Early on in my aerospace engineering career I was once told this, (the title of this post) by a more seasoned engineer. Since then I have taken this to heart. I tend to buy books often and I am a firm believer in preparing for a new project before hand. I also don’t think you can fully commit everything to memory but I often find myself remembering a topic I read and then going back to a resource to refresh my memory.
The code base suffered from poorly formatted code to poorly implemented or misused design patterns. There were a lot of opportunities for code reuse and a need for consistency in the user interface as a whole. Also the project build processes needed to be recreated from scratch since significant parts of it did not work and what did work couldn’t be easily automated. The code base did use the Model, View, Controller pattern, but not very well. The view objects contained most of the code for the application logic and the controllers did very little.
Each application in the suite is launched from an encompassing application via an iframe. This gave the applications a lot of flexibility but each application also had its own copy of dependent libraries. Also the iframes would make communication between the applications more difficult.
So my first task was to identify parts of the applications that were reused throughout the code base and using the Module Pattern, create reusable modules that could easily be used by any of the applications in the suite. previously these components had been copied and pasted in the code where they were used. They were also inconsistent from place to place and bug fixes had to be applied to multiple locations in the code base.
With these basic reusable pieces in place, any new application in the suite can easily utilize them and the existing applications will be refactored over time to begin using them. Each application will also use the module pattern so that eventually, when all the applications have been refactored they can be included in a new encompassing application using the Sandbox Pattern.
In my previous Java projects we had used CruiseControl and ANT build scripts for continuos integration and automated testing. I really appreciate the peace of mind and constant feedback that CI provides so I plan on using Jenkins CI for continuos integration and create new ANT build scripts for each application.
Coming up next in my reading list are the following. I hope they are as impressive as the previous.
- High Performance Web Sites: Essential Knowledge for Front-End Engineers by Steve Souders
- Even Faster Web Sites: Performance Best Practices for Web Developers by Steve Souders
Anyway, I thought I’d share this list of resources in case anyone finds themselves in a similar situation.