YOUR FEEDBACK
Working at Google vs. Working at Microsoft
Ray the Barbarian wrote: I worked at Microsoft Research, and I had an in p...
SOA World Conference
Virtualization Conference
$50 Savings Expire June 24, 2008... – Register Today!


2007 West
GOLD SPONSORS:
Active Endpoints
Your SOA Needs BPEL for Orchestration
BEA
Virtualized SOA: Adaptive Infrastructure for Demanding Applications
Nexaweb
Overcoming Bandwidth Challenges with Nexaweb
TIBCO
What is Service Virtualization?
SILVER SPONSORS:
WSO2
Using Web Services Technologies and FOSS Solutions
Click For 2007 East
Event Webcasts

2008 East
PLATINUM SPONSORS:
Appcelerator
Think Fast: Accelerate AJAX Development with Appcelerator
GOLD SPONSORS:
DreamFace Interactive
The Ultimate Framework for Creating Personalized Web 2.0 Mashups
ICEsoft
AJAX and Social Computing for the Enterprise
Kaazing
Enterprise Comet: Real–Time, Real–Time, or Real–Time Web 2.0?
Nexaweb
Now Playing: Desktop Apps in the Browser!
Sun
jMaki as an AJAX Mashup Framework
POWER PANELS:
The Business Value
of RIAs
What Lies Beyond AJAX?
KEYNOTES:
Douglas Crockford
Can We Fix the Web?
Anthony Franco
2008: The Year of the RIA
Click For 2007 Event Webcasts
SYS-CON.TV
TOP LINKS YOU MUST CLICK ON


Code Development in Distributed Environments
Requires effective build management tools

Digg This!

Page 2 of 2   « previous page

Another commonly faced problem is lack of build portability. Builds often work only on an individual developer's machine, which by default becomes the "production" build machine. This approach can cause severe problems when trying to track down bugs that are discovered once an application has been released to Production. To solve this problem, development teams should standardize their directory structure. All developers should work on code in the same directory structure. If a versioning or CM tool is used, pull the directory structure from it; if not, enforce strong directory conventions for all developers.

Portability problems also can be mitigated by using global variables in the build script templates that identify the root location for all source code, compilers and common libraries. By setting environment variables such as SRC_HOME, COMPILER_HOME, and COMMON_HOME, the same build scripts should work on all machines. Using global variables in the build script templates also reduces the amount of template editing that is required by developers.

Finally, isolate the build scripts to just that: builds. Too often, "build" scripts include substantial pre- and post-build logic unrelated to the build. Pre- and post-build logic can be extremely complex, especially as an application matures and development is being performed on multiple versions simultaneously. The Ant script in Listing 2 demonstrates a build script with a very basic and generic deployment portion.

Rather than writing pre- and post-build logic within a build script (where the functionality is often limited by the scripting language or tool), place the non-build logic in external scripts. The external scripts should be written in a scalable, lightweight, and cross-platform language such as PERL or PYTHON. Tightly focused build scripts can then have built-in hooks to the external build utility. Listing 3 takes the overly complex build script of the prior example and replaces it with a call to an external script.

By partitioning the build scripts in this way, developers (or build masters) who encounter build problems can drill down to the root cause very rapidly. Additionally, as development grows in complexity and new languages or target Operating Systems are added, the in-house build utility can scale more effectively.

For example, consider a C and C++ development shop that uses an entirely Make based build system with all pre- and post-build logic written in the Make scripts. When the development shop decides to add a Java component to their application, they are faced with writing an Ant component (equivalent to their existing Make scripts) that manages all of Java-related pre-build, build, and post-build logic.

However, if the development shop has a build utility, written in PERL, that executes Make scripts limited to build execution, they only have to write Ant scripts that handle the Java builds, and can use the existing PERL framework as a basis for all of the non-build functionality.

Dealing with multiple languages
Another common problem in complex distributed environments is build scripting inconsistency resulting from development in multiple languages. Build administrators can either force a single scripting language, or maintain different build scripts for different teams (Make, for example, works for C and C++, but is not particularly well suited for Java). The best approach is to maintain different scripts with isolated build functionality, using a consistent, cross-platform, lightweight scripting language for all non-build functionality (e.g., retrieving code from a CM tool, moving files around, deploying binaries etc.). Separating build functionality from all non-build functionality limits variances. There is no reason to be using Make or Ant scripts to copy files around or make logical decision during batch processing.

A common problem in such complex environments is the lack of an effective audit trail. Log all build script templates and "non-build" script components, and make sure audit trails track source code to executable. For each action that touches source code (check-out, move, compile etc.), embed a logging message into the script templates. This is facilitated by adding a basic Bill Of Materials report to the in-house build solution, including:

  1. Name of the final target being built
  2. Build machine environment information
  3. Compiler version information
  4. Version information derived from the CM tool for every dependency included in the build
Identifying Breaking Points
There are a number of critical "breaking points" that cause in-house build systems to become cost- and/or resource-prohibitive. When they occur, development teams generally begin to consider an automated, non-scripting environment.

One of the first breaking points occurs when the amount of time it takes for an application to build begins to limit unit- and integration-testing effectiveness. Only the items that need to be built should be built, in a true incremental approach. Another breaking point is excessive problem-resolution turnaround, because the development environment scales beyond the capabilities of the in-house scripted manual build system. Developers find themselves spending most of their time tracking down what source code and common libraries went into a built object rather than resolving coding problems.

A sure sign that developers are reaching the limits of manual scripting efficiency is when they find themselves consistently spending as much as an hour a day working on build problems (either their own, or debugging build problems of a centralized CM team). Some companies actually assign a dedicated CM team whose sole responsibility it is to execute builds. Developers find themselves waiting for the CM team to build their applications before they can move on to the next development effort. It can reach the point where the centralized CM team simply cannot keep up with the demand, especially when builds are cross-language, cross-platform and incredibly complex.

Migrating to Automated Build-Management
To solve the problems described above, teams within medium- to large-sized development environments are now turning to tools based on a true Client/Server architecture with a central build knowledge base. Introduced over the past five years, this new class of build tool provides a standardized method for creating and managing Build Control files that replace Make and Ant/XML manual scripting. This approach eliminates the portability issues of rule-based programs derived from Make, while resolving the standardization challenges associated with scripted build processes based on Ant/XML.

One example of this approach is a build management tool that weaves together human and machine intelligence to automate and standardize the enterprise build process. It is possible to incorporate a browser-based user interface and a Tomcat or WebSphere Application Server to provide access to a Knowledge Base Server. Enterprise-based features allow for the connection to multiple remote build servers. Simple Object Access Protocol (SOAP) is used as the communication layer between the browser and the application servers.

Developers interface through a web client, a command line interface, or indirectly through IDE plug-ins. Build meta-data is stored and managed via the central Knowledge Base Server and reused by multiple developers to generate Ant/XML scripts for Java support, or to generate "Make"-like scripts for traditional build requirements. Build Control files can be generated to build a single object (supporting developer daily compile activities) or a complete application (containing hundreds of inter-dependent modules).

When a complete application Build Control file is generated, it eliminates the problem of recursive Make and ensures the accuracy of incremental builds. Builds can be managed from an empty build directory pulling source code from a pre-defined search path, or by retrieving source code from a version management tool. Build management also allows control over environment variable settings such as LIB, INCLUDE and CLASSPATH so that, regardless of the build machine, the build results are the same.

Build management does not replace Ant for completing Java builds, but rather extends the use of Jakarta Ant without the need for manually coding XML scripts. In the place of hard-coded Make and Ant/XML scripts, for instance, its rules engine takes advantage of a knowledge base of build meta-data, such as Target Name and Dependency information, to dynamically generate portable, PERL-based build processes at build time that can be referenced by multiple development teams.


Page 2 of 2   « previous page

About Matt Gabor
Matt Gabor is a senior developer, Catalyst Systems Corporation. He has an extensive background in the use and development of Eclipse Plug-ins and is expert in the Openmake Build Plug-in. His technical skills includes J2EE, J2SE, and .NET development.

About Steve Taylor
Steve Taylor is an experienced senior developer, bringing 17 years of expertise with client/server and mainframe application development and system integration. Prior to founding Catalyst Systems Corporation, he served as a lead technical consultant responsible for the successful implementation of applications into the production environment. Steve received his BS in computer science/mathematics from the University of Illinois-CU.

Jarno Lamberg wrote: It seems like listings 2 and 3 of the article did not make it to this online version even though the paper version states that both listings can be downloaded from here. Am I missing a download link somewhere?
read & respond »
Wayne Fay wrote: Somehow you've managed to write an entire 2 pages about Java build management without mentioning Maven even once. Astounding.
read & respond »
LATEST ECLIPSE STORIES . . .
Adobe's Kevin Lynch and Microsoft's Scott Guthrie to Keynote AJAX World RIA Conference & Expo
Two of the biggest launches in Rich Internet Application history took place in 2007/2008 when Adobe launched AIR 1.0 in February '08 and Microsoft launched Silverlight (September '07). At the 6th International AJAXWorld RIA Conference & Expo in October SYS-CON Events is delighted to be
Instantiations Rolls Out Product Updates in Conjunction with Eclipse 3.4 and Ganymede
Instantiations announced that its entire Eclipse-based product line has been updated to coincide with the annual Eclipse open source release, Ganymede. Included with the roll-out are additions in the area of security to its CodePro AnalytiX comprehensive code quality product, bringing
Quest Software's JProbe Now Available as Eclipse Plug-In
Quest Software announced the latest release of its Java profiler, JProbe 8.0, which is now offered as a plug-in to the Eclipse Java Integrated Development Environment (IDE). The release of this capability aligns with the increased adoption of the open source development. Launching JPro
Migrate to Eclipse 3.4 Ganymede, Manage Configurations with Pulse
Genuitec announced the general availability of Pulse 2.2, a way to obtain, manage and configure Eclipse Ganymede and plugins. Genuitec is pleased to offer this product to Pulse users on the day of the Ganymede release. As of today, Pulse 2.2 will support full Ganymede tool stacks.
Protecode Announces Governance and Intellectual Property Management Software
Protecode announced the general availability of its software development tool for governance and Intellectual Property (IP) management. The latest release enables commercial software developers and open source creators to accelerate managed adoption of open source code in a simple, pai
AccuRev and Rally Software Partner to Scale Agile Software Development Best Practices
AccuRev and Rally announced a technology partnership that will integrate AccuRev software change and configuration management (SCCM) with Rally's Agile lifecycle management solutions. The combined solution will provide a platform to manage multiple Agile processes and ongoing customer
SUBSCRIBE TO THE WORLD'S MOST POWERFUL NEWSLETTERS
SUBSCRIBE TO OUR RSS FEEDS & GET YOUR SYS-CON NEWS LIVE!
Click to Add our RSS Feeds to the Service of Your Choice:
Google Reader or Homepage Add to My Yahoo! Subscribe with Bloglines Subscribe in NewsGator Online
myFeedster Add to My AOL Subscribe in Rojo Add 'Hugg' to Newsburst from CNET News.com Kinja Digest View Additional SYS-CON Feeds
Publish Your Article! Please send it to editorial(at)sys-con.com!

Advertise on this site! Contact advertising(at)sys-con.com! 201 802-3021

SYS-CON FEATURED WHITEPAPERS

ADS BY GOOGLE