Hacker News new | past | comments | ask | show | jobs | submit login

To all the 'oh noes - another framework people' - there's a pattern here. We're going through a transition that isn't complete.

(I might have the details wrong but here's the flavour)

Backbone was a good start - Ember and later angular offered to fulfil a genuine need but after a long period of bedding in, many people have become dissatisfied with them.

React (and a few similar frameworks that appeared around thw same time) turned everyone's head and seemed to offer a much better way forward. However it was only part of the jigsaw. It can be described as the V in MVC with some suggestions on the right way to add the M and C ('Flux').

So - what we're seeing now is a lot of people who've had time to digest React+Flux and are releasing a complete MVC package that incorporates all the lessons learnt. Consider how long we had the "just use jQuery" phase of front-end development. It's just time for pendulum to swing back the other way.




I recall reading about this idea of "exponential creativity". I don't remember if that was the actual term used in the article, but it was basically this idea that given a problem, you can incrementally come up with better solutions (e.g. add 9's to the end of a number to make it bigger), or you can take a leap out of that box and come up with a new class of solutions that completely outdo the old way of doing things (e.g. Knuth's arrow notation, busy beaver).

One could argue that the arms race between Prototype, Dojo, YUI etc from the last decade was a race of incremental solutions and one-upmanship, and jQuery largely stood out from the crowd by having extremely well thought out developer ergonomics.

I think that the ideas behind React/Mithril/Mercury (composability, unidirectionality, etc) are, as jQuery UX was at the time, a "leap out of the box" in the frameworks' arms race, but I feel that frameworks like tuxedo are again settling into the territory of being merely stabs at incremental improvements.

The main problem I see here is that it's not particularly obvious what kind of problem this framework solves. Virtual DOM frameworks are hot because they help solve problems. In contrast, it's hard to sell features.


The big problem is that OSS market rewards bloated frameworks/high commit rate/hype over careful, minimal design. Devs are unable to separate hype from technical excellence. I'm not sure many developers even skim the code of their favorite frameworks. Essentially, they're selecting OSS based on the exact same criteria used by the enterprise companies:

* "I'll go with Angular since it's supported by Google"

* "When I'm not sure which library to use, I just choose the one with the most commits"

* "I'll just choose something with the most features in case I need them"

The upshot is that incremental, monolithic solutions get selected over and over because they're easiest to digest and usually supported by a well-known entity with lots of capital (lol meritocracy).

Ultimately, OSS is a poor vehicle for R&D because the market is every bit as dysfunctional and short-term-gain-seeking as the real market. Very strange.


It's not strange, it's the natural state of a market with limited and ever-changing information. At each iteration, people ask themselves two questions: "Am I convinced this will alleviate one or more pain points I have?" and "Am I convinced this will be active, well-documented, maintained, and improved for the forseeable future?". Note the questions are "am I convinced this will" rather than "will this", because information is limited.

It is very difficult to know a priori whether something will really alleviate a pain point, or whether it just seems like it will. The ability to do that successfully most of the time is one of the great advantages of experience.

Even worse, it's basically impossible to predict the future evolution of community support for a given project, but support from a company that can pay salaries and is not itself going anywhere is one of the best positive indicators of longevity and maintenance (though it says little of quality).


When I'm not sure which library to use, I just choose the one with the most commits

I have never seen anyone use that logic.


Me neither. Nevertheless, the commit rate plays a role.

If the last commit is months old, you should be careful. If it is years old, you should stay away from it. (Example: The original Qmail mailserver was rock solid and djb's masterpiece of security. But you had to add custom patches for even basic features such as SMTP Auth. Why? Because at the time Qmail was written, SMTP Auth wasn't common yet.)

If the author then says that this is not due to lack of time, but because the software is "ready" / "done", this is an even worse sign. (Yes, I'm looking at you, Tilecache.)


> Ultimately, OSS is a poor vehicle for R&D because the market is every bit as dysfunctional and short-term-gain-seeking as the real market.

My biggest problem is I don't want to invest time anymore keeping up with the latest technology fad. I still write Perl code for this very reason, I invested the time, and it's "good enough" for most problems.

The second biggest problem is the maintenance of software developed using a fad technology. As often happens when I've used something cool it ends up biting me in the ass when a year or two down the line I have to go back and make code changes and the framework/library is no longer maintained, breaks in newer browsers, etc. because people have moved on to something newer and better.

I seriously question the long-term return on investment using new web technologies these days and am very apprehensive about willy-nilly investing time learning and using them until they've gained a significant amount of traction.


Those lessons appear to have left us needing a loading screen to show a web page. I'll stick with not bolting everything I can find together into a Frankensteins monster of a stack.


To be fair, a loading screen in a web app is a symptom of a bad design, not the use of a framework. For instance, you can use React from Node.js to pre-render the app's initial state.


Yep, SPAs and loading screens are not synonymous and the implication that any SPA can be replaced with a traditional multi-page app with no loading concerns and comparable UX is purposely obtuse.


Sorry - you've conflated two things:

"When building complex front-end apps frameworks help."

doesn't imply:

"Everything on the web should pretend it's an app"

My sweet-spot is is pjax, progressive enhancement and "let's pretend some people have javascript turned off so we can maintain a sane architecture without having to explain why"...

But - some things that run in a browser ARE apps and need some support beyond jQuery et al.


It doesn't have to be that way. These lessons are no substitute for server side rendering although with more frameworks supporting isomorphism out of the box this will hopefully be a thing of the past.


My only issue with 'isomorphism' it it forces me to use javascript on the server. As much as javascript isn't the worst language in the world, I'll never be happy with to live in a world where it's the only language.


The interesting bit of isomorphic applications isn't the fact that you can use JS on the server. For me, it's that you can keep all your UI and UI-related logic written in one language, and have your business logic, data fetching, and everything else in whatever language you prefer.

This has many benefits like code reusability and not having to write placeholders/render code twice -- in two different languages.


Thank you! I will never understand this push towards "isomorphism". Why do you want to use more javascript? I use javascript because I have to, not because I want to. I love being able to work in the language of my choice on the server.

Furthermore, I'm not convinced it's a good thing to blur the lines between client and server. Or in other words, I think it's a good thing for the developer to be thinking about the differences and the ramifications of code on the client vs. code on the server. The whole thing reminds me of the EJB days, where we were sold on the idea of not having to think about the implications of local vs. remote objects. In reality, no matter how you hide it in the syntax, those kinds of distinctions have consequences, and treating client code like it's server code or vice versa just seems like a bad idea to me.


I will never understand this push towards "isomorphism"

Keep it DRY. Write once, run everywhere. Bearing in mind you have to write the application once in Javascript, it's a counter-proposal to "being able to work in the language of my choice on the server", which is to use the 1 version.


> to digest React+Flux and are releasing a complete MVC package that incorporates all the lessons learnt

I'd reduce this to "some lessons learnt".

While some people build frameworks based on React+Flux, other poeple still think these frameworks are larger than they should be, and provide even more lightweight alternatives, such as Riot.js.

Nevertheless, I agree that this is still in progress. There are phases of trying entirely new designs, pushing them to their limits, reducing them to their essence, using them as building blocks for new designs, and so on.


Frameworks are most often a bad idea. Use libraries instead.

Sometimes they are useful though. For instance, they make sense when routing. But in those cases, they should more like libraries as well: more lightweight. Something like Express or Koa.js but more lightweight.


> Frameworks are most often a bad idea. Use libraries instead.

People say this a lot, and it makes me wonder if they've ever worked on a team working on the same codebase. And if they do, what secret sauce they're drinking to not go insane.

In my experience, when people on a team use libraries at their whim, the coding styles diverge wildly from feature to feature. One person decides they're going to write all their AJAX callbacks in an anonymous function; another likes to reference a function directly; another likes to both; and yet another uses promises.

And as soon as someone needs to fix someone else's project, they do some combination of (a) getting wildly frustrated with this other coding style, (b) rewire their mental model to adapt to this new style, (c) spend a week rewriting it in their own style, (d) introduce a ton of bugs in the process, or (e) by some miracle, get it to work perfectly.

So to combat this, the team works out coding standards and a style guide. You must tab with two spaces! You must pass a real Javascript function to your callbacks! You must separate your state from your view!

And of course, once your style guide is big enough, lo and behold: you have your own hand-rolled framework. And hopefully it's tight enough that everyone writes in the same style, but is still expressive, and is still simple enough for a new team member to learn quickly.

So if you're just starting a codebase, it makes complete sense to pick a framework on the outset because people have already gone through that headache for you.


Absolutely, I'm beginning to lose patience repeating the frankly blinding-obvious-at-this-point-argument you just had to make, but I'm glad others like yourself haven't.

The 'don't use frameworks, use libraries' argument is naive, and just does not hold up in the real world of teams trying to build things.


And I have found the "you're just writing your own framework" point needlessly repeated over and over, despite having never run into it in practice. Choosing a large framework does not insulate you from the concerns of the grandparent. You still must come up with a style guide, and a way of using the tools. The win is not obvious, imo.


The style guide is surely longer when using a toolset with fewer conventions?

If I'm using Backbone over Ember, my style guide has to cover things that would be covered by Ember's own docs, for example how to compose views, how to do nested routing, how to represent computed properties ...

Your longer style guide is defining code patterns for those use-cases. Your longer style guide is a framework, just more verbose because you aren't actually abstracting away those patterns.


I don't think that a framework is a good substitute for a style guide or the processes like reviewing, documenting or factoring code that lead to consistency and readability. If your team members feel like they have to "rewire their mental models" or spend weeks rewriting code rather than adapting to it, the team has a problem that you should deal with in another way than pigeonholing your projects into frameworks.

I generally disagree with the sentiment that collections of libraries are somehow inherently a better solution than frameworks, though. I just think that it is probably a poor solution to the problem you describe here.


I'm moving towards the library approach for some toy projects for both client and server.

There is no perfect framework and by choosing one you're usually stuck with its warts for the long haul. I usually find that I'm bending my code to fit into the framework conventions that I don't necessarily agree with.

With ExtJS for example, the framework conventions dictate your project should be organized into folders like this:

  controllers/
  models/
  views/
...whereas I prefer controllers, models, and views, which are coupled, to be located in the same folder and models which are intended to be shared to be explicitly in a shared folder.

Another example (still ExtJS!) is that I never agreed with ExtJS's MVC implementation - where its controllers were global for all instances of a view. It took Sencha several years before they fixed this by adding "ViewControllers" in ExtJS 5.

If ExtJS was not an all-encompassing framework I would have liked to use its UI components with a different MVC library (or simply vanilla JS) organized into my preferred project structure. I suppose it's still possible to do this but with frameworks you tend to not want to deviate too much from the framework conventions or things start to go wrong.


People learn using frameworks and discover using libraries.

Some are pioneering-friendly others just-doing-the-job-friendly.

Nothing static, all oscillating in a big Cambrian Explosion of JavaScript creativity


unless of course it's just the CADT model all over again.




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

Search: