Blog

Category Filtering: 'ColdFusion'

Remove Filter


Railo Visiting the IECFUG in Cal Poly Pomona!

Posted by Luis Majano
Jul 28, 2008 00:00:00 UTC
If you are in the OC area or the Inland Empire, we would like to invite you to our CFUG this coming Friday, August 1st 2008 at 7PM. We will be hosting Gert Franz on an incredible Railo Presentation. You can find more information about our CFUG and our location by visiting our website. We meet at Cal Poly Pomona University in Room 98C 4-27 (campus map)

Railo (www.railo-technologies.com) is a CFML engine that runs on a wide variety of Java servlet engines, and provides a cost-effective, high performance alternative to using Adobe's ColdFusion engine. As you may have heard, at the Scotch on the Rocks ColdFusion conference in Scotland in June, Railo announced that they are partnering with JBoss to convert their software to a completely free, open-source offering.

Gert Franz, CEO of Railo and member of the recently founded CFML advisory committee, will be visiting to present an overview of Railo, and what the advantages of using Railo are for CFML developers. He’ll also be talking about the upcoming open-source conversion of Railo, and what that means for the community and the developers. Of course, Gert will have some free versions of the Railo software to hand out, and some other goodies as well.

onSessionEnd does not respect per-app mappings?

Posted by Luis Majano
Jul 25, 2008 00:00:00 UTC
I have been breaking my head on this one and I can reproduce something. Maybe I am missing something, but I do not believe my per-application mappins in cf8 are working in combination with onSessionEnd(). I created a very simple test and wallah, failure.

Application.cfc - I setup my timeout to 2 seconds, so I can see the onSession end errors come up quicker.

Then I have an index file with the following:

This is mappings Test.

I execute the page, the page executes the component and dumps it correctly. After two seconds I fire up the cf admin and this is what the logs say:

OnSessionEnd : coldfusion.runtime.CfJspPage$NoSuchTemplateException: Could not find the ColdFusion Component or Interface coldbox.system.beans.requestContext.

Now, if I am totally wrong on this one, please comment. However, I do believe the correct behavior would be that onSessionEnd() would respect my per-application mappings. Do you agree?

To solve this, I have to actually create a CF Mapping in the administrator and then it works. But it gets weirder!! Let's say my application is not in the root but here:

http://localhost/testing/appmappingTest/index.cfm

I placed a cfc under /testing/cfc/requestContext.cfc. I then modified the code to use this create statement:

And again, it breaks, so it can do absolute references to cfc's either. I moved it to inside the test application and then it works. So there you go, I am totally confused in this behavior. Any comments??

New ColdBox Addons - Transfer Config Factory and Transfer Decorator Injector Observer

Posted by Luis Majano
Jul 24, 2008 00:00:00 UTC

I am releasing today a set of addons for ColdBox-Transfer interactivity:

  1. TransferConfigFactory.cfc : A factory cfc that produces transfer configuration objects based on ColdBox Datasource configurations. This is thanks to Tom de Manincor
  2. TDOBeanInjectorObserver.cfc : A transfer observer based on Brian Kotek's amazing TDOBeanInjectorObserver in his Coldspring Utilities project, used to create rich decorators by injecting them with dependencies from Coldspring and Lightwire. However, we had to take it a step further, so it can even inject dependencies from the ColdBox Cache.

You can download these tools from here. All you need to do to install them is drop them in the /coldbox/system/extras folder. This will create a transfer folder that holds these cfc's inside of the extras folder. That's it. Then you need to configure them via a coldspring.xml or a lightwire configuration object or manually (ohh brave one). The tools have also been added to the SVN and I will be adding a link to them from the extra downloads section of the website.

Transfer Config Factory

This object is used to create a transfer configuration object based on the datasource information found in the ColdBox configuration file. This idea is thanks to Tom de Manincor and his musings in ColdBox-ColdSpring-Transfer. This let's you maintain all of your application's configuration in one single location and not create a datasource.xml. It is meant to be used alongside coldspring but it can be used as a separate object too (You will have to do the wiring). Anyways, here is a sample coldspring declaration for this usage:

${Setting: TransferDSNAlias not found}

${Setting: TransferConfigPath not found}

${Setting: TransferDefinitionsPath not found}

As you can see, we first define the coldbox factory element and construct a datasource bean element with it. We then setup the transferConfigFactory.cfc as a coldspring factory bean. The last step is configuring the transfer factory. We send in a configuration bean and set it up as a call to our transfer config factory with the same parameters we are used to, except that for datasource we use the dsnBean element and have it referenced to the datasource that we want to use, in our case MyDSN, that we defined at the beginning. If you need a refresher on how the ColdBox Factory for IoC works, please read the following IoC Integration Guide. That's it. Simple as that, now you can define all your configurations via the coldbox configuration file and let coldspring do the heavy lifting.

TDOBeanInjectorObserver

This handy tools is based on Brian Kotek's original observer. I want to say thank you to Brian for his contributions and incredible code. Thanks Brian.

However, we have modified it to use ColdBox beanFactory plugin to do the autowiring for us. For those familiar with the ColdBox autowiring conventions, you can do autowiring via annotations using the cfproperty tag or via setter injection. Not only that, but you can use ColdSpring or Lightwire seamlessly, and to top it off, you can autowire objects from the ColdBox cache. Here is a sample of some cool autowire annotations:

