This year, my eldest son started learning spanish, at school. He is the kind of boy who does not spend a lot of time in studying his vocabulary lessons. Immediate consequence: average grades...
So, I wanted to provide him with a simple application that could help him in reviewing his vocabulary lists.
The first version of this application should include following functions:
Some additional, non functional requirements:
I'll use Java language, so that Windows / Linux requirement is fulfilled. Additionally,using Java should allow for easy ports to other platforms (e.g. my Nokia N810).
I know Eclipse a little bit more than Netbeans, so I'll use Eclipse. Netbeans includes a native GUI builder. For Eclipse, I could add one, like Jigloo, for instance. But as my application is very simple, in its first version, I'll do without one.
To get a look and feel well-integrated into the execution platform, I'll use SWT.
To store data in a persistant way, I'll use Derby.
I'll store my source code into a subversion repository, on my Linux (ubuntu 9.04) PC. I'll configure it so that I can access the source code from any other machine connected to the internet.
Synaptic knows about the 3.2.2 version of Eclipse (Callisto), no more. So I manually install the latest version, Galileo, after having downloaded it from the Eclipse web site. And, before this, I install the sun-java6-jdk package.
See below for installation of subclipse plug-in.
SWT is downloaded from here. And installed according to this page.
For Derby, I install Derby plug-ins (core, ui and doc plug-ins must be extracted into the eclipse plugins directory). Derby plug-ins documentation is accessible from Eclipse help. Derby documentation is here.
Once the Derby plug-ins are installed, add Derby nature to the concerned project. The effect is to add following libraries to the project:
To install and configure subversion, I rely on those documentations: this one and this one. Resulting main steps are:
I'll use svn over ssh, to ensure that no clear-text passwords are transmitted over the internet. As the PC where I install all this stuff connects to the internet via a router, I need to configure it, adding a port forwarding rule: every incoming connection request on port 22 (ssh port) will be forwarded to this PC. While I'm at it, as I use DHCP on our home network, I add an address reservation for the PC, to ensure that port forwarding will always be OK.
To use svn from a remote machine, I'll have to use the following syntax for the repository:
svn+ssh://<userName>@<routerDomainName>/home/svn/projects/<projectName>
with:
Ssh will request a password: I'll have to give it my Linux password.
Most of svn commands will ask twice for password. As they open two successive connections to the repository, ssh asks the password twice... To get rid of this problem, one possible solution is to configure ssh so that it uses keys. We'll do this later on...
Svn documentation is here.
To have a direct access to the svn repository from inside eclipse, I install subclipse 1.6.5. Documentation is available from the eclipse help.
Useful SVN commands, in command line mode:
Next article: design.