the singularity of being and nothingness
Web 2.0 Goodness – Adobe's Spry Framework
Ok, so as everyone who reads this blog knows (or should know…), I am a web designer/web developer. On the development side, I am best at ColdFusion , one of the under-appreciated programming langugages out there. While ColdFusion is awesome, one of the drawbacks of it (as well as of PHP, .NET, etc.) is that it is a server-side technology, meaning (surprise, surprise) that all of the code processing done is accomplished on the server. So, any of the cool Web 2.0 stuff out there, like asynchronous form submission, has to use Javascript.
While ColdFusion 8 has some seriously cool AJAX features built into it that handle alot of this kind of thing with ease, it is not free and wonderful hosting companies (like GoDaddy) are slow to upgrade their servers to the newest version. Therefore, the onus is upon the developer to utilize the various work-arounds until ColdFusion 8 is firmly entrenched.
One tool that makes life significantly easier is Adobe's Spry Framework . While Spry includes a lot of the cool effects of other Javascript frameworks, one of the best parts of it is the easy way in which it allows Spry to make server-side calls to allow applications to harness normally off-limits server-side functionality asychronously. For example, consider that I wish to display a list of businesses by city. I want to be able to display the businesses by city, as well as all without a filter on the city. To accomplish this without Javascript and ColdFusion alone, the standard practice would be to give each city link an ID that would be passed to the URL string. Then, when the page reloads, the variable passed to the URL string would tell the database to only show the records that are relevant to that variable.
While this works, it is not very sexy. It requires page reload after page reload just to see different information. Blah. Enter Spry. With Spry, the functionality works exactly the same. A variable is passed through a URL that tells the database to only return certain records. However, what is different is that Spry does not need page reloads. Rather, being the sexy little thing that it is, Spry is able to pass the variable to ColdFusion, get ColdFusion to process the variable on the server, return the variable to Spry, and then output it for the user to see—all without a single page reload.
While this is a great solution for the end user, it does require a bit more effort on the development side. With ColdFusion, I could normally do the database call, data processing, and data ouput in about 20 lines of code. Using Spry, however, has significantly increased that number, for besides having to outline–in Javascript–the various xhtml elements that I wish to populate with data, I also have convert my database queries to an XML format that Spry will be content to use.
Nonetheless, I think the number of lines of code is justifiable, and as I do this more, the coding time will be signficantly reduced. Plus, I think the end result is pretty dang cool.
Interested? You can see a very unsexy example here .
Print article | This entry was posted by existdissolve on September 12, 2007 at 11:19 am, and is filed under Spry Framework. Follow any responses to this post through RSS 2.0. You can leave a response or trackback from your own site. |