What do you get when you combine the easiest Web language ever with the most powerful hosting platform ever?
WatchPaul Kukiel’s short tutorial on setting it up.
Posted by David Chandler on December 10, 2009
What do you get when you combine the easiest Web language ever with the most powerful hosting platform ever?
WatchPaul Kukiel’s short tutorial on setting it up.
Posted in AppEngine, ColdFusion | Leave a Comment »
Posted by David Chandler on November 28, 2005
I’ve updated the Web state machine example from my earlier CFDJ article. You can find the updated code here:
It now implements the POST-REDIRECT-GET (PRG) pattern and uses a page token to allow the back button to work better. I also updated the following files:
Refresh now works perfectly courtesy of PRG. The back button is trickier because when you click it, the browser actually loads its cached copy of the page, but what’s on the previous page no longer represents what’s stored in the user’s Session scope. So when you then click something on the page, you’re going forward again and will get to the right view state, but may see data from the future on your page. For example, in the sample app I’ve written, if you select two products, then use the back button, you will see a screen showing one product. But when you select another product, the page you get will show all THREE items you’ve now selected as far as the Session is concerned.
If you want to get really fancy, you can write code that keeps track of all the variables created in each state and “roll back” to your previous state by deleting any variables created forward from that point. Another possible solution is to use CFHTTPHEADER to set the no-cached directives. Then, when you click Back, the browser will be forced to make a trip to the server and the previous view will be shown with now current data.
If you get an error condition, you can display a hyperlink like “Resume what you were doing” with a link to flowctl.cfm. That will at least get the user back to the state that’s current on the server.
Good luck!
/dmc
Posted in ColdFusion | Leave a Comment »
Posted by David Chandler on May 12, 2005
In CF5, if you attempt to deserialize a WDDX packet containing a recordset (query) with a duplicate column name, it will stop the ColdFusion service! You will get a message in server.log: “Unknown error threshold reached. Restarting service.” In fact, the service is not completely restarted and responds to all subsequent requests with the same error message, causing the user to see “Server busy or unable to fulfill request.”
This is a huge bug in CFWDDX. If you’re using it to store queries in the Client scope, look out!
/dmc
Posted in ColdFusion | Leave a Comment »
Posted by David Chandler on November 23, 2004
Here is the complete example code that goes with my Web State Machine article in the October CFDJ.
Just unzip the files into your web root and set up a “Northwind” data source pointing to the Northwind sample database that comes with SQL Server. To run it, use http://localhost/WebStateMachine/flowctl.cfm?event=startFlow.
I’ve made a few improvements: notably, replacing the submit buttons with <input type=”button”> and using on onclick handler to call a JavaScript function that sends an event to the flow controller. This is less restrictive than using a named submit button, in which the event name is also the button text.
/dmc
Posted in ColdFusion | Leave a Comment »