The Future of ColdFusion Part 3

Word Count: 1044
There are two major features I have yet to talk about and I have saved the best for last. First we are going to talk about the new AIR Integration. The more and more Flex/AIR code I start writing I see places where tighter integration would definitely help adoption rates. ColdFusion is the perfect back end for AIR applications and AIR is an ideal client for ColdFusion. Ben pointed out the with LCDS data sync is currently available but its a very manual process right now and he said that it was there job to streamline the process. Adam showed off some demo code that he said they were just playing around but looked amazing to say the least. The idea behind the code is that your AIR application could be online, make a connection to the server and write data to that datasource but if the application went offline it could write to a local database (SQLLite). Right away the wheels in my head started turning and I thought wow this would be great for blog software (BlogCFC) in an application where you could write a bunch of articles on a plane ride and sync (post) them when you get off. This is the code, please remember this is just protype and not the actual implementation.

The final feature I want to talk about and probably one of the biggest is native ORM via Hibernate. If you have never heard of ORM it stand for Object Relational Mapping. If you want to learn more there are 2 projects for ColdFusion in the ORM market Transfer & Reactor. While its possible to use hibernate today its a very manual process and like everything else in ColdFusion they want to make it as easy as possible to use. So what is hybernate, this a quick intro straight from the site.

Hibernate is a powerful, high performance object/relational persistence and query service. Hibernate lets you develop persistent classes following object-oriented idiom - including association, inheritance, polymorphism, composition, and collections. Hibernate allows you to express queries in its own portable SQL extension (HQL), as well as in native SQL, or with an object-oriented Criteria and Example API.   

Databases are the core of all ColdFusion applications and integrated ORM in Centaur will dramatically simplify data integration. The basic idea is that by using hibernate all you would have to do is tell a cfc the datasource and turn orm on it will create all of the sql needed for you. This means for basic crud applications you will no longer have to go in and write/generate 4 methods for every table in your database. Here is a quick example of the code Adam showed. This is the least amount of code you need to persist a cfc to the database.

Here is an example of using the built in ORM. You will notice that we have all the implicit getters/setters and you would be able to call the save method that you never wrote!

A pretty cool feature that Adam showed is the configuration file for hibernate. They use pretty much the same configuration file as hibernate. If you were to go ahead and dump the object straight to screen you would see all of the getters/setters along with all of the component methods. With everything else they are adding your code will still work the same and this is only an option. If your not a fan of ORM than don't bother using it.

I have to admit that I have never used hibernate so I may try and download it and hook it into ColdFusion so I can how it works. I have used both Reactor & Transfer before and they are both great products so if you have not used an ORM yet I would check it out. Ben also stated that if you have ideas on how this should work / implementation / features then you should blog about it or even email them about it. These are 2 really great features and I am looking forward to seeing what the community thinks about  it. I also learned from the keynote that ColdFusion 9 will ship in 2009 so we are not that far away. I am also curious about something else Adam mentioned, he said that it is a small peice of a much bigger puzzle. Any ideas on what he is talking about?

Comments

#1 Posted By: GRACE22 Posted On: 1/19/10 2:20 PM
Usually students do know the way to compose the <a href="http://www.essaysprofessors.com/papers-for-sale.ht... for sale</a>. But if you are not experienced essay writer, you would have to seek the distinguished <a href="http://www.essaysprofessors.com/buy-paper.html&quo... paper</a> service to purchase your custom essay writing with the purpose not to spoil your reputation.


Post Your Comment

Leave this field empty







Show Captcha

If you subscribe, any new posts to this thread will be sent to your email address.

Copyright © 2007 Dan Vega | BlogCFC was created by Raymond Camden. This blog is running version 5.8.001.