jaunesarmiento / fries

Fries helps you prototype Android apps using HTML, CSS, and JavaScript.
MIT License
1.55k stars 222 forks source link

Wil you use `Require.js/AMD/CMD` or what's the namespace strategy? #42

Closed hbrls closed 11 years ago

hbrls commented 11 years ago

Recently I was trying to make a framework like yours. Maybe the code is too rough to look at.

I was thinking about the code structure, and at last I decided to use sea.js(which is an alternative to require.js) and angular.js to make my code more modular and organized. And I choosed hammer.js to handle touch events.

I did not find a modular or namespace strategy in your repo. Will you do that?

jaunesarmiento commented 11 years ago

Hi @shuaishuai, nope I won't be adding RequireJS to handle modularization in Fries. The framework is already too deep into the development of version 1.0.1. I can however reconsider this for the later versions of Fries.

Wolfr commented 11 years ago

I think it would be best to use a bootstrap/ratchet approach where every component is pick and choose and can work separate from the others (some components can inherit others e.g. tooltip and popover in bootstrap work together)

On Fri, Jun 21, 2013 at 12:07 PM, Jaune Sarmiento notifications@github.comwrote:

Hi @shuaishuai https://github.com/shuaishuai, nope I won't be adding RequireJS to handle modularization in Fries. The framework is already too deep into the development of version 1.0.1. I can however reconsider this for the later versions of Fries.

— Reply to this email directly or view it on GitHubhttps://github.com/jaunesarmiento/fries/issues/42#issuecomment-19807791 .

hbrls commented 11 years ago

@jaunesarmiento then which do you prefer? require.js or namespace like window.Fries || window.Fries = {}; window.Fries.spin = blabla;

jaunesarmiento commented 11 years ago

@shuaishuai I'd rather use RequireJS. It's a much more elegant solution rather than having Fries components in the window variable.

@Wolfr, I think the best approach would be to use BEM method which, correct me if I'm wrong, being used by those mentioned frameworks. Actually, I've been thinking about redoing Fries from scratch yet again due to these kinds of concerns. I honestly wasn't able to think this through in a long-term context. But I really love having these kinds of conversations. Fries is still young, I think, so a lot can still change.