You will be redirected in 30 seconds or close now.

ColdFusion Authors: Yakov Fain, Jeremy Geelan, Maureen O'Gara, Nancy Y. Nee, Tad Anderson

Related Topics: ColdFusion

ColdFusion: Article

Bearing Fruit with Plum

Review of the Plum IDE from Productivity Enhancement, Inc.

Plum stands for Practical Lightweight Universal Methodology, and consists of a comprehensive development environment that includes a Windows-based IDE; code generator; robust application framework; development methodology; simple integrated Content Management System (CMS); and stored procedure, unit test, and component generators. Plum accomplishes so much for a ColdFusion developer that it can literally be overwhelming trying to grok it all at first glance.

System Requirements and Installation

CFMX 6.1 is required to run Plum applications as the framework makes extensive use of ColdFusion Components (CFCs). The Plum IDE is a Windows .NET desktop application, so have the Microsoft .NET Framework 1.1 installed on your Windows 2000/XP computer prior to installation. Though the IDE is a Windows application, Plum-generated code can be deployed on any CFMX platform.

Plum was designed to work primarily with MS SQL Server 2000 (the stored procedure generator only supports this option), but will also support Oracle 9i and Microsoft Access 2000. If you are using Oracle you will need to download the Oracle .NET data provider to ensure that the IDE can read the database schema. (A future version of Plum is slated to support popular open source databases such as MySQL and PostgresSQL.)

Creating a Project

The New Project Wizard
Plum includes a new project wizard that steps you through the process of creating a fully functional baseline Web application in about two to five minutes.

The first steps collect and verify information about the operating environment, including application name, directory mappings, and server operating system. Once this information is collected the Plum Framework and starter content are installed.

The next several steps of the wizard verify a connection to your database and ensure that the mandatory Plum tables are present. Plum projects require the presence of five tables that support the Content Management and User Access modules of the application. If the tables are not present, they will be inserted, fully respecting the integrity of the objects already in the database. The remaining pages in the wizard collect and verify mappings for server, custom tag, and Verity collections, and allow you to optionally choose for which tables to generate standard maintenance forms.

At the completion of the project wizard, Plum launches your default browser and runs an initialization routine to verify your environment is set up correctly. At this point you can also optionally create Verity collections for your CMS starter content. When initialization is successfully completed, you are redirected to the home page of your new Web site, complete with starter content! Returning to the Plum IDE reveals a new project tree containing all the major components of your project.

The Generated Application
The application generated by the wizard is a fully functional Web site, with both public and private (administrative) areas. It contains many useful public-facing general purpose forms that handle tasks such as logging in, user self-registration, user profile maintenance, password retrieval, feedback, e-mailing a copy of the currently viewed page to a specific address, and a site search form. Starter content is provided for basic pages common to many Web sites, which can be easily edited through the internal CMS. The administrative modules provide built-in forms for maintaining users/roles, content, and layouts.

XML Project File
The resulting Plum project file is a fully compliant XML file with a .plum extension. Over time I expect Plum adopters will think of many creative ways to extend the use of this file using XLST. A note of caution - you should avoid manually editing the project file or you risk having it become unreadable by the IDE. You might even want to consider including it in your source control provider, if you are using one.

Working with the IDE

The main purpose of the Plum IDE is to synchronize your project with the schema of your database and rapidly generate code for your application. There is no WYSIWYG design surface or internal code editor; you will still be using your favorite code editor to manage code. The preferred editor is HomeSite+, and custom graphical tag editors are included to work with the generated code. However, it is relatively easy to re-create these tags in a custom tag library in Dreamweaver MX, if that is your preferred editing tool.

Round-trip editing is not supported; any manual changes made to the generated code are not subsequently reflected in the Plum project file. If you make custom changes to tag attributes in the code and you want to keep your project file up to date, you will have to manually update the attributes in the IDE. In fact, there comes a point in every Plum project when the generated code is "divorced" from the IDE, after which you might add your own handcrafted code. This is a necessary and intended behavior to allow you to extend the application with your own customizations.

The Workspace
The IDE workspace is split into three frames with the project tree in the left frame, form data entry in the top right frame, and help information for the selected node in the bottom right frame (see Figure 1).

The project tree contains four nodes that focus on the major code generation areas: environment, database, modules, and security. Clicking on a node in the tree activates the associated data input form for that node in the top right frame. The database and modules nodes and their children make liberal use of context menus, so it is a good idea to right-click on these nodes as you get started to view the available command options.

