3 ms·
I thought this was a pretty good read. Here at blip.tv, we have a few sizeable JS projects in the wild (our HTML5 player, our distributor dashboard, and our des
by kellysutton 16y ago
I thought this was a pretty good read. Here at blip.tv, we have a few sizeable JS projects in the wild (our HTML5 player, our distributor dashboard, and our destination site), each with shared dependencies.
Keeping discrete files in JS is one step from bringing your work from quick hacks to complete projects. I disagree with a few of the patterns in the post, but I thought it's on the right track.
As far as handling many asynchronous events, we follow a naming paradigm similar to Apple's Obj-C. It works surprisingly well for JS. We deviate a little bit with global (page) events via our own fireEvent() methods. There are also local (component) events that communicate within pieces of a page itself. We maintain a loose coupling of all elements on the page and thereby increase usability. We still provide a messaging system for other components to listen to, which allows us to have strong and consistent integrations across pages.
I'll write a followup on exactly how we do our concatenation and minification in a later post. I think it could be useful!
- petegrif 16y agocould you give us some idea on how big your sizable js apps are? I suspect this is a case where quantity does turn into quality. I.e. as continues to get bigger problems morph.