Skip to content

Organizational refactor [deprecated]

Brian Graham edited this page Aug 12, 2013 · 1 revision

#Organizational refactor [deprecated]

The contents of this entry are no longer relevant and connected to the project.

#Process ##Next steps

  • Load code through http://jsbeautifier.org/ as a script, or something to give us a consistent style/white-space standard automatically.
  • Find a http://www.jshint.com/ profile that works for our project, automate static analysis so we can rapidly spot the easy bugs.
  • Build a utility to abstract away some of the HTML string building and dialog actions
  • config.js, common.js and main.js need to become more clear as to their purposes, or turned into a utility object.
  • Script loader, so we can add new scripts as an array or on-demand rather than all-at-once.

#Purpose I intend to refactor some of the code base to accomplish three goals really

  1. Make it faster for a new contributor to get working
  2. Consistency between conventions used
  3. Enhance separation of concerns

Basically I'll be doing a few things to the code base:

  1. Light Restructure - Third party libraries are going to be placed into an asset folder, plug-ins are great where they are so they don't need to be moved, some of the scripts existing are unobvious to their purpose, these need to find a nicer home.
  2. Load restructure - We may want to make a loader to include all the scripts if speed on opening is not our absolute top priority, adding a loader script will be negligible and may actually improve future load times.
  3. Separation of concerns - I'd like to remove inline CSS styles and JS code from HTML elements, these are better use to us when not inline with HTML content. Likewise, we may wish to have a small template engine to do some of the JS that builds HTML. This also includes consistency of how event listeners are implemented in some places.

Right now that's the plan for refactoring. Feel free to send me a message to change the plan. Everything will likely work the exact same on the user side (or possibly remove a handfull of glitches), and files will only move folders (but I include readmes in each folder to describe the purpose of it).

Clone this wiki locally