The environment node extends much of the required information gathered by the new project wizard, i.e., application name, directory mappings, data source connection, etc., by allowing you to specify variable settings for the SMTP mail server, Webmaster e-mail address, persistence preferences (session and/or cookie), minimum acceptable browser versions, enabling of error handlers, and whether or not to allow visitors to create their own accounts when visiting your site. All of the settings specified in this node are optionally written to the Environment.cfm file in the root of the application directory during code generation.

The database node expands downward two additional levels to include nodes for each of the tables in the database, and for the column and relationship attributes in each of the tables. Each table node allows you to specify the primary and alternate keys for each table as well as default singular and plural labels for framework references to the table in the application. Column nodes provide a form for specifying column labels, data type, default values, enumerated values, formatting functions, whether nulls are allowed, and finally, whether the value is issued by the database server or supplied by business logic. In the two latter instances, the column values can be displayed on forms, but input controls are not generated to prevent user input. Relations can also be created, but the database synchronization process handles this for you automatically. Relationships are already handled for you in most instances when Plum reads the database schema, but you can add or change relationships manually from the database node context menu. The settings in the database node are referenced by the IDE when building data pages.

The modules node is where you will spend most of your time in the IDE, building the forms for your application. Modules consist of pages (form containers) that are related by functionality, or similar security access restrictions. A page can contain multiple form types if desired. For instance, you can create a list form that also has an embedded search form on it, or an edit form which has a child list form on it (called a master-detail form), complete with built-in paging controls. Certain combinations are not allowed; you obviously can't have a child list on an add form, for instance. Pages can either be created individually, or you can have Plum generate standard or master/detail form sets for optionally selected tables at one time. It is quite a sight to see Plum generate all of the data maintenance forms for a module in just a few seconds! When you select a form on a page, a builder is presented in the top right frame that lets you choose the columns to be included in the form, as well as the control type and sort order for each column.

Building forms is an iterative process. Once you have a form built the way you think you want it, you generate the code for it and view it in your browser, come back into the IDE and tweak it some more, etc. At some point you may want to start placing your own handcrafted code into the page, or use one of Plum's custom tags that is not available in the IDE. This is the point at which you need to "divorce" the page from the IDE. Individual pages or entire modules can be locked down to avoid accidentally overwriting customizations.

The security node is where you create application roles and then assign users and modules to the role. Plum then generates the authentication code for each module. Roles are table driven, but not handled for you automatically. You will have to go into the User module on the admin side of your application and add each role code manually to the database.

Working Outside of the IDE
Plum's IDE generates code pages that leverage the extensive custom tag library included with the Plum Framework. Using the provided custom tag editors, it is very easy to create Plum pages and modules manually. The trick is to learn the proper nesting hierarchy of the custom tag calls. Once you master this, you can create pages very rapidly just using your code editor.

This comes in very handy when rapidly prototyping Plum applications that don't yet have a data model defined. The Plum Framework includes a component that creates sample data either programmatically or by retrieving data from text files. You can use this component to generate sample data in two ways: by using a QueryStub, which returns a query object based on passed data type parameters, or by using the sampleData attribute of the form and list-related tags. Prototyping in this fashion is like wireframing on steroids because all of the prototype code can be leveraged by simply changing the query calls.

You can resynchronize your project with the database at any time by selecting an option from the Utilities menu, and the database tree nodes will be refreshed to reflect the changes to the data structure. One, many, or all of the tables can be imported into the project at one time. If an existing table structure has changed, you are notified with a dialog and given the option to accept or decline the changes to your project. Tables, columns, relationships, and their associated attributes can all be manually added to the tree as well.

If you are using MS SQL Server 2000 as your database server, you are in for a treat because you can have the Plum IDE create a complete set of insert, update, delete, list, and get stored procedures for you, one script for each designated table. These scripts are placed in the project's test directory, and can either be used as or as a starting point for further customization. While the stored procedures generated currently support single table operations only, and therefore won't work as is with some of the more complex Plum form types, this is still a very useful tool and an impressive feature for a 1.0 release.

You can further utilize the generated stored procedure scripts by having them converted to CFCs (ColdFusion Components) using the component generator. This tool encapsulates all of the stored procedures as methods calls in a component of the same name as the script, with a .cfc extension.

Unit testing is a popular practice in the OOP world, and involves designing and writing test cases which validate that class methods function properly and return valid outputs. The same principles can be applied to CFCs, although it can be a time-consuming and tedious process to write them yourself. The Plum IDE contains an internal facility that enables you to easily create and execute unit tests against your CFC methods. A series of dialogs allows you to visually build the tests, and the results are graphically displayed in your browser, along with the ability to drill down into the details of the result. This tool is useful if you plan on integrating additional components into the application.

