128 karma · joined January 17, 2012
you can see all the smelling shit of requirejs there.
Check out OneJS: http://github.com/azer/onejs
It's the only tool that lets you structure your client-side project as a CommonJS package and produces unobtrusive code mixable with anything in same global scope.
I'm sorry for negative comments but, what ruby and .net communities produce for JS is shit. It's even more harmful then IE6 for our future.
browserify-http can be used by OneJS as well but I don't see any point of emulating http module on client-side. I prefer using libraries supporting both platforms, such as boxcars; http://github.com/azer/boxcars
see my comment above for details about the differences; http://news.ycombinator.com/item?id=3915403
Let me introduce you OneJS: http://github.com/azer/onejs
It simply converts any CommonJS package into a single, stand-alone JavaScript file. It means, you can structure your client-side project just like a NodeJS project and you can convert your NodeJS project to a single file just like a client-side project.
Unlike Browserify, OneJS is unobtrusive [1], provides an accurate implementation of CommonJS specs [2] and the output it produces is suitable for splitting and having async dependencies.
[1] A chess website built with OneJS: http://multiplayerchess.com/mpc.js
[2] ExpressJS built with OneJS, with all dependencies: https://gist.github.com/2415048
here is the output comparison of onejs and browserify:
onejs: https://gist.github.com/2398843 browserify: https://gist.github.com/2398824
and here is a real world example of onejs;
http://multiplayerchess.com/mpc.js
The second thing is, onejs lets us use the core NodeJS library, too. It doesn't contain it by default but you can install the available modules by typing; "one install assert path util url"
And here are the differences of OneJS:
- it produces unobtrusive code
- it bundles any level of dependency properly
- it's not only for web browsers, but also all JS environments including Node itself
- it's a command-line tool that doesn't require you to code.It doesn't contain the standard library of NodeJS by default but you can install the available modules like assert, path, url etc.. by doing:
$ onejs install assert
It's the coolest web-based spreadsheets application built 6 years ago using no library, no framework. I'm a fan of it. It was looking just like this current version 6 years ago and was pretty fast at even IE6. And its 6 years old JavaScript code follows the rules of coding good JavaScript code way more than Ember itself.
Here is another story: I was working for a competitor of EditGrid and built a Microsoft Excel clone with dozens of features in 6 months, using no framework, no library, 5 years ago. We were two guys at frontend and two other guys in at backend. And our source code was almost pure object orient, mixable, reusable and relying on MVC, event-driven programming.
I've been shipping rich web apps for more than 6 years and recently had the chance of working with both Backbone and Ember. Here is my feedback:
The size of Ember library is bigger than total source code (including an AI library) of the last multiplayer game I built.
And both of them solve no problem, simplify nothing. They just force beginners to not code crappy code and that's all. Good JavaScript code should benefit of functional programming very well, like some NodeJS apps and libraries. They got no understanding of FP. Especially Ember relies on a horrible idea that increases the cost of development very huge. Very ironically, ember code is not reusable, not mixable with other web apps. It's not even unobtrusive, pollutes Object prototypes. When you finish your app, you got a huge garbage that has not even one piece of reusable code.
To summarize, there is nothing Ember does right. It tries to solve already solved problems in a very absurd way and is very irrelevant with the new problems JavaScript community tries to solve (such as code-reuse with NodeJS apps, it's partly solved)
It's the new, communist North Korea of JavaScript world.