Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Nice! 'async' is almost essential for me: the 'waterfall' style in particular. I modularize everything too, but using AMD modules.

- I move between client and server fairly frequently, and AMD works in both via RequireJS.

- I often share code between client and server, eg, my current app has a shared models module that is augmented by the client and server-specific modules that import it.

I avoid adding methods by a string for the simple fact that JSHint warns about using [] rather than . wherever it can (I think the only time I use [] is for Express' badly named 'static' plugin - 'static' is a reserved word.

Following you on Twitter (I'm @mikemaccana). Hope to catch you about someday!



Thanks! I haven't been using AMD so much since I've mainly been working on the server-side js, but it seems like a similar structure.

The shared code between client and server is definitely an interesting concept. I'd be interested to see some of your posts on how this ends up working!




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: