Nathaniel is speaking at Into The Box 2014
April 18, 2014Legacy app, meet ColdBox
January 13, 2018In the wild world of mobile and emerging internet of things, REST based applications are becoming more commonplace. While building apps with REST is relatively new in the ColdFusion community, there are variety of good options available.
Natively, we have 2 options:
- ColdFusion 10 introduced REST aspects as a native option. It redirects RESTful services through a separate servlet and provides a collection of metadata and new functions to control REST aspects in the CFCs. ColdFusion 11 further developed this by streamlining some features and improving JSON performance and support.
- Railo also introduced REST aspects natively in Railo 4. The syntax, metadata, and functions provided in RAILO are very similar to the ones that ColdFusion implemented and RAILO also uses a separate servlet to process RESTful services.
There are also 3 frameworks that implement REST in different ways:
- Taffy is an Open Source REST focused framework that is mostly conventions based, provides a collection of helper functions and metadata, provides some convenient REST tools through its dashboard component, and allows RESTful applications to be made as far back as ColdFusion 8. It has been well adopted by the ColdFusion community and is supported by a crafted collections of support documents. Taffy was made for REST – it is a REST focused framework.
- Coldbox is an Open Source, enterprise focused, rich, conventions based framework ecosystem. It provides a large collection of helper functions, data management, custom routing, http verb management, security, and REST tooling system (through RELAX). ColdBox employs the modular application structure to generate REST options within a ColdBox application. Even though ColdBox is an enterprised focused application ecosystem, it does a smooth job of integrating REST into its ecosystem and provides easy to use tools for your REST aspects.
- Framework 1 is an Open Source lightweight framework focused on providing a minimalist, conventions based framework for building MVC ColdFusion applications. It provides a versatile routing system and data management to very easily employ REST aspects in a FW/1 application.
The focus of this talk, the slides and the corresponding code samples is to help ColdFusion developers and developer teams see what REST options exist in our community, how they work at the most basic level, and how they differ. The good news is that each and every technique from the native implementations to each framework faithfully employs RESTful aspects into ColdFusion applications. Most of the decisions that developers make are determined by how they approach ColdFusion – whether they prefer the Adobe or Railo engine, and whether they use a framework or not. For those that are pretty open in their options, preference towards the metadata, configuration, routing, and helper function options are key. This presentation is based on informing the developer and empower them to decide for themselves rather than showing particular preferences for any of the available options.
It was a blast to give at CFSummit 2014 and I hope it helps some of us approach REST as an application architecture and start using it.