Blog

Luis Majano

February 21, 2011

Spread the word


Share your thoughts

After almost a full year of development I am happy to announce our FINAL release candidate, ColdBox 3.0.0 RC2, before final release. The circle is complete now and our most ambitious release is finalized. To recap the history of this 3.0.0 release, it all started about 1 year ago in our team ColdBox sessions trying to discover how to take the platform to another level and take ColdFusion with it. We had ideas from our own ORM to pure java hibernate integration, to even GORM integration, which Sana Ullah actually completed at one point. Alas, our brainstorming was saved by the introduction of hibernate to ColdFusion 9 and Railo and we concentrated ourselves in what was missing for ColdFusion developers:

  • Simplicity
  • Productivity
  • Better tools
  • Better documentation
  • Easy dependency injection
  • that is fully documented and actively developed with ColdFusion in mind
  • Easy hibernate ORM integrations
  • Better testing and mocking capabilities
  • Better logging and monitoring
  • Performance
  • Lower the entrance barrier to non-framework users
  • Enterprise caching, cluster caching and ehCache integration

I am glad to say we decoupled the entire codebase into 5 distinct areas which have now become their own standalone libraries:

  • WireBox: Enterprise Dependency Injection and AOP framework
  • Logbox: Enterprise Logging library
  • MockBox: Mocking & Stubbing Framework
  • CacheBox: Enterprise Cache Engine and Cache Aggregator
  • ColdBox MVC

Thanks to the complete decoupling of the libraries and internal core, our performance sky rocketed. Every single piece of the core has been tested and optimized in the period of this year of development. Unfortunately, we still will support ColdFusion 7 and this still holds us back on some performance, library size and optimizations. Our next release 3.1, which yes we are already planning and working on, will drop CF7 and about a 1/3 of the codebase with it so we can concentrate on moving the Platform full steam ahead. As a sneep peek of the future, we are even working on a lower entry barrier MVC component that we will call ColdBox Lite, for those who just love their MVC conventions and lightweight frameworks. It will be 100% compatible with all the other parts of the Platform and even provide an upgrade path to the ColdBox enterprise MVC component once you need more power, scalability and extensibility. We are also working on several products around the product stack that will be released and announced soon, all I can say is the following: Dynamic Hibernate and Cluster Awareness.

This release brings the latest stability possible for the platform as all tickets are closed for the 3.0.0 release and our dependency injection capabilities are now online with WireBox (Entry to follow). Before upgrading we always recommend looking at our compatibility guide and also our what's new guide that includes everything new in the 3.0.0 Platform. You can also visit the milestone page to see what was done in RC2.

So let's get an overview of the major aspects of this release and where you can get it:

Sample Applications

Thanks to Curt Gratz and the Computer Know How crew, all sample applications have been update to 3.0.0 standards and several new sample apps have been added to the mix. We have now over 25 full blow sample applications in our bundle release where you can learn from and even use for your apps. So Kudos to Curt and Crew for all the great support and help.

Stability & Performance

Thanks to the thousands of users around the world who have contributed their time to testing, load testing and performance tuning this core is the fastest release we have seen and the most stable. We have also done extensive optimizations to the core where we have seen tremendous performance increases for requests.

WireBox

WireBox is our new addition to the family. It is our enterprise dependency injection and AOP framework for ColdFusion 8 and above. This project has been part of ColdBox since its early version 2.0 releases but now it has been released as a standalone framework that can be used in any ColdFusion application. WireBox's inspiration has been based on the idea of rapid workflows when building object oriented ColdFusion applications, programmatic configurations and simplicity. With that motivation we introduced dependency injection by annotations and conventions, which has been the core foundation of WireBox. We have definitely been influenced by great DI projects like Google Guice, Grails Framework, Spring and ColdSpring so we thank them for their contributions and inspiration.

WireBox alleviates the need for custom object factories or manual object creation in your ColdFusion applications. It provides a standardized approach to object construction and assembling that will make your code easier to adapt to changes, easier to test, mock and extend. As software developers we are always challanged with maintenance and one ever occurring annoyance, change.

Therefeore, the more sustainable and maintainable our software, the more we can concentrate on real problems and make our lives more productive. WireBox leverages an array of object, function, and property metadata annotations to make your object assembling, storage and creation easy as pie! We have leveraged the power of event driven architecture via object listeners or interceptors so you can extend not only WireBox but the way objects are analyzed, created, wired and much more. To the extent that our AOP capabilities are all driven by our AOP listener which decouples itself from WireBox code and makes it extremely flexible. We have also seen the value of a central location for object descriptions and behavior so we created our very own WireBox Programmatic Mapping DSL (Domain Specific Language) that you can use to define object construction and relationships in pure ColdFusion (No XML!). WireBox has been running and powering mission critical ColdFusion applications since 2009 and now you can too. We truly hope you enjoy WireBox!

For the 3.0.0 release your ColdBox applications can be used in two modes: 1) WireBox 2) CF7 compatible wirebox. The latter will be removed by 3.1 so we encourage you to read our compatibility guide to migrate your applications to use the new WireBox standards. We have also added a WireBox adapater to the IOC integration pieces. This means that if you have already built an application using lightwire, coldbox enhanced lightwire or coldspring, you can easily migrate them to use WireBox instead by doing the following:

ioc = { framework = "wirebox", definitionFile = "config/WireBox" };

Please note that the latter support is only for quick migrations to WireBox without modifying your "ioc" injections. For full support, please use the integrated settings and not the ioc settings.

