ColdBox Platform

Last updated
ColdBox Platform
Original author(s) Ortus Solutions, Corp
Initial releaseJune 15, 2006 (2006-06-15)
Stable release
6.8.1 [1] / 2022-08-11 [±]
Repository ColdBox Repository
Written in CFML, Java
Type Web application framework
License Apache License v2
Website ColdBox.org

ColdBox is a free, open-source, conventions-based, modular web application framework intended for building enterprise applications with ColdFusion (CFML) using a Hierarchical MVC approach.

Contents

It is a set of tools and methodologies that can allow a developer to build their web applications in a modern and secure way.  It also provides them a scaffold to which to base their applications on. As a result, they don’t have to reinvent the wheel on the majority of concerns when they have to think about when building web applications.  The framework gives developers the right tooling to get their job done quickly, securely, modularly and in a flexible way.

The source code of ColdBox and its companion libraries are hosted on GitHub and licensed under the terms of the Apache License v2.

History

ColdBox was developed and created by Luis F. Majano in 2006 and it has become the most widely used and maintained MVC framework. Given its speed and scalability, ColdBox evolved into a performant and simple framework that empowered developers. It became a professional open source project in 2008, when professional services were offered by the parent company Ortus Solutions, Corp. Later, in 2011 the Hierarchical Model View Controller was set as its core foundation design pattern. In the last few years it introduced tight integration to Java's CompletableFuture API to support Futures and Promises and asynchronous/parallel programming. Currently, the latest release is version 6.8.1 (August 11, 2022).

Capabilities

Platforms

ColdBox is supported on Lucee (A popular open source CFML engine) and Adobe's ColdFusion application servers.It has supported IDE plugins for, Visual Studio Code, Sublime Text, Eclipse IDE, and Adobe ColdFusion Builder

ColdBox Universe

The ColdBox Platform is composed of several internal standalone libraries that can be used with any CFML Framework or none at all. Its library includes:

Usage

Below is a list of some notable users of the Coldbox Platform. [2]

Installation

Getting started is easy with ColdBox, WireBox, CacheBox or LogBox in any ColdFusion (CFML) application since just CommandBox, the CLI and package manager, should be leveraged. These commands run from the CommandBox interactive shell.

Controllers

ColdBox is conventions-based framework that is programmed in CFML, differing from other CFML MVC frameworks that use XML declarative logic for their controllers.

Below is an example of a controller:

