|
A very important part of improving software development efficiencies is
improving the set of tools used by the development team. This section
captures a viable open source "development tools stack".
- Source Code
Control System
- A source code
control system is paramount to an efficient development team.
- Compare
the options to select a tool that is well-suited to your particular
enterprise needs. Subversion looks like a reasonable choice for most
scenarios.
- Defect
Tracking Tool/Change request process - Click
here for a comprehensive list of defect tracking tools.
- Requirements
Management/Full Development Cycle Management tools - Such toolsets can be
a great boost for productivity and could include defect tracking/change
request management tools as part of a suite of tools.
- Modeling Tools -
Modeling tools add a lot of value to the productivity of teams. Important
features to look out for include UML 2.0 support,
roundtrip engineering,
model simulation capability etc.
- Code
Review/Checkin Process –It is important to have a well-defined
code-review process that includes at least one level of peer review.
It's nice to achieve integration between the source control system,
change request/defect tacking tool and the code review process. The
changelist concept of source code control systems become handy to
implement such a process (not all source code control systems support
this feature).
- Integrated
Development Environment – There is a lot of debate about Netbeans
vs. Eclipse. I initially preferred Netbeans to Eclipse simply because it
does not try to introduce too many new UI concepts and also comes with
more pre-packaged plugins. Eclipse wins however because of the abundance
of plugins and wider following. For J2EE applications, the following set
of open source plugins are a must, unless you have the luxury of using
an expensive commercial IDE. Simply download the following plugins and
extract to your eclipse installation folder.
- Lomboz –Wizard based
J2EE features. Great way to get started using XDoclet-enabled
J2EE development. Click
here to get started using Lomboz. The Simple
EJB sample is great to quickly develop an XDoclet-enabled EJB
example. You can use this example to build your own template sample,
complete with well-designed Ant build scripts etc.
- JBoss IDE – JBOSS
IDE gives convenient auto-complete functionality for XDoclet tags
apart from JBoss integration (the latter is also provided by the
Lomboz plugin). Click
here to get started on the JBoss-IDE plugin.
- Hibernate Synchronizer
– This is a great plugin that allows you to use a mapping-file-centric
approach to generate and maintain the java classes. I love the fact
that it generates two sets of classes, one bases class and another
extension that you can include your business logic in without fear of
losing your hand-written code. Read this
article to get started with the Hibernate Synchronizer. Compared
with a data-centric code generation approach, a mapping-centric approach is
more practical for different scenarios (legacy systems as well as
green-field systems).
- Build - There
are two primary options here
- Ant – Ubiquitous build tool for Java
– automates most common build tasks in a platform independent manner.
The problem with Ant is there is a learning curve as it deviates from
concepts of scripting environments (obviously because it wasn't meant
for scripting). Also ant files can get unwieldy and difficult to
manage.
- Maven – covers a wider set of
interests than Ant. Better project management and project organization
facilities are built-in to Maven. Many of the routine tasks get automated
through convenient maven plugins. Ant tasks can be used from Maven
anyway so there's no reason why we shouldn't be using Maven instead.
The repository and project site reporting features are neat. Click
here to get a head start on creating J2EE Applications with Maven.
If you want to get right down to it – download
this sample (from the link above) that creates a eclipse-compatible
xdoclet based multi-project sample. Also try out Maven Workshop plugin
– which allows you to generate code as well as integrate Maven with
Eclipse – haven’t tried it myself yet – but in my list of things to
check out.
- Configurable source
code formatting – Jalopy
- Style Checker – Checkstyle
- Unit testing - unit
testing of code should be mandatory . – JUnit
- In-container testing –
Cactus
- Daily builds and
nightly unit tests - AntHill
- In
product-development systems, dedicated unit-test boxes are setup with
various supported configurations for the product. These boxes
"pickup" new builds as soon as they are dropped and start
running the unit tests. A similar framework can be used in an
enterprise. For example, seperate configurations for unit tests
including coverage and another for performance tests etc.
- Unit Test Coverage
Reporting - jcoverage
- Code generation - I
truly believe in the power of code-generation. XDoclet
and Middlegen is a
good choice if you don't want to fork out $$$$$ on expensive MDA tools.
- Compile time AOP - I'm
still too conservative to use AOP in production. It can, however be used
very effectively for enforcing layering constraints in a large system. This
presentation has a good example.
- Profilers - It's
important to have the right tools to optimize your code for performance.
Profilers will help spot the bottlenecks in your code.
- Dev Testing - dev
testing involves individual feature teams testing new functionality that
they have introduced and any relevant (not exhaustive) regression tests.
- Integration Testing -
integration testing may be driven by either a developer-team or a
QA-team and typically involve testing intersections of the new
features.. A very good practice in my opinion is to have the Architect
closely involved with his developement team to come up with the
integration test cases. These test cases should thereafter be handed
over to QA and will become part of QA's regular suite of tests - and
potentially automated. See open
source test management tools.
TODO: Create a very simple sample that combines the power of the above
tools through Maven or Ant.
|
|