As you can see from the code we have two dependencies marked by their types: ioc and ocm. The type of ioc means that this dependency must be injected from the ioc plugin (coldspring/lighwire) and the type of ocm means that the dependency must be injected from the ColdBox Cache. The scope attribute is also useful as you can define in which scope or pathed scope you would like this dependency injected. The default value is variables.

The theory behind this tool is to be able to very easily create rich decorators that can be injected with dependencies from the IoC container or the ColdBox Cache. It is a great way to have your objects be composed of other objects and utilities. So let's see the coldspring.xml, but first, please note that the instructions below are for ColdSpring 1.2 that enables the usage of the lazy-init property. For Coldpsring 1.0, you will have to do some more manual work. (More instructions found in the cfc's themselves).

beanFactory

true or false

onDIComplete

true or false

We first define the ColdBox Factory, then the beanFactory plugin we will use. We then define our Observer with some cool parameters:

  • Transfer : The transfer bean reference
  • ColdBoxBeanFactory : The beanFactory plugin we just defined
  • useSetterInjection : A boolean variable that enables or disabled setter injection in preference of annotations via cfproperty. If enabled, it will do cfproperty annotations first and then look for setters.
  • onDICompleteUDF : The name of the UDF to call in your decorators once they have been injected with their dependencies. The default value used is onDIComplete. This means that you create a method in your decorators called onDIComplete or whatever you like and when the bean factory injects the dependencies, it will call this method afterwards. You can use this to do configuration or object setup.
  • debugMode : This boolean variable is part of the bean factory plugin. If set to true, it will log to the logging facilities all the interactions when trying to autowire the objects.

That's it folks. Once application starts up, coldspring will create and register this observer for you. So when transfer objects are created and have autowire dependencies, they will be wired up.

10 Concepts that every software engineer should know about!

Posted by Luis Majano
Jul 24, 2008 00:00:00 UTC
I just found this incredible article via digg and had lots of fun reading it. I really recommend for you to read it and get some good concepts in your toolbelt.

The top 10 concepts are:

  1. Interfaces
  2. Conventions and Templates
  3. Layering
  4. Algorithmic Complexity
  5. Hashing
  6. Caching
  7. Concurrency
  8. Cloud Computing
  9. Security
  10. Relational Databases

Simple CSS Based Graphing ColdBox Plugin

Posted by Luis Majano
Jul 23, 2008 00:00:00 UTC
Russ Johnson, of team coldbox, has just released his new graphing plugin based on CSS. The plugins looks awesome and so simple to use. Thanks Russ!! You can download the plugin here.

ColdBox at the Boston CFUG

Posted by Luis Majano
Jul 17, 2008 00:00:00 UTC
I had the privilege of presenting at the Boston CFUG last night on the glories of ColdBox. I was cordially invited by mi friend Brian Rinaldi, so first of all, thank you very much Brian for inviting me to speak. It was a very cool presentation showcasing all of the 2.6.0 features, the methodologies behind it and some very cool examples. I showcased a flex app talking to a coldbox application and using the coldbox debugger, being able to monitor and see the data coming in and out of both technologies. Granted my charting blew up (TEST TEST TEST), but overall, it was a great presentation. The presentation recording has been added to the presentations and media section of the wiki or you can launch it here.

MXUnit 1.0 now online!

Posted by Luis Majano
Jul 11, 2008 00:00:00 UTC
I am a big fan of MXUnit and a constant user. I had the honor of meeting both Marc Esher and Bill Shelton at CFunited and they are A-class guys. MXUnit is solid and has changed the way I develop coldfusion applications. So to me, this is an exciting release.

Kudos MXUNIT GUYS!!

CFunited 2008 Presentation Posted

Posted by Luis Majano
Jun 08, 2008 00:00:00 UTC
I am super excited to be going to my first CFUnited Conference in the next few weeks. I will be doing my first presentations on ColdBox and I just posted such presentations in the official ColdBox Wiki. So please check them out as they are different than any of the presentations and it includes most of the 2.6 features.

Railo goes Open Source!!

Posted by Luis Majano
Jun 05, 2008 00:00:00 UTC
WOW!! I got the news today and I am extremely happy for Railo Technologies. They will release a CFML version at JBoss.org, which is the leading j2ee engine. I am super excited about this news, because I love the Railo cfml engine. It is snappy, responsive and extremely compatible. What I love the most is:

As part of the work with Railo, the JBoss.org community will be working on

several enhancements to provide CFML developers tag-based access to

JBoss core functionalities, including JBoss Cache and Messaging.

Finally, some CFML JBoss Cache!!! Again, these are great news and congrats to the Railo crew on trying to expand CFML to the massess.

Railo 3.0 New Features

Posted by Luis Majano
Jun 05, 2008 00:00:00 UTC
I was just going over the Railo 3.0 new features and the following just smacked me in my forehead!!

New features

Amazon S3 resource

Cluster Scope

instance synchronization

Spooler with frontend in the admin for mail, thread-tasks, instance synchronization

Definition of constants in the Railo XML

Cluster scope and synchronization!! WOW!! These are features that anybody running on a cluster would appreciate. I am excited to try this out.

Site Updates

Archives

Entries Search