dukecon / dukecon_html5

MIT License
2 stars 3 forks source link

Modularize the application #48

Closed annam002 closed 8 years ago

annam002 commented 8 years ago

Dependencies between the js files in the application are a mess. Use requirejs to divide the application into proper modules.

annam002 commented 8 years ago

Involves a lot of changes for all files; will do this after release.

dasniko commented 8 years ago

I just started something, what might be possible to support your approach. We discussed yesterday in Skype chat to switch the frontend build process to Gulp. There's a gulp branch containing the changes.

Additionally to only replacing Maven with Gulp, which wouldn't have an advantage, it is now possible to do a frontend development on http://localhost:3000, without requiring to have a local backend server running. There's a proxy middleware plugin, which delegates all rest calls to a somewhere deployed backend server (currently latest ist default). So, no need to run local file:// protocol anymore and always have a proper server behaviour. The command to run the local server / browser-sync is gulp watch.

Furthermore, I'm currently dividing the .css files into some kind of base/filter/talks/speaker fragments, adding some Sass magic and building the final css for browser usage during the Gulp build task. With browser-sync, the browser content is automatically refreshed/reloaded when contents change. This leads to a more maintainable approach.

After that, I want to this for the JS files. This could be a good base for modularize the JS things.

BTW: Do you really mean RequireJS/AMD? I would prefer CommonJS (which has the require() function) with Browserify (or even Webpack), it has a more understandable api/syntax.

annam002 commented 8 years ago

I wanted to modularize the js next Friday. There is an issue for this on my name. Already started befor the release but did not merge back yet. Am 31.01.2016 13:11 schrieb "Niko Köbler" notifications@github.com:

I just started something, what might be possible to support your approach. We discussed yesterday in Skype chat to switch the frontend build process to Gulp. There's a gulp branch containing the changes.

Additionally to only replacing Maven with Gulp, which wouldn't have an advantage, it is now possible to do a frontend development on http://localhost:3000, without requiring to have a local backend server running. There's a proxy middleware plugin, which delegates all rest calls to a somewhere deployed backend server (currently latest ist default). So, no need to run local file:// protocol anymore and always have a proper server behaviour. The command to run the local server / browser-sync is gulp watch.

Furthermore, I'm currently dividing the .css files into some kind of base/filter/talks/speaker fragments, adding some Sass magic and building the final css for browser usage during the Gulp build task. With browser-sync, the browser content is automatically refreshed/reloaded when contents change. This leads to a more maintainable approach.

After that, I want to this for the JS files. This could be a good base for modularize the JS things.

BTW: Do you really mean RequireJS/AMD? I would prefer CommonJS (which has the require() function) with Browserify (or even Webpack), it has a more understandable api/syntax.

— Reply to this email directly or view it on GitHub https://github.com/dukecon/dukecon_html5/issues/48#issuecomment-177484306 .

dasniko commented 8 years ago

Yes, you and me already commented in your issue... :-)

annam002 commented 8 years ago

Ok, so, please let me finish this refactoring that I already started before you change everything. Am 31.01.2016 14:08 schrieb "Niko Köbler" notifications@github.com:

Yes, you and me already commented in your issue... :-)

— Reply to this email directly or view it on GitHub https://github.com/dukecon/dukecon_html5/issues/48#issuecomment-177497158 .

dasniko commented 8 years ago

I didn't change "everything". No JS file relations yet. Please have a look into the gulp branch for what I did, including the readme file!

annam002 commented 8 years ago

Ok, it sounded like that. ;-) Will check out your changes this afternoon. Am 31.01.2016 14:18 schrieb "Niko Köbler" notifications@github.com:

I didn't change "everything". No JS file relations yet. Please have a look into the gulp branch for what I did, including the readme file!

— Reply to this email directly or view it on GitHub https://github.com/dukecon/dukecon_html5/issues/48#issuecomment-177498855 .

annam002 commented 8 years ago

Modularized the app with requirejs. Still some clean up to do.

annam002 commented 8 years ago

Left to do: fix the tests

ahus1 commented 8 years ago

test are now fixed. see 20bd20a78e8261a67c00da02a4cd84883ef47917 and 485ba93b68ed415efd8bdefb3ac123565655cd0f