Skip to content

Latest commit

 

History

History
67 lines (47 loc) · 3.2 KB

8.1.md

File metadata and controls

67 lines (47 loc) · 3.2 KB

8.1 Technical Debt

Most codebases which have been worked on by many people, over a long, long time, usually have some parts which are not very nice. Here are some parts of the Go codebase (in no particular order) which could do with cleaning up -

8.1.1 Hibernate and iBatis - Both used

Description

Some of the DAOs in the Go codebase still use iBatis. Some use Hibernate. This causes, for instance, the transaction management to be more complicated than it should be. It also stops Go from easily supporting multiple databases.

History

It was a planned and slow strangler move from iBatis to Hibernate, which got slower over time, rather than quicker.

Moving forward

Need to move iBatis code over to Hibernate whenever any work around an area is done. Might need to allocate some time specifically to move, too.

8.1.2 Old version of JRuby and Rails in codebase

Description

Go uses a 2.3.x release of Rails, which recently got deprecated. Probably don't need to say much more about this. :( It causes Go to not be able to take advantage of new improvements in Rails. Causes people to have to use antiquated Rails contructs rather than the new ones.

History

It's a daunting task, because of API changes in Rails, dependency on JRuby, RSpec and other gems. It feels like one upgrade was missed a few years ago and then it was too late.

Moving forward

Will need to first upgrade JRuby and Jetty to the newer revisions, since newer Rails releases do not support the old JRuby revision that is used (corresponds to Ruby 1.8.6). Then, need to do a pretty big upgrade to all Rails code in the codebase. Need to bring in Bundler into the codebase for gem management. Biggest hurdles will be:

  1. Default ERB syntax has changed, so most ERB files will not work out of the box, but will silently fail when viewed (will show ERB code on the rendered page).

  2. RSpec needs to be upgraded, since the old gem will not work with the new JRuby/Rails combination. Most tests will fail.

8.1.3 Use of velocity for views

8.1.4 Remove old view usage in acceptance & get delete those views

8.1.5 ‘util’ module should be used only by ‘server’

8.1.6 Javascript frameworks

Description

  1. Prototype and jQuery: Should migrate to jQuery. There are a few pages which still use Prototype.

  2. JSUnit: Should move to a more modern Javascript unit-testing framework. Though JSUnit is not very bad, the feedback loop is a little slow because the JSUnit server needs to be restarted every time the JS code changes, while testing. A framework like Jasmine will work better.

  3. Some Javascript code needs refactoring/remodeling. For instance, vsm_renderer.js has tests, but is not well organized.

History

A consequence of a long-running project, probably. Some amount of stranglers left behind. Some cleanup should have been done before, but wasn't. Needs to be done now.

8.1.7 Improve user documentation

generate images for every release (automation)

8.1.8 Deprecate usage of ant

use maven for modules with rake for scripting & buildr for installers. currently we use ant for building osx installer.

8.1.9 Upgrade jetty 6.1.23 -> 9.1.3

8.1.10 Make server & agent independent of jetty so that we can support all servers.