A few weeks ago, Raymond Camden posted an article on his blog: This is ColdFusion – this is ColdFusion 100% in Script – on Bolt. In it he attached a screenshot of Adobe’s planned ColdFusion IDE (Bolt) that has a code snippet from ColdFusion 9 which was a CFC being written in 100% cfscript. In [...]
A few weeks ago, Raymond Camden posted an article on his blog: This is ColdFusion – this is ColdFusion 100% in Script – on Bolt. In it he attached a screenshot of Adobe’s planned ColdFusion IDE (Bolt) that has a code snippet from ColdFusion 9 which was a CFC being written in 100% cfscript.
In case you don’t want to follow the link here is the code that is shown:
component { public function void init(){} public query function getData(){ var q = new query(); q.setDatasource("cfartgallery"); q.setSQL("SELECT * FROM art where mediaid = :mediaid"); q.addParam('mediaId',value=arguments.mediaid,CFSQLType=CF_SQL_INTEGER); return q.execute(); } }
There are alot of comments on that blog post with people complaining that they don’t want to write their components in pure script. Personally, I think it would be great, coming from a PHP background this just seems to make more sense to me. However consider our current situation with ColdFusion 8.
Currently, I like to use with ColdFusion 8, the below is a snippet from one of my projects that I am currently working on.
q = variables.transferObj.createQuery("from podcast where podcast.releaseDate <= :relDate order by podcast.releaseDate DESC"); q.setParam("relDate", now(), "date"); return variables.transferObj.listByQuery(q);
This code looks very similar to what’s being proposed with ColdFusion 9, most of the above is CFSCRIPT that uses functions from Transfer, and it works very well for me.
I suppose my point in all of this is stop complaining about how you would prefer to write your components, right now you have a choice as to how you want to write your functions at least (CFSCRIPT or tag based) I can only imagine that you’re still going to have all, if not most, of that flexibility with the release of ColdFusion 9.
3 Responses
I blogged a bit about this recently,
Ideas for CFML improvements, less tag bloat!
specifically the ability to avoid the verbose cfscript tags by setting that on the CFFUCTION tags
It should also be noted that although this is a new way to do things, it is not the only way to do it either.
Hence the old tag based syntax will still work as well.
Some people tend to jump on things before they fully understand, hopefully when CF9 is released they may even be the first ones to even switch over to the other way to do the same job.
Who knows….
Most of the business directory offer search engine friendly listing. When a Web site of businesses is added in a directory, it gets a link. The link starting from a business directory is with one way and much suitable.