Live data from Hacker News

Ask HN: Why web frameworks are becoming so complex?

news.ycombinator.com

31–40 of 44 posts

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

#31
post #30
post #23

Earlier quoted context omitted.

"It doesn't force any particular way of doing things onto you." Might as well be "Your app is spaghetti 1 year after you leave the company."

There's some truth to that. I think it's all about knowing the right tools for the job. If you spend several dev-years on a Sinatra app, then you probably will have a unmaintainable mess unless you have some good architects enforcing a sensible structure on it. Sticking with Ruby for examples, if you want to put up a quickie site with 4 routes and no DB, then it seems kinda silly to pull in Rails and deal with all of…

I've found that it's all about the team.

If it is a small team of close knit developers who communicate well, and expect to work together for a long time. Roll your own setup, loads easier and much more flexible.

If you are a corporation with reasonable dev turnover and good management, you might be able to pull off your own solution too.

If you are using contractors, have high dev turnover, a distributed team, and especially all of the above. Use a framework, any framework, otherwise you will wind up with a disaster within 6 months.

There was a really great talk a couple years ago about Twitter's defunct FlightJS framework. The framework was meh, but something in the presentation stuck with me, "If the shit is in a box, no one can smell it.".

I took that to mean that if your application is structured and organized ( like what a framework imposes ), suboptimal parts of the application will have a smaller impact on the app as a whole, and refactoring those parts is often a matter of just "throwing out the box".

On the front-end React has done a fantastic job of providing lots of boxes for contractors to shit in.

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

#32
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 value…

It is really difficult to explain the benefits of static analysis and type safety to people who only work in dynamically typed languages.

The JS community is just now being introduced to compilers, and there is significant push back and lots of people crying for "simpler age". I think it will be a while (if ever) until languages like closurescript, scalajs, & typescript start seeing widespread adoption outside of their fiefdoms (google, fb, microsoft).

If you are interested in a typesafe universal js ( or isomorphic js, whatever we are calling it now ) proof of concept you can check out this project using scalajs and scala-js react.

http://ochrons.github.io/scalajs-spa-tutorial/index.html

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

#33
post #21
post #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 wh…

Websites are becoming more complex. Deal with it. I'm sure people said the same thing about the gutenburg press vs locking a bunch of monks in a room for 20 years. That being said, if you don't understand the tech, or the tooling that implements it, don't use it. Keep doing things the hard way, I really don't care. In a few years we will be writing config files for machine learning algorithms to stitch together a ui…

I was with you initially, but this seems hostile in a way that's honestly kind of confusing. The argument, as I understand it, isn't something like "websites are too complex now," it's that "web-app programming is becoming more complex without corresponding returns on functionality or UX."

Your example, though it's buried under a bunch of stuff calling people dumbasses, makes an interesting point: You're right, there isn't anything simple about 100,000 lines of code in ANY language, even if it's 100,000 necessary lines. What were they trying to do that was so easy to replace? What kind of JS was knocking around in 2005 -- is it all display stuff and wonky jQuery?

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

#34
post #2

This sort of "complexity" (DI, ORM, extensive configuration) has existed for a long time, particularly in the Java webapp space. You don't need a license to release a framework, and a framework doesn't have to be sensical to be adopted. If you learn the fundamentals of the things you're working with, particularly HTTP, web browsers, the web in general, and your chosen programming languages, things will become much mo…

It's not that these things are not clear for me, I build many successful applications using these technologies. Also in the past I was really happy using them, but lately I started to realise that it's usually just increase the time we need to spend building applications. I can't see what really I get in return. Especially debugging this kind of application is also hard, as we can not just set breakpoints in yml file…

> I started to realise that it's usually just increase the time we need to spend building applications.

This might be because I'm not building anything that's going to blow the doors off of the internet, but I've found having at least a casual familiarity with a few frameworks (Django is the first that pops into my head, though you may be talking about .JS stuff) has made prototyping, at least, far simpler. Building a basic Python CRUD app from scratch, depending on what you're trying to do, could take, I'd guess, two weeks to get something* up and running. With Django, you could absolutely have your basic front-end and admin interface done in a day.

Once you get into the tricky bits (or just bumping against the edges of the Django database abstraction layer), yeah, I can see how it's annoying -- is that more what you're talking about with the "we can not just set breakpoints in yml file" bit? That setting up models by hand is more predictable than letting the framework do it?

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

#35
post #21

Earlier quoted context omitted.

Websites are becoming more complex. Deal with it. I'm sure people said the same thing about the gutenburg press vs locking a bunch of monks in a room for 20 years. That being said, if you don't understand the tech, or the tooling that implements it, don't use it. Keep doing things the hard way, I really don't care. In a few years we will be writing config files for machine learning algorithms to stitch together a ui…

I was with you initially, but this seems hostile in a way that's honestly kind of confusing. The argument, as I understand it, isn't something like "websites are too complex now," it's that "web-app programming is becoming more complex without corresponding returns on functionality or UX." Your example, though it's buried under a bunch of stuff calling people dumbasses, makes an interesting point: You're right, there…

If I seemed hostile, it is because I am dealing with this exact topic on almost a per contract basis, and it is becoming exhausting. However I don't recall calling anyone a dumbass.

Here are some ( sanitized ) examples from my current project that exemplify the danger of allowing this line of thinking among your contractors:

1. Completely unmanaged client dependencies on a per page basis ( negligible code, infinite heartache )

2. Template files that do not reuse code due to laziness or differences in markup style ( 20k+ extra lines of code )

3. CSS files crafted on a per page basis, again little code reuse due to developer style and competence ( 20k+ extra lines of code, huge download size, difficult cacheing requirements )

4. Confusing and undocumented deployment procedures ( I had to completely rebuild the infrastructure from the ground up )

5. Each and every page had a its own js file, with its own global exports, dependencies, and code style. Most were over 1000 lines of untested jQuery Stackoverflow answers. 65 unique pages, sharing almost no code.

6 My favorite, a grunt task that searched the code for 'some_var + other_var' and replaced it with a string literal "https://my-dynamically-generated-cdn-fingerprint.cdn.com/res...

7. Superflous build tasks and bugs due to inconsistent project structure. Some people like /dist others /builds etc.

The list goes on, I'm finding more stuff every day.

This is a well funded project, 1 year into development.

Just implementing react, gulp, and sass allowed me to remove 60k lines of code over 2 months. The app still works in a request / response method, haven't gotten to that yet. The backend is still a tangle of coffeescript.

This is the risk you run by not imposing structure on your developers via solid frameworks and tools. If you can't pick the best tool for the job, hire someone who can. Otherwise you'll end up hiring him anyways to fix your broken 20 million dollar "unicorn".

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

#36
Writing config files or filling some template classes instead of actual programming is pretty much the purpose of a framework. As a senior developer it may be your responsability to filter the hype from the real stuff as you can influence which technologies should be used in your projects. Fortunately there is a parallel universe of people developing wonderful libraries that you can combine and use as you wish.

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

#37
We've come full circle and have just pulled our stack back from a complex framework (Durandal, akin to Angular) to a simple architecture centred around knockout.js, and everyone is happier for it. The code is cleaner and debugging is a world apart.

Backend wise I've taken a liking to Express because it hides nothing. I prefer it over Rails or ASP.NET MVC, where there is so much magic. I would switch if I could but we have too much legacy code.

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

#38
post #35

Earlier quoted context omitted.

I was with you initially, but this seems hostile in a way that's honestly kind of confusing. The argument, as I understand it, isn't something like "websites are too complex now," it's that "web-app programming is becoming more complex without corresponding returns on functionality or UX." Your example, though it's buried under a bunch of stuff calling people dumbasses, makes an interesting point: You're right, there…

If I seemed hostile, it is because I am dealing with this exact topic on almost a per contract basis, and it is becoming exhausting. However I don't recall calling anyone a dumbass. Here are some ( sanitized ) examples from my current project that exemplify the danger of allowing this line of thinking among your contractors: 1. Completely unmanaged client dependencies on a per page basis ( negligible code, infinite h…

This is really interesting, thanks for responding. It seems, though, like the vast majority of these problems aren't coming from the necessary evils brought about by outdated technologies -- it just seems like inexperienced (or just...bad) coders trying to shove stuff out the door on the cheap. If the people who made the original project had been "using" React, I'd imagine you'd just be dealing with the busted CSS and mangled JSX everywhere.

This raises an interest point that I think I was missing before -- "imposing structure on your developers via solid frameworks and tools." The idea that even if you don't need the functionality of a particular framework, a framework's prescriptive way of doing things might reduce enough of the variance in styles to make a big project more coherent.

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

#39
post #35

Earlier quoted context omitted.

If I seemed hostile, it is because I am dealing with this exact topic on almost a per contract basis, and it is becoming exhausting. However I don't recall calling anyone a dumbass. Here are some ( sanitized ) examples from my current project that exemplify the danger of allowing this line of thinking among your contractors: 1. Completely unmanaged client dependencies on a per page basis ( negligible code, infinite h…

This is really interesting, thanks for responding. It seems, though, like the vast majority of these problems aren't coming from the necessary evils brought about by outdated technologies -- it just seems like inexperienced (or just...bad) coders trying to shove stuff out the door on the cheap. If the people who made the original project had been "using" React, I'd imagine you'd just be dealing with the busted CSS an…

That's just the thing.

Having a framework in place minimizes the impact of those "bad programmers" to just a single ui component, or api route, or database migration.

Not having a framework in place means that that intern or contractor from india can now introduce bugs that impact the entire system and are nearly impossible to track down.

I feel like it shouldn't be such a hard sell to get software engineers to admit that structure and consistency are good things.

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

#40
post #35

Earlier quoted context omitted.

If I seemed hostile, it is because I am dealing with this exact topic on almost a per contract basis, and it is becoming exhausting. However I don't recall calling anyone a dumbass. Here are some ( sanitized ) examples from my current project that exemplify the danger of allowing this line of thinking among your contractors: 1. Completely unmanaged client dependencies on a per page basis ( negligible code, infinite h…

This is really interesting, thanks for responding. It seems, though, like the vast majority of these problems aren't coming from the necessary evils brought about by outdated technologies -- it just seems like inexperienced (or just...bad) coders trying to shove stuff out the door on the cheap. If the people who made the original project had been "using" React, I'd imagine you'd just be dealing with the busted CSS an…

"imposing structure on your developers via solid frameworks and tools." is exactly why i use frameworks.
Post reply on HN