The Framework

The Plum Framework comes with a core set of components, custom tags, and other supporting files that handle most of the heavy lifting required by all ColdFusion applications, including role-based security, data access and validation, structured exception handling, client/session management, browser detection, and layout management. An extensive, unencrypted custom tag library is provided to access the component methods. In fact, all of the code generated by the IDE consists of nothing more than custom tag calls (see Listing 1). There are so many custom tags and associated attributes available that using the provided tag editors is a must until you have spent some serious time using them (see Figure 2).

Plum's intelligent forms are feature rich and provide you with many options from which to choose. You can build forms that handle single table maintenance, parent-child, and/or many-to-many relationships, all on the same page if you prefer. You can create a stand-alone search form or a combination search/list form on one page. All of the common HTML form control types are supported and some of them have enhanced functionality. One of my favorites is the Filtered Select menu, which can either fully populate a Select menu from a parent lookup, or filter it (if the query results exceed a certain threshold) by collecting criteria from the user in a small text field to the left of the menu and then pressing Tab. This is very useful when dealing with parent lookups with very large tables. Both client-side and server-side form validation are automatically handled for you; the former uses an extended version of the popular qForms JavaScript library.

Content Management System
Plum integrates a rudimentary, but effective CMS into your projects. Most of the starter content generated for a new project is contained within the CMS to provide examples of how it works. As of this writing you could choose between HTMLArea and ActivEdit as the WYSIWYG editor, although efforts are already underway to adopt other commonly used editors that support other popular browsers like Firefox. Multipage content can be easily created with paging controls added to each page. Simple workflow management features are also provided.

Automated Verity Management
Forms are provided for you to automate the entire Verity collection creation, maintenance, and indexing operations. You can create multiple content collections and offer them independently for users to search through.

Clean Separation of Data, Logic, and Presentation
While not strictly adhering to the Model-View-Controller (MVC) design pattern popular in some other ColdFusion frameworks, Plum provides a nice and easily understood separation of the data, logic, and presentation tiers of your application. Plum's straightforward directory layout and file naming conventions make it easy to find and debug code.

Structured Exception Handling
Plum provides very robust structured exception handling with predefined enumerated exceptions that can be turned on or off by checking one box in the IDE (or by changing the associated variable in the Environment.cfm file). When turned on, Plum dumps the exception specifics into an e-mail notification to the Webmaster. You will want to turn the exception handler off when you are debugging pages so that you can view the raw error and avoid having your mailbox overrun with exception reports.

Security Model
You can easily require authentication to the module, page, or page section levels of your application with a single call to the cf_Authorize custom tag. The following tag call placed in the Application.cfm file for a module would authenticate a user against the ADMIN or PUBLISHER roles.


Page sections can be restricted by using the cf_Authorize paired tag:


You will see me only if you're an ADMIN or a PUBLISHER.


The Plum Methodology

The Plum methodology takes a slightly different slant on system development that espouses quickness and simplicity. The Plum methodology is tightly coupled with the framework and is meant to help streamline Plum development with what is basically a 10-step process:
  1. Chart the business processes your application will support
  2. Derive the navigational interface from the business process charts
  3. Design the site content search structure
  4. Develop the graphical layouts
  5. Create the database
  6. Generate and tweak the administrative application
  7. Create the prototype pages
  8. Write the business logic
  9. Convert prototypes to the finished application
  10. Test and deploy
One of the interesting central themes of the Plum methodology is that documentation should be lightweight and code commenting should be kept to a minimum, arguing that it is more preferable to make the code as self-explanatory as possible and relegate extensive comments to the source control provider. This philosophy is totally counter to methodologies like FLiP, which promote documenting the functionality of the code before it is written. It's obviously up to you whether you adopt the Plum Methodology or not. While it is not imperative that the Plum Methodology be used with Plum, it is worth reading about it before making your decision.


In dedicated host situations, the difference between a Plum application in a staging environment versus a production environment is the settings in the Environment.cfm file. So you should be able to upload your directory structure from the staging site to the production site, replacing the staging Environment.cfm file with one that has the correct values for the production server.

However, if you deploy the application to a shared host, there is a potential issue to contend with that involves custom tag mappings. CFMX cannot formally bind an instance of a custom tag to a particular application, so having multiple copies of the same tag name referenced in multiple custom tag paths results in CFMX not knowing which instance belongs with which application. To address this issue, Productivity Enhancement has provided a free utility called CF_2CFModule, which will convert all custom tag calls to CFMODULE="template" syntax, allowing the variable path reference to remain. To use CF_2CFMODULE, you simply drag and drop the root Plum project directory onto the CF_2CFMODULE.EXE icon, (after making a backup of course). You then deploy the converted directory.

