5 ms·
Have you seen React.js (http://facebook.github.io/react/ http://facebook.github.io/react/) and Mithril (http://lhorie.github.io/mithril/ http://lhorie.github.io
by KajMagnus 12y ago
Have you seen React.js (http://facebook.github.io/react/ http://facebook.github.io/react/) and Mithril (http://lhorie.github.io/mithril/ http://lhorie.github.io/mithril/)? They're supposedly smaller, faster, and easier than Angular, and does roughly the same things, as far as I've read. And they support server side rendering. At least React does.
- skeletonjelly 12y agoReact is just for presentation though (the V in MVC)
- Renaud 12y agoBut React + Flux is an alternative to MVC. Still early days for Flux, but the principles are sound and I hope it offers a viable alternative to all these framework that rely mainly on variants of the MVC pattern.
- Kiro 12y agoFlux seem so overcomplicated I can't believe what I'm seeing.
- colinramsay 12y agoI think Flux is probably very simple, it's just been presented very, very poorly.
- Kiro 12y agoDo you have any good tutorial that presents in a better way?
- andwaal 12y agoCheck out https://github.com/spoike/refluxjs https://github.com/spoike/refluxjs better explained and more elegant implemented( no string dirty-checking for one).
- colinramsay 12y agoI agree with andwaal that reflux is the simplest way so far that I've seen. I think what is really lacking is a demonstration application which isn't just "hello world" or the standard todo app rewritten in React. I just don't find that helpful. For another overview, see this article: http://blog.andrewray.me/reactjs-for-stupid-people/ http://blog.andrewray.me/reactjs-for-stupid-people/ Please don't take offence at the title, I didn't write it :D
- mercer 12y agoPerhaps Reflux is better for your purposes? https://github.com/spoike/refluxjs https://github.com/spoike/refluxjs
- o_____________o 12y agoThe overcomplication (relative to what could be) is due to boilerplate and poorly defined convention for anything but the canonical todo app. It's early days. There are some frameworks using some form of the Flux spec like Fluxxor and Reflux, but they're not opinionated or complete enough to hit the ground running. The author of Fluxxor, for example, is himself working out where to put very basic functionality like network service calls. In the react-router project, there's not an obvious way to either render from server or refetch data on route changes. This is all very basic functionality for a medium to large project. It will feel like you're in the weeds after a couple of days of development. We need a Flux++ framework with some stronger opinions, closer to Ember or Angular in scope.
- rmsaksida 12y agoThanks for mentioning Mithril, I didn't know about it. It looks very interesting. I've been meaning to try React.js for a while now, just haven't found the time. About Mithril, HTML generation with JavaScript is an odd design choice. Obviously it's much better from a technical point of view, but nested or complex HTML must get ugly fast, and I really don't want to deal with template code written by non-developers. Having said that, for a certain class of apps with high performance requirements and comprehensive browser support, Mithril is a very appealing option.
- insin 12y ago> but nested or complex HTML must get ugly fast That's the problem JSX solves - nesting tags and attributes is less syntactically onerous than managing a tree of function calls or nested object structures, with their attendant braces and commas. Here's the Mithril getting started example [1] done using JSX [2], for comparison (some of the other code has changed since I did this, but the rendering part looks the same) [1] http://lhorie.github.io/mithril/getting-started.html#summary http://lhorie.github.io/mithril/getting-started.html#summary [2] https://github.com/insin/msx/blob/master/test/jsx/example.jsx https://github.com/insin/msx/blob/master/test/jsx/example.js...
- kallussed 12y agoI like JSX, but I would say that Mithril + CoffeeScript is even nicer. A coffeescript example (not mine): http://www.reddit.com/r/javascript/comments/20pzbj/mithril_a_javascript_framework_for_building/ckfgfey http://www.reddit.com/r/javascript/comments/20pzbj/mithril_a... or https://github.com/Whoaa512/mithril-coffee-gulp-seed/blob/master/app/scripts/components/MyComponent.coffee https://github.com/Whoaa512/mithril-coffee-gulp-seed/blob/ma... Looks really clean...