Live data from Hacker News

Ask HN: Why web frameworks are becoming so complex?

news.ycombinator.com

11–20 of 44 posts

Re: Ask HN: Why web frameworks are becoming so complex?

#11
The theory is that a DSL should be better than whatever generalised programming language you're using. SQL is a good example - ORMs tend to fuck up querying databases (ie pulling back unnecessary data) almost as much as they fix. SQL, a language designed for querying relational data, is (unsurprisingly) pretty good at doing what you need efficiently.

In practice, a lot of frameworks are made by people (who are just people, and don't 100% know what they're doing at the outset). I'd say that if you're spending too much time in configuration, you're not using the right frameworks.

No, in a few years those frameworks will be forgotten. From the terms that you've used, it sounds as though you're coming from the Java world, which has an inexplicable love of config files - if that's the case, it might be a bit longer than a few years, but they'll eventually figure out that config files aren't a good representation for options.

Though the layers of magic and abstraction will continue to increase and grow, at least until simple LOB usecases can be achieved in a couple of lines at most.

Re: Ask HN: Why web frameworks are becoming so complex?

#13
Innovation always leads to change. The fact that framework complexity has been increasing is only incidental.

In fact, I think we're starting to see a trend in the other direction. Angular 1 was a massive mess of complexity, but Angular 2, React-based frameworks, and various other frameworks coming out these days tend to be much simpler.

Believe it or not, the web has been the platform where most of the innovation in UI development paradigms has been taking place in the past few years. And I don't just mean in terms of the sheer number of new things coming out.

The web community pioneered UI development paradigms involving functional programming techniques and immutable data, and have brought its benefits to other platforms (through React Native). I personally would never want to go back to the old way of building UIs. And I suspect I'll feel the same way about client-centric data fetching when I get to try out Relay/GraphQL, Falcor, Om Next, etc in production.

If constant change is the price we have to pay for innovation at such a relentless pace, I personally welcome it with open arms.

Re: Ask HN: Why web frameworks are becoming so complex?

#14
>Instead of writing code in programing language we move into xml/yaml direction and hundreds of weird config files.

Blame this partially on the weird phenomenon of programmers refusing to touch languages they consider aesthetically ugly. Javascript? CSS? Ick. Much better to pile on a build system to compile those languages from another language that looks kind of Ruby. HTML? Ew - no significant whitespace. Let's generate HTML from something that looks and acts like Python.

But, snark aside, I think it's a good thing if a framework can be agnostic about the kind of configuration syntax it uses, although that in and of itself implies some minimal complexity. Whatever choices the developers make about this, of course, amount to personal preference. Heck, I prefer INI files for configuration.

>Even small website often requires hundreds of megabytes of dependencies

That depends on the language and framework you're using. And how small you consider a "small" website.

Unfortunately (in my opinion, with which I know others will disagree) frameworks tend to want to do too much, and as such tend to bloat into vast, overly complex attempts at reinventing the wheel, the chassis, the transmission, the bumpers and deciding what kind of air freshener you should want hanging from the mirror. I would prefer a framework not have a templating library or ORM or code generators baked in at all. Those should be implementation specific decisions. Rather, a framework should manage dependencies, routing, global config, responses, have some hooks to allow extensibility - the basics. If I want more, I can pick libraries for that.

Re: Ask HN: Why web frameworks are becoming so complex?

#15
Complicated frameworks are pain in the ass, I fully understand but there is a value in following some "market standard" frameworks as they make the team speaks the same language and will make it easier to bring developers in at any time without long learning curve.

Re: Ask HN: Why web frameworks are becoming so complex?

#16

Innovation always leads to change. The fact that framework complexity has been increasing is only incidental. In fact, I think we're starting to see a trend in the other direction. Angular 1 was a massive mess of complexity, but Angular 2, React-based frameworks, and various other frameworks coming out these days tend to be much simpler. Believe it or not, the web has been the platform where most of the innovation in…

    > The web community pioneered UI development paradigms involving
    > functional programming techniques and immutable data
Ugh, No. https://raw.githubusercontent.com/papers-we-love/papers-we-l... and https://www.youtube.com/watch?v=Agu6jipKfYw

Re: Ask HN: Why web frameworks are becoming so complex?

#17
I get where you're coming from - when the initial project for the framework you're working with has so much stuff that you don't understand or need yet, it feels like a huge burden to do the simplest thing in it.

You might want to give Ruby Sinatra a whirl. I just helped a friend build a starter site in it. The Hello World for it is 1 file with 4 lines of Ruby, no config files at all. Save that 1 file, run it, and you have a live website.

What I think really makes it cool is that there is a decent amount of sophistication to it, but you only see it when you need it. It doesn't force any particular way of doing things onto you. It's also kind of a cousin of Rails, so if your needs get to that level, you should be able to switch over pretty easily and make use of the enormous ecosystem of gems.

I think express.js on Node has kind of the same idea, might be worth a look also.

Re: Ask HN: Why web frameworks are becoming so complex?

#18
It's annoyingly bad at this point. You know it's gotten bad whenever new frameworks are coming out where being "minimal" is a feature.

Page loads are very large on some sites now, where they don't have to be. Though, advertising can be blamed for a lot of that. There's just a lot of extra cruft out there now, without much added to the user experience, in fact, it often detracts from it.

What happened to using only what is necessary? Why throw so much unused stuff behind a site, and especially, why load anything you're not using? Why complicate things?

Maybe I'm nostalgic for static pages or something, but I miss the days where things were simple in terms of page loads and efficient design, and I think a technologically-advanced but focused (avoiding excessiveness) approach is best going forward.

This philosophical approach is one reason I like the Hacker News site itself. It accomplishes its task well, and is almost solely text and minimal css. It's running on some stuff built underneath (as dynamic pages require), but it seems pretty minimal in general. It needs nothing extra.

Re: Ask HN: Why web frameworks are becoming so complex?

#19
post #14

>Instead of writing code in programing language we move into xml/yaml direction and hundreds of weird config files. Blame this partially on the weird phenomenon of programmers refusing to touch languages they consider aesthetically ugly. Javascript? CSS? Ick. Much better to pile on a build system to compile those languages from another language that looks kind of Ruby. HTML? Ew - no significant whitespace. Let's gene…

The problem with JS is not that is it aesthetically ugly, but the lack of a decent type system. The fact you can add whatever data you like to any object, and the object itself could be the data or a promise to return the data, and you cannot verify that the caller and callee are compatiable at compile time is asking for so much trouble. Let alone the nasty implicit type casting, two types of null value, truthy values etc. It is a real mess for the programmer who likes to reason about their code.

Re: Ask HN: Why web frameworks are becoming so complex?

#20

Innovation always leads to change. The fact that framework complexity has been increasing is only incidental. In fact, I think we're starting to see a trend in the other direction. Angular 1 was a massive mess of complexity, but Angular 2, React-based frameworks, and various other frameworks coming out these days tend to be much simpler. Believe it or not, the web has been the platform where most of the innovation in…

> The web community pioneered UI development paradigms involving > functional programming techniques and immutable data Ugh, No. https://raw.githubusercontent.com/papers-we-love/papers-we-l... and https://www.youtube.com/watch?v=Agu6jipKfYw

I'm honestly not aware of any UI development platform that makes heavy use of functional techniques and immutable data outside of the web. Sure, papers have been written about the idea, but where else has it been used in practice?

RE: the video. I'm almost certain you know this, but Elm is a part of the web community.

Post reply on HN