crawljax / crawljax

Crawljax
Apache License 2.0
514 stars 218 forks source link

Reorganize the Web Application Client #302

Open ryansolid opened 11 years ago

ryansolid commented 11 years ago

Currently all the relevant templates are on the index.html page and all the controllers, models, and views are grouped together. This is very simple for what is currently there but doesn't scale terribly well. On the positive everything is very accessible and just works.

There are 2 parts to this suggestion. Firstly break out all the controllers, models, etc into their own files in folders name models, controllers, views. Using a RequireJS solution could be feasible but Ember does tend to locate all it's objects in the Global Namespace so perhaps it isn't really necessary. It does prevent you from having the enormous includes list on the index.html.

The 2nd part is precompiled Templates. This might require more work than desired since templates now required an additional step every time they are changed. However this would allow putting all the templates in their own Handlebars files in say the Template directory and then they are compiled into a JS object that is accessible at run time. This is great for organization.

NodeJS module does provide a lot of auto tools to do this for you, but that requires another development tool in the stack. NodeJS simply as a client builder has other benefits but if it's just for a single one may not be worth it. If Node is an option look into Brunch(http://brunch.io/) and EmblemJS(http://emblemjs.com/).

alexnederlof commented 11 years ago

Thanks for the advise @ryansolid! Much appreciated :+1: