Entries Tagged as "coldfusion"
Model Glue Caching - patch update
Posted by Andrea Campolonghi in cfml , coldfusion , ModelGlue , railo on January 8, 2010
Two days ago I have posted some code that solve ( in part ) an annoying bug regarding caching in Model Glue framework.
As per MG docs the caching declaration can be used on any event-handler and include tag but, in practice. caching is only working if applied to the initial event-handler ( the first invoked by the url ).
Since we want to use MG on our project, and we absolutely need a granular caching system, we are implementing what we think can be a good solution and we would like to share for feedback and testings ( of course the MG team is the first in receiving our code for review and possible inclusion in future releases ).
We have made a new review to the first patch and now MG can support the following instructions:
<event-handler name="page.index"> <broadcasts /> <results> <result do="views.one"/> <result do="views.two"/> <result do="template.main" /> </results> <views> <include name="three" template="pages/three.cfm" cache="true" /> <include name="four" template="pages/four.cfm"/> </views> </event-handler>
<event-handler name="views.one" cache="true"> <broadcasts /> ....... <views> <include name="one" template="pages/one.cfm" /> </views> </event-handler>
<event-handler name="views.two"> <broadcasts /> ...... <views> <include name="two" template="pages/two.cfm" /> </views> </event-handler>
As you can see from this code MG can cache a single views but , and this is the best feature I guess , is also able to cache a full event.handler even if that is not the initial event handler.
This solution can really speed up yout MG app reducing dramatically the effort you ask to your server to what your page exactly needs. Any time you are able to cache an "inner request" event MG will just include a bunch of html skipping any broadcasting and this can really save a lot of unnecessary server stress.
Over that imagine you can easily cache a full page excluding just the single lines that ( for example ) are reserved to logged user info/panel ( and of course skipping any unnecessary message broadcasting ).
You can find the patch here ( replace file /ModelGlue/gesture/eventrequest/EventContext.cfc)
Let me have your feedbacks and suggestions.
REMEMBER : THIS IS CODE SHARED FOR TESTING AND NOT FOR PRODUCTION USE.
Replace CfDocument with Flying Saucer Xhtml renderer
Posted by Andrea Campolonghi in cfml , coldfusion , railo on December 23, 2009
As per my previous post about Xhtml Railo capabilities I will post my firsts experiences using Flying Saucer as enhancements of cfdocument tag.
Now, cfdocument is not bad but the rendering capabilities are quite limitated and when I discovered that cfdocument, up to cf9, do not support justified text alignment I decided to give a try with Flying Saucer.
The library works taking your xhtml and rendering that into a pdf processing your css.
My first cfwheels plugin - ioc interface
Posted by Andrea Campolonghi in cfwheels , coldbox , coldfusion , fw1 , railo on December 7, 2009
I decided to play around with cfwheels cause I was amazed by some examples I saw around and I have to admit is good fun.
After 1 hr testing I realized that no ioc support is build into cfwheels and ..... I really cannot live with no Ioc container available at any time so I decided to add a plugin for managing a beanFactory into cfwheels.
Probably is not the best cfwheel plugin ever written but was very easy and painless. While I tend to be very OO guy I am amazed by conventions in last period ( I am also playing with Sean Corfield FW1 ). While I am also an happy user of Coldbox and ModelGlue I find that sometimes frameworks added complexity also to easy tasks. From here my desire to look into frameworks that make of conventions their core basement.
In my mind conventions means less code in default situations and about this cfwheels and fw1 at the moment are the best. Btw I also think that for a more complex task Coldbox really has something more to help development of more advanced applications.
You can find the plugin here to play with it and have a look to cfwheels.
ColdBox Book Released
Posted by Andrea Campolonghi in books , cfml , coldbox , coldfusion , railo on December 3, 2009
I am a big coldbox fan and I am very glad to post about the release of the ColdBox Book. I am ordering a copy for me and, if you are serious about coldbox, I strongly recomend it.
Coldbox has always been very well documented and the book will surely be an interesting way to go deeply into coldbox framework.
Thanks to Luis for the hard job.
ColdFusion 9 is out
Posted by Andrea Campolonghi in coldfusion on October 5, 2009
I was expecting the release for Max but this morning I found the new CF9 available for download from Adobe Web Site.
Many intersting news respect to cf8 are availble :
- Orm Support
- Cfspreadsheet
- Caching
- Exposing of services like mailing, pdf manipulation etc….
- Many more….
A lot of job will start now to test, on official release finally, all the new possibilities that cf9 ships.
Good job!