component{// Use Dependency injection for hibernate based virtual servicespropertyname="userService"inject="entityservice:User";/** * Return immediate HTML */functionsayHello(event){return"hello";}/** * Return immediate JSON from an ORM object's memento */functionsayHello(event){returnuserService.get(rc.id).getMemento();}/** * Return content in multiple formats */functionlist(event){prc.data=userService.list();// render out all users in json formatevent.renderData(data=prc.data,formats="json,xml,pdf,html");}}

URL mappings

ColdBox supports URL mappings and routing Rails style but adapted for ColdFusion. It also supports the creation of RESTful routing:

// Resources resource("photos");// Nested Resourcesresources(resource="agents",pattern="/sites/:id/agents");// Redirectsroute("/oldRoute").toRedirect("/main/redirectTest");// Direct Routingroute("/render/:format").to("actionRendering.index");// With Regexroute("post/:postID-regex:([a-zA-Z]+?)/:userID-alpha/regex:(xml|json)").to("ehGeneral.dumpRC");// subdomain routingroute("/").withDomain(":username.forgebox.dev").to("subdomain.show");// Responses + Conditionsroute("/ff").withCondition(function(){return(findnocase("Firefox",cgi.HTTP_USER_AGENT)?true:false);}).toResponse("Hello FireFox");route("/luis/:lname").toResponse("<h1>Hi Luis {lname}, how are {you}</h1>",200,"What up dude!");// Inline Closure Responsesroute("/luis2/:lname").toResponse(function(event,rc,prc){return"<h1>Hello from closure land: #arguments.rc.lname#</h1>";});// Views No Eventsroute("contactus").as("contactUs").toView("simpleView");// Named routesroute(pattern="/routeRunner/:id/:name",name="routeRunner").to("main.returnTest");// Grouped Routinggroup({pattern="/runAWNsync",handler="utilities.AWNsync"},function(options){route('/:user_id').withAction({get="runAWNsync",options="returnOptions"}).end();});// RESTFul Actionsroute("/health_check").withAction({get="runCheck",options="returnOptions"}).to("utilities.HealthCheck");

RESTful URLs

ColdBox allows for easy creation of RESTful URLs via URL mappings and extension detection. Natively ColdBox can detect any extension when supplied to an URI resource:

http://api.coldbox.org/rest/user/luis.json http://api.coldbox.org/rest/user/luis.xml http://api.coldbox.org/rest/user/luis.pdf http://api.coldbox.org/rest/user/luis.yml 

It allows for the detection of such extensions, security around them and the ability to customize the extensions.

Ajax support

ColdBox supports all JavaScript frameworks that provide Ajax capabilities. It also provides an auto-marshalling function to render any object to the following formats natively: XML, WDDX, JSON, JSONP, TEXT, PDF, CUSTOM.

SOAP-Adobe Flex/Air support

ColdBox offers support for creating, monitoring and developing SOAP web services and Flex/Air remote components. It allows for having one development paradigm for multiple GUI interfaces.

Related Research Articles

<span class="mw-page-title-main">Jakarta EE</span> Set of specifications extending Java SE

Jakarta EE, formerly Java Platform, Enterprise Edition and Java 2 Platform, Enterprise Edition (J2EE), is a set of specifications, extending Java SE with specifications for enterprise features such as distributed computing and web services. Jakarta EE applications are run on reference runtimes, that can be microservices or application servers, which handle transactions, security, scalability, concurrency and management of the components it is deploying.

<span class="mw-page-title-main">Adobe ColdFusion</span> Rapid Web app development platform

Adobe ColdFusion is a commercial rapid web-application development computing platform created by J. J. Allaire in 1995. ColdFusion was originally designed to make it easier to connect simple HTML pages to a database. By version 2 (1996), it became a full platform that included an IDE in addition to a full scripting language.

Representational state transfer (REST) is a software architectural style that describes the architecture of the Web. It was derived from the following constraints:

ColdFusion Markup Language, more commonly known as CFML, is a scripting language for web development that runs on the JVM, the .NET framework, and Google App Engine. Multiple commercial and open source implementations of CFML engines are available, including Adobe ColdFusion, Lucee, New Atlanta BlueDragon, Railo, and Open BlueDragon as well as other CFML server engines.

Fusebox was a web application framework for CFML and PHP. Originally released in 1997, the final version, 5.5.2, was released in May 2012. In January 2012 the rights to Fusebox were transferred from TeraTech to a team of five developers, who removed the rights and placed the framework in the hands of the community.

<span class="mw-page-title-main">Ruby on Rails</span> Server-side open source web application framework

Ruby on Rails is a server-side web application framework written in Ruby under the MIT License. Rails is a model–view–controller (MVC) framework, providing default structures for a database, a web service, and web pages. It encourages and facilitates the use of web standards such as JSON or XML for data transfer and HTML, CSS and JavaScript for user interfacing. In addition to MVC, Rails emphasizes the use of other well-known software engineering patterns and paradigms, including convention over configuration (CoC), don't repeat yourself (DRY), and the active record pattern.

A web framework (WF) or web application framework (WAF) is a software framework that is designed to support the development of web applications including web services, web resources, and web APIs. Web frameworks provide a standard way to build and deploy web applications on the World Wide Web. Web frameworks aim to automate the overhead associated with common activities performed in web development. For example, many web frameworks provide libraries for database access, templating frameworks, and session management, and they often promote code reuse. Although they often target development of dynamic web sites, they are also applicable to static websites.

XML Interface for Network Services (XINS) is an open-source technology for definition and implementation of internet applications, which enforces a specification-oriented approach.

Railo Server, commonly referred to as Railo, is open source software which implements the general-purpose CFML server-side scripting language, often used to create dynamic websites, web applications and intranet systems. CFML is a dynamic language supporting multiple programming paradigms and runs on the Java virtual machine (JVM).

Laminas Project is an open source, object-oriented web application framework implemented in PHP 7 and licensed under the New BSD License. The framework is basically a collection of professional PHP-based packages. The framework uses various packages by the use of Composer as part of its package dependency managers; some of them are PHPUnit for testing all packages, Travis CI for continuous Integration Services. Laminas provides to users a support of the model–view–controller (MVC) in combination with Front Controller solution. MVC implementation in Laminas has five main areas. The router and dispatcher functions to decide which controller to run based on data from URL, and controller functions in combination with the model and view to develop and create the final web page.

The Spring Framework is an application framework and inversion of control container for the Java platform. The framework's core features can be used by any Java application, but there are extensions for building web applications on top of the Java EE platform. Although the framework does not impose any specific programming model, it has become popular in the Java community as an addition to the Enterprise JavaBeans (EJB) model. The Spring Framework is open source.

Web2py is an open-source web application framework written in the Python programming language. Web2py allows web developers to program dynamic web content using Python. Web2py is designed to help reduce tedious web development tasks, such as developing web forms from scratch, although a web developer may build a form from scratch if required.

The POrtable COmponents (POCO) C++ Libraries are computer software, a set of class libraries for developing computer network-centric, portable applications in the programming language C++. The libraries cover functions such as threads, thread synchronizing, file system access, streams, shared libraries and class loading, Internet sockets, and network communications protocols, and include an HTTP server, and an XML parser with SAX2 and DOM interfaces and SQL database access. The modular and efficient design and implementation makes the libraries well suited for embedded system development.

<span class="mw-page-title-main">Spring Roo</span> Open-source software tool

Spring Roo is an open-source software tool that uses convention-over-configuration principles to provide rapid application development of Java-based enterprise software. The resulting applications use common Java technologies such as Spring Framework, Java Persistence API, Thymeleaf, Apache Maven and AspectJ. Spring Roo is a member of the Spring portfolio of projects.

Mojito is an environment agnostic, Model-View-Controller (MVC) web application framework. It was designed by Ric Allinson.

Lucee is an open source implementation of a lightweight dynamically-typed scripting language for the Java virtual machine (JVM). The language is used for rapid development of web applications that compile directly to Java bytecode, and is compatible with contemporary CFML script and tag language variants, and provides configurable support for legacy CFML.

<span class="mw-page-title-main">ContentBox Modular CMS</span> Content management system

ContentBox Modular CMS is an open-source content management system for CFML, created by Ortus Solutions, Corp. ContentBox has been designed as a modular HMVC software based on Hibernate ORM and the ColdBox Platform.

Silex is a micro web framework written in PHP and based on Symfony, Twig and Doctrine. It is MIT Licensed.

Oracle TopLink is a mapping and persistence framework for Java developers. TopLink is produced by Oracle and is a part of Oracle's OracleAS, WebLogic, and OC4J servers. It is an object-persistence and object-transformation framework. TopLink provides development tools and run-time functionalities that ease the development process and help increase functionality. Persistent object-oriented data is stored in relational databases which helps build high-performance applications. Storing data in either XML or relational databases is made possible by transforming it from object-oriented data.

References

  1. "ColdBox Platform Versions". forgebox.io. Retrieved 2022-08-11.
  2. "ColdBox MVC".