|By Sheldon Sargent||
|July 11, 2001 12:00 AM EDT||
I've been out of the hard-core development team dynamic for more than a year now, so I was a little hesitant when CFDJ approached me about writing this article. Nevertheless, I have traveled to various ColdFusion shops around the globe and worked with numerous development teams.
The majority of these shops have a tight-knit group of developers, who eat and sleep CF and Web development. Others have one or two developers who happen to have heard about a cool technology that allows integration with powerful back-end systems with an easy-to-use, tag-based language, and have let CF lead them to the mountaintop. And then there are those shops filled with developers who swear they are top-notch but don't really have a clue as to when not to use pound signs.
But even those shops at the high end of the CF development spectrum can have environments that are not conducive to good coding practices. Managers, as well as developers, need to understand the crucial aspects of the development environment: team, architecture, and methodology. This article is an attempt to level the playing field, so that even the worst coders are in an environment that will help elevate their game.
Although an understanding of the development process is fundamental to successful Web development, that discussion is beyond this article's scope. Rather, my focus is on facilitating this process. Rudimentary to this facilitation are the provision and protection of three distinct environmental areas: development, testing/staging, and production. Obviously, this article focuses on development, but it is important to stress the staging - which can be broken down further into quality assurance (QA) and user acceptance testing (UAT) - and production areas.
You should stage all good production code before going live. I learned this fundamental precept in the early days at WashingtonPost.com, where our access actually included storyboarding, development, staging, and production.
The staging/testing/QA server provides a platform to make necessary code revisions without touching "live" code. Following good principles, the staging server platform mirrors the production platform, and contains a frozen copy of the production code and database. This provides backup systems for disaster recovery, allowing full code migration to production, and extra resources to scale the site during unexpected load hikes.
It seems common sense to divide your development life cycle - at a minimum - into the development and production phases. However, you would be surprised - or maybe you wouldn't - at how many sites develop and modify code on production servers, data, and source code.
Again, good practice is to code and test functionality in development, and then migrate this functionality to a staging area for QA and/or UAT. Once approved, this code base should be frozen - then pushed to production. We never, ever want to modify production code! And code should never move from production to development - code should be copied from the staging server to development for code revisions. Let's not continue to bemoan such sites but rather proceed in breaking down the ideal development environment architecture.
The Development Server
The first step in achieving the optimal development environment is dedication: management must make the necessary expenditures for dedicated resources - human, hardware, and software. The development team and their IDEs are only part of this environment. (We will cover those later in the article.) For now, let's focus on the development server.
The ideal development platform will completely mirror the production architecture but usually on a single box. Say your production environment includes three systems: two Compaq 1850R servers running Windows 2000 Server, IIS 5, and CF 5, and a Compaq 3000 running Windows 2000 Server and SQL Server 2000. Then your development server should be a Compaq 1850R running Windows 2000 Server, IIS 5, CF 5, SQL Server 2000, and some source control software. (We will cover source control in a minute.) Some small shops can only budget for a small development server, but even a desktop HP system should be adequate for these shops.
Nevertheless, if budget permits, align the development systems parallel to production. This provides your developers with a simulated production playground, and provides extra machines for swapping in the event of catastrophic hardware or system failures. Mirroring the production architecture in development also helps eliminate hardware as a possible source for bottlenecks - and we all debug our code and eliminate bottlenecks, don't we?
Please refrain from implementing a Windows-based development environment for a Solaris production environment. If you realize most Web development tools are Windows-based, these only need to reside on your developers' desktops. So if your production system is a Solaris or Linux solution, your development system(s) should be also. Your developers' desktops should be the only Windows systems in the environment.
The Developer Desktop
What's more debilitating and frustrating to a developer or graphic artist than having to be creative on a slow, antiquated machine? In a perfect world, each developer and/or artist would have a fast, powerful desktop machine with the fastest available processor, ample RAM, and hard-drive space. For CF developers, this machine should not only include a licensed copy of CF Studio, but it should also be a miniversion of the production system.
This means each developer should be working with a local copy of the production source and data. In my last development team, each developer had his or her own copy of CF Studio, a CF server, a Web server, and a local copy of the database. The single-user edition of CF Enterprise that's bundled on the CF Studio CD is provided for development purposes. Developers can integrate this with Peer Web Services on their desktops and code against Microsoft SQL Server 2000 Personal Edition. The Personal Edition comes with both the Standard and Enterprise editions and is not sold separately. It is powerful enough for desktop development.
Obviously, if you have an Oracle shop, you'll want Oracle's developer editions - you want to keep your development, staging, and production environments as homogeneous as possible.
This configuration is ideal because the developers can work independently on local copies of source code and data instead of trampling one another on the development server, or worse, contaminating your production database. In order to do this properly, protect the code on the development server with enterprise-level version control software.
Most small shops use freeware versions, such as GNU SCCS (www.gnu.org) and ComponentSoftware's CVS (www.componentsoftware.com). Larger players in the change management or version control space are Perforce P4 (www.perforce.com), Merant PVCS (www.merant.com/products/pvcs/), Starbase StarTeam (www.starbase.com/products/starteam/), and Micro- soft Visual SourceSafe (http://msdn.microsoft.com/ssafe/). Although I have encountered Visual SourceSafe at most of the shops I have visited, more CF shops are turning to PVCS solutions.
The key features for change management are versioning, document comparison and merge, rollback, and deployment. Integration with your IDE, or integrated development environment, is a plus that will help win over your developers - and winning them over is just what you'll have to do if you have not already implemented a version control solution. Whichever change management system you deploy, the client software must make its use relatively easy in order for developers to consistently use it.
Frameworks and Methodology
Application frameworks and coding methodology coincides with change management and source control. Developers need good application frameworks to form a solid structure within which to properly code cohesive sites. CF has its own Application Framework instantiated with Application.cfm and OnRequestEnd.cfm; but this framework is really a building block for focusing on Session and Client variable management and some rudimentary application-level security. It does not address the larger, more prevalent issues of code reuse and symmetry, teamwork efficiency and productivity, commenting and documentation, and so on.
Furthermore, a sound application framework provides some base functionality fundamental to the site. This fosters code reuse, as developers can focus on retooling or customizing that piece of functionality instead of reinventing the wheel each time.
Methodologies provide guidelines for coding the application structure. A methodology is composed of standards. It dictates how to code the site or application so that your code is legible, manageable, and reusable. A good methodology reads easily and is documented thoroughly. It is stern enough to keep developers focused, yet flexible enough to allow developers to grow as they learn.
Application framework and methodology are essential to good rapid application development. However, most shops are guilty of coding without one or both.
A Familiar Scenario
You're an IT or Web shop manager of a team of three Web developers. Your team is pretty strong in fundamental CFML and quickly grasping the advanced concepts. Now you have the opportunity to hire what you perceive is a hotshot. You've heard this developer's name all over the CFUG meetings and you leap at the opportunity to enhance your staff.
This developer comes on board and right away begins to affect the team. However, instead of leaving his bags (bad coding habits) at the door, he starts littering your source code with his own unique indentation style, his own custom tags, and so forth. The code he writes is advanced stuff, but he neglected to comment the code, so your other team members cannot learn by his examples, debug his code, or make any editions without his hand-holding. What should you do?
The Other Side of the Story
You are the hired gun, and, upon walking into the place, you notice their staff is still coding at the CF 3.11 level - their code is full of pound signs, needlessly complex syntax, and deprecated tags. You remain humble, sit in your cubicle, and begin to do your thing. Your tasks are simple and the coding is basic - to you. You are pleased with your work so far, but at the next monthly meeting, you are reamed for your nonstandard methods and lack of comments, and accused of changing the entire application. Do you leave or stay?
A Slightly Different Scenario
Again, same setup as the first scenario, you're this same IT or Web shop manager of three. You decide to send your hungriest developer to a local Advanced ColdFusion Development course, figuring she will be able to pass the lessons on to the rest of the staff. Instead, she takes what she has learned and finishes the next major application revision with advanced methods. However, she now realizes her increased marketability, and serves you notice in lieu of a more lucrative position. She leaves without sharing her onion or documenting the code enhancements she just made. Now what do you do?
There are numerous scenarios to spin through, but I think the point is now obvious. A good application framework and methodology could have remedied all three scenarios. A sound application framework and clear, well-documented methodology would have facilitated the hired gun's adjustment to the team dynamic. Certainly some of his coding style could have enhanced the framework, providing impetus for upgrading the current methodology.
In the case of the hungry developer, providing good documentation for every code revision or even mandating a comment section at the head of each template as part of the coding methodology would allay this situation. If the developer jumps ship, then the rest of the team doesn't have to remain in the dark. The knowledge transfer has already taken place.
Where should shops turn for an application framework and/or methodology? iiFramework (www.iiframework.com) is a popular CF application framework. Other object-oriented CF application frameworks include SmartObjects (www.smartobjects.com) and cfObjects (www.cfobjects.com). Fusebox (www.fusebox.org) is the most popular CF methodology. Spectra is Macromedia's answer to the CF application framework and methodology paradigm. (Many readers are aware that version 1.5.1 is the last feature-additive release of Spectra as the core components are being melded into the next major release of the CF server.) Each of these has its share of strong points and shortcomings.
Patrick Steil does a great job comparing Fusebox, Allaire Spectra, and iiFrame-work in his article, "Rad++' Propel Your ColdFusion Project with Application Frameworks" in CFDJ (Vol. 2, issue 11). See Benjamin Pate's "Introducing Smart-Objects: Build Extendable, Reusable, Object-Based Components Using CFML," article in CFDJ (Vol. 2, issue 8) for an object-oriented CF framework primer.
The Weakest Link
The most important part of the development environment is the team dynamic. Like the proverbial chain, a development team is only as strong as its weakest developer. That said, the importance of a Web development team composed of technically sound individuals cannot be over-emphasized. There are three key members of the Web development team: Web/CF developer, graphic, and database.
At a minimum, a good Web developer today is well versed in HTML 4, Dynamic HTML (DHTML), Cascading Style Sheets (CSS), and ANSI-SQL. It is not enough to simply know about deprecated tags, such as the FONT tag, but in knowing how to correctly code cross-browser, inline style syntax is fundamental.
The complete Web developer is one who not only has mastered all of the above prerequisites, but whose lunch pail also includes the full Web development smorgasbord and Internet alphabet soup: XML\XHTML,WAP\CHTML\I-Mode, LDAP, SSL, and so forth.
Building upon that weak link, the consummate CF developer has mastered all of Ben Forta's tips and tricks, understands the complexities of structures and WDDX (Web Distributed Data Exchange) packets, and understands the intricacies of advanced caching techniques, load distribution, and session management. The well-rounded CF developer contributes to the community by actively participating in local ColdFusion Users Groups (CFUG).
The CF developer is the MVP of the development team, so it would behoove the good IT manager to have several MVP candidates on the team. To ensure MVP status, Macromedia has developed two certification offerings as part of its Macromedia Certified Professional Program (MMCP): Certified ColdFusion Developer and Certified Web Site Developer.
For a complete listing of CFUGs, visit the Allaire Web site at http://devex.allaire.com/developer/usergroups/; for more information on WDDX see www.openwddx.org/; for more information on ACP, see www.allaire.com/services/training/certification/index.cfm.
The final team members are the graphic artist and database administrator. Typically, the CF developer fills one or both of these roles as well, however, the team will function more productively if each member focuses on the area of his or her specialty in designing/developing the site or application. A great number of CF developers can animate images in tools like Macromedia Fireworks or crop photos with Adobe Photoshop. However, there is no substitute for a true graphic designer who can take an idea from charcoal and sketchpad to full-length Flash animation in a few hours.
Likewise, there is no substitute for a good DBA to manage your database. For dynamic Web applications, nothing is as vital and volatile as the data in the database. It is indeed the backbone and life of the application. Take it from a former CF Developer/SQL Server DBA, you don't want your CF developer writing code and worrying about Database Maintenance Plans, truncating logs, proper replication scenarios, or any other DBA functions.
We have a saying in the industry: "Let the Database and Web Server do their jobs, and let ColdFusion do its." The same goes for the development team - let each member do his or her job and focus on his or her specialty. However, separation of power does not equal segregation of force. Dividing the Web team along duty lines is not a call to build up walls, put on blinders, or break the lines of communication.
Communication is the key to success in any relationship - Web development is no different. Part of letting the database do its job is the CF developer asking the DBA to create a stored procedure on the database to replace a long-running query.
Tools of the Trade
The key to rapid application development is accessibility to tools that help you effectively build and deploy powerful, high-end applications quickly. There are a myriad of Web development tools, or integrated development environments (IDE), and graphic suites out there to help attain this goal. I started my Web development career with Notepad, then moved on to Kenn Nesbitt's WebEdit, and Nick Bradbury's HomeSite - acquired by Allaire in 1996.
Today, the industry is crowded with good WYSIWYG editors, such as Micro-soft's FrontPage 2000 and Adobe's GoLive. I won't even go into the numerous Java IDEs. (Sorry, I did not intend this to be a biased product review, but there are really only two IDE choices for serious CF development: UltraDev and Studio.)
When it comes to graphics, artists usually pick their poison and stick with it. Adobe Photoshop (www.adobe.com/products/photoshop/main.html) continues to be the industry standard for traditional graphics and photo retouching, shadowed by CorelDraw 10 Graphics Suite (www3.corel.com/cgi-bin/gx.cgi/AppLogic+FTContentServer?pagename=Corel/Product/Details&id=CC1IOY1YKCC), Ulead PhotoImpact (www.ulead.com/pi/runme.htm), and Macromedia Freehand (www.macromedia.com/software/freehand/). Macromedia's Fireworks 4 (www.macromedia.com/software/fireworks/) has become the favorite among Web developers for Web graphics creation, animation, optimization, and integration.
Macromedia solidified its spot atop the IDE market with the release of its Dreamweaver UltraDev. UltraDev takes Dreamweaver to the edge by complementing the robust Web design engine with support for such data-driven languages as CF, ASP, and JSP. UltraDev integrates with ColdFusion Studio to provide an unparalleled combination of database and debugging tools - and visual development environment to help rapidly design and deliver powerful applications.
For traditional CF development, ColdFusion Studio is the best - hands down! ColdFusion Studio is the de facto CF IDE - pardon the pun. Allaire built Studio on its award-winning HomeSite HTML editor and added features such as full CFML (ColdFusion Markup Language) support, Remote Data Services, a CSS editor, and Source Code Control support. Studio's Project metaphor integrates with any Microsoft Source Code Control (SCC) API-compliant versioning software to help facilitate team coordination on all applications: simple or complex. Again, Macromedia has done a great job of integrating its leading tools - Studio for CF development, UltraDev for visual development - into one sweet package, ColdFusion 4.5 UltraDev 4 Studio.
As I said, CF Studio is my tool of choice for CF development. However, I am increasingly finding Dreamweaver UltraDev and Fireworks on more developer's desktops, and Photoshop on graphic artists' Macs, at each shop I visit.
The optimum CF development environment has dedicated human, hardware, and software resources. Developers use industry-leading IDEs to develop against local resources and within a versioning system on the dedicated development server. The staging server gets a copy of this code base for testing, where it is frozen upon acceptance for migration to production.
Your job as an IT or Web shop manager is to make this development environment conducive to your developers' efforts. Your job as CF developers is to use standards-based methodologies within application frameworks to help facilitate the rapid application development process.
- Where Are RIA Technologies Headed in 2008?
- The Next Programming Models, RIAs and Composite Applications
- AJAX World RIA Conference & Expo Kicks Off in New York City
- Constructing an Application with Flash Forms from the Ground Up
- Building a Zip Code Proximity Search with ColdFusion
- Personal Branding Checklist
- CFEclipse: The Developer's IDE, Eclipse For ColdFusion
- Has the Technology Bounceback Begun?
- Cloud People: A Who's Who of Cloud Computing
- i-Technology Viewpoint: We Need Not More Frameworks, But Better Programmers
- Adobe Flex 2: Advanced DataGrid
- Web Services Using ColdFusion and Apache CXF