Saturday 26 February 2011

Inexpensive Development Platform for J2EE

Once the server is ready (see my previous article) I need a similar inexpensive development environment. Inexpensive it's OK but uncomfortable would be bad. I have two different choices: the first is to create a small development corner on my office workstation. The second would be to buy a a net-book and use it as dedicated appliance.

The first option has the advantage of a powerful hardware and a large screen. The net-book is small and may be used everywhere. I decided to investigate both environments because the first is suitable for developing a new project or a major release and the second seems to be suitable for support and small changes.

The components I did choose for my environment works and are available for Windows, MacOSX and Linux. I'm really working with this environment on Windows/Linux clients. I don't use a MacOSX but some of my colleagues at work uses all this pieces of software without any problems on different Macs.

Installed Software
  • Java Development Kit (JDK), the last one, currently 1.6.0_24. (all systems)
  • PuTTY (ssh connectivity, Windows only).
  • GIT (all systems).
  • Tortoise GIT (Windows only).
These software packages are installed on each client for better integration into the environment. To avoid additional documentation I always perform a standard installation. For GIT on Windows I prefer the integration into the windows CMD-Box, with PuTTY and no integration with the Windows explorer (this integration is done by Totoise GIT). I describe my SSH setup here.

Portable Software
I did copy this software on a memory stick (2GB). The performance is acceptable also on the net-book. For project which don't rely on security at all, the stick may be replaced by a service like Dropbox.

Configurations

Windows Environment
SET JAVA_HOME=C:\Program Files\Java\jdk1.6.0_24
SET M2_HOME=E:\java\apache-maven-3.0.2
SET PATH=%PATH%;%JAVA_HOME%\bin;%M2_HOME%\bin

UNIX Environment
JAVA_HOME=/usr/local/java/jdk1.6.0_24
M2_HOME=/usb-mnt/java/apache-maven-3.0.2
PATH=${PATH}:${JAVA_HOME}/bin;${M2_HOME}/bin
export JAVA_HOME M2_HOME PATH

Maven Settings

The file settings.xml have to be placed into the folder .m2 which was created into the home directory of the user on both Windows and UNIX.
<settings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/SETTINGS/1.0.0" xsi:schemalocation="http://maven.apache.org/SETTINGS/1.0.0
                      http://maven.apache.org/xsd/settings-1.0.0.xsd">
  <localrepository>[usb-mnt]/java/m2/repository</localrepository>
  <profiles>
    <profile>
      <id>default</id>
      <repositories>
        <repository>
          <id>org-matheclipse-repository</id>
          <url>http://symja.googlecode.com/svn/maven-repository/</url>
          <releases>
            <enabled>true</enabled>
          </releases>
          <snapshots>
            <enabled>false</enabled>
          </snapshots>
        </repository>
      </repositories>
    </profile>
  </profiles>
  <activeprofiles>
    <activeprofile>default</activeprofile>
  </activeprofiles>
</settings>

The Source Code
The source code was checked out under [/usb-mnt]/gitroot/[maven-project] using GIT. I did open a CMD-Box/Terminal-Window into this folder and I did execute mvn clean install.

The IDE
I did start the Eclipse STS from the memory stick, after setting my preferences I noticed that the Maven configuration was already OK. After importing the Maven project I could start working as usual.

Conclusion
The environment is quite simple but efficient and enough to program and maintain any J2EE application. The development corner on the strong office workstation doesn't collide in any way with the main purpose of the workstation.

The net-book environment is better than expected. I had to be patient during the installation and the first start of the IDE, but, once started, also the IDE is usable and the small screen doesn't affect my productivity.

I did work a while with the net-book only and without any additional device like an external screen or a mouse. Using the tethering function of my smartphone I was able to connect to my servers from everywhere and travelling by train.

The net-book is light and wakes up fast and did cost 170€ including the USB stick.

The Net-Book

I did work with two net-books the first an ASUS Eee 1001PX and the second a Samsung NP-N150 Plus, both with Intel Atom 450 CPU, 1GB memory, 250 GB HD and Windows 7 Starter.

No comments:

Post a Comment