Around Advice AOP for Handlers

We have introduced two new conventions when creating event handler functions: aroundHandler() and around{Action}() which introdue localized around aspect advices for event handlers. You can now take complete control of one or all methods in a handler without actually modifying them. This is great for cross-cutting concerns like logging, threading, transactions, RESTful services and much more.

function aroundHandler(event, targetAction, eventArguments){ // start transaction transaction{ // execute the targeted action results = arguments.targetAction( arguments.event ); } // check for results and send back if found if( NOT isNull(results) ){ return results; } } Another example: function aroundHandler(event, targetAction, eventArguments){ try{ // execute the targeted action results = arguments.targetAction( arguments.event ); } catch(Any e){ //log it log.error("Error executing #getMetadata(targetAction).name#: #e.detail#, #e.message#"); // place exception on request collection for display rc.exception = e; // Take them to an error page screen for nice display. event.setView("exceptions/generic"); } // check for results and send back if found if( NOT isNull(results) ){ return results; } }

New Interception Points

You can now intercept at onInvalidEvent to take control when invalid events occurr in your application the interceptor way.

ColdBox Programmatic Configuration Enhancements

  • The ColdBox.cfc programmatic CFC is now also an interceptor. WOW! You can now use the configuration object to add ANY interception you like. Once the application starts up, ColdBox will register the CFC as an interceptor for you. You can put any of your bootloading procedures here now in one centralized location.
  • A reference to the programmatic CFC is now stored in your application settings for retrieval and usage as 'coldboxConfig': getSetting('coldboxConfig')

Request Context Enhancements

  • New method: getHTTPContent() to retrieve the http body contents, useful on RESTful services. Also great for mocking capabilities.

ORM Services Revisions

  • We have revised all ORM services to allow for further usage of query caching.
  • Enabled DLM style batch updates to several new functions
  • Allow for strict java-cf type conversions when removing or using internal hibernate "id" keywords on HQL
  • save() now has a transactional attribute to allow for non-transaction saves
  • New saveAll(entities) method that can take in an array of entities to save in chronological and transaction order
  • New TransactionAspect interceptor to allow for AOP annotations on model objects, handlers, etc. You can now make any method use native hibernate transactions without worrying about nesting anything by just adding an annotation to any cffunction. The annotation is "transactional=true" and your handler action, or your service method magically becomes transactioned.

function saveUser() transactional=true{ }

Modules Enhancements

  • The ColdBox modules have been enhanced to leverage WireBox and its new features. You can now declare a new module configuration structure "wirebox" which is the wirebox DSL or you can use the injected "binder" in the variables scope to leverage the WireBox Mapping DSL.
  • The SES interceptor has been enhanced to allow for modules to be accessed much like packages in SES routes. Before if you wanted to hit by convention a module called "MyModule" with a handler called "Home" and an action "sayHello", you would do this:

http://myapp.com/index.cfm/MyModule:Home/sayHello

Which is ok, but not great. So we added module discovery to our package resolver.

http://myapp.com/index.cfm/MyModule/Home/sayHello

So now you can use the default route in your application to do ANY kind of URL to any module, package, nested package etc via nice Pretty URLs.

SES Enhancements

  • Invalid HTTP method exceptions standardized to 403 status codes
  • New method setThrowOnInvalidExtension() to tell the interceptor to throw a invalid extension exception or not
  • Module discovery added to package resolver when using the default :/handler/:action? route
  • New convention for your routes.cfm file: pathInfoProvider(). Thanks to Aaron Greenlee for this gem that allows the developer to override the retrieval of the cgi.path_info the interceptor automatically provides the interceptor. By just creating a method called "pathInfoProvider(event)" the SES interceptor will call your provider for the cgi.path_info instead of the normal avenue. Check out the what's new for examples.
  • The addRoute() method has a new argument: ssl=[boolean=false] to allow you to tell the interceptor that certain routes can only be accessed via SSL. If the incoming request to that route is not in SSL mode, the interceptor will redirect the user (302) to the same requested route but in SSL mode.

If you would like to see all the tickets then go here: https://coldbox.assembla.com/spaces/coldbox/milestones/312453-3-0-0-rc2

Add Your Comment

Recent Entries

Hackers demand a ransom to restore data from my ColdFusion web applications!

Hackers demand a ransom to restore data from my ColdFusion web applications!

Hackers demand a ransom to restore data from my ColdFusion web applications!

Unfortunately, we often hear this message from clients who thought it would never happen to them... until it did. Some believed they could delay the expense of Implementing ColdFusion security best practices for one year, while others were tempted to put it off for just a few months. However, in today's rapidly evolving digital landscape, the security of web applications, including ColdFusio...

Cristobal Escobar
Cristobal Escobar
April 16, 2024
Ortus March Newsletter

Ortus March Newsletter

Welcome to Ortus Solutions’ monthly roundup, where we're thrilled to showcase cutting-edge advancements, product updates, and exciting events! Join us as we delve into the latest innovations shaping the future of technology.

Maria Jose Herrera
Maria Jose Herrera
April 01, 2024
Into the Box 2024 Last Early Bird Days!

Into the Box 2024 Last Early Bird Days!

Time is ticking, with less than 60 days remaining until the excitement of Into the Box 2024 unfolds! Don't let this golden opportunity slip away; our exclusive Early Bird Pricing is here for a limited time only, available until March 31st. Why wait? Secure your seat now and take advantage of this steal!

Maria Jose Herrera
Maria Jose Herrera
March 20, 2024