Creating an application from zero to done: Day 1
As I might have mentioned earlier on, I’m still a student at Åbo Akademi, working to get my master’s degree in computer science. The studies have not really moved forward in the pace I would have hoped, since i have worked almost full time for the last two years. I’m trying to get my last courses done this semester so that I can then start, and focus on my final thesis.
I got a chance to take a intruging course this period. My school and my workplace was organizing a one week intesive course in Vaadin! The course itself is a walk in the park for me as I been working with Vaadin full time now for over two years. It is an introduction course where you are supposed to make a basic application with the framework. The example application coded live on the presentation of day 1 was a RSS reader, and the course participant’s projects should be of the same magnitude. As I probably got about five of that size projects already done, and when it isn’t really a challange for me, I decided to make something bigger.
I got interested in golf last summer and got me a bag of clubs of my own this spring. For that reason, and that I’ve been wanting to test out new Java frameworks, I decided to start doing a golf result tracker software. This is a total overkill for the course but I get to do something I think is fun.
For the backend I decided to go with Maven for package and dependency control and db4o for the database, along with JUnit for testing. As a seprate project I’ll do a Vaadin frontend with at least two addon components found on the newly released Vaadin Directory, ChameleonTheme for making a custom look & feel, and VisualizationsForVaadin to plot some graphs. I think this set of complexity is about what I will be capable of doing in the four days (Mon-Thu) we have time to code on it. Vaadin is in a different project so that I can add alternative GUI’s to it sometime in the future, if I end up with a decent application. An Android and iPhone app would be handy when being on the golf course!
Today I started looking at what features I want to support in the project. I decided to limit it to adding and viewing of players, tracks and scores. With this small featureset I have still room for some feature creeps. I went on defining a data model and basically coded the first version of all entities all the way. It resulted into seven different entities. I also did some user-handling and password encryption for safe data storage at one point when I accidentally got a little carried away. After defining the fields for the entities I started doing unit tests, and added the getters and setters to the objects along the test writing as I noticed which ones is actually neccessary for the applicaiton (for example a lot of setters are not allowed to be called after initialization and I prefer to have less code and no unused public methods). My project has only entities and tests and no entry point to the application itself. Only dependency injected so far with Maven is JUnit. The code base is still only 355 total lines of code, with 54% of it being tests. 93.7% of the code is being tested with only some catch clauses and such still being outside the coverage. This information is gathered with the plugins ECLEmma (for code coverage) and Metrics (for metrics, duh!) for Eclipse. Moving on from actually coding, I started with doing some mockups of the user interface. I used Balsamiq to do them, as it is really fast and it is free to use online. I did five mockups which is about a third of what I need. These focused on the main screen of the application and adding a new track to the system.
I’m starting to somewhat get a picture of what the application will include at this point. Tomorrow I will probably start with setting up a project with Vaadin and fiddling around with the main layout of the application. I’ll probably draw a couple of mockups and alter the business logic too as I will probably find some points that could have been done better.
