So the app I'm working on is simple. I only need to handle some UI stuff – a user clicks a button, create ajax call to update db and then manipulate the UI a little. I think it's too basic to justify using Angular/Vue/etc for front end.
Here's a gist of what I have right now. I'd like to break this up. Separate files for Helpers, Offers, Carousel would be nice, but I'm not really sure the best approach here. Classes / Modules / neither?
Note: I don't think my usage of the
MyApp class is correct – I probably shouldn't be creating an instance of the entire app 🙂 sounds dumb to me, but it's what I came up with that works. Maybe I should using modules? I don't really know. Any help here is much appreciated.
I'm using gulp and bebelify / browserify for ES6 stuff. I don't really have time to learn WebPack or whatever is cool these days.
The back end is built on top of a Code Igniter / Mongo DB back end, if that matters.
Submitted August 14, 2017 at 06:38AM by SoBoredAtWork
via reddit http://ift.tt/2w1LZua