Cut to the Chase

Plum could be the Swiss Army Knife of the ColdFusion world. It does just about everything you need, and does it well?for free. That's right! Plum can be used for free if you don't mind looking at one small Productivity Enhancement advertisement in the bottom left corner of the IDE. If you adopt it, you will want to do yourself a favor and pay the $79.95 for a licensed version so you can sleep better at night.

While there are some areas that need improvement, it's an awesome product for a first release. Unfortunately for some, Plum performs most of its magic on Windows. If you develop on Windows, you owe it to yourself to check it out. If you are developing on another platform, you will have to pray for Mono.

For a complete list of Plum offerings, visit www.productivityenhancement.com/plum/WhatPlumCanDo.cfm.

Productivity Enhancement, Inc.
5806 Glenn Hollow Lane
Norcross, Georgia 30071
Office: 770-446-8866
Fax: 770-242-0410
Price: Free with banner ads displayed, $79.95 for licensed copy.

More Stories By Jeff Fleitz

Jeff Fleitz has been developing Web applications for over eight years and using ColdFusion since version 2. He is currently the director of Information Solutions for KR Systems, Inc., where he continues to develop applications for the federal government and maritime shipping industries. He has been involved with Plum since the first private beta.

Comments (0)

Share your thoughts on this story.

Add your comment
You must be signed in to add a comment. Sign-in | Register

In accordance with our Comment Policy, we encourage comments that are on topic, relevant and to-the-point. We will remove comments that include profanity, personal attacks, racial slurs, threats of violence, or other inappropriate material that violates our Terms and Conditions, and will block users who make repeated violations. We ask all readers to expect diversity of opinion and to treat one another with dignity and respect.

