Hacker News new | past | comments | ask | show | jobs | submit login
Show HN: An Isomorphic JavaScript Framework Faster Than React (jsblocks.com)
337 points by astoilkov on May 26, 2015 | hide | past | favorite | 253 comments



I think it's great that there is such an amount of active development in the JS sphere, and I'm sure your framework is fantastic - so don't take this as directed at your framework specifically. That being said...

I am however feeling so overexposed to new libraries and frameworks that I can hardly muster the energy to even look at it. I constantly feel that I'm behind on my homework having to evaluate new libraries and frameworks showing up. Every two weeks, another one shows up with another paradigm shifting approach.

I am getting increasingly apprehensive about committing myself to learning anything new, because in two weeks there's another shiny framework that everyone is proclaiming as the next wunderkind. Sorry about the 6 months spent learning it, but now we're doing something new.

The amount of time where I feel that I am confident and productive with a library or framework is getting shorter and shorter, and more and more of my time learning, I feel is wasted.

Sorry to barf all over your post - like I said, it's nothing specifically with your framework, and it looks very shiny on the surface, but I think I'll just get back to work instead of studying it in greater detail.


So don't study it then? It's perfectly fine to continue using what you are using. Most recruiters talking to me still ask for Angular, even if I consider it a little hairy and prefer not using it.

After being in the JS sphere for a while and living with these changes, I have learned a lot. Because there is nothing new under the sun, these all do pretty much the same thing - but in different ways. There are tradeoffs, and by working with and making big and small products in different frameworks, I've learned how to learn. Picking up new things are not always needed, but the more you expose yourself to different libs, frameworks and platforms, the better you get at it.


The problem is, it's our fault that recruiters are now asking for Angular, because we sold our employers on Angular and built their apps in Angular. Now that Angular is mainstream and has fallen out of fashion, they need to hire more developers to maintain all those Angular apps we built for them.


There is no "our" and there is no "we". Developers, web developers, JS developers or even HN users who are JS developers are not:

* a tribe

* a close-knit group

* an industry union

You do not assign blame to hundreds of thousands of professionals, who live in different parts of the world, speak different languages and work on different projects.

The web evolves without intelligent design or regard of your personal interests. Deal with it or withdraw in denial to the perfect land of perfect web technologies.


> not:

> * a tribe

> * a close-knit group

> * an industry union

unfourtunately


I would love to see some sustainable structured cooperation with at least thousands of developers participating.

https://snowdrift.coop <-- this is a great example, btw


Oh ok, well then I guess it's just Google's fault.


It's Google fault as in a mistake, a defect, an offense that they've created a popular js framework? Is that a correct interpretation of your words?


Only if you feel that Angular itself was a mistake.

I do, primarily because it's yet another attempt in a long history of misguided attempts to bestow Turing completeness on XML.


Not at all! Honestly there are some WONDERFUL things about angular. There are some bad ones too.

- Polling for changes vs. event driven - two way data bindings causing infinite redraw loops. - "feels like O(n^2)" performance on ng-repeats / large pages

but things like the templating, directives, data-binding... they are all really good things.

And dependency injection! They have really moved the needle forward on client side testing.

No angular in itself is not a mistake at all. There are mistakes without question. I suspect the angular 2.0 release will address many of the major criticisms. Though, I haven't read much about it yet.


ng-if, ng-switch, ng-repeat? There's already a language in the browser that does these things, it's called JavaScript.

Why do you even need dependency injection and singleton services and factories in a dynamic language with closures and first-class functions? You don't. Client-side testing works fine without DI. Angular is just a way to do Java in JavaScript. It's a pile of unnecessary complexity designed to sell to enterprises that love over-designed Java projects and want to make client-side development feel more similar to what they know. In that regard I suppose Angular is a little better than Google Web Toolkit, but that isn't saying much.


> ng-if, ng-switch, ng-repeat? There's already a language in the browser that does these things, it's called JavaScript.

It's nice to have a largely declarative way to specify markup but still allow simple loops and conditionals.

Hasn't every template language in the world has come to a similar conclusion?


> Hasn't every template language in the world has come to a similar conclusion?

No, not even every mainstream template language. For example, I still use ERB and EJS extensively, and so do many other engineers. ERB and EJS use the control flow constructs of the underlying languages (Ruby and JS, respectively).

There is of course debate about whether templates should expose the full power of a programming language. I have tried templating languages that do and ones that don't. For now, I'm sticking with templates that let me mix in arbitrary code as I see fit. Could I abuse that power and make a mess? Absolutely. But I try not to, and my code stays pretty maintainable.


The overarching problem here is herd mentality. Using Angular is a bad idea, but lots of companies are using it anyway because The Herd stampeded towards the new shiny thing, mostly because of how cool two-way binding looked in Angular's demo toy app.

Now all those companies are bogged down by Angular, but feel like ejecting it would be too costly. Elsewhere, lots of new developers are introduced to Angular and invest time and effort into learning it because they don't know any better.

Herd mentality is a big problem. It's basically the polar opposite of thinking for yourself, and as such, extremely detrimental in other aspects too.


> Using Angular is a bad idea, but lots of companies are using it anyway because The Herd stampeded towards the new shiny thing

The most ironic thing in all this is that your comment is still full of Herd mentality, except that it goes the other way.

Angular is a framework, period. Using it is neither a good or a bad idea, it all depends on the people who actually use it.


The couple of times I've worked with angular, some things went incredibly smoothly, and when you hit those edges, it really reminded me of ASP.Net 1.0, it was nice for about 80% of your workload, but the other 20% took 10x the effort, and was a much bigger headache to work around.

Honestly, if/when browsers have better support, I think something closer to Polymer may be the best of all worlds with web development... for now, I find that React code tends to be the most sensible (with a decent framework around it)... not to mention shared client-server code with node/io.js


I can make functional prototypes very, very quickly with angular. There are things it does not do well, in my opinion, but it has given me a tool that previously didn't exist in the JS world.

I don't care about the turing completeness of angular.


I don't.

If Angular has produced a local optima of efficiency in the range of "misguided attempts" then it's effect on the development ecosystem was a net positive.

That said, I am extremely concerned that most popular frameworks/libraries are products of megacorps.


That is in part due to the complexity of problems in frontend and that most companies don't need to solve those problems (or don't have the resources to solve them).


Ember would be a notable counter-example.

I think a more important reason would be that Facebook/Microsoft/Google media influence and corporate support creates massive brand awareness and generates instant interest. Educational projects anticipate the interest from developers and create courses, tutorials and reviews. The cycle continues and bam! we have an information cascade[0].

Rich get richer and poorer get poorer (in developer mindshare). Megacorps reap the benefits while indie developers are not able to achieve critical mass.

I shudder when I think about the possible Typescript/Microsoft, Angular/Google, React/Facebook domination in web technologies.

[0] http://en.wikipedia.org/wiki/Information_cascade


I think that has more to do with developer evangelists/pr people and budgets. Most good ideas languish in obscurity, even when given the light of day.


Angular is helpful because it promotes things like loose-coupling, dependency injection, modularity, re-use and the factory pattern. I agree that two way data binding was oversold. It isn't a bad thing, just not the most important thing about angular. No doubt angular itself, and other libraries, will evolve. But I don't think angular is a mistake. It encourages developers to design applications the right way.


Angular is helpful because it promotes things like loose-coupling, dependency injection, modularity, re-use and the factory pattern.

Modularity and code re-use are like apple pie and motherhood. The real question is, do you need dependency injection and the factory pattern to get those things? In JavaScript, the answer is no you don't, because you have closures and first-class functions. Patterns like DI and Factory were invented to compensate for the deficiencies of Java, they are superfluous in JavaScript.


I have to agree.. factories and IoC/DI in JS just seems like such alien overkill in the space. Yes, it's great when you need to create a testable system in a strongly typed world like .Net or Java, but in JS you can simple spike your module loader for unit testing your modules in certain conditions (proxyquire and the like).

Even in those platforms (.Net and Java) unit testing is such a miserable experience, and adds so much complexity it's easier to just skip unit testing in favor of simpler classes/methods and better integration tests.


