Entries for month: August 2007

ColdFusion 8 flies!

Default , ColdFusion 1 Comment »

When Adobe released CF8, they touted the increased performance.  I've been using CF since 4.0, and I think this has been a claim for every release.  I assumed it was just a marketing ploy, as I haven't noticed a huge difference in past upgrades.  However, I am AMAZED at how much faster CF8 is than CF7. 

We have a very programming-intensive portal that is heavily used by pretty much everyone at the college I work for.  Its the access gateway to almost every Web system we have.  Prior to CF8, the average page processing time for the portal was about 700ms.   After CF8, it is down around 200ms.  While a half-second might not seem like much, the impact is enormous.  As a result, the rest of our site runs much faster.  If you multiply that half-second by the thousands of logins we get in a day, you can see how much processing time is saved.

Our whole site is noticeably faster, even at peak traffic times.  This boost alone makes the upgrade worth it.

Read more...

Quick and easy column alignment for CFGRID

ColdFusion , Web Development , Ajax 17 Comments »

When using the CFGRID tag (type="html"), there is no built-in way to align the data in the columns.  The dataalign attribute of the CFGRIDCOLUMN tag is not available for the HTML grid type.  There is a simple CSS trick to align the columns.

Each column in the grid has its own css class, and there is also a class that applies to all columns.  The x-grid-col class allows you to apply formatting to all of the columns at once, for example: .x-grid-column {text-align:right;}.  The rest of the columns have numbers associated with them, starting with 0 as the first column.  So, the code below aligns all of the grid columns to the right, then sets only the first and second columns to align left.

 <style type="text/css">
    .x-grid-col {text-align:right;}
    .x-grid-col-0 {text-align:left;}
    .x-grid-col-1 {text-align:left;}
</style>

 You can also update just the column headers using a similar method.  The  headeralign attribute of cfgridcolumn also doesn't work for HTML grids.

 <style type="text/css">
    .x-grid-hd {text-align:center;}      
    .x-grid-hd-0-0 {text-align:left;}     
    .x-grid-hd-0-1 {text-align:left;}
</style>

Read more...

Where am I?

ColdFusion , Web Servers , IIS 1 Comment »

If you run load-balanced ColdFusion servers, it can often to difficult to determine which server a notification or error message originated from.  There's a nice little Java trick to get around this. 

---
#Createobject('java','java.net.InetAddress').getLocalHost().getHostName()#
--- 

We add this line to error notifications on our site so that we always know which physical machine the message came from.   This makes it a little easier to diagnose a problem, determine if it is limited to one server, and know which log files to look at. 

This is also great if your site is responding a bit slow and you want to know which server in the setup you are hitting from your machine.  We set up a small script called whereami.cfm that simply displays the machine name.

Read more...

Be cool or be productive? ECLIPSE

Default , ColdFusion , Web Development 8 Comments »

When reading blogs and attending conferences, I notice that a huge portion of ColdFusion developers have switched to using Eclipse (cfeclipse) as their primary IDE.  I can see the appeal of it being free, but what bothers me about this movement is that developers who have stuck with Dreamweaver or Homesite+ seem to be ridiculed.  "Why would you be using Dreamwever?"  That comment by a presenter drew quite a few laughs at this year's CFUNITED conference.

Why?  Well, from what I gather, it is mainly because it is just the "in" thing to be using Eclipse.

Read more... 

Read more...

Powered by Mango Blog. Design and Icons by N.Design Studio
RSS Feeds