@ThingsExpo Stories
In his session at 21st Cloud Expo, Carl J. Levine, Senior Technical Evangelist for NS1, will objectively discuss how DNS is used to solve Digital Transformation challenges in large SaaS applications, CDNs, AdTech platforms, and other demanding use cases. Carl J. Levine is the Senior Technical Evangelist for NS1. A veteran of the Internet Infrastructure space, he has over a decade of experience with startups, networking protocols and Internet infrastructure, combined with the unique ability to it...
"There's plenty of bandwidth out there but it's never in the right place. So what Cedexis does is uses data to work out the best pathways to get data from the origin to the person who wants to get it," explained Simon Jones, Evangelist and Head of Marketing at Cedexis, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
"Cloud Academy is an enterprise training platform for the cloud, specifically public clouds. We offer guided learning experiences on AWS, Azure, Google Cloud and all the surrounding methodologies and technologies that you need to know and your teams need to know in order to leverage the full benefits of the cloud," explained Alex Brower, VP of Marketing at Cloud Academy, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clar...
Large industrial manufacturing organizations are adopting the agile principles of cloud software companies. The industrial manufacturing development process has not scaled over time. Now that design CAD teams are geographically distributed, centralizing their work is key. With large multi-gigabyte projects, outdated tools have stifled industrial team agility, time-to-market milestones, and impacted P&L stakeholders.
Gemini is Yahoo’s native and search advertising platform. To ensure the quality of a complex distributed system that spans multiple products and components and across various desktop websites and mobile app and web experiences – both Yahoo owned and operated and third-party syndication (supply), with complex interaction with more than a billion users and numerous advertisers globally (demand) – it becomes imperative to automate a set of end-to-end tests 24x7 to detect bugs and regression. In th...
"Akvelon is a software development company and we also provide consultancy services to folks who are looking to scale or accelerate their engineering roadmaps," explained Jeremiah Mothersell, Marketing Manager at Akvelon, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
"MobiDev is a software development company and we do complex, custom software development for everybody from entrepreneurs to large enterprises," explained Alan Winters, U.S. Head of Business Development at MobiDev, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
SYS-CON Events announced today that CrowdReviews.com has been named “Media Sponsor” of SYS-CON's 22nd International Cloud Expo, which will take place on June 5–7, 2018, at the Javits Center in New York City, NY. CrowdReviews.com is a transparent online platform for determining which products and services are the best based on the opinion of the crowd. The crowd consists of Internet users that have experienced products and services first-hand and have an interest in letting other potential buye...
"IBM is really all in on blockchain. We take a look at sort of the history of blockchain ledger technologies. It started out with bitcoin, Ethereum, and IBM evaluated these particular blockchain technologies and found they were anonymous and permissionless and that many companies were looking for permissioned blockchain," stated René Bostic, Technical VP of the IBM Cloud Unit in North America, in this SYS-CON.tv interview at 21st Cloud Expo, held Oct 31 – Nov 2, 2017, at the Santa Clara Conventi...
SYS-CON Events announced today that Telecom Reseller has been named “Media Sponsor” of SYS-CON's 22nd International Cloud Expo, which will take place on June 5-7, 2018, at the Javits Center in New York, NY. Telecom Reseller reports on Unified Communications, UCaaS, BPaaS for enterprise and SMBs. They report extensively on both customer premises based solutions such as IP-PBX as well as cloud based and hosted platforms.
"Space Monkey by Vivent Smart Home is a product that is a distributed cloud-based edge storage network. Vivent Smart Home, our parent company, is a smart home provider that places a lot of hard drives across homes in North America," explained JT Olds, Director of Engineering, and Brandon Crowfeather, Product Manager, at Vivint Smart Home, in this SYS-CON.tv interview at @ThingsExpo, held Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA.
Coca-Cola’s Google powered digital signage system lays the groundwork for a more valuable connection between Coke and its customers. Digital signs pair software with high-resolution displays so that a message can be changed instantly based on what the operator wants to communicate or sell. In their Day 3 Keynote at 21st Cloud Expo, Greg Chambers, Global Group Director, Digital Innovation, Coca-Cola, and Vidya Nagarajan, a Senior Product Manager at Google, discussed how from store operations and ...
It is of utmost importance for the future success of WebRTC to ensure that interoperability is operational between web browsers and any WebRTC-compliant client. To be guaranteed as operational and effective, interoperability must be tested extensively by establishing WebRTC data and media connections between different web browsers running on different devices and operating systems. In his session at WebRTC Summit at @ThingsExpo, Dr. Alex Gouaillard, CEO and Founder of CoSMo Software, presented ...
WebRTC is great technology to build your own communication tools. It will be even more exciting experience it with advanced devices, such as a 360 Camera, 360 microphone, and a depth sensor camera. In his session at @ThingsExpo, Masashi Ganeko, a manager at INFOCOM Corporation, introduced two experimental projects from his team and what they learned from them. "Shotoku Tamago" uses the robot audition software HARK to track speakers in 360 video of a remote party. "Virtual Teleport" uses a multip...
A strange thing is happening along the way to the Internet of Things, namely far too many devices to work with and manage. It has become clear that we'll need much higher efficiency user experiences that can allow us to more easily and scalably work with the thousands of devices that will soon be in each of our lives. Enter the conversational interface revolution, combining bots we can literally talk with, gesture to, and even direct with our thoughts, with embedded artificial intelligence, whic...
SYS-CON Events announced today that Evatronix will exhibit at SYS-CON's 21st International Cloud Expo®, which will take place on Oct 31 – Nov 2, 2017, at the Santa Clara Convention Center in Santa Clara, CA. Evatronix SA offers comprehensive solutions in the design and implementation of electronic systems, in CAD / CAM deployment, and also is a designer and manufacturer of advanced 3D scanners for professional applications.
Leading companies, from the Global Fortune 500 to the smallest companies, are adopting hybrid cloud as the path to business advantage. Hybrid cloud depends on cloud services and on-premises infrastructure working in unison. Successful implementations require new levels of data mobility, enabled by an automated and seamless flow across on-premises and cloud resources. In his general session at 21st Cloud Expo, Greg Tevis, an IBM Storage Software Technical Strategist and Customer Solution Architec...
To get the most out of their data, successful companies are not focusing on queries and data lakes, they are actively integrating analytics into their operations with a data-first application development approach. Real-time adjustments to improve revenues, reduce costs, or mitigate risk rely on applications that minimize latency on a variety of data sources. In his session at @BigDataExpo, Jack Norris, Senior Vice President, Data and Applications at MapR Technologies, reviewed best practices to ...
An increasing number of companies are creating products that combine data with analytical capabilities. Running interactive queries on Big Data requires complex architectures to store and query data effectively, typically involving data streams, an choosing efficient file format/database and multiple independent systems that are tied together through custom-engineered pipelines. In his session at @BigDataExpo at @ThingsExpo, Tomer Levi, a senior software engineer at Intel’s Advanced Analytics gr...
When talking IoT we often focus on the devices, the sensors, the hardware itself. The new smart appliances, the new smart or self-driving cars (which are amalgamations of many ‘things’). When we are looking at the world of IoT, we should take a step back, look at the big picture. What value are these devices providing? IoT is not about the devices, it’s about the data consumed and generated. The devices are tools, mechanisms, conduits. In his session at Internet of Things at Cloud Expo | DXWor...