Agree - i think 2-way data binding is a more superficial benefit vs the other benefits you mention


I think it's not so much the fact that developers praised Angular, but rather this same above mentioned proliferation of frameworks - with so many choices, at some point it becomes paradoxically more likely that people will follow the herd instead of picking each his own framework (if I may oversimplify to make the point clearer) with the risks that entails (possibility of bad choice, of support ending while you still need it...). Nobody's gonna get fired for betting on a big name like Google.


It is our fault if Angular was not a best tool for a job at the time, otherwise we should be happy that we have better tools coming to help us doing our job.


What is problem for you - for some might be job security :) And I think Angular is still very much in fashion. At least this is impression I am getting from occasional talks with random recruiters.


this is impression I am getting from occasional talks with random recruiters

What's in fashion isn't what the recruiters are talking about, but what the developers are talking about. Recruiters will always lag a bit behind whats actually in fashion.


Exactly, recruiters are not cool, so when they are asking for a particular framework that is the strongest sign that the framework isn't cool anymore.

It's just like when your parents start listening to your (former) favorite musician.


I guess it is also depends on who is judge - either business (my case) or developers (yours :))


If you're talking about finding a job now, then I absolutely agree. But if you're talking about what technology developers will persuade their employers to adopt in the future, then developers are the ones who decide.

Employers seem to be influenced by what the developers push (maybe not short term, but longer term it seems to me to be that way). Recruiters go where the employers are. Therefore, IMHO, ultimately its the (vocal) developers who pick the fashion.


Right, his point is that it's in fashion with employers and recruiters because there are things to be maintained and sometimes even built. Where everyone else on HN that stays up with JS is trying to things with maybe a reactjs, or this, now.


Haha, yep. I did that. Sorry, Future Me.

Love, Past Me.


I "failed" a job interview recently to the reason that they didn't have faith in my jQuery (any by extension Javascript) skills.

I managed to write a multi-page response explaining how the modern frameworks were moving away from jquery in favour of data bindings, virtual dom, etc... while I acknowledge that there is still a place for jQuery, it has a very much diminished role in modern web development.

In the end, I never sent the email in response. While it was cathartic to write, I really didn't want to come across as "sour grapes". (and truth be told, I respected their decision... I'd feel a better fit in a more technology forward environment, their reliance on "old faithful" technologies can still make money)

I feel like even angular has come-and-gone as a framework the 1.x just isn't performant on busy pages. Anything with a log of ng-repeats gets out of hand. Though I suppose that could also mean that I'm writing bad pages too.

My most recent favorite is Leo Horie's https://lhorie.github.io/mithril/ We've got some of that running in production and it really is beautiful to work with.

I'd like to try REACT, but haven't found the right project for it yet.

I've sortof started rambling here... my point was I share your experience with employers looking for "old" tech.


I dont understand, if mithril is good why would you want to try react? Personally I'm trying to solve a problem (make complex ui easy to code and understand) Either mithril solves it or it doesnt..?


Totally fair question.

I think the reason I want to try react is to compare and contrast the various approaches.

I've written both angular & mithril for production. So far I haven't enjoyed anything as much as mithril. It is so clean & pure. It stays almost completely out of your way.

In fact there are places where I'm actually running angular INSIDE mithril pages (long story, part of migrating a project from angular to mithril, without losing legacy pages)

I would like to start a react project from scratch to see what it's like. To compare what one really, really smart guy (Leo) came up with against the mighty multibillion dollar facebook.

Leo has a day job and mithril is spare-time, facebook has a staff dedicated to react. Facebook is committed to working on react long term as a corporate strategy. Leo could get bored and walk away.

Additionally there's the aspect of looking at react-native. It makes me suspect that there may be a long term value in being aware of the patterns used in the react.

I struggle to believe it could be better than mithril, but who knows? I haven't tried it yet!

Finally there's the "learning things is fun" side of things.


FYI, Mithril is largely a scratch-my-own-itch kind of project project and I use it heavily at work, so I'm definitely not going to walk away from it :)


Of course!

But what if you're in a Starbucks, and the person behind you is the head of BMA Model's hands and feet division? (http://www.bmamodels.com/hands_legs_feet). As you reach for your frappachino you're "discovered" as the next-big-thing. About to explode into the glamorous, yet high stakes world of hand-modelling. It's a multi million dollar deal... but with the stipulation... no more coding effective immediately.

What happens to mithril then Leo? What then?

If it happened at facebook they'd give the job to Jimmy "Stubby Fingers" Malone and move on.

Obviously I'm teasing (hopefully at least).

I think there are actually a lot of advantages to your running mithril lean & (mostly) solo.

I've been impressed by seeing the contributors in github https://github.com/lhorie/mithril.js/issues and the quality of the discussions in the google group https://groups.google.com/forum/#!forum/mithriljs ... to say nothing of how great your blog posts are.

You contribute and participate in all those places and even turn up on HN.

It does make it a consideration when selecting a direction for a project though. It's a bit of a risk awareness/tolerance thing. I still think C# is way better than node.js for some things too :)


Chances are React would be better supported long-term. React Native could be a selling point for a lot of people too.


I think they failed the job interview. jQuery is great, but with React or Angular (or Mithril? don't know what that is) it has become unnecessary. Unless you wanted the job fixing all of their old javascript bugs, in which case my condolences.


> I am however feeling so overexposed to new libraries and frameworks that I can hardly muster the energy to even look at it.

That's the nature of the job. In the front-end new frameworks are born all the time, new apis are created, new paradigms are "invented". Coming up with the "perfect" framework is clearly a work in progress.

Here is a list of the techs I had to learn and work with during my career :

- flex

- jquery

- extjs

- backbonejs

- angularjs 1.x

- Reactjs

- angularjs 2.X

And i'm only talking about "view frameworks" here. Not even about the crazy js pipelines involving build tools, running on nodejs , 3 different CSS pre- processors , ...

And in 1 year i'm pretty sure i'll have to work with yet another new framework because managers think framework Z isn't cool enough anymore.

Again that's the nature of the job,because front-end techs are evolving. Everybody was praising backbone 3/4 years ago. Then everybody was praising Angular then everybody is praising React as the new hot stuff.

In the front end, either you keep on learning new stuff, or you're out of job.

Those who believe they have "job security"(as I read in this thread) because they chose angular are lying to them self.

Being a front-end developer means having to learn a shit tons of libraries , techs and apis everyday. You can't just tell yourself , "I'll learn X and i'll be all set" like with server-side techs.

Yet today the biggest challenge isn't even choosing a framework, but more like choosing how to transition from ES5 to ES6. Because the tools aren't ready.


I'm not even going to try to equate the pace of backend tech libraries with frontend, but you can't just learn one stack and be set on the backend. SQL->NoSQL, various queuing methodologies, diff. Automation platforms, different scripting languages rising and falling..,

You can be a Java developer on hibernate the same way you can be a frontend dev doing jquery for almost a decade but being on the cutting edge is the same deal on frontend as it is backend.


I totally agree with the point about always needing to learn on front-end because things are always changing...but having recently been exposed to the Java world there is a huge amount of stuff there too and if you're a server side dev then it's constantly changing e.g. you're org has a django app now but what about Go, Clojure, Scala, Haskell, etc, etc, etc. Different tech for different use cases but there are constantly evolving options out there.

Things are always changing but that's the beauty of it, isn't it?


I don't see the frustration so much about job security as about not being able to really get the most out of a technology before it becomes obsolete. It's one thing to be able to simply use some technology to get the job done. It's something else to deeply understand it and to become fluent in its paradigms and write code that is idiomatic and elegant. When a developer has to spend half the time learning new frameworks, it isn't so much about the loss of job security, it's the loss of craftsmanship.


The obvious followup question (not necessarily directed at you) is why do front-end technologies appear to be so much more transitory than back-end ones?


Probably because javascript engines (since 2008ish) are constantly improving and each new ES version adds new specs/features so there are opportunities for the smart, brave and foolish to build libraries and frameworks for these.

I think it's good that there is so much fervour around it. Time and use will flush out the things that don't work and we'll be left with the bits that do (well mostly)


> I constantly feel that I'm behind on my homework having to evaluate new libraries and frameworks showing up. Every two weeks, another one shows up with another paradigm shifting approach.

Every two weeks? Try every day. I hate to be that guy, but this sounds like whining. You're a developer, it's an incredible privilege (we're part of one of the fastest-growing, most-successful businesses ever, and we basically get paid to solve puzzles by writing machines directly from our minds and in most dev shops I've worked in nobody cares if you roll in at 10am, not to mention that we get compensated quite well while arguably becoming ultimately smarter than doctors yet without any required certification or schooling... I mean, in the history of human jobs, I can't imagine it getting much better!!), and staying on top of new developments is part of our job description. If you're getting fatigued, perhaps it's time to take that vacation you've been putting off, or to (wo)man-up and ask your superiors for more. Or to ask yourself if this is the right career path for you (although there's so much work now that you can get by just fine even relying on decades-old technology/libraries/languages). OR... to specialize. The full-stack developer's days are unfortunately numbered, there's no way a full-stack developer can keep up with every new development while keeping his job anymore. I myself gave up on keeping up with frontend around the time Angular came out...


Come on, I'm a full-stack guy and worked on lots of teams/projects/companies. I have yet to see a need to stay on top of every new development constantly, especially JS frameworks that still need to be proven.

None of the productive developers I know care about all the daily/weekly noise, if something is truly new and good it'll become known on a monthly or quarterly scale.

And about job description - developers are hired to build functionality, not learn new things. It might help further your personal goals and eventually help provide functionality faster/better using new tools but at the end of the day, the business doesn't care and would rather have something that works. Don't get caught up in the hype. It's great that you seem so passionate about it but keep in mind what the work is really about.


That's how I see it too. I try to at least stay aware of what's new but I don't dive deep until it becomes apparent that this new thing will be of use to me.

I imagine most here have day jobs with projects that last more than a few months so I doubt the need to learn things faster than your cycles of your job.


> the business doesn't care and would rather have something that works

True, but unless you own the business, the business' goals are not your goals. The business wants a working product; you need to stay relevant in a career. Sometimes these may align, but not always.


Right, which is why I said learning isn't part of the job description.

When I hire devs, I base their relevancy on what functionality and results they produced for their employer/project, not how new their tech stack was.

Go ahead and learn new stuff but if you know the fundamentals, the frameworks are just different syntaxes for the same thing. But don't assume that someone who doesnt keep up with things every day or week is somehow irrelevant. These frameworks won't change your productivity that much and your output is what matters.


Sure if you don't have a family and kids, go ahead spend every second keeping on top of things, but not everyone is holed up in a dark corner just programming and researching new frameworks. It's not part of our job description, our job description is to ship, and if you're spending all your time re-building so you can be using the "new" hot gizmo framework, you're not shipping. Sorry you hit a nerve expecting everyone to be on top of everything. I get about an hour a day, if I can convince myself to wake up after putting kids to sleep, so is it better to work on my project and get something done, or just keep researching new frameworks?


> Sure if you don't have a family and kids

Family and kids are, by any measure, a huge time and energy sink. But that too is also important work that must be done, even if it has professional costs.

The guys writing these new things, more often than not, don't have a family and kids and do have all that extra time. If you have committed to a family and kids, then join a shop where family people work and be content to use yesterday's stuff to get work done, it will still work fine for the most part. You don't have to keep up with everything, perhaps just general trends. Just watch out for that gentle slide into irrelevancy. ;)


> You don't have to keep up with everything, perhaps just general trends. Just watch out for that gentle slide into irrelevancy. ;)

I would argue that wasting time learning the JS "framework of the day" is not the best approach to stay relevant. Learn the logic and math behind programming and you can watch the industry slowly catch up...


Yep and if you know the fundamentals then you can pick up a new framework in a couple of weeks because these frameworks being discussed are built around core CS concepts and patterns borrowed (rightly) from elsewhere.

I was recently at a jobs fair and spoke to a lot of companies and everyone (apart from one) were saying they wanted developers who had the core fundamentals and could learn any framework or language (the latter obviously takes longer but not much longer). So they weren't putting an emphasis on having to know the latest frameworks even if they were using them, but instead looking for people with knowledge of core concepts.


I don't actually work on Web related stuff at all professionally, I am only using these things because they are my "side projects".... but I do like to keep on top of things when I can. I think just saying that someone HAS to keep on top to be able to be a developer is a bit much.


"it's an incredible privilege" -- how do you figure that? It's as accessible as accountancy, and I wouldn't say that's a privilege either, unless you're going to bring in the lack of educational opportunities available to bedouin kids. Maybe it's an accomplishment, it's a job, but how is it a privilege?


I filled out my explanation further.


Thanks. That looks like the SV experience. I realise that this is an SV site, but it sure is tiring hearing the 1%s point of view as if it's the norm across the industry globally.


I'm at a loss- I don't know what the SV acronym stands for :O


...silicon valley. sigh


> Or to ask yourself if this is the right career path for you

Yeah. No wonder people figure out that it is not the right career path for them when people will jump on them for admitting any kind of "programmer weakness"[1], or for not being perfectly passionate about programming all the time, or for not thanking their boss for having the privilege of getting their generous pay-check and almost salivating at getting more overtime to work on the companies' interesting problems.

Sometime the work itself might not be as bad as the people you have to do it with.

[1] In their minds.


> man-up and ask your superiors for more.

Or woman-up, right?


Yes. Person-up. Adult-up, whatever. I'm not very PC. ;)

For the record, I changed it to (wo)man-up.


I understand you very well. My todo list called 'stuff to check out' grows so fast that sometimes I'm thinking about clearing it out and just start another one.


Your problem is that have a life. Spend all day working and then checking out new stuff. Don't take a shower, eat on your laptop, etc.

=)



Hehe, I've done that when I was younger :)


Geography. The replies I've read, as they so often do, ignore geography. SV might move rapidly from one to the next, but the city I'm in is more conservative and moves slower, so all I've ever seen much of from recruiters are jquery, knockout, angular. SV is the gladiatorial arena, and only the survivors make it through the filters to elsewhere, so elsewhere has fewer to deal with. If you engage with SV news while living elsewhere you'll still be trying to keep up, but if you hang back, things are a bit more laid back. Or, make the decision to ignore every other tech. If the next one is along shortly, you'll not likely miss much.


> all I've ever seen much of from recruiters are jquery, knockout, angular

A year ago they weren't even asking for angular.


Which is the reason, it is an appropriate time to back and stay with React for the long term.

React has so many technical benefits that is all covered through so many posts - That declarative is better, Fast DOM manipulation with Virtual DOM is nice and a great development API and syntax sugar with JSX is wonderful.

Having said all of that, I think what seals the deal in favour of React is that it is being used by Facebook on their homepage for half a decade and in all likely hood going to be continued to, which means you're assured of incremental upgrades and regularly maintained and yet no radical shifts, which would warrant a large change for your product.

I think Facebook has hit the abstraction level perfectly with "Product Engineering" and "Library Development" or "Infrastructure Development". This abstraction may not work well for all use cases. But for a large audience this is what is needed and where it is needed, it fits in perfectly.


Take a look at Mithril. People are frequently surprised by its small learning curve (and for many, the majority of the learning is for knowledge that you can go and apply outside of Mithril)


Tired of looking at new javascript frameworks? Look at this javascript framework that will fix everything!


Funny. But the "will fix everything" mentality is ironically why most frameworks are hard to evaluate and learn.

For learning, what you really want is a small set of new concepts to learn that easily map to things you are already familiar with, good documentation to refer to, and a active community that can answer your questions within a couple of minutes. That's why I mentioned Mithril.


To give him credit, the thing that is appealing about it is that there is very little to it that's not javascript. So you can very easily expect to figure out everything you need to know about it in a day or two, vs however long it take to familiarize yourself with one of these massive new frameworks.


Lately I've been helping to maintain a sizeable open source app that someone else wrote in Mithril with MSX: https://github.com/ScienceCommons/www and I have to agree that the learning curve has been very gentle. It's every bit as powerful as Angular but it feels so much more like writing vanilla JS with a lightweight MVC structure to it. It keeps the code easy to understand and maintain.


I'm using Mithril because of how easy it is to look over the source. I didn't want to have another framework with a huge learning curve (even for senior devs) like Angular. It's well documented, and you can read the entire Mithril source and understand what it's doing within a few hours. That means I don't have to bother training people on it. I can give any new people the API and a link to the source and they should be able to contribute within days.


I went from Backbone to Angular to Mithril, and published a blog post about it: https://medium.com/@l1ambda/mithril-vs-angular-vs-react-d0d6...


I haven't heard of mithril until I read this thread but I think I might give it a try. I've only just picked up angular to build a form app served from a node server that communicates with good old soap services. I've kept the soap stuff on the node server so that the angular stuff is relatively light but still find it pretty heavy handed.

I'd be quite keen to look at either refactoring to use mithril or react, so will check you blog post - thanks!


If you already found good tools and happy with these - stick to it. If you are still looking - I find description on the site is pretty clear about idea behind approach, which made me quickly do proper decision to learn it/skip it this time.


I feel what you're saying. With regards to this and similar projects, I think the important thing is to be familiar with reactive programming. To me, it was an eye-opening new paradigm to develop in.


Man, a few hours ago I was debating with some team mates about js frameworks. In the middle of this ocean of frameworks I keep going with ExtJS. And I'm very criticized about this. And today the discussion is as always - that it's a monster and I need try ember ou angular etc etc... But I keep using ExtJs happily focusing in my business and almost never worrying about why something not work and wondering how to use new new coolest javascript/css/html thing - I almost never touch html and css since I begin to use ExtJS. I'm happy and it's working.


You might actually want to spend some time looking into useing node/babel to transpile ES6/7 syntax JS into ES5.. this will give you a leg up in writing inherited classes with JS... alternatively there is TypeScript, which you may also like and be more productive with.

That said, I think that ExtJS's UI is starting to look a little long in the tooth, but it's still usable. I really never liked it... class based hierarchies in JS always seemed like a waste to me.

That said, if that's your path, there are still some newer tools (namely node+babeljs) that can greatly improve your development experience... I think the module and class syntax from es6 would be a boon for you, along with being able to use es7 async/await combined with a fetch shim...


Instead of learning a new framework, try learning a new paradigm. You can then apply that knowledge in whatever new shiny tool your boss want you to use to build the next big thing.


This is seriously one reason I've been looking at career-switching to being a machinist. A new technology can come along, but it has to establish itself, and then you can take time and get really proficient at it.

That, plus the more grey hairs a machinist has, the more they're respected (usually).


That comment!

That's exactly how I feel about every new js framework popping out from nowhere.

But I accidentally clicked on the title. The site looks cool and guess what, a framework which is faster that React and doesn't make you put xml in js.

And it grabbed my attention. I don't know whether I'll ever use it but it will be on my radar for sure. Especially if they don't lie about how fast it is.


I'm sure some scientist said the same thing about some early stage germ of a discovery once upon a time. But it's true, we still get very far along with Newtonian physics, we don't need a full working knowledge of quantum mechanics to get our jobs done day-to-day. Not that what we're doing is anything comparable, but maybe the analogy fits somewhat.


This.

To me this

-) is a sign of an area or areas of still not recognized core problems leading to tackling it from different angles

-) it could be connected to the average age of developers in the field responsible for the choice of their tools. They will settle for something with time ... eventually ;)

-) bears resemblance with an earlier me, eager to find the latest, newest and most importantly most different way to ... well, what actually? Most probably traverse the unknown landscapes of new, landscapes of "my way"

-) is worst than it used to be, as the _really_ old ppl say ;) ... or I changed the sides, moved on on this spectrum of professional attention deficit hyperactivity disorder.


It's not hard to be faster than React, React's performance benefit comes from the fact it makes performance easy to understand and optimise rather than just being magically (but opaquely) fast.

However, the real reason React is a good choice is not performance, but rather how it encourages developers to think about, isolate and better manage mutable state in their applications.


100% agreed. Working now on angular app at work (not my choice) I see state flying everywhere which will inevitably lead to something awful. The argument to push it back into a main controller and let it flow downward only seems completely unrealistic if not impossible and the api certainly doesn't encourage it at all.

Meanwhile in Clojurescript I have undo functionality without thinking about it - mind blowing because it's something I never expected to see in a web app without much pain.


Correct. But React is also a step behind ClojureScript based React wrappers :) like Om and Reagent.


Could you explain why are they step ahead? I am not familiar with ClojureScript, but my interest in it is really high.


Because Clojurescript uses immutable data structures, and keeps the state in a centralized atom, so comparing different states is as easy (and fast) as comparing the different versions of the data structure, which in turn (and thanks to being immutable data structures) reduces to compare their memory references, which is fast.


Immutable.js is a project also from FaceBook that brings immutable data structures to your JS applications including those using React.

Since Clojurescript compiles down to JS, wouldn't it be possible to use Immutable.js and a slightly different app design (a single Flux Store for the entire app) to get the same benefit of using React with Clojurescript?


The centralized immutable state oriented architecture advocated by Om can definitely be implemented using plain JavaScript (my favorite in this space is https://github.com/moreartyjs/moreartyjs), but language features like core.async, transducers and macros are not so easily replicated.


Nitpicking but ClojureScript the language does not keep state in a centralized atom. That's just a common pattern used for Reagent/Om apps.


Centralized state as an immutable data structure is exactly how the app I work with is built. It's plain JavaScript and React. So I don't see how React is "behind" on this front.


Nuclear.js also does this, with pretty idiomatic JavaScript


This is a slightly long read, but it will give you a feel for it: https://github.com/Day8/re-frame

(disclosure: I am the author)


care to share how react is transparent?

it's completely opaque on how it decides to re render the dom. unless you only have react code there, it's completely dark magic for other code


> <div data-query="each(products)">

Well, one problem is declarative programming has never been as expressive as imperative programming. In React you'd use JavaScript for this iteration. This is why I like React over say Angular, with ng-each, ng-if, etc. Flow control does not belong in markup. I cringed the first time I saw an XML schema with an IF element.


Flow control does not belong in markup.

My favourite templating system is enlive[1] (or enliven[2]). You use CSS-style selectors to select snippets of HTML to manipulate and then use code to duplicate, remove, move or replace these snippets, insert content, set attributes etc.

The "template" is pure HTML without any additional markup and without any logic. The code then says "repeat this snippet for every item in this list and insert it over there" (or whatever you need). Markup does what its good at, code does what its good at. Works out really nicely.

Although nowadays I use reagent and hiccup-style markup and write everything in code (but keep my components as pure and dumb as possible).

[1] https://github.com/cgrand/enlive

[2] https://github.com/cgrand/enliven


How do the frontenders and CSS folk feel about you making assumptions about what CSS selectors there should be in order to render a template on the backend? Its hard enough to get dedicated frontend folk to stick to an adaptable/maintainable CSS architecture like SUITCSS, let alone backenders too. I've always thought Enlive seems to create a brittle co-dependency between frontend and backend codebases, ok for small projects with 1 or 2 devs with skills that span front and backend, but surely a nightmare for larger project with lots of people working on them?


Genshi [1] is (was?) wonderful in a similar respect. Although the "code" was itself an html document, it allows master templates to fully select and manipulate nodes from child templates.

[1] http://genshi.edgewall.org/


What do you think about OneScript - https://github.com/astoilkov/OneScript?


Can't say I'm a fan honestly. Reminds me too much of PHP, I guess.

The thing about reagent/hiccup is that the markup is just a clojurescript data structure and can be composed and manipulated like one. This also means that you can easily write pure functions to generate the UI (data in, markup out).

The thing about enlive/enliven is that the markup and the logic are completely separated.

OneScript has neither of the things that I like about enlive or reagent.

EDIT: I should probably add that I'm not particularly a fan of JSX either, so I'm probably the wrong person to ask for an opinion on this.


In the beginning we mixed style with content. Now we're mixing logic which, IMO, is an even worst mistake.


I would argue that React is a declarative style as well, the difference between it and the above example being that JS is far more expressive than HTML.


You are right. Flow control does not belong in markup. But what if I redefined the logic and called them instead relationships.

Could relationships be declared in markup? Could behaviors be declared in markup? Then we would expect the browser and the script to play with the relationships according to the behaviors.


The other-side of the argument is that JavaScript is much harder to tool than HTML.


If I heard such statement in a debate I would stress that word harder.


A lot of stupid arguments in your message, the biggest being :

> Well, one problem is declarative programming has never been as expressive as imperative programming

Haskell is declarative, are you saying Haskell isn't expressive ?

> Flow control does not belong in markup

> In React you'd use JavaScript for this iteration

There is no flow control in HTML , but some frameworks use DSLs in the HTML. If you are saying frameworks shouldn't be using DSLs yet you praise React which uses JSX which contains a declarative DSL in form of XML markup ... your point is a big contradiction.


    <div data-query="each(products)"> ... </div>
The React (or Mithril, or Mercury, or other virtual DOM libraries - just change the function being called) equivalent would be:

    products.map(product => React.createElement('div', null, ... ))
Which you can use JSX (again in any virtual DOM library, via Babel) to sugar as:

    products.map(product => <div> ... </div>)
The flow control is outside the DSL, not part of it.


A DSL for logic inside of a declarative markup language is very different from a DSL for declarative markup inside a programming language.


In my view, one of the huge benefits of react is the lack of two-way data binding, since the one-way flow of flux is far easier to think about IMO. Speed is one thing, but when the framework you have is fast enough, a little more for a sacrifice of code reason-ability seems undesirable.


Top article on the front page of Hacker News as I write this, and not a single positive comment below. Great job, guys...

To the author: I think the homepage looks great, the examples are clear and informative, and I would definitely give this a try if I weren't wed to a couple of other frameworks right now.


I think a lot of the negativity has to do with the marketing. This isn't being sold as "a cool thing I made", but "Better MV-ish Framework" and "Faster than React". If you try to position it as better than existing alternatives, HN commenters will tear it down if they don't think it makes the cut. If you put it out as "exploring interesting new approaches", I think you're likely to see a lot less negativity here.

Compare to the launch of Mithril: https://news.ycombinator.com/item?id=7421652

EDIT: Actually, revisiting this, the problem may be more with the fact that it hit the front page than the fact it has a lot of negative comments. If nobody here seems to like it, how did it get 182 upvotes? That seems like a problem with our community, eg; upvoting before actually looking at the article. (Note: I don't mean to comment on whether this is a good framework, just that the HN community doesn't seem to like it much).


@dang, if you're listening, an idea:

make the "upvote" buttons invisible on stories that the user hasn't visited before. This could be done like so:

    // css
    a.upvote-botton:visited { visibility: hidden };


    <!-- in html -->
    <a href="{article_link}" onclick="perform_upvote()" class="upvote-button">upvote triangle</a>

The href & onclick handlers would need to be added in javascript so as not to affect hn for non-js users.


That doesn't actually work in pretty much any browser, since it allows for history-mining by a malicious site. :visited styling changed a couple of years ago to only honor color changes, thus preventing most ways of exploiting that issue.

http://dbaron.org/mozilla/visited-privacy is one of the better resources explaining the issue more fully.

I guess you could create the triangle solely with CSS borders, and then style the border-color to be the same color as the background when not :visited


Could you not just render the anchor out of the view port and look at its color?


Ah, good catch. You would just do `color: white` then, no?


I think upvoting means promoting discussion, not necessarily liking the article linked.


Absolutely fair points.

Another one: the general weariness with which new JS frameworks are greeted has increased massively in the 433 days since Mithril was posted here.


on record: I loved working in Mithril and am a huge fan of Leo one of the nicest guys around.


You are totally correct. I believe it could have taken another direction if I have done this. It is hard to be compared to React built by Facebook but I started first. :)


This is interesting, but it doesn't excite me. My initial reaction is to be curious as to why it's able to thrash underscore and lodash (and React too, but separately) on speed.

There could be many reasons for this. Maybe I'm personally not interested in adopting a new framework, maybe your target audience (which includes me) has some sort of fatigue or lack of interest, maybe speed isn't enough of a reason to sell me (or us) on its own, or maybe your landing page needs work. I'm not sure, but maybe my comment will help identify an/the issue – or maybe there is no issue, and it's just me.

Thanks for making a JS framework and posting it here. That takes a lot of guts and is notorious for inviting hostility. I appreciate it.


I was curious about the claimed collection performance too, since this is an area that a lot of people have looked at, and a 5x improvement there would be pretty impressive.

Apparently, what makes jsblocks different is that it appears to be doing dynamic code generation. That's an interesting idea, though I'd have concerns about how it respects lexical scoping. There are a couple bumps apparent as well:

- the benchmark is only faster because it ends in a .reduce(). I suspect that code generation allows them to remove all collection generation here and just update the reduced value in a loop. If you remove the reduction at the end, then lodash is fastest, as expected.

- the jsblocks code in their own benchmark reports the wrong result. It appears there's either an off-by-one error or the generated code runs the filter step before the map. I'm not counting this against the method, as presumably it's fixable, but it might speak to the difficulty of code generation as a strategy.


I think it's because people are tired of the thrashing between/around the "next big thing." Angular was supposed to fix everything, React is still trying to fix everything... But even Atom stopped using React because it was so slow.

As for this framework, I'd be happier if it came in discrete chunks that you could wire together, because if you're not happy with one part of it, you don't have to accept it. You can instead build your own.


> But even Atom stopped using React because it was so slow

That's a mischaracterization -- it was only slow for a very specific usecase -- rendering a source code text-view. (It's like using an optimized C plugin in your python project for that core part that needs the benefit of performance.)

React makes a LOT of sense for a JS framework, and it's not a surprise that it's among the most popular ones now. To simply call it unusable because ONE particular usecase did not suit it is doing it an injustice.


Nice hearing that. I am currently working on making the framework more modular. This is create powerful individual modules that could be used for other purposes not only in MV* Framework.


I'm surprised that no one's pointed this out yet, but isn't this basically the same as Knockout (http://knockoutjs.com/)?

The difference being that Knockout's been around forever (first release was in 2010), does two things and does them well (data binding and observables), and is very mature and feature-complete at this point.

I don't have any comparison performance-wise, but I don't see anything new and exciting feature-wise in JSBlocks that Knockout doesn't already do.


It is similar to Knockout. However, Knockout is hard to manage because you have to invent architecture on your own while jsblocks offers MVC out of the box. Additionally, Knockout don't have routing, server-side rendering, animations, filtering, sorting, paging, lazy loading of views, validation, working with remote data out of the box.

Also the debugging experience is a cool feature - http://jsblocks.com/learn/introduction-why-jsblocks#debuggin....


Thanks for highlighting 2 things: "Level UP your HTML" and "Two-way data binding".. Already made my decision, stick with react! (:


You perhaps have a reasonable criticism but there is no need to wrap it in a sarcastic insult


I'd be more interested to see a performance comparison with Mithril[1] rather than React, their core functionality is similar but Mitril strives to be lean and fast.

[1] https://lhorie.github.io/mithril/


Agreed. Mithril's performance is incredible, and it's also closer to React in philosophy. That's the alternative I'd be looking at (perhaps along with Vue, which also goes unmentioned).

EDIT: though, one difference is this supports server-side rendering out of the box, while Mithril requires a (tiny) third-party module: https://www.npmjs.com/package/mithril-node-render


There's also another more ambitious Mithril isomorphism project called misojs https://github.com/jsguy/misojs

Definitely worth looking into if you're looking for a full stack solution.


I wish Vue were more popular. It has one of the nicest APIs of all the JS frameworks and offers good performance.


Mithril's use of helper assisted javascript for it's view templating is a giant drawback for me. I'd be using it exclusively, but as an old crusty dev, I've gone down that path more than once, and it's always been a train wreck.


You mean how the DOM is constructed via JS functions? There's this project to fix it: https://github.com/insin/msx


Thanks for this, I was looking for something that could keep me using Mithril.


FYI, you can use Babel to transpile JSX for Mithril by putting this in .babelrc:

    {
      "jsxPragma": "m"
    }


I thought this at first too -- the syntax turned me off. But having it used it for a while now, I can say any drawbacks are purely cosmetic, and it's easy to get used to. If that's the only thing holding you back, I'd say to give it a try.


What do you mean by "helper assisted javascript"? Can you give an example where this has caused problems for you? I'm trying to decide between mithril and this library.


Sorry, poor word usage on my part. As vvpan more eloquently puts it, DOM construction via js functions. This is the example from their website. This is very difficult to maintain, and personally, I become very adverse to making changes. Though it appears vvpan has a link to a project attempting to fork(?) React's transformer to be usable in mithril.

    todo.view = function() {
        return m("html", [
            m("body", [
                m("input"),
                m("button", "Add"),
                m("table", [
                    m("tr", [
                        m("td", [
                            m("input[type=checkbox]")
                        ]),
                        m("td", "task description"),
                    ])
                ])
            ])
        ]);
    };


Not "attempting to fork", MSX is a JSX fork that outputs Mithril-compatible virtual DOM JS objects.

It works as advertised :-)


Since I've been called out twice on my use of language in this thread alone, I serious need an editor to proof my comments before I submit them from now on.


Performance comparisons with Angular and React aren't that interesting anymore. They are good because they got Facebook/Google behind them and not because they are blazing the rest of the Frameworks away.

Mess yourself with Mithril, Mercury or Elm.


Right; a large part of the "is this framework worth using" question really relies on "can we get other developers to work on this", "can we make a business case for it", "how is hiring going to work", and critically: "will stack overflow work for us". 50ms on the client is very negotiable and trivial versus cultural concerns.


Still relies on JavaScript server side rendering - which will be the biggest performance bottleneck, by far, for both this and React.

If you really want a framework that is faster, check out Tungsten (https://github.com/wayfair/tungstenjs), which is as fast as this client side, and can render in vanilla Mustache using Go/C++.


I can't speak to this framework, but you do not need to use server-side rendering for React applications. Instead, you can essentially serve a blank page on every request, then have the React application bootstrap itself when the page loads. Alternatively, one could precompile the HTML, and serve it as static content with nginx, apache, etc.


It's funny Meteor actually has this problem upside down and are trying to add a way to have server side rendering.


Correct, not rendering on the server removes the bottleneck.


Being a current react user the thing that I like the most about react is having my markup and my logic in one self contained file. React is fast, but that isn't what has me use it on all of my projects. React has toString() which makes isomorphic apps very easy to create but that isn't why I use it either. I use it because it constantly encourages maintainable solutions for user interfaces.


If you don't mind me asking - how do you manage that? Do you use inline CSS a la https://speakerdeck.com/vjeux/react-css-in-js?


My js and my markup live together but I still use seperate css. So maybe I was over stating my case but generally, I have a predefined set of styles that I am working from, which means I don't think about the styles too much, other than setting them using classes. I am definitely interested and excited for someone to make an excellent inline styles framework though, but I haven't found one yet.

Currently for most of my projects I still use bootstrap (with a theme or something) and just include one compiled css file and bootstrap.js in my main index (everything else gets put together into one javascript file by browserify). I choose my markup with classes (className) and use bootstraps interactive pieces (accordians, modals, messages) with the markup data api.

If you are really curious, here is a template app I often use to start from. (https://github.com/availabs/dashboardTemplate)


I've been playing around with RiotJs (actually committed some fixes/features to the repo). I think what is attractive about both Riot and React is that everything is "defined" in JavaScript, there isn't really a separation of markup and behavior. Each little module can act an individual component. React has gone a step further and has shown that the DOM doesn't really matter...your React code could create native apps.

Does jsblocks allow users to develop little objects that encapsulate whats's needed for that component to work? The examples seem to have separate html/js/css.


Cool question. Please take a look at OneScript - https://github.com/astoilkov/OneScript and share your opinion. I believe this is the next step in developing applications. Bringing HTML, CSS and JavaScript in one place where components are modular and small.


I like this syntax. How do you pass values to a component and how do you nest components with values and lets say, loop over an array and create a (sub)component? Also, when you embed a component, is there a way to interact with it?

This looks cool, keep it up


Great questions. I currently filling the documentation so you could watch the repo or star it and keep an eye on it. The idea is that components will be like objects and elements so you could easily access them. Take a look at this example:

<div> { this.each(profiles);

  <!-- Render all profiles -->
  <Profile>
} <div> { this.find('Profile').setIsMyProfile(true);

  <!-- render personal profile -->
  My profile.
  <Profile>
}


" I believe this is the next step in developing applications."

Agreed - encapsulation is key to managing complexity.


How would you compare Riot to React?


I cannot give a fair comparison because I haven't done much outside of the the demo stuff with React. However, I will say that React seems to have much more tooling and a bigger community. Riot may be easier to get into and understand because it uses plain html in its Tag objects.


People here dismissing this framework due to 'fatigue' or 'overexposure'. It's weird as I don't recall hearing this when React started to see adoption 8 months ago.


React was released by Facebook as a mature project. There wasn't much doubt as to whether it would be at least worth considering. There also may have been fewer JavaScript frameworks released that month (Dekku came out something like last week).


I care less about react's performance than that it at last brings code organisation that makes sense.


What is it isomorphic to? How do I compute the isomorphism between this framework and some other thing?


> What is it isomorphic to?

Don't bother, most people using this word in the context of javascript apps do not understand what it really means. It just has became a buzz word meaning :" you can render your views on client and on the server using JavaScript". IE you can render an HTML page representing the initial state of your app, then upgrade to an interactive application using JavaScript on the front-end seamlessly .

You can't do that with angularjs 1.x for instance without some kind of heavy machinery relying on a headless browser. That's why angular 2.x basically ditches 1.x and is a completely different framework.


To be fair, it comes from the same people who call node.js "close to the metal"


In javascript frameworks, isomorphic usually refers to running the same code in the server (node.js) as well as the client.


Have you ever encountered a situation in the browser where 32k ops per second from underscorejs wasn't enough?

How many rows/columns were in the table being repopulated? 10 times in 2400ms doesn't seem that bad - it's 240ms per refresh. Is this too slow for your use case?

The 250ms gain on rendering 1500 rows - is this something you think needs to be optimized? I can't imagine a scenario where all of those rows would fit on the screen at once.

I ask as the main area of focus for the framework seems to be speed, and I'm curious to know what inspired you to make it.


For me 240ms is very slow. I target 60fps for all operations, so that's 17ms. There's a very noticeable difference when you get to this level in performance.

A project i'm working on went from 10000ms -> 500ms -> 60ms -> 15ms. Each phase opened up a new usability model.


I agree. Performance is important because the lack of it creates problems. Additionally, with performance I want to showcase that you can rely on a framework that is built with care because it is hard to be compared with frameworks like React and Angular built from the two largest companies in the world. It needs skill for a single person to create such a framework.


Consider that this is rarely going to be the only thing you want to do.


Even if 240ms was fast, is it still that fast on old iPad, budget Android phone or old computer?


This is interesting but the performance comparison is a moot point for me. React also has React Native, the pros of a faster isomorphic javascript framework working in the browser is not a very strong selling point in a world where native apps are dominating the mobile web. React will help me reach more platforms.

http://cdixon.org/2014/04/07/the-decline-of-the-mobile-web/


Yeah definitely. It is hard to be compared to React which is built within Facebook. I am happy to even get here. :)


Looks good, I look forward to playing with this.

One note on site design of the API section, you have some dead zone sizes issues. The window can be larger than trigger to turn the api list into a hoverable sidebar, but too small to display the content. This causes the API definition to fall to the bottom of the page. I was clicking for a while, thinking it not working, before realizing that the content was at the bottom.


While I think this is relatively cool, I'd be somewhat more interested to see how it compares to knockout. Beyond that, none of the demos give any indication as to how one would create discrete components or modules, it seems like you'd wind up with some fairly difficult to manage code on a larger project.

React and related tools just feel more right to me... that or going more towards Polymer... There are several alternatives, and in practice, how many times are you going to change all 10k rows in a table 10 times? I'll lean towards more manageable code in this case. We aren't talking the performance drop to say Angular 1.x, or other frameworks that work directly against the DOM.

Of course most people don't need absolute performance in a web based application. To me React with something similar to Flux just makes the most sense... I think Flummox brings it to a nice circle, that's easy enough to reason about.


Maybe I'm in the minority but after drinking the React 1-way data flow kool-aid I love it. I can think more logically about what a components state is and I can test for that state very easily. IMHO 2-way data bindings are not a feature anymore they are firmly on the cons list for me.


The title of this post "faster than React" is misguided.

React is fast. Most libraries and frameworks have to be fast to be widely adopted. But speed is not, in my opinion, one of the main reasons to use React.

I use React professionally. I choose React because of maintainable the resulting code is. There are other libraries/frameworks that I could use which are faster than React. I choose not to because, having used several of them, I found the code produced comparatively more difficult to understand and maintain in the long run.

I'm sure jsblocks is awesome and some people will love it. I haven't tried it yet but perhaps I will someday. Nonetheless I think calling it faster than react, while perhaps true, will be misleading to some.


It'd be better to explain more on why it is faster. It's more convincing.

I was a Knockout user, but 2 way binding and mixing up logic with html made me choose React. I think the target audience of this framework should be AngularJs user.


Will be hard to compete with those big libraries like angular and react, b/c they have yet a large community, IMO I like angular on top of react (didn't like the way you create DOM with javascript, tried it 2 years ago, maybe it evolve but I doubt it).

Also I'll wait till the project get more mature and get a significant community, b/c I'm not with the energy to learn every library that come out there, maybe will test with some small project but not with big projects, yet.

Keep working on it, but try to make it more intuitive and easy to use (didn't read well the docs, but just seen it quickly). ;)


You are absolutely correct. It is hard to compete with Google and Facebook. Possibly impossible. I love what I do and it is great experience developing jsblocks.

And one last thing you could check OneScript - https://github.com/astoilkov/OneScript. Do you think it is simple?


Its simple but got an issue, you need to hack your html. IMO the best approach will be the angular one, just add params to elements, so your designer that is brain less and only knows html can see your template after you put all the logic.

An advice maybe will be try to get as much html friendly as you can, so ppl don't need to relearn / hack html.

I only can give the point of view of someone that uses libraries, not developing libraries, so maybe there is some unknown reason to me for those approaches.


Why not joining Elm instead?


I believe that HTML, CSS, JavaScript should be combined the way they exist in the moment. Elm is too revolutionary for me. :)


do you think that Elm is in the good track? if you are involved with Elm, why I must using it? give me good reasons ;)


I agree. I am not saying jsblocks is better. It is choice of what you prefer. jsblocks offers Backbone like MVC structure and easy to manage observables. It also have a unique debugging experience - http://jsblocks.com/learn/introduction-why-jsblocks#debuggin....

It also packs things like routing and animation integration which React lacks out of the box.


MY personal reason I like Angular (haven't had time to look into the others, sorry, but most I assume fit this bill) is that I don't need a server, I can put my application up on a static hosting site, and worry about what is happening in my controller/html/css/etc I like that approach. Putting a server that you now have to maintain is just one reason I wouldn't want to use it. I Love Firebase/Sendgrid/etc because I can write a client side only app exclusively, and let people who are good at databases,email,etc manage the back end. Is it a poor approach? Maybe, but when you only have an hour here and an hour there to build things, spending 6 months just setting up a few simple things seems crazy. Getting to a working application quickly for me is the goal. (I am not amazing with databases, so something like firebase gives me database with ease, and I don't have to figure out how to setup a server, figure out the database, figure out where to host... Same goes for email providers, etc)


Resuming:

I know that we are still in the wild west but Javascript Land should start learning politics.

Javascript Land tribes need to merge and get a larger population support, a small tribe even with fast weapons will never be more than a guerrilla. External support is also crutial (Angular, React and Typescript without Google, Facebook and Microsoft, respectively, wouldn't be nearly as strong. Even Meteor has external support: Horowitz). It completely saddens me watching little tribes as Elm, Purescript or Clojurescript struggling even with such a great weaponry. These little tribes should at least merge. Sometimes is too difficult but other times is just pride: their leaders want to remain as such. Stepping down a bit in the hierarchy doesn't seem acceptable for them, they prefer to be the leaders of the guerrilla till the end - because normally there is an end.

Politics are boring and ugly but they work: just look at Meteor.


> Isomorphic JavaScript Framework

No. Just no.


Is this just criticism of the "isomorphic" term?

I'm not a fan of it either ("isomorphic" already has a different well-defined meaning in CS), but it does seem to have some traction now.

Perhaps you have an alternative term you'd prefer these frameworks used?


I've seen "progressive javascript"[1] and "heterogeneous javascript". Both of which are much better IMHO.

[1]: https://medium.com/the-thinkmill/making-the-case-for-progres...


Agreed, both of those are better. Hopefully one will gain traction.

Thanks for the link, good to know people are thinking about the naming issues.


I've seen "split rendering" a few times.


Impressive, but Vapor.JS is still orders of magnitude faster than both of them. https://github.com/madrobby/vapor.js/tree/master


Why build in list traversal functions? Some people prefer lodash, some prefer underscore, others prefer VanillaJS. It seems like just a little sugar, but adding a sugar a little at a time gets addictive.


You are correct. I am thinking of removing the functional methods. It would be better to leave this battle to lodash and underscore.


I'm just generally not a big fan of "X is some percent slower than Y" stats, because I find them counterintuitive. However, in this case I think something is wrong.

Rendering:

  jsblocks: 700ms
  React:    950ms (35% slower)
  Angular: 2200ms (310% slower)

Doing some maths:

  700ms + (700ms * 0.35) = 945ms
  700ms + (700ms * 3.10) = 2870ms
Looks like they got a little carried away when calculating Angular's rendering speed. Same thing with the "Syncing Changes" stats.

Edit: formatting


You are absolutely correct. It actually is an error. Thanks I will fix it.


Also, please add 'track by $index' to the Angular example.. might be a suprise for you.

(Makes Angular outperform both frameworks)


Are you sure you are getting correct results. Theoretically Angular can't be faster than both libraries because it does not implement diffing algorithm.


You can try yourself, the samples are there.

And it does, just not Virtual DOM


The speed comparison is sadly incorrect:

Adding 'track by $index' to the Angular example makes it run 10x faster (outperforming both React and Blocks).


Are you sure you are getting correct results. Theoretically Angular can't be faster than both libraries because it does not implement something like diffing.


Yes, you can easily test it - the code they used is in a link on the site.


> I am however feeling so overexposed to new libraries and frameworks that I can hardly muster the energy to even look at it.

My rule is to ignore pretty much anything and everything until either:

1. A year goes by and it seems like it is gaining traction.

2. certain key people that I know personally and respect also start talking about it etc.


If you have N virtual dom nodes, and you are going to compare them every time a single thing changes, your performance may be good, as long as N is small. Unfortunately, React and similar frameworks don't deal with the case that N is large.


Actually, they do. React has shouldComponentUpdate, Mithril has subtree directives, Mercury has thunks, etc. One big difference between vdom frameworks and KVO/dirty checking frameworks is that since the virtual dom tree is in plain view (pun intended), it's possible to use advanced features to micro-optimize the hell out of it, whereas other types of engines tend to be more "black boxy" and make these kinds of optimization nearly impossible.


That only helps if you had poor state management and churning updates to things which hadn't changed.

If you actually have a large number of DOM elements which need to be updated, you'll find that React is an order of magnitude worse than just using the DOM directly because it has to do that extra book-keeping multiplied by the number of elements.


Touching the DOM is by far the biggest bottleneck in performance. Of course for some arbitrary discrete task, hand coded DOM manipulation code is always going to be faster than a layer of abstraction on top of it. But the strength of virtual dom is that a single piece of code can handle insertions, deletions, sorts, splices and pretty much any data contortion you can throw at it without increasing code debt. Managing all of those w/ only the DOM API (or jQuery) as an application grows is difficult, and it's one of the main reasons why frameworks exist in the first place.


> Touching the DOM is by far the biggest bottleneck in performance

My point was simply that this devolves back to Amdahl's law: the only way that React overhead + the DOM can be faster than the DOM alone is when the pure-DOM code is doing too much work. It's possible that React makes the code so much easier to maintain that you write better algorithms but that has very little to do with the virtualdom rather than the strong push towards better structure.


There's the fact that dom changes related to a given set of events can be made as part of the same changes to the DOM as a whole... which can reduce parts of the render time overall.

However, depending on your needs, a stream of changes may behave differently in different use cases... to me React simply represents in my mind a better way to manage components and rendering logic, combined with something like flux for data and event flows.


That productivity gain is, in my mind, the better reason to use React. Browser performance characteristics change and most of the time you're not pushing the limits but ugly code is forever.


Might want to tighten up the spelling and grammar http://jsblocks.com/learn/introduction-why-jsblocks


I wish js authors would stop baking functional apis into their libs and let the available contenders (ramda lodash underscore) do it for them.

this reminds of the days when everyone published their own psuedo oo js lib. yuck.


I am actually considering removing the functional API. I agree lodash is better. It just doesn't make sense to use something that is not proven.


Is isomorphic JavaScript a thing? Isn't it just 'using jsdom'?


It is, but i dunno why every other new framework pushes that, when you can do this in react with some conventions and 30 lines of node code. AFAIK ember fastboot gonna use jsdom and they are planning to release something for a long time, may be it is focus thing, or just too painful to do that using naive jsdom rendering.


No. jsdom is not the perfect solution. jsblocks is using Virtual DOM and have specific implementation to support server-side rendering which makes the framework more powerful and flexible.


How is it Isomorphic? I can't see how the example illustrates server-side rendering? Just an HTML file?


It's unclear if the views are also leveraging Observables to asynchronous load views. Is so, are Observerables not unlike the ones of RxJS being used?


You could load views asynchronously. Observables could be compared to RxJS but they do not use it. They are inspired by Knockout observables.


"Faster than React" does mean anything?


React.js is a new popular toolkit by Facebook (http://facebook.github.io/react/)


I think he meant to imply that React is slow.


You could take a look at the performance chart at the home page and inspect the project containing the tests - http://jsblocks.com/downloads/jsblocks-performance.zip. In general rendering and syncing changes are faster.


I'm not sure if an example beginning with an HTML file gives me good perception about it being isomorphic.


data-query="val(...)" data-query="css(...)" data-query="click(...)" data-query="each(...)"

... Really? Are you aiming for single god function?

"It makes so much sense to query a click!!" said no one ever.


To demonstrate speed, don't use a very slow CSS transition property...


You mean the animations demo? This is to showcase how to work with animations to speed. CSS3 Transitions/Animations have the same performance regardless of the framework.


I think he's just saying you should have used a lower transition time, like 100 or 200ms. It has to do with nothing more than the impression it makes on the user. It's "illogical" but if one of your examples uses a slow CSS transition then the framework "feels" slower, even though the two things have nothing to do with each other.


DBmonster or it didn't happen


I seriously think this is some sort of parody of JS. Really? A new framework every week?


As someone who mostly codes in Python, I don't understand, why JS gets new framework so often. What is the reason behind? Is Javascript makes thing easy to develop a new framework? Why doesn't Python get new framework so often?


Ahh. You just haven't been around Python for long enough. Python used to get new server framework every other week. There was a Cambrian Explosion of them at one stage. Then it settled down. Javascript is still evolving. React has just kicked off a whole new iteration by putting the reactive/functional/immutable paradigm firmly on the agenda. That's going to take a couple of years to play out.

BTW, If you want to see what that combination looks like in a more suited language then look towards ClojureScript or Elm.


My personal theory is that it is because

    * JS is possibly the largest programming language community in the world
    * There are a lot of shortcomings in "the web platform" for app-style development
    * Most JS developers are primarily developers in another language with a stronger culture and set of ideas/idioms
Combine these things and you get .NET developers creating C# flavored JS frameworks, Ruby developers creating Railsish frameworks, etc. Then you have interactions of those ideas, where it's like C# and Ruby had a baby as a JavaScript MVC framework. :-)

It's basically the cambrian explosion.


Is there any Pythonish JS framework?


There are clones for most popular template rendering systems, and would be surprised if there wasn't similar as a whole application framework.

Do a search of https://npmjs.com/ for a framework you want a synonym to, and you will probably find it.

For me, some tools simple ring better in the JS way than others... if it's too cobbled, and relies on strange markup behaviors I like it less. If it's really class centric I tend to like it less, though ES7 classes and React isn't too bad. It just depends on your likes.

I really don't like seeing certain patterns in JS (factories and di/ioc) as they simply aren't needed and only add complexity.


Server code is spread across different languages. But every webdev is forced to use JS on the client. It's the sheer amount of people using this language.


It because package management in JS is complete garbage. I can't believe people actually like using Bower or Browserify or JSPM or any of it. While NPM for Node has some scaling problems, at least it just works for the simple cases. I've never not had problems with the client-side JS package systems and managers.

So package adoption is hard because of this. If you make it a pain for implementing developers to use your code, they're more likely to just write their own code.

That's why I think the old style ala jQuery or Google Maps API of packaging everything manually as just namespacing-objects still makes the most sense, with the fewest tradeoffs. You give the user a single, minified JS file to either copy or reference on your CDN. It's a least-common-denominator solution and it lets the implementing developer figure out how to fit it into their workflow.


Just use npm dude :p </brogrammer>

Seriously though, it's a non-problem now. There is no way I'd go back to anything else. Webpack and browserify are the only way to go. </religion>

Yes, there is a certain purism to doing your own modules and IIFEs and JS, but it's like claiming that code is only fast when it's asm. </realcoders>

Besides it can all be optimised out if you add the closure compiler plus relevant comments </nobodyactuallydoesthat>


In general I just use npm... I don't use bower or jspm... for that matter, I don't think browserify where needed is so bad.. there's also options with babeljs, which I'm liking more and more.

A base set of packages, for your external functionality, your core (shared functionality) and the rest makes a lot of sense, and isn't that hard to do. In the end it's pretty easy to reason about, and with sourcemaps and better build tools it's easy to use. Though having to have a watcher or build process when JS changes takes some getting used to... if you're used to compiling server code, it really isn't bad...


I think it's because it's relatively straightforward to accomplish. These guys can work on creating stuff like this and put on their portfolio they created "Noun.js" and it 'looks good' to those not in the developer world and knowing a new one is out every week.

I consider them somewhat fluffy and learn just to say nice job and move on.


> Why doesn't Python get new framework so often?

It definitely did with django, pylons, flask, turbogears, web2py, . . . I didn't know which way to turn.

PHP had the same thing with cakePHP, symphony, drupal, and so forth. I remember rolling my own using smarty long ago, because I couldn't decide.


I've been coding JS for a while now, and it personally feels having imposter syndrome most of the time.

It's easy to get into making/sharing something, but has no (strict) guidelines on how things are structured or work. So you have countless ways to do one thing.


lodash slower than underscore? Isn't lodash's primary purpose to be a more performant drop-in for underscore? Would love to see these benchmarks in a jsPerf.


I have discussions with lodash creator. jsblocks is only faster in some cases and almost the same speed in other cases. Underscore is slower in general than lodash just the test cases shows some isolated scenario.



Why link version with year old code? https://jsperf.com/ldash-vs-underscore/3


Lodash was still slightly slower here for me.

Chrome 43.0.2357.65 on OS X 10.10.0




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

Search: