J2EE project execution: Some best practices
Template code, a developer's handbook, and automated code reviews can improve project execution
By Shrikant Vashishtha, JavaWorld.com, 11/14/05
Even though we all face similar issues in most of our projects, we still lack defined ways of tackling them. Throughout my
years in software development, I have used some solutions to the recurring problems that plague most of my development projects,
solutions that have really helped me effectively execute projects. In this article, I share with you three best practices
for project execution, some of which could be considered full-fledged patterns:
- Use template code
- Write an effective developer's handbook
- Perform automated code review
Use template code
A sample code implementation for a simple and a complex business use-case can help developers write effective and efficient
code. Consider the following factors that often plague software development projects:
- Technologies change, and finding competent technical people with experience in new technologies can prove difficult. Plus,
newer developers may not have experience writing efficient and effective code. Template code eases the way to learning new
technologies and provides an outstanding reference point for developers.
- Learning and implementing new technologies takes time and might lead to a mess if not handled properly. Instead of forcing
developers to learn on their own, jump-start them in their development by offering the template code as a reference point
they could use for coding.
- Many projects must be completed within tight schedules and with limited manpower. Everybody in a project shouldn't have to
reinvent the wheel. Senior technical people might be available at design time, but when it comes to real implementation, developers
are usually on their own. Trivial issues can get lost, only to be discovered when they've already caused a mess. How many
times do Javadocs follow a standardized format and guidelines? How many times does code follow well-defined idioms and best
practices? Visual framing is more effective than books or reference manuals, thus, template code comes to the rescue.
- Many software projects are not only large, but also distributed. Sometimes, projects execute in different parts of the world.
When the project is nearing completion, you don't want customers to be surprised by code that doesn't meet their expectations.
Send sample code to customers well before construction starts and record their feedback. This sample code should be realistic
and representative, not just a "Hello World" kind of application.
- Developers usually have a bulk of reference manuals, standards, and frameworks to help them with a project. But coding idioms
may not be obvious even if a design is in place. Visual framing helps. Unless developers have real code examples, they may
have slightly different interpretations of the proposed project. One simple item could be implemented in various ways, with
none of the suggested approaches exemplifying the best implementation. The sample code could help by implementing specific
code idioms.
Implementation
To write your template code, gather a team of experts (both technical and functional) to identify a simple and a complex case
from a problem area of the application to be developed. Have these experts come up with an implementation, or template, based
on existing design. Below I list some tips for writing this code: