onTap

From Wikipedia, the free encyclopedia


onTap
Image:powerontap.png
"Features Without Fixtures"
Developed by S. Isaac Dealey
Latest release 3.0b / Jan 15, 2008
OS Cross-platform
Genre web application framework
Licence OpenBSD
Website ontap.riaforge.org
Prerequisites
Web server
ColdFusion MX7

onTap is an free "full stack" web application framework for ColdFusion with a lot of syntactic sugar. In addition to providing an MVC controller like most other ColdFusion frameworks, it also includes an array of APIs for rapid application development, including e-mail, ORM and SQL language abstraction (including DDL useful for development of self-installing plugin applications via its plugin manager extension and an implementation of the active record design pattern), HTML abstraction (and associated DHTML widgets such as 503C compliant tabsets), AJAX, application branding and customization, form management and i18n internationalization features.

Contents

[edit] License

The onTap framework is distributed using the OpenBSD license.

Several of the early version of the framework (prior to version 2.0) were released under the Lesser GPL. The LGPL had been chosen specifically for the purpose of allowing commercial software to be written using the framework as a starting-point. The OpenBSD license was later adopted for its even less restrictive terms, allowing commercial projects based on the framework to encrypt their own proprietary source code (which was not allowed by the LGPL).

[edit] Philosophy

Author S. Isaac Dealey, Ft Lauderdale FL, Spring 2001
Author S. Isaac Dealey, Ft Lauderdale FL, Spring 2001

The onTap framework's primary objective is to speed and improve rapid application development (RAD) by simplifying common or tedious web development tasks as well as providing convenient methods of accomplishing very complex tasks such as and/or keyword search filtering. However like Yukihiro Matsumoto the creator of the Ruby language, the author S. Isaac Dealey (ike) frequently stresses that systems design needs to emphasize human needs, rather than computer needs.

In this respect the onTap framework shares some of the intent behind agile software development methodologies or the Agile Manifesto seeking a "lightweight" method of software development that can produce versatile working software very quickly. While agile software development methods have been criticized for producing very little written documentation, the onTap framework core is heavily documented.

To meet the objective of simplifying and improving the RAD process, the framework's core principles include Convention over Configuration (CoC) and Don't Repeat Yourself (DRY). It shares these underlying principals with a small handful of other web application frameworks such as Ruby on Rails and it is for these reasons that while most ColdFusion frameworks include large XML configuration files (or many small XML configuration files) the onTap framework requires no XML and very little configuration.

"Convention over Configuration" means a developer should only specify atypical or unconventional aspects of the application. If an aspect of an application's behavior can be driven by a conventional default this satisfies the objective of simplifying and speeding development by eliminating work that would otherwise demand the programmers' time.

"Don't repeat yourself" means that there is a single unambiguous source for any given item of information. For example if several objects connect to a relational database, each individual object should reference a shared "connection object" instead of each containing a copy of the DSN. This satisfies the objective of simplifying and speeding development by eliminating the possibility of multiple information storage points becoming out of sync and needing to be synchronized or otherwise maintained. (This DRY principal is the same purpose behind relational database normalization.)

The logo of the Open Source Initiative
The logo of the Open Source Initiative

Two examples of CoC and DRY principles can be found in the framework's ORM and form features.

  • The framework's SQL abstraction tools include a "Statement" object with a "join" method. Although this join method allows the programmer to specify the columns on which the join is created, it is recommended that the columns are not specified in the join, allowing the Statement object to assume by default that the join will be created matching a foreign key constraint between the database table specified in the Statement object and the table specified in the join arguments. This is in keeping with the notion of Convention over Configuration (CoC) by specifying columns for joins only in the atypical case in which a foreign key constraint can't be used either because of confusion between multiple constraints or because either table is included in the query multiple times. The foreign key constraint then becomes the single point of truth regarding the relationship between data in the joined tables. This is a deviation from the majority of other systems for ORM in ColdFusion which require the use of XML configuration files to explicitly declare relationships between database tables.
  • Similarly the framework's form tools allow the programmer to omit most of the code required to create common CRUD forms by relying on the database as the single point of truth for information about the type of data managed by the form. The following are examples of a form as created using the CFML native cfform tag as compared to using the onTap framework's CoC / DRY concepts for CRUD forms.

The following code sample shows how many ColdFusion forms are written:

<cfparam name="attributes.eventid" default="" />
<cfif len(trim(attributes.eventid))>
  <cfquery name="getEvent" datasource="primary">
    select * from tblEvent 
    where eventid = <cfqueryparam value="#attributes.eventid#" cfsqltype="cf_sql_idstamp" />
  </cfquery>
  <cfparam name="attributes.eventname" default="#getevent.eventname#" />
  <cfparam name="attributes.eventdate" default="#getevent.eventdate#" />
  <cfparam name="attributes.ticketprice" default="#getevent.ticketprice#" />
</cfif>
 
<cfparam name="attributes.eventname" default="" />
<cfparam name="attributes.eventdate" default="" />
<cfparam name="attributes.ticketprice" default="0" />
<cfform format="xml">
  <cfinput type="hidden" name="eventid" value="#attributes.eventid#" />
  <cfinput type="text" name="eventname" label="Event" 
    required="yes" value="#attributes.eventname#" />
  <cfinput type="text" name="eventdate" label="Date" 
    required="yes" value="#attributes.eventdate#" validate="date" />
  <cfinput type="text" name="ticketprice" label="Ticket Price" 
    required="yes" value="#attributes.ticketprice#" validate="numeric" />
</cfform>

The following code sample shows how the same form could be written using the onTap framework's XHTML syntax (syntactic sugar) to speed development. This code anticipates the intent of the code in the previous sample by using a conventional relationship between database columns and form input elements. These two code samples produce an approximately similar result with mostly semantic differences in operation. This supports the philosophy of CoC because the programmer only needs to specify the value of an input element (or its default) or the type of validation (date, numeric, required, etc.) in atypical cases in which the input doesn't mirror the structure of the database.

<cf_html>
<tap:form tap:dbtable="tblEvent" xmlns:tap="http://www.fusiontap.com">
  <input type="hidden" name="eventid" />
  <input type="text" name="eventname" label="Event" />
  <input type="text" name="eventdate" label="Date" />
  <input type="text" name="ticketprice" label="Ticket Price" tap:default="0" />
</tap:form>
<cf_html>

Unlike some of the more popular ORM frameworks for ColdFusion such as Transfer or Reactor (which both provide only ORM functionality), the onTap framework does not employ supplemental code generation (the ColdFusion server generates Java bytecode when ColdFusion templates are executed). The framework doesn't resort to code generation largely because the author of the framework feels this violates the once and only once (OAOO) principal which is analogous to the DRY principal with respect to behavior instead of information. Simply put, OAOO suggests that code for a given purpose should be written only once. To that end the author prefers object composition or inheritance over code generation. The author later discovered that he is not alone in this belief.

[edit] History

MCI WorldCom logo (Used from 1998–2000)
MCI WorldCom logo (Used from 1998–2000)

In 1998 Isaac Dealey began his first programming job on a contract for MCI WorldCom shortly after the acquisition of the telephone company MCI by WorldCom during the period in which they were merging the name WorldCom into the MCI company logo. The job at MCI introduced him to the ColdFusion platform for web application development, then owned by Allaire Corp. Although the MCI job lasted only six months, Isaac soon began working on a content management system (CMS) using ColdFusion which transitioned through several names eventually becoming known as Tapestry (not to be confused with the Tapestry framework for Java).

Isaac later abandoned the CMS but not before releasing an open source API for ColdFusion development called the Tapestry Application Programming Interface (TAPI) not to be confused with the Telephony Application Programming Interface (TAPI). TAPI had been designed with minimal system requirements with the intention of being used within an existing application.

Within several months Isaac decided that the minimal system requirements for TAPI were too limiting and released the first version of the onTap framework (a complex clip of "on Tapestry") as an alternative to TAPI in August 2003. In spite of the fact that the name onTap shares pronunciation with a colloquial description of draught beer (which is often said to be "on tap"), the name produces significantly less confusion than had been created by the TAPI acronym (or for that matter the name Tapestry associated with the CMS that inspired it).

[edit] Website

Some time between August 2003 and August 2004, an official website for the framework launched at http://www.fusiontap.com. In March 2007, Nick Tong and Kola Oyedeji interviewed Isaac for a podcast about the framework on the cfFrameworks website. Shortly after the interview on the heels of being fired from a job in Austin TX, Isaac canceled the dedicated hosting service for the official website. A friend offered to park the fusiontap.com domain for him, which created some confusion in the following months with some people thinking the framework site had been "re purposed" and many wondering what had happened to Isaac since he had also unsubscribed from the popular CF-Talk mailing list. In December 2007 Isaac submitted the onTap framework along with its Plugin Manager and two plugins (tapMCE and Members onTap) to the open source development community RIAForge.org, an alternative to SourceForge specifically for projects based on Adobe software platforms.

[edit] External links

[edit] See also