News for hackers. Stuff that matters.
Re:Why is modern web development so complicated? by reaperducer on Wednesday August 07, 2019 @04:04PM (#20638342)
It doesn't have to be complicated, if you get support from above.

A few weeks ago I launched a new web site for a health care company. HTML, PHP, CSS, and MySQL. No frameworks. No javascript. No garbage.

It replaced a site that was a mess of javascript libraries on top of frameworks on top of a half dozen jquery version and on and on and on.

The company administrators, doctors, practitioners, etc... are so happy with the new no-nonsense site that they raved to the parent company about it. The parent company's IT department looked into the site, asked me some questions about it, and yesterday I was been asked to do the same type of cruft-free rebuild of three other sites that the company owns.

Not buying into the framework-of-the-day hype just landed me job security for the next two years.

Re:Why is modern web development so complicated? by orf on Wednesday August 07, 2019 @04:13PM (#20638435)
Did you consider that the next developer might well come along and post a similar comment:

> It replaced a site that was pretty much a home-grown PHP framework written by a single developer. Random mixed logic in templates, hard to update CSS and a poorly designed 'not-an-ORM' ORM.

Not to say that your rewrite is like that, but one man's garbage is another man's treasure.

Re:Why is modern web development so complicated? by reaperducer on Wednesday August 07, 2019 @04:34PM (#20638690)
I'm sure it's possible. Someone may come along who is all into DrupalPress and Agilereactboxqueryhack and think it's primitive.

But they won't be able to say it's not maintainable, upgradable, or scalable. And it's documented out the wazoo, all the way down to the CSS both in code and in the accompanying PDFs. The last developer gave zero thought to who would come next. I've given great thought, and included the occasional quotation in the code comments from Goethe where appropriate.

But if the company wants to pay him/her to blow away my work, then that's neither my business, nor my problem.

Re:Why is modern web development so complicated? by geegoo on Wednesday August 07, 2019 @05:17PM (#20639191)
There are pros and cons to this. One con is that the next developer might have to spend considerable time buying into your ecosystem to be productive. A pro is that it is easily maintainable by you since you built it; which is also a con since it's not generally feasible for a single developer to cover all the in's and out's of a web ecosystem. Lets say you pass away tomorrow, and a week from now a major security vulnerability is announced that affects your system. If you had used a mature framework (Such as Laravel) with a auto update system in place, the issue might be patched in 1-2 weeks. Whereas in this hypothetical the company has to hire a developer that now has to ramp up on your software, be familiar with the security vulnerability, know how to patch it, and have some guarantee that your system will behave as expected. This puts the burden on both the employer who might not know how to screen the applicants because it's not their domain, and the developer.

Saying software is clean because it is untangled from a larger code base is misleading for most use cases, but especially so for web development. It is also not fair to treat front end and backend code in the same context as you can easily decouple both without (since you didn't mention if the backend itself is custom built by you or not, but it seems implied)

Re:Why is modern web development so complicated? by Roritharr on Wednesday August 07, 2019 @05:33PM (#20639351)
From my experience, going through a vanilla php app to fix a CVE is a much better experience than praying to the Framework Powers that be to have your patch ready and non-breaking when you need it.
Re:Why is modern web development so complicated? by temac on Wednesday August 07, 2019 @06:11PM (#20639702)
The web has nothing magic.

People have been maintaining SW developed by 3rd parties for several decades. Something like 5 or 6, probably. With all the various amount of available documentation you can imagine, and that includes no documentation and really stupid code bases, or even no source code and you have to patch a binary.

So while I recognize it can be obviously cool to e.g. have virtually no code but simply use a well-designed and currently actively-maintained third party project, it is not always possible, and if it's not then implementing (or even just configuring) anything on top of fashionable software can also be done in crappy undocumented ways.

So the key is to actually have detailed and useful documentation, regardless of 3rd party stacks (or they very relative "absence", I mean probably don't develop your own web-server nor your own database nor your own programming language nor your own operating system nor your own web-browser...)

Re:Why is modern web development so complicated? by arkh on Wednesday August 07, 2019 @07:35PM (#20640356)
You know there's Symfony between "my homegrown php" and "DrupalPress" which gives a lot of facilities for simple HTML based websites?
Re:Why is modern web development so complicated? by kaishiro on Wednesday August 07, 2019 @11:56PM (#20641714)
They absolutely can and will say it's all of those things - and for the most part the client will be none the wiser. It's practically the first step in relationship building for most agency pipelines.
Re:Why is modern web development so complicated? by Dumblydorr on Wednesday August 07, 2019 @04:40PM (#20638763)
Wow, awesome! Can you share your Goethe use and the context it enriches?
Re:Why is modern web development so complicated? by PunchTornado on Wednesday August 07, 2019 @05:20PM (#20639223)
if you don't use sass then it's not maintainable or scalable.
Re:Why is modern web development so complicated? by alpha_squared on Wednesday August 07, 2019 @05:41PM (#20639436)
Oh? Why's that?
Re:Why is modern web development so complicated? by PunchTornado on Thursday August 08, 2019 @11:28AM (#20645422)
i wouldn't want to write dirty css without a preprocessor. makes me vomit.
Re:Why is modern web development so complicated? by TotempaaltJ on Wednesday August 07, 2019 @04:17PM (#20638475)
And here's the trick to not building shit software: don't build shit software. It's a crude way to put it, but the reality is that you can build bad websites in any framework (including old PHP stuff and new JavaScript hype). You can also build good websites in any framework.

It depends way more on the organisation or team developing it than on the libraries you use.

Re:Why is modern web development so complicated? by afarrell on Wednesday August 07, 2019 @04:21PM (#20638521)
The trouble is that "don't build shit software" isn't actionable advice on how to avoid building shit software. For someone seeking to be a more skillful web software engineer, there's no information there.
Re:Why is modern web development so complicated? by thaumaturgy on Wednesday August 07, 2019 @06:23PM (#20639839)
This is fundamentally because our industry is built on opinions, not standards.

You talk to one software engineer, and they'll say, "that's built in PHP, so it sucks; it should have been built with npm, obviously." Then you talk to another and they say, "I can't believe they built that with npm, the package management system is just terrible and the whole mess is bloated and there have been a ton of security issues. They should have used a static generator instead." And on, and on, and on.

Now compare this to a mature industry with real engineers who are able to say things like, "sure, that material might not be the most durable on the market, but unobtainium would have added $35 million to the project cost and ongoing maintenance costs would have gone up by another $5 million / year."

That right there is a comparison that developers can never, ever offer anyone that's writing the checks for a project. Nobody's bothered to do that work. We can't even accurately estimate the cost of a complex project given our choice of tools, let alone talk about costs and ROI with different toolchains for the same projects.

This is absolutely shameful IMO, and the reason why I cringe a little inside whenever I see the words "software engineer".

Re:Why is modern web development so complicated? by jacobsenscott on Wednesday August 07, 2019 @07:58PM (#20640492)
Likely in that other industry the engineer built 100+ other basically identical items that are two or three orders of magnitude less complex and where all the costs and techniques are pretty well known.

Also, those mature industries routinely overrun by millions of dollars and months or years, event though they are dealing with a fraction of the complexity and the costs and techniques are well known.

Software is the only industry where you are asked to build systems that have never been built before but that are more complex than anything ever built in the history of "mature industries", on top of astronomically complex systems, and estimate it with an accuracy of 5 to 10 days and a few thousand dollars.

Re:Why is modern web development so complicated? by pjmlp on Thursday August 08, 2019 @01:16AM (#20642038)
90% of Web applications are database frontends.

What they do to the end user might be different, how the pieces come together, it is always the same, unless one is doing curriculum driven development.

Re:Why is modern web development so complicated? by collyw on Thursday August 08, 2019 @07:09AM (#20643398)
I wish we could get away from the fashion show in this industry. Currently we have a React frontend, which just adds extra complexity for no real benefit. But its fashionable.
Re:Why is modern web development so complicated? by eropple on Thursday August 08, 2019 @12:48PM (#20646136)
React (and other SPAs) may be fashionable, but I generally contend that--when written well or even passably, which obviously requires an asterisk lest the Scotsmen come by but I don't think is a very high bar--if nothing else it requires developers to treat a web application as a client of an API rather than tightly integrating it. It enforces a level of separation of concerns that, IME, tends to encourage loose coupling and better design.

Forget everything about responsiveness or whatever (which I find way more valuable than the tradeoffs one makes)--the lack of tight coupling is the real win of React and similar. I mean, if you'd like you can pretty easily build a server-side React app with NextJS and still get a lot of these benefits while using React purely as a pretty-dang-good templating language.

Re:Why is modern web development so complicated? by collyw on Friday August 09, 2019 @03:13AM (#20651973)
SPA apps will decouple the backend from the front end, but the front end will always be specific to a backend in the vast majority of cases. I don't see how that is so different from templates being rendered on the server.

Old school server side rendered apps are underrated and its perfectly possible to make something that looks and behaves as well as a SPA app for most things.

Re:Why is modern web development so complicated? by eropple on Friday August 09, 2019 @09:46AM (#20654246)
I disagree that the frontend will be specific in even a "vast" majority of cases--if only because of the obvious proliferation of mobile. And while I agree that you can often make a good-looking server-side-rendered, templated application, I will contest that you can ever make a server-side-rendered, templated application feel correctly on a mobile device.

Even in the case where you do have a specific frontend, I contend that there's still value in the separation because it very strongly encourages (coupled with tools like, shameless plug, nestjs-data-sec[0]) the writing of very clear viewmodels where thought must be put into what exactly should be exposed over the wire in a way that commingling database objects and template logic doesn't allow.

I think server-side rendered pages are properly rated at this point, not underrated; there are places to use them but they're shrinking as other tooling get better. As an example, even I write React almost exclusively because I write React faster and with fewer errors than any templating language I see in common use except maybe Razor (and Razor implies buying into ASP.NET, which, no). React/TypeScript are hard to get wrong and easy to burn through quickly. And I would call a React page rendered through NextJS a "server-side rendered app"--but I get the feeling you would not. ;)

[0] - https://github.com/eropple/nestjs-data-sec

Re:Why is modern web development so complicated? by I_complete_me on Thursday August 08, 2019 @01:42PM (#20646693)
Off topic this but your phrase "lest the Scotsmen come by" intrigued me. It sounds vaguely idiomatic but I don't know the reference. Any enlightenment available?
Re:Why is modern web development so complicated? by steve_g on Thursday August 08, 2019 @03:05PM (#20647522)
Re:Why is modern web development so complicated? by I_complete_me on Friday August 09, 2019 @04:25PM (#20657989)
Thanks for the link. No true Scotsman would have been so kind!
Re:Why is modern web development so complicated? by jacobsenscott on Friday August 09, 2019 @10:33AM (#20654692)
90% of apps use databases, but that doesn't mean they are just database frontends. If you zoom in there is always specialized domain logic that is custom to that app. If there isn't it shouldn't have been built.
Re:Why is modern web development so complicated? by Xelbair on Thursday August 08, 2019 @07:42AM (#20643570)
>Software is the only industry where you are asked to build systems that have never been built before but that are more complex than anything ever built in the history of "mature industries", on top of astronomically complex systems, and estimate it with an accuracy of 5 to 10 days and a few thousand dollars.

You are seriously overestimating complexity and novelty of most software development, while underestimating engineering in other industries. I work currently as software developer and previously in a branch of a civil engineering.

Do you seriously think that other engineering disciplines to not have those small little problems that plague us all the time in software development? They do, but they can offer their solutions based on data, not just whim. They do also have codified standards, and guidelines and certification exams.

On the other hand software development is relatively new discipline - other fields had hundred of years to mature.

EDIT: and they are catching up with rapid prototyping - it is getting cheaper and faster.

Re:Why is modern web development so complicated? by kjsthree on Thursday August 08, 2019 @12:41AM (#20641902)
> Software is the only industry where you are asked to build systems that have never been built before but that are more complex than anything ever built in the history of "mature industries"

I have a feeling that some SpaceX engineers would have something to say about this after one of their rockets lands on a floating barge.

Re:Why is modern web development so complicated? by shkkmo on Thursday August 08, 2019 @02:03AM (#20642231)
> I have a feeling that some SpaceX engineers would have something to say about this after one of their rockets lands on a floating barge.

That is because you are ignoring/left out the critical last part of the phrase you quoted: "and estimate it with an accuracy of 5 to 10 days and a few thousand dollars."

This is particularly relevant because this is a direct response to the following:

> We can't even accurately estimate the cost of a complex project given our choice of tools, let alone talk about costs and ROI with different toolchains for the same projects.

Re:Why is modern web development so complicated? by jacobsenscott on Friday August 09, 2019 @10:13AM (#20654487)
Software landed the rocket on on a floating barge. The hardware is just holes for hot gas to come out.
Re:Why is modern web development so complicated? by newen on Thursday August 08, 2019 @05:52PM (#20649206)
It's especially hilarious because he is comparing projects done by bootcamp graduates to projects done by highly trained PhDs. Some people just don't have a clue about the massive difference involved in webdev type projects and complex engineering projects.
Re:Why is modern web development so complicated? by lexs on Thursday August 08, 2019 @06:03AM (#20643115)
Some McDonnell Douglas DC-X engineers would probably have something to say about your comment too.
Re:Why is modern web development so complicated? by CapricornNoble on Thursday August 08, 2019 @08:21AM (#20643797)
>>>>Software is the only industry where you are asked to build systems that have never been built before but that are more complex than anything ever built in the history of "mature industries"

Anyone engineering hypersonic missiles would easily dispute that.[1] Or submarine-capable quantum communication systems.[2] [1]https://www.nytimes.com/2019/06/19/magazine/hypersonic-missi... [2]https://www.realcleardefense.com/2017/11/04/quantum_communic...

Re:Why is modern web development so complicated? by jacobsenscott on Friday August 09, 2019 @10:25AM (#20654609)
There are occasionally novel engineering projects. These will be millions of dollars and years over budget, and then will fail. All their "mature industry standards and procedures and certifications" wont' save them.
Re:Why is modern web development so complicated? by CapricornNoble on Saturday August 10, 2019 @06:59AM (#20661373)
It's unwise to extrapolate the US defense industry's procurement problems onto the Russians and Chinese. There's reasonable evidence to suggest the Russian Kinzhal and Zircon hypersonic missiles are already Working As Designed, or fairly close to it.[1][2]

[1]https://www.scmp.com/news/world/russia-central-asia/article/...

[2]https://en.wikipedia.org/wiki/3M22_Zircon

Re:Why is modern web development so complicated? by saiya-jin on Thursday August 08, 2019 @07:28AM (#20643499)
Yeah, I used to hold similar naive views fresh out of school. Reality is, at least 98% of the software out there is just redoing what has been done, copy paste for slightly different purposes, integrating libs in slightly different ways.

But maybe its hard to admit it, lower down your ego and be a bit humble. Yes, software development is a creative work, but so are all other engineering branches. And yes, we have massive issues with code, process and people quality across whole business.

Re:Why is modern web development so complicated? by nostrademons on Wednesday August 07, 2019 @07:21PM (#20640261)
> "sure, that material might not be the most durable on the market, but unobtainium would have added $35 million to the project cost and ongoing maintenance costs would have gone up by another $5 million / year."

> That right there is a comparison that developers can never, ever offer anyone that's writing the checks for a project.

Sure they can. At Google there was an internal cheat sheet of "numbers every engineer should know" which included the cost in dollar terms of trading off engineer time vs. memory vs. CPU vs. network vs. user-perceived latency etc. (Actually there were two of them - the more famous one is the Jeff Dean version that traded off CPU cycles vs. L1-L3 cache misses vs. RAM latency vs. sending data over the network vs. compression vs. disk latency etc, measured in nanoseconds) If you had any moderately complex new system, you'd prototype a few different approaches on a small set of sampled data, do some multiplication to figure out how much it'll actually cost in production, then compare that against the engineer time needed for various optimizations. If you were in a revenue-generating area like Search, somebody (usually at the executive level) would also be calculating how much the project was likely to make or lose for the company and ensuring that's acceptable. Not all that unlike any traditional engineering field.

The thing is that the overhead for this process really only makes sense at Google scale. For the vast majority of new software projects, revenues on success >>> developer time >>> hardware cost. So you just assume that if you can get the job done in a way that satisfies the customer, it'll be wildly profitable, and the primary factor to optimize for is developer time. And if the developer can build it, the hardware costs needed to run it will be negligible, so just buy more hardware.

This is an artifact of the software industry essentially being a gold rush, where it's rapidly eating the rest of the world and replacing non-computerized processes that are millions of times slower. When you have 6 orders of magnitude to play with, you can play fast and loose with estimates, because any acceptable solution at all will make you a lot of money. When software has eaten the rest of the world and new systems are competing with existing computerized systems, then it's worth it to start paying attention to things like efficiency, security, TCO. There's some evidence we're approaching that point, but we're not there yet, and it's still more advisable for an entrepreneur to tackle an old-school non-computerized industry than to try and improve on existing software solutions.

Re:Why is modern web development so complicated? by TeMPOraL on Thursday August 08, 2019 @03:20AM (#20642494)
> At Google there was an internal cheat sheet of "numbers every engineer should know" which included the cost in dollar terms of trading off engineer time vs. memory vs. CPU vs. network vs. user-perceived latency etc.

Could someone alert Google's web developer teams (in particular the GMail frontend team) about that cheat sheet? If released products are considered as evidence, it doesn't seem like this cheat sheet is used.

Re:Why is modern web development so complicated? by nostrademons on Thursday August 08, 2019 @12:55PM (#20646206)
I left 5 years ago, but a friend of mine who stayed said that Google's basically given up on trying to hold the line on latency, and recent projects don't care. Which is kinda a damn shame - when we were Nooglers we fought for bytes - but I get the sense that the institutional knowledge about how much latency affects revenue left when Marissa, Amit, Craig, et al departed and Larry & Sergey moved upstairs to Alphabet. Sundar's background is Google Toolbar, Chrome, and Android, all of which are product areas where latency doesn't matter because it's installed desktop software.
Re:Why is modern web development so complicated? by aswanson on Wednesday August 07, 2019 @08:57PM (#20640856)
Ugh. You've basically made the case for me doing my next project in c++ 17 instead of using it as an excuse to learn Rust. Im morally opposed to c++....
Re:Why is modern web development so complicated? by iamwil on Wednesday August 07, 2019 @10:11PM (#20641205)
isn't protection against de-referencing null pointers a good reason?
Re:Why is modern web development so complicated? by MaxBarraclough on Monday August 12, 2019 @05:31PM (#20680248)
In C++'s defence, the language itself doesn't mandate any protections here (the famous 'undefined behaviour'), but there's no reason your compiler can't add automatic runtime checking against illegal use of null. GCC supports it with "-fsanitize=null" [0]

[0] https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.h...

Re:Why is modern web development so complicated? by aswanson on Thursday August 08, 2019 @07:17AM (#20643441)
Yeah, but I've been around the block enough times to avoid those types of bugs.
Re:Why is modern web development so complicated? by apta on Thursday August 08, 2019 @01:21PM (#20646460)
It's much more than just null pointer dereferencing. Time and time again, it's been proven that Rust protects even very experienced C++ programmers from bugs they didn't realize they're even making.
Re:Why is modern web development so complicated? by MaxBarraclough on Monday August 12, 2019 @05:40PM (#20680329)
This is a good point. Personal assurances count for little. No-one is above writing buggy code. Even C/C++ codebases written by very expert programmers, often have pointer-based bugs, especially if large and complex. Operating systems and drivers, for instance.

As well as having free-form pointers, C/C++ also have many, many dark corners.

What proportion of C++ programmers know that comparison = (c == c++); causes undefined behaviour?

Re:Why is modern web development so complicated? by thaumaturgy on Wednesday August 07, 2019 @08:29PM (#20640697)
It's awesome that Google did that. This is the first I've heard of it. But:

> The thing is that the overhead for this process really only makes sense at Google scale.

The software industry is far larger than Google. If we want to claim that software is a discipline of engineering, we all need to have access to that kind of reference data, rather than trying to feel our way around in the dark in comment threads about blog posts about somebody's personal experiences.

I won't go so far as to say there's no such thing as software engineering -- a number of people working for companies with large budgets have well earned that title, I'm sure -- but the extent to which the term is traded like currency in our industry is disrespectful to the discipline.

> So you just assume that if you can get the job done in a way that satisfies the customer, it'll be wildly profitable, and the primary factor to optimize for is developer time.

The fetishization of developer time is one of the problems slowing the maturation of our industry. It ignores end-user time, it ignores management time; it often focuses solely on the initial development time of a project and ignores entirely the ongoing maintenance time for a project.

How many codebases are there out there that are gigantic balls of mud? How much developer time has been wasted on trying to maintain or refactor those codebases? How many really dumb security issues have negatively impacted companies or end users? How many comments has tptacek left on one little forum in one musty corner of the internet over the years trying to explain cryptographic and security-related best practices to an infinite legion of under-trained developers?

How many people have lost their lives to software defects? Not even the really tricky CS stuff, I mean the kind of defects that any other engineering discipline uses as case studies in their introductory courses.

Which case study would you choose for our Galloping Gertie?

Certainly software has done an incalculable amount of good in the world, and its impact is far and away net positive.

But while software has been busy "eating the world", it has rarely paused to also consider the cost and damage it has wrought and whether there are practices that could be standardized to reduce those negative effects. So I disagree wholeheartedly that we're not yet at the point that these things are important. Depending on who you ask, computer programming is between 60 and 180 years old. That's well long enough for us to begin asking questions like, "what data do we have to support this approach or that approach?"

There is still plenty of room for experimentation and research. There is still plenty of room for hobbyists and tinkerers. This isn't an exclusive-or thing.

As much as I really do appreciate blog posts like this one, and the discussion they tend to generate, and especially that there's a new one to read every single day (he said, wryly), I can't help but see every one of them as another indicator of the immaturity of our profession.

Re:Why is modern web development so complicated? by james-mcelwain on Wednesday August 07, 2019 @09:49PM (#20641100)
I’d argue that the multiplicity of different programming languages and programming language paradigms suggests there likely isn't a teleological trajectory towards some single standard for programming.

Part of this is because many systems are evolving, because business needs have human inputs and are not always "logical." At the edges where this human interaction happens, we expand the domain of programming to that of human psychology. There definitely are empirical claims we can make human-computer interfaces, but it begins to get a bit messy.

To be clear, I am personally interested in becoming more rigorous about empirically justifying claims I make about the code I write. But I’m also interested in code because many of the problems it attempts to solve map the very complexity of the real world. In many ways, abstraction is a properly philosophical exercise, and I think it’s impossible to separate a pure engineering discipline from this broader context.

Programming is multi-disciplinary, and I think that’s a strength.

Re:Why is modern web development so complicated? by unimployed on Thursday August 08, 2019 @12:18AM (#20641815)
Physical constraints are more restrictive than information constraints. Physical constraints keep physical engineering from fragmenting into thousands of different but similar frameworks because the physical constraints rarely allow more than a few solutions to be competitive as best solutions. In information, the bounds/constraints are something more of a constructed popularity contest who the largest players are (Google, Amazon, Microsoft, Facebook, Apple, etc.) which carries as much or more weight than rigorously empirical comparisons.
Re:Why is modern web development so complicated? by kd0amg on Thursday August 08, 2019 @11:39AM (#20645519)
I’d argue that the multiplicity of different programming languages and programming language paradigms suggests there likely isn't a teleological trajectory towards some single standard for programming.

We also have a multiplicity of building materials, tools, fabrication processes, etc. What's the standard way to make a steel object? Do you cast, forge, stamp, mill, sinter, roll, weld? I would expect engineering as a discipline to have more solid arguments for choosing which (combination) of those processes to use for a particular task than what is typically thrown around in discussions about choosing a programming language or paradigm.

Re:Why is modern web development so complicated? by pingyong on Thursday August 08, 2019 @10:21AM (#20644836)
>The fetishization of developer time is one of the problems slowing the maturation of our industry. It ignores end-user time, it ignores management time; it often focuses solely on the initial development time of a project and ignores entirely the ongoing maintenance time for a project.

The problem is that in many projects, especially small web-dev or simple automation projects, you simply don't know if they're going to be profitable. The margins are huge, since the upfront development cost is almost constant, you might lose $50,000, or you might make $500,000, or anything in-between, but you just don't really know beforehand. So obviously in this situation you want to become at least somewhat profitable as fast as possible, and then think about "doing things right" later. Is this horrible practice? Sure. But it's also the most logical thing to do here, because "doing things right" at the start is simply a huge risk that only pays off if you're successful anyway. And people would rather minimize losses than maximize gains.

On the other hand more traditional engineering tasks tend to require big up-front investments anyway, and "failing is not an option". I mean it really kind of isn't, if you need more money and/or more time you'll get that much more often here because the initial investment was so big already. So doing things right from the start makes complete sense.

Re:Why is modern web development so complicated? by dhruvkar on Wednesday August 07, 2019 @07:42PM (#20640398)
>> internal cheat sheet of "numbers every engineer should know" which included the cost in dollar terms

Would love to see that. For companies determining what's worth what, this would be great to see, even just for the format.

Re:Why is modern web development so complicated? by nostrademons on Thursday August 08, 2019 @01:04PM (#20646288)
The format is IIRC something like:

  1 engineer-hour =
     W ms/search of latency
     X GB-year of RAM
     Y CPU-years of processing time
     Z TB-year of hard disk space
     etc.
The actual numbers are very confidential, I've forgotten them, and they're probably different from when I was there. Basically, everything is computed in dollar terms and normalized to engineer time. You assume your code will live for a certain lifetime (a year seemed reasonable when I was there), and you know how many queries your service currently gets (that's another number-you-should-know: usage data for the product you're working on). Multiply out the CPU usage increase by number of queries to get total CPU increase (you need this for capacity planning anyway), and you can compare that to the number of engineer-hours spent working on it to get cost effectiveness.
Re:Why is modern web development so complicated? by SquishyPanda23 on Wednesday August 07, 2019 @10:07PM (#20641183)
The Jeff Dean version is public, but does not include cost in dollars

https://youtu.be/modXC5IWTJI?t=3548

Re:Why is modern web development so complicated? by pfraze on Wednesday August 07, 2019 @07:05PM (#20640135)
Not that software can't improve on this front, but I'm pretty sure that every engineering profession has its fair share of opinions and disagreements around them. Heck, my dad's a general surgeon and he's constantly debating with other surgeons over things like whether a procedure should be out-patient or which procedure has the best outcomes. They have a better concept of outcomes, which helps them make data-driven decisions, but they also have a higher risk profile which slows down the innovation process.

I agree with most of your premise, but I think you overstate it a bit. Like the GP's point above, it seems like you're describing bad engineers. In the good web dev agencies I've worked at, they work pretty hard to make informed decisions which stay within budget and timeline. It doesn't always happen, but that's not just due to poor practice.

Re:Why is modern web development so complicated? by hvidgaard on Thursday August 08, 2019 @02:24AM (#20642303)
> We can't even accurately estimate the cost of a complex project given our choice of tools, let alone talk about costs and ROI with different toolchains for the same projects.

No industry can, unless it's something that has been done repeatedly before. If you ask a frontend designer specializing in WordPress to make a theme for WordPress and implement it, they can estimate it accurately.

What is thoroughly missing from this debate is the age old project management terms of scope and risks. As soon as you enter unknown land, the risk goes up. And risk means uncertainty and probably expenses. And if the people writing the checks change the scope, the original estimates goes out the window. If you're making a building, it's easier to understand that you cannot just change the scope after the blueprint is made. You have to get an architect to remake it, and everything done and ordered so far may or may not be salvageable. It happens in all industries, but just more so in software development.

Re:Why is modern web development so complicated? by testy3 on Wednesday August 07, 2019 @07:18PM (#20640240)
There are reasons why other industries are more mature, like:

they've been waaaaaaaaay longer than CS/SE

they do not change so robustly & fast in short peroids of time.

>We can't even accurately estimate the cost of a complex project given our choice of tools

Let's do not pretend as if that was limited to our industry.

Re:Why is modern web development so complicated? by Frost1x on Wednesday August 07, 2019 @07:39PM (#20640381)
I think OP's point, or at least my agreement, is how many often pretend the software industry is like other engineering industries and make such implications in their job titles.

There is still a lot of creative art and the more we stop pretending this isn't the case, the more people will be reasonable. There is still an high degree of technicality in the profession, but that doesn't mean its "engineering" -- you can be technical, not an engineer, and still respectable (heck, look at science in general). It's still a complex skill and makes lots of money for many businesses.

Re:Why is modern web development so complicated? by Xelbair on Thursday August 08, 2019 @08:41AM (#20643952)
>they do not change so robustly & fast in short peroids of time.

Not really, rapid prototyping - especially due to 3d printing - is a thing now - you can iterate on a model as fast as you can in CS/CE.

Also - a lot of engineering disciplines use simulations - civil engineering, avionics etc - so they too can iterate quickly.

We are absolutely horrible at estimating. I had article somewhere that analyzed plenty of CS/CE projects and found that we are good at estimating median, and if something goes wrong in most complex part - the time to delivery can skyrocket 100x.

Re:Why is modern web development so complicated? by goatinaboat on Thursday August 08, 2019 @09:21AM (#20644239)
they've been waaaaaaaaay longer than CS/SE

Nah, this isn’t really true. Consider all the technology that came out of WW2: digital computers are contemporaneous with jet engines for example.

Re:Why is modern web development so complicated? by icxa on Wednesday August 07, 2019 @09:45PM (#20641078)
I think a more eloquent way is to say fundamentally creating long lasting software structures is more of an art rather than a science, and you can't just tell someone "go practice these 5 things and you'll be the next Picasso" you just have to do it a lot of times, over and over, learning from your mistakes.

There are no shortcuts. You have to build a ton of software, and make a lot of mistakes, and most importantly, learn from them. Then there's the other half of the equation and some people just have the creative mind to imagine the right framework, or tool or library or abstraction or architecture for the problem at hand.

Re:Why is modern web development so complicated? by sgift on Thursday August 08, 2019 @12:32AM (#20641878)
The important thing is: Picasso knew what to study. Over time art had established a canon of things which helped people to get better at classical arts. Only after he studied that canon in depth and for a long time he could then break into new territories and start breaking rules intentionally to develop his own style/school.

Our craft is very bad at providing such a canon. It is even anti-intellectual in parts ("what do you mean you cannot be a master after x weeks? You are a gatekeeper! you suck"). That and we are still not sure what is important and what isn't (i.e. what should be part of the canon). Our medium of study changes all the time. Arts medium of study is reality and reality, for all our advances, doesn't really change.

Re:Why is modern web development so complicated? by icxa on Thursday August 08, 2019 @09:52AM (#20644540)
We absolutely have a canon. You show me someone who has studied Dikjstra, Turing, Hoare, who has taken the time to pour over the Art of Computer Programming and Structures and Interpretations of Computer Programs, and poured over Ivan Sutherland, is familiar with the early days of IBM, Fairchild, Xerox PARC, and hundreds of other classics we consider to be "canon" that I am surely missing (just shooting from the hip here), and you'' be showing me, more likely than not, a damn good programmer. We have a canon, we just don't have the same studios, detail-oriented attention spans we once had, and the technology we have built is partly to blame.

Maybe related, you were once considered an ignorant brut in this country and others if you haven't read a library of literary classics, now we have kids growing up who barely know Shakespeare, or the rich body of the writing of the abolitionists or slave narratives (how many people you think in this country that even know 1/100th of what Henry Louis Gates Jr knows?) Do you think W.E.B Du Bois and Booker T Washington are common names anymore? I remember when everyone had the preamble of the Constitution and the Gettysburg Address burned into their minds, now we can't be expected to remember questions for a simple AWS Certification Exam, it's pathetic.

Re:Why is modern web development so complicated? by eropple on Thursday August 08, 2019 @12:50PM (#20646160)
I think it is worth considering whether you may have the arrow of causality backwards. For tech specifically; your second paragraph is right on point. The folks I know who've got a fundamental grounding in the stuff you listed (and I count myself among them) all seemed to have an understanding of What Makes Systems Good before doing so. In many ways it becomes the naming of parts along with elaboration upon fairly basic ideas.

I do not believe in the idea of a bimodal distribution of software development (not just programming) aptitude, but I sometimes wonder.

(Regardless, I don't call myself an engineer. Engineers get sued if their stuff doesn't work. I'm a software developer, no matter how good and careful I might be.)

Re:Why is modern web development so complicated? by siruncledrew on Thursday August 08, 2019 @02:12AM (#20642256)
The "opinions" part is true, and has implications on whoever is paying for the software and whoever is maintaining it (with their own opinions, of course).

A company/client will often make decisions based on "opinions" too. "We need a website, what should we use to make it?" It's a bit of a blank canvas situation at first where a developer/engineer could come in and say "We should do it X way with Y libraries because <some opinion on why it's the best stack>". Devs could have totally different takes on the same canvas by a matter of opinion.

If I were to ask people "What type of car should I buy?", I would likely get a whole variety of answers from hybrids to SUVs to European and Japanese cars based on who I asked and what their own preferences and tendencies are. I may end up happy or I may end up unhappy depending on which opinion I'm swayed by and how much rigor I put into investigating the different opinions.

Software can be very similar when people providing the "opinions" are caught up in looking to use specific tools over trying to figure out an appropriate solution. When developers/engineers/designers/managers immediate choose tools as a blanket solution over understanding the scope and use-case for context, it's a sign to heavily question the authority of their opinions.

Re:Why is modern web development so complicated? by quickthrower2 on Thursday August 08, 2019 @12:22AM (#20641829)
Software is an interesting animal because what PHP and NodeJS have in common is they were created as hobbies, as were a lot of the frameworks and software tech the world relies on. Maybe there is a bit of us software engineers liking the shiny new thing?

There are a lot of dynamics going on. One is programmer's curiosity but then there is a financial incentive to be on the latest tech. If you see React jobs paying more than Angular jobs, it might be a sign to jump ship which has nothing to do with technical merits. Then there is things like Blockchain that excites investors and techies alike, even when it's a useless solution for something.

People sitting in a room deciding the genuine best thing to do is going to be hard with all these dynamics going on.

Re:Why is modern web development so complicated? by dagw on Friday August 09, 2019 @05:08AM (#20652542)
We can't even accurately estimate the cost of a complex project given our choice of tools

We've been building bridges for thousands of years, and still the relatively simple bridge they built down the road from me took 2.5 years to complete instead of the estimated 9-12 month.

Re:Why is modern web development so complicated? by robertAngst on Wednesday August 07, 2019 @09:03PM (#20640885)
This is good that you are calling this out.

I've seen non-science in Healthcare, and I've spoke out against it. I don't really understand why people are stubborn when there is data, and the data is solid.

If I could wish anything in software engineering- follow the data.

Re:Why is modern web development so complicated? by 6gvONxR4sf7o on Wednesday August 07, 2019 @11:41PM (#20641649)
I think that's the point. If you're looking for actionable advice in terms of "hammers are better than screwdrivers" you aren't going to find it. You'll find people purporting to give that advice. Look elsewhere, like "best practices for hammers" or "when to use a hammer instead of a screwdriver" or better yet "best practices for working as a team."
Re:Why is modern web development so complicated? by madeofpalk on Wednesday August 07, 2019 @04:46PM (#20638837)
But "Javascript makes you build shit software" isn't actionable in the sense that its definitely incorrect.
Re:Why is modern web development so complicated? by cwp on Wednesday August 07, 2019 @05:29PM (#20639317)
It's not Javascript that makes you write shit software. It's trying to write software that runs correctly on a wide variety of platforms that you don't control.

reaperducer's rewrite was an improvement, not because he replaced Javascript with PHP, but because he moved all the logic to the server, which is a single environment he controls. He could have used Node instead of PHP and achieved the same thing.

Re:Why is modern web development so complicated? by dsego on Wednesday August 07, 2019 @05:54PM (#20639552)
It's definitely not about the environment. Yes, there are browser inconsistencies, but for the most part, this is not a major issue today. The problem of js apps is handling asynchronicity, having to fetch data from the server and managing UI state and in the case of an SPA, having to take care of routing, permissions, timeouts, errors etc. When you sum it all up, you end up with a front-end that mostly needs to replicate all logic from the server, apart from running the sql queries.

On the other side, when you render on the server, everything is already there. It's easy to write logic when the data you need is an sql query away and all you need to do is spit out some html. What gets a bit complex is keeping working state between pages and this usually requires handling sessions, cookies etc.

Re:Why is modern web development so complicated? by cwp on Wednesday August 07, 2019 @08:27PM (#20640687)
Well, the environment isn't the only factor, but it's the biggest one. You have to take care of routing, permissions, timeouts, errors etc on the server as well. Data being "an sql query away" on the server is similar to being "an AJAX call away" on the client.

If you have a UI, you're going to have to manage UI state somewhere. Even if you have no client-side code, you've marshal that state into strings to send to the client, and then parse it all out again on the server when you get the next request. Remember hidden form fields? Heck, this very site has some pretty interesting history about attempts to solve that problem elegantly. It was a PITA.

Ultimately, none of that has to do with Javascript; it's inherent in a client-server architecture. The one thing that is specific to JS is asynchronicity. If you don't like that, ok, fair enough, but that's a matter of taste. It has advantages as well as disadvantages, and with Promises and async/await, it's actually pretty elegant. It's certainly not the case that asynchronicity makes you write shit code.

Re:Why is modern web development so complicated? by dsego on Wednesday August 07, 2019 @11:09PM (#20641511)
Your first paragraph is exactly my point. Because in an SPA, you have to handle it in both places, not only on the server. That makes it twice as hard as an old fashioned server-side mvc page.

> Data being "an sql query away" on the server is similar to being "an AJAX call away" on the client.

This is a bit disingenuous, since sql calls in most back end languages are synchronous. Also an ajax call needs to update the UI to tell the user something is happening. This might mean disabling controls, showing spinners etc. All of this goes away if you only use server-side rendering since form requests are natively handled by the browser.

> It's certainly not the case that asynchronicity makes you write shit code.

But it expands the number of cases you have to deal in the UI, to show all the loading states, error states etc.

Re:Why is modern web development so complicated? by robertoandred on Wednesday August 07, 2019 @11:17PM (#20641553)
Except no one is going to want to wait for a page refresh just to update a bit of data.
Re:Why is modern web development so complicated? by Nyandalized on Thursday August 08, 2019 @05:13AM (#20642937)
Page refreshes can be a delta increment, it doesn't have to download everything again
Re:Why is modern web development so complicated? by gameswithgo on Wednesday August 07, 2019 @05:08PM (#20639101)
There is some truth to it. The whole ecosystem encourages a lot of things that are bad for developing simple, stable, good performing systems. I don't go anywhere near that world unless I have to for these reasons. You get all the downsides of dynamic language ecosystems, with worse compile times than Rust (webpack etc).
Re:Why is modern web development so complicated? by rhengles on Wednesday August 07, 2019 @05:40PM (#20639424)
In my opinion, the biggest complicator there is in javascript land is Webpack and similar loaders. They do absolutely everything in the name of optimizing performance in production, things which even the "development mode" don't simplify.

I developed my own custom scaffolding for Vue projects[0], which is a lot simpler and customizable. It even allows you to develop Vue projects without a build step/tool, you save and reload. Yes, there are tools that reload the page when you save, but I don't think they're worth the complexity.

It could be further improved to actually compile/build when you actually want to deploy, I hadn't the time or a strong need for it yet. But when you are developing, things need to be simple, I think you need to know everything that is happening in the browser so you can resolve any bug with much more speed and confidence.

[0] https://news.ycombinator.com/item?id=20270816

Re:Why is modern web development so complicated? by scarface74 on Wednesday August 07, 2019 @05:57PM (#20639577)
I try to know just enough of the $cool_kids front end stack to pass an interview, but I’m very honest - I don’t like front end development and that’s not my forte. Besides, front end developers are a dime a dozen. Your typical software as a service CRUD company, is looking for mere competence and pays at that rate. I have no interest in competing in a commodity market.
Re:Why is modern web development so complicated? by throwaway5d097 on Wednesday August 07, 2019 @05:39PM (#20639421)
It's actionable in the sense that it's definitely^Woften correct.
Re:Why is modern web development so complicated? by krageon on Thursday August 08, 2019 @03:48AM (#20642635)
Build software that you would still want to work on five years later. That usually means tests (that aren't so embroiled in the technical details they break with every trivial change, but instead describe the business logic that is important for your application), sensible abstractions, etc. Usually from there you can select some paradigms that make sense for you.

Fundamentally, all of it is a matter of opinion. You have a million options and they are all correct. Don't take a million options at once, practice a lot, understand your problem domain. You won't write something perfect every time but you'll write something a whole lot better than if you were using a million frameworks instead of real thought.

Re:Why is modern web development so complicated? by hhas01 on Thursday August 08, 2019 @05:41AM (#20643021)
The key to being a competent software developer is really, really simple: Learn the Business. Because if you can’t/won’t/don’t understand the problem domain, how can you expect to solve problems in it?
Re:Why is modern web development so complicated? by cjfd on Thursday August 08, 2019 @04:38AM (#20642801)
There may not be actionable advice for someone hiring a software engineer if that person knows nothing about software engineering. However, I would argue that that person is in a bad position no matter what. There is actionable advice for a software engineer here insofar as the general 'shitiness' of software is due to a lack of discipline on the part of the software engineer. Having witnessed inexcusable practices like functions that contain 10000 lines 'don't build shit software' sounds like very much actionable advice to me.
Re:Why is modern web development so complicated? by justbaker on Wednesday August 07, 2019 @04:27PM (#20638603)
It means the underlying problem is not the tooling, but the use of the tooling.

In other words, "I can choose the correct tool but still fail from poor approach of problem."

Re:Why is modern web development so complicated? by orf on Wednesday August 07, 2019 @04:33PM (#20638672)
If the tool allows you to shoot yourself in the face without warning, and has a reputation/history of doing it to a lot of other people, then the tooling is indeed the problem.
Re:Why is modern web development so complicated? by MadWombat on Wednesday August 07, 2019 @05:58PM (#20639581)
Most tools out there allow you to shoot yourself in the face. In this case, the guy replaced client-side JavaScript (very notorious for its amazing face shooting abilities) with server-side PHP (also, a very notorious face shooter).
Re:Why is modern web development so complicated? by jdnenej on Thursday August 08, 2019 @04:46AM (#20642832)
The real metric of quality is does it do what you expected. PHP is a gun that sometimes shoots backwards with no sensible reason where as rust has a gyroscope that can work out when the gun is pointing at your face and requires that you turn off the safety first.

Entire classes of bugs simply don't exist in better languages.

Re:Why is modern web development so complicated? by MadWombat on Thursday August 08, 2019 @01:34PM (#20646598)
Well, yes. You can write a web application in Haskell and enjoy the beautiful and flexible type system, first order functions, monads and all the other wonderful things. But you shouldn't. Because when you leave, the client will never be able to find someone to maintain the damn thing and chances are they will hire someone else to rewrite it yet again in PHP. And possibly hire someone to make a voodoo doll of you and stick pins up its ass.
Re:Why is modern web development so complicated? by afarrell on Monday August 19, 2019 @08:15AM (#20737049)
You can also write your application in Ruby or Python or Java or Go
Re:Why is modern web development so complicated? by chrshawkes on Wednesday August 07, 2019 @04:41PM (#20638781)
Nobody is building anything unique with the same tool. I get your point though. The more handholding these frameworks do, the less we learn it seems.
Re:Why is modern web development so complicated? by TAForObvReasons on Wednesday August 07, 2019 @04:33PM (#20638676)
There's no guarantee that good approaches in 2019 will still be good approaches in 2029 and beyond. OOP was considered a good approach many years ago, and now in many circles it is derided and bashed.
Re:Why is modern web development so complicated? by jfaat on Wednesday August 07, 2019 @04:52PM (#20638915)
Sure but for that person is “use a no-nonsense lamp stack” going to result in a better outcome than them just starting with react?
Re:Why is modern web development so complicated? by castis on Wednesday August 07, 2019 @04:31PM (#20638652)
It most certainly is actionable advice, but it's usefulness depends on how well you take blunt advice.
Re:Why is modern web development so complicated? by chrshawkes on Wednesday August 07, 2019 @04:39PM (#20638754)
Unhelpful advice. Typical programmer up his own ass bullshit really. Oh that ways not good. Well what's good? I don't know, just not that. Look at how many clowns criticize jQuery these days as an example of garbage software.
Re:Why is modern web development so complicated? by benbristow on Wednesday August 07, 2019 @05:07PM (#20639078)
jQuery isn't garbage as per se. It's a great library for directly querying & manipulating the DOM.

Trying to make web applications with it is another story though. The lack of any state management is a nightmare, hence declarative frameworks/libraries such as React/Angular(JS)/Vue/Svelte etc. etc. came along.

Re:Why is modern web development so complicated? by lacampbell on Wednesday August 07, 2019 @05:12PM (#20639138)
The lack of any state management is a nightmare

What makes the lack of state management a nightmare in the javascript world, but a complete non-issue when doing .NET or Qt apps?

As someone who started with desktop apps and then moved into web dev, I never really understood why Javascript developers wanted a library to help them manage state.

Re:Why is modern web development so complicated? by asark on Wednesday August 07, 2019 @05:36PM (#20639395)
All the state management stuff seems to be tied up in (=synonymous with) attempts to purify JS frameworks and codebases, as in "purely functional". It's... kinda silly and far removed from either the problem at hand, or the strengths of Javascript (such as they are) much of the time.

Meanwhile objects representing various parts of the view, and plenty of models that don't look much like "modern" JS state management, remain the norm elsewhere, and the sky is not falling. I do not know what to make of it. I go along with it when in that sort of company—when in Rome, and all that—but the evangelism can be pretty funny.

Anyway a bunch of the stuff isn't half as special as you'd think reading about it through the usual channels. Redux? A data cache and a so-so local event bus with somewhat awkward semantics and a few really bad terminology choices thrown in. Whee. There's your "state management". Not that it's useless, but you'd swear it's black magic reading all the blog posts about it.

Re:Why is modern web development so complicated? by crimsonalucard on Wednesday August 07, 2019 @11:55PM (#20641710)
The main benefit of purely functional systems is function composition. The ability to build entire programs through the composition of function primitives. Composition without dependencies.

The problem with javascript is that this concept is entirely lost on react developers. Due to the untyped nature of javascript and it's close linkage with html. HTML is made up of dependent components and this essentially puts dependency injection into javascript leading to JAVA like issues that the functional paradigm was suppose to solve.

Re:Why is modern web development so complicated? by root_axis on Wednesday August 07, 2019 @08:41PM (#20640757)
> I never really understood why Javascript developers wanted a library to help them manage state

The reason is rooted in how browsers work.

In native software you can "just" render your data structures directly to the screen. In the browser, barring webgl, you can't render your data structures directly to the screen, instead, you're forced to interact with an imperative browser API to individually manage bespoke UI widgets that store their own state internally and can't understand nor access any of the data structures defined for your business logic. The only option left is to manually update the internal state of the browser UI widgets whenever you update the internal state of your application. Manually keeping the two states in snyc is a real pain, highly bug prone, and a maintenance nightmare. The front-end browser frameworks came along as a way to "auto-sync" the business logic state with the browser ui state.

Re:Why is modern web development so complicated? by TeMPOraL on Thursday August 08, 2019 @03:28AM (#20642530)
That's the same way you work with literally every other UI framework (except the immediate-mode GUIs popular in gamedev), complete with the built-in event loop that's hidden from you. Web isn't special here, except that no other framework I've seen allows you to modify the UI by programmatically editing the serialized text description of it.
Re:Why is modern web development so complicated? by jimmaswell on Wednesday August 07, 2019 @05:36PM (#20639389)
The criticism makes no sense to me. jQuery is just there to make things nicer that you'd already be doing. It doesn't need to be an MVC framework.
Re:Why is modern web development so complicated? by benbristow on Wednesday August 07, 2019 @05:45PM (#20639475)
For example, React isn’t an MVC framework. It’s a library. It allows rendering DOM declaratively based upon a state/props.

jQuery just changes the DOM. It gets very difficult to keep the DOM in sync with the JavaScript backed data when there’s multiple moving parts.

Re:Why is modern web development so complicated? by lacampbell on Wednesday August 07, 2019 @06:00PM (#20639592)
jQuery just changes the DOM. It gets very difficult to keep the DOM in sync with the JavaScript backed data when there’s multiple moving parts.

Again I don't understand this argument. What's difficult about it? People have been doing it with win forms for well over a decade now.

Re:Why is modern web development so complicated? by dragonwriter on Wednesday August 07, 2019 @06:27PM (#20639866)
> Again I don't understand this argument. What's difficult about it? People have been doing it with win forms for well over a decade now.

And yet it's recognized as a problem there, too, and one of the more recent solutions is state management libraries inspired by those used in Web apps, e.g., there are fairly direct copies/adaptations of React and Redux for .NET specifically to address this issue.

Re:Why is modern web development so complicated? by FussyZeus on Wednesday August 07, 2019 @05:07PM (#20639082)
I think jQuery got a bad rap because so many script kiddies would drop the entire damn framework into a page when they just didn't feel like writing a standard selector to do a mobile menu.
Re:Why is modern web development so complicated? by chews on Wednesday August 07, 2019 @07:50PM (#20640447)
funny, that is the pattern I use, I don't consider it kiddy... it's just efficiant and easy to drop in.

le sigh

Re:Why is modern web development so complicated? by FussyZeus on Wednesday August 07, 2019 @09:47PM (#20641093)
I mean, if all you're doing is showing and hiding a mobile menu, you can do that in a really expanded form in like 5 lines of vanilla JS, and not have your user download 90 KB* of crap.

*And you BETTER be using the minified version for production.

Re:Why is modern web development so complicated? by Roboprog on Wednesday August 07, 2019 @11:15PM (#20641541)
90 KB is probably bad for a marketing page, but it’s nothing for a B2B or internal use app, particularly when the second use is just the “you already have it” HTTP header response.

Good or bad depending on context.

Re:Why is modern web development so complicated? by FussyZeus on Thursday August 08, 2019 @09:25AM (#20644282)
I don't disagree, but when so many public websites are unloading megabytes of Javascript for simple tasks, it feels like that attitude is the core problem. I'm not opposed to using frameworks when they're needed, I just have a problem with people using them to shorten up already short and very easy code because they can't be bothered to Google for a few minutes.
Re:Why is modern web development so complicated? by johnisgood on Thursday August 08, 2019 @05:02AM (#20642898)
Is bloat sometimes a good thing?
Re:Why is modern web development so complicated? by castis on Wednesday August 07, 2019 @04:48PM (#20638867)
Maybe it would be more helpful if I also put on a hostile attitude?
Re:Why is modern web development so complicated? by chrshawkes on Wednesday August 07, 2019 @04:56PM (#20638953)
I'm not being hostile, I apologize if you took it that way. I'm just making a point about how so many dev's claim to have the right answer until you need to rely on them to get something done. Projects turn to a mess mostly due to things one single person cannot control. I don't know a single person, including myself, who've thought that their code didn't look like shit 6 months to a year down the road. I think we always get better and we'll always criticize what we don't know and understand. This includes mountains of other peoples code (garbage or not).
Re:Why is modern web development so complicated? by buzzerbetrayed on Wednesday August 07, 2019 @05:46PM (#20639487)
> I apologize if you took it that way

Placing the blame on him when you were the one being hostile is hostile.

Re:Why is modern web development so complicated? by johnisgood on Thursday August 08, 2019 @05:05AM (#20642909)
He did just apologize in case that person perceived something hostile when it was not meant to be hostile. He should not have apologized it seems. Damned if you do, damned if you do not.
Re:Why is modern web development so complicated? by enraged_camel on Wednesday August 07, 2019 @04:38PM (#20638740)
What exactly is actionable about it? Just curious.
Re:Why is modern web development so complicated? by castis on Wednesday August 07, 2019 @04:49PM (#20638879)
Google the inverse question "how to build good software" and dont stop reading until you die?
Re:Why is modern web development so complicated? by SketchySeaBeast on Wednesday August 07, 2019 @05:03PM (#20639038)
That's like googling "how to eat right" - it's going to be 99% unhelpful and contradictory.
Re:Why is modern web development so complicated? by void445be54d48a on Wednesday August 07, 2019 @04:30PM (#20638643)
Just don't build software and then we won't have shit software
Re:Why is modern web development so complicated? by gen220 on Wednesday August 07, 2019 @04:41PM (#20638773)
I know this was probably meant as tongue-in-cheek, but I think this is a powerful idea.

I think it should be a more widespread idea that people should aim to leave a company with a net-negative `cloc` contribution.

Re:Why is modern web development so complicated? by majewsky on Wednesday August 07, 2019 @06:59PM (#20640091)
The problem is, even if you try to contribute negative LOC, every other week your boss/customer/PM sees a new feature in their dreams or hears about a new technology at a conference and demands you put it in there right now.

Every system that I've built so far has started out with a simple, obvious set of rules (both new systems and replacements for old systems). Then the customer/PM/whatever notices just one more edge case. And another. And another. And another. The truth is that reality is frustratingly complicated. Especially if the reality you're mapping contains the internal bureaucracies of large companies.

Re:Why is modern web development so complicated? by johnchristopher on Wednesday August 07, 2019 @05:01PM (#20639016)
Actually, that's a well know mantra: the best code is no code.
Re:Why is modern web development so complicated? by BubRoss on Wednesday August 07, 2019 @05:46PM (#20639482)
People don't know what that means though. It is only helpful after explaining to shoot for deeper yet simpler rules for your system along with identifying what can be separated from execution as static data.
Re:Why is modern web development so complicated? by Frost1x on Wednesday August 07, 2019 @07:42PM (#20640403)
Part of that mantra also falls under problem solving in general. Not every solution needs a technology solution. Sometimes fixes can be made in processes or policy in general. Many jump to technology solutions too quickly and I feel this is lazy and often passing responsibility for someone else to fix a situation.
Re:Why is modern web development so complicated? by johnchristopher on Thursday August 08, 2019 @02:23AM (#20642300)
Yep, I can see how beginners or god-level guru could turn that into a thousand characters one-liner.
Re:Why is modern web development so complicated? by keithnz on Wednesday August 07, 2019 @05:29PM (#20639321)
no code is also the fastest thing you can do!
Re:Why is modern web development so complicated? by jtms on Wednesday August 07, 2019 @05:03PM (#20639039)
Yes. Deleting code is my favorite type of programming.
Re:Why is modern web development so complicated? by temac on Wednesday August 07, 2019 @05:48PM (#20639506)
I'm a fan of that idea and I'm taking it even further:

Erase existing software, so we have less amount of shit software.

I'm actually applying that technique at work with great results (really!)

Re:Why is modern web development so complicated? by root_axis on Wednesday August 07, 2019 @06:05PM (#20639639)
Deleting code is not always better. I know a lot of developers who like to "refactor" code by making everything more terse and they regard that as a win even though the code is now cleverly incomprehensible.
Re:Why is modern web development so complicated? by temac on Wednesday August 07, 2019 @06:34PM (#20639923)
I agree, it depends of the code, and if you need to replace it: by what.

I'm actually more found of when I don't even have to replace it: just delete the damn obsolete shit. Not replace. Delete. Most of the time it for cases where it is just dead. Sometimes it is only quasi-dead (from an incomplete previous modification) and in a few cases deleting it actually fixes some bugs.

The best patches only have - lines :D

Re:Why is modern web development so complicated? by baddox on Wednesday August 07, 2019 @05:23PM (#20639248)
Having bad software or a bad website is very often not an existential threat to companies, but having no software or no website is very often an existential threat.
Re:Why is modern web development so complicated? by temac on Wednesday August 07, 2019 @05:55PM (#20639557)
The secret is, you don't have to not write and/or delete everything indiscriminately.

The second thing is: companies do not only try to avoid existential threats; they also attempt to have economical approaches. If anything needs to be maintained, there is the potential, if it is crappy, to make maintenance costly.

Re:Why is modern web development so complicated? by walshemj on Wednesday August 07, 2019 @06:24PM (#20639848)
Ask ASOS about how a site migration tanked the share price and was mentioned in the financial press.
Re:Why is modern web development so complicated? by hnick on Wednesday August 07, 2019 @08:59PM (#20640862)
With enough AI the software can build itself, and we can start blaming the computers.
Re:Why is modern web development so complicated? by rubicon33 on Wednesday August 07, 2019 @07:16PM (#20640224)
That is THE benefit of a "framework" -

It locks you, and future developers, into a paradigm. It might not be a "best" or even "good" way of doing things, but, adopting a framework helps keep everybody writing the same 'shit software'.

Consistency, it turns out, is key. That's because (as others have pointed out) all software is ultimately shit software. If you wrote it, chances are you don't think it's shit, but everyone else does.

Re:Why is modern web development so complicated? by jeoeo0md on Wednesday August 07, 2019 @04:51PM (#20638903)
Agreed. Doing things in a computer is just organizing the information you have at hand.

That could be files or symbols in files that defined a set of operations a computer should run on symbols in another file/db.

This isn’t magic. But it’s susceptible to social behaviors and those are “growth every quarter, demand, demand!” so we latch onto buzzwords or trends because some VC funded dork thinks their way of laying out a todo app is best. IMO anyway.

Having gone freelancer and flipped the bird to corporate life, I’m way happier and write little code: not having to learn new frameworks makes when to write more generic, re-useable, dependency less, code way more obvious. And I don’t have to worry about a Github repo going inactive.

We’re making it harder with tent pool frameworks due to information overload. When the work is information organization, less is more.

A parallel to all that “more data is just a bigger security liability.” theme that popped up a couple years ago. It’s also a progress liability.

Re:Why is modern web development so complicated? by avgDev on Wednesday August 07, 2019 @04:29PM (#20638628)
I agree as I build some terrible applications in .Net MVC, which is a decent framework. I think you have to build shit software not to build shit software.

First, professional web app I developed 3 years ago is still being build upon now. Even though it is pure garbage and I hate touching it, because I "made it work". As I gained experience and got burned because I did something a certain way I slowly but surely looked for alternative approaches.

Now 3 years later, I'm building an app with layered architecture, proper separation of concerns, dependency injection. Plus, before I start hammering code away, I think about what is the number 1 priority for a piece of code, am I gonna use it once and forget it? Will I use it all the time? Then, proceed accordingly.

Re:Why is modern web development so complicated? by JohnBooty on Wednesday August 07, 2019 @06:11PM (#20639709)

   I think about what is the number 1 priority for a piece of code, am I gonna use it once and forget it? Will I use it all the time?
I've gone in the opposite direction in my career.

Overbuilding the initial version of something for a bunch of anticipated (rather than actual use/failure scenarios) is something I now work very hard to avoid.

The key IMHO is really being nimble enough to extract and/or refactor and/or refine as soon as it is needed. Not before, not after.

"Overly robust" code is actually a huge problem sometimes. All that unused code is in there, giving the appearance of being robust, but is not actually battle-tested....

Re:Why is modern web development so complicated? by ct520 on Wednesday August 07, 2019 @04:34PM (#20638700)
" am I gonna use it once and forget it? " Always comes back to bite me in the a$$. Also taking over projects that were built this way always a pain. Now and days I just refuse to do the work if they pushing to cut corners.All in all I say my quality of life and the sense of being proud of work has increased.
Re:Why is modern web development so complicated? by avgDev on Wednesday August 07, 2019 @04:41PM (#20638770)
I do agree with you. Now that I think of it I rarely write "use it once and forget it", because as you said it will come back to bite.
Re:Why is modern web development so complicated? by benbristow on Wednesday August 07, 2019 @05:08PM (#20639108)
"am I gonna use it once and forget it?"

Isn't the saying, YAGNI (You're not gonna need it)?

Re:Why is modern web development so complicated? by Izkata on Thursday August 08, 2019 @06:25PM (#20649502)
YAGNI is meant for a "this could maybe be useful" scope-creep feature, that seems simple to add but doesn't have a reason to exist.

(Aside, flip the contraction to get the acronym - "you aren't gonna need it")

Re:Why is modern web development so complicated? by jorblumesea on Wednesday August 07, 2019 @04:27PM (#20638608)
Do you think anyone goes into a project thinking: "I'm going to build some complete garbage"?

Shifting project and business requirements, scope creep, poor design choices and lack of competence all contribute to what makes bad software.

Re:Why is modern web development so complicated? by johnisgood on Thursday August 08, 2019 @05:15AM (#20642943)
Eh, many people think "let me shit it out ASAP for those quick bucks", and then there it is. I would say not giving a damn about quality is identical to your quote, feels a bit more passive, but still.
Re:Why is modern web development so complicated? by weberc2 on Wednesday August 07, 2019 @04:58PM (#20638978)
These are strawmen arguments. No one is arguing that libraries matter more than organizations/teams, and no one is arguing that it's impossible to build good/bad frameworks in any given language/framework/etc. You can (and should!) solve the problems with your teams and your tools. If you pick a tool that solves problems you don't have (probably because it's new and shiny), there are probably hidden costs that you didn't consider and you're probably going to slow your team down. How much that slow down is going to affect your project depends on how significant the slow-down is and how sensitive your project is to developer productivity (the widely used internal tool with the big budget at BIG CORP is probably safe, but the team at the small startup with the shoestring budget and fierce competition is going to feel that friction in a bad way.
Re:Why is modern web development so complicated? by Aeolun on Wednesday August 07, 2019 @10:40PM (#20641344)
I’d argue that it depends mostly on the organization. A great developer is still going to produce shit if the organization doesn’t work with them.
Re:Why is modern web development so complicated? by enraged_camel on Wednesday August 07, 2019 @04:42PM (#20638790)
>>It's a crude way to put it, but the reality is that you can build bad websites in any framework

The point of (well-designed) frameworks is that they act as “rails” and make it difficult to make bad decisions.

They also make it easier for people on a team (or people who maintain the project after you leave) reason about your code.

Therefore, as far as I’m concerned, not using frameworks is a huge red flag.

edit: bring on the downvotes!

Re:Why is modern web development so complicated? by crimsonalucard on Wednesday August 07, 2019 @07:27PM (#20640305)
What if I told you there is a theory about good module design and if you follow the formal rules of the theory (not design principles mind you there's a huge difference) good and organized designs can emerge from just knowledge of the theory itself?
Re:Why is modern web development so complicated? by dlcmh on Wednesday August 07, 2019 @09:10PM (#20640937)
Any material you’d recommend on this subject matter?
Re:Why is modern web development so complicated? by PopeDotNinja on Wednesday August 07, 2019 @06:01PM (#20639608)
Define shit software.
Re:Why is modern web development so complicated? by jayess on Wednesday August 07, 2019 @10:17PM (#20641227)
Whatever the last developer did.
Re:Why is modern web development so complicated? by PopeDotNinja on Wednesday August 07, 2019 @11:09PM (#20641509)
That's pretty much the truth.
Re:Why is modern web development so complicated? by dpau on Wednesday August 07, 2019 @04:21PM (#20638524)
was just about to comment along these lines! i never understood those eschewing frameworks... in the above example a PHP framework like Laravel is in constant development by lots of people, with security updates and refinements pushed out on a regular basis. even if u are an uber-developer, in what situation is rolling your own ever the right choice? is your project that different from everyone else's?
Re:Why is modern web development so complicated? by orf on Wednesday August 07, 2019 @04:32PM (#20638658)
I remember seeing this one post on HN from some PHP consultancy that had open sourced some kind of PHP web app that was "engineered from the start to be secure".

I took a look at the code on GitHub and it was absolutely horrible. They basically built their own mini-framework, poorly, with mixed concerns and poor, ad-hoc and inconsistent validation everywhere. Terrible.

I left an issue on GitHub with my findings and got into an argument with the author in the HN submission about how it's disingenous to say something is engineered from the ground up to be secure, if you're eschewing all the man hours that have gone into something like Larvel. I think his reasoning boiled down to "Larvel has CVE's so it's not secure".

Some people are just like that I guess.

Edit: found it - "How We Engineered CMS Airship to Be Simply Secure" https://news.ycombinator.com/item?id=13905055

Re:Why is modern web development so complicated? by wolco on Wednesday August 07, 2019 @05:01PM (#20639013)
Messy code is not insecure code and clean looking code is not secure code by default.

It could be a signal of sloppyness or writing it in vim.

Re:Why is modern web development so complicated? by orf on Wednesday August 07, 2019 @05:04PM (#20639050)
I totally agree. My point was:

> This is not engineering a project to be "simply secure", in the sense that it is definitely not simple and probably not secure!

Messy, duplicated code that re-invents the wheel hides security bugs.

Saying "Windows has security issues, so I'm going to write my own operating system for my software" doesn't mean you can't knock it out of the park and make the most secure operating system ever... but I wouldn't exactly bet on that being the case.

Re:Why is modern web development so complicated? by syn0byte on Wednesday August 07, 2019 @05:06PM (#20639074)
Why don't you drive an 18 wheeler to work every day? They are used by millions of professional people every day who's job it is to drive! Why would you be different from all those people that you think you need to use a little car instead?

The answer is obvious in both cases; You don't need it and it would be wasteful. If I don't have a huge database with constant read/write calls, If I don't have to try to manage multiple end users submitting content, if I don't need super async real-time snappy UIs to compete with the latest android app fad or session tracking of tens of thousands of users, why would I need laravel?

If nobody rolled their own specifically for what they needed, we would still be writing ASM/APL/Raw hex.

Re:Why is modern web development so complicated? by dpau on Wednesday August 07, 2019 @05:47PM (#20639493)
i'm sorry but i'm really not convinced by this argument. there are many frameworks available in various languages/platforms, some created specifically to be light and fast (in the PHP example above, lumen is a possible choice). my other argument would be- why are you spending so much time on plumbing when you could be concentrating on the parts of your application that make it special?
Re:Why is modern web development so complicated? by NeoBasilisk on Wednesday August 07, 2019 @06:11PM (#20639708)
Most people are making CRUD apps that aren't all that special.
Re:Why is modern web development so complicated? by least on Wednesday August 07, 2019 @08:42PM (#20640765)
This analogy sort of falls apart in the details. Rolling your own is more akin to building your own vehicle. You might have all the right parts to have a functioning vehicle but you probably don't have the experience of a team of engineers and designers of a commercial vehicle.

In most cases you can buy a modestly sized vehicle from a manufacturer that still has a team of people ensuring the performance, utility, and safety of the vehicle.

Re:Why is modern web development so complicated? by itronitron on Wednesday August 07, 2019 @04:55PM (#20638945)
I think the main problem with the current Javascript UI frameworks is that they introduce an 'abstract middleman'that distances developers from what is actually happening in the browser. I expect there are many web developers unfamiliar enough with MVC that they are drawn to the Javascript frameworks even though MVC isn't a particularly difficult concept.
Re:Why is modern web development so complicated? by asdf21 on Thursday August 08, 2019 @12:03AM (#20641750)
But there are tons of laravel sites, so there is a substantial profit motive to look for vulnerabilities in them.

It's like, outdated Wordpress sites get hacked all the time, but if I just threw together my own shitty blog in PHP and MySQL there's almost no chance it would, as no one (generally) is going to take the time to figure out hacks for just one site (especially for SMB).

Re:Why is modern web development so complicated? by nfgu on Wednesday August 07, 2019 @04:40PM (#20638768)
Someone isn't necessarily "rolling their own stack from scratch" just because they eschew a framework.

You can always import libraries into your project for the critical stuff, instead of using the whole framework.

Even Laravel itself imports third-party libraries such as Symfony, which you can use in your project without importing Laravel.

Re:Why is modern web development so complicated? by tsukikage on Thursday August 08, 2019 @03:10AM (#20642460)
> Did you consider that the next developer might well come along and post a similar comment

"After me cometh a Builder. Tell him I too have known."

http://www.kiplingsociety.co.uk/poems_palace.htm

Re:Why is modern web development so complicated? by yrro on Friday August 09, 2019 @04:52AM (#20652419)
Thank you for introducing me to this wonderful poem.
Re:Why is modern web development so complicated? by tluyben2 on Wednesday August 07, 2019 @04:54PM (#20638928)
> but one man's garbage is another man's treasure.

Not entirely related, but there is usually the incentive to at least say this for a new person/team coming on because money. Especially for frontends, the new person/team we talk to when going into an existing project, says that it has to be redone because it's 'not up to standards'. That is not because it's not fine and maybe even beautiful; it makes more money to rewrite it. And job security perhaps too. So when someone says something is garbage, I need to assess the reason why; is it garbage or does the person saying it benefit from a rewrite somehow.

Re:Why is modern web development so complicated? by burlesona on Wednesday August 07, 2019 @06:36PM (#20639935)
Logic in the templates... are you describing PHP or React?

To be fair the parent comment isn’t saying everything about his stack is perfectly elegant, but if you can deliver a website that works without stateful client side JS and associated build tooling, then it certainly is simpler, and most of the time simpler is better.

Re:Why is modern web development so complicated? by tiborsaas on Wednesday August 07, 2019 @07:30PM (#20640323)
I'm 90% sure it's Twig (or Jinja in Python land)
Re:Why is modern web development so complicated? by alistproducer2 on Wednesday August 07, 2019 @09:11PM (#20640946)
As long as the code isn't abstracted more han 1 or two layers deep, it's commented in places where the control flow isn't that intuitive, and follows best practices for whatever the kids of languages is, it doesn't matter if it's home spun. Just being "home grown" is not synonymous with bad software. At the end of the day, just using frameworks are no guarantee that the code is readable and maintainable. Usually by the time someone is looking at your code to rewrite or update it, what seemed like an awesome choice of framework at the time can end up being a nightmare to parse as documentation has dried up, forums that were the sole source of knowledge are offline, and now your once amazing code is just garbage to the poor coder trying to make sense of the random abstractions of the framework.
Re:Why is modern web development so complicated? by jtdev on Wednesday August 07, 2019 @07:03PM (#20640121)
...ORM use <> better code, I’ve actually found the opposite to be true.
Re:Why is modern web development so complicated? by Roboprog on Wednesday August 07, 2019 @11:22PM (#20641568)
I would tend to agree. Not a fan of database abuse / contempt. Turn on the SQL trace in Hibernate and weep. So much code wanking to be “performant”, which just waits for horrible database usage to grind along.
Re:Why is modern web development so complicated? by flukus on Thursday August 08, 2019 @02:12AM (#20642262)
Did you consider that up to a certain point any framework, be it home grown or commonly used, makes things more complicated?

Simple cgi endpoints and static files for any css/js should be our starting point and any web developer should understand them. When the problem becomes bigger and more complex is when we should start looking at frameworks.

Re:Why is modern web development so complicated? by codegeek on Wednesday August 07, 2019 @04:54PM (#20638933)
Not necessarily. If the new developer rewrites in a modern framework again but the user experience becomes terrible (looking at you modern reddit), then the new developer cannot really say that. As a developer, I understand the hard to update CSS etc but that is far better if the user experience remains great.
Re:Why is modern web development so complicated? by Theodores on Wednesday August 07, 2019 @05:32PM (#20639348)
> Hard to update CSS.

When was the last time you had a go at CSS? So much has changed since 2017. You can chuck out the pre-processor junk and just use CSS variables and CSS Grid. Productivity is 10x.

You can even keep it simple so that a page just loads the CSS it needs instead of some 40,000 line ball of junk.

Same with templates, if you are using CSS Grid you don't need the sea of div containers, you can just use actual content elements from HTML5 and never use a div.

Pseudo-selectors mean you don't need spans. You can get pretty things done without the markup in the document. Once you write HTML this way you wonder what on earth people are doing with these impossible toolchain and impossible HTML web pages. Regular development from about five years ago with frameworks and jQuery nonsense just looks like hacks.

Re:Why is modern web development so complicated? by Roritharr on Wednesday August 07, 2019 @05:35PM (#20639374)
Honest Question, how do I support our IE 11 Customers (8% of our MRR) with this approach?
Re:Why is modern web development so complicated? by Theodores on Wednesday August 07, 2019 @07:07PM (#20640151)
Easy if you don't have to have it pixel perfect for them. Just build it out with CSS Grid and the CSS variables, then look at the broken mess on IE and make it work. Who cares if things are not centered on IE11. It is not an HTML5 browser and is only there for legacy support - ActiveX and all that.

Also add a banner at the top telling people they need to use their other browser for the page.

What business are you in where 8% are still on IE11?

Re:Why is modern web development so complicated? by Roritharr on Wednesday August 07, 2019 @07:12PM (#20640188)
SME Finance Management for Europe (mostly D/A/CH), think of it as Xero/Freshbooks with very country specific features.
Re:Why is modern web development so complicated? by Theodores on Wednesday August 07, 2019 @08:36PM (#20640740)
COBOL springs to mind. It sounds like you have a profitable niche supporting legacy stuff. Edge came out five years ago and IE11 was depreciated.

You can try the polyfill approach. This is generally not recommended as it wastes bandwidth. But since your customers have bandwidth you could go with polyfills. Or just stay stuck in the past with a niche of writing IE11 compatible stuff. That could be career limiting, IE11 is getting as irrelevant as 8.3 FAT filenames.

Re:Why is modern web development so complicated? by mjevans on Wednesday August 07, 2019 @05:51PM (#20639533)
That really depends on how quickly you can deprecate browsers that don't support modern features.

https://en.wikipedia.org/wiki/Microsoft_Edge

Edge is supposedly an option even back to Windows 7, though I don't believe it's a required security update. I haven't used a Windows 7 system in long enough that I'm not sure.

https://caniuse.com/css-grid

At this point it is reasonable to tell people they NEED to install a more modern (and more security up to date!) web browser, be it Google Chrome, Microsoft Edge, or Mozilla Firefox.

Re:Why is modern web development so complicated? by Roboprog on Wednesday August 07, 2019 @05:48PM (#20639503)
Alas, about 50% of mine.

Many government and healthcare organizations STILL using Internet Exploder, presumably until its 2025 end of life:-(

Re:Why is modern web development so complicated? by collinmanderson on Saturday August 10, 2019 @08:22PM (#20665395)
2025 end of life for IE11? Do you have a source for that?

As far as I know, Microsoft plans to keep IE11 around as long as Windows exists.

Re:Why is modern web development so complicated? by spaced-out on Wednesday August 07, 2019 @06:09PM (#20639688)
>presumably until its 2025 end of life

Oh you sweet summer child...

Re:Why is modern web development so complicated? by Roboprog on Wednesday August 07, 2019 @10:32PM (#20641306)
Wishful thinking?

PS - this “child” started working as a developer, at least part time, back in 1985

C++ eventually passed into a bad memory, and so will MSIE.

Re:Why is modern web development so complicated? by lonelappde on Wednesday August 07, 2019 @07:19PM (#20640251)
The true judge is the user experience, not the code quality. Modern web sites try to be apps, with tons of whizzy nonsense that breaks on user browsers, to the users' detriment, when they should be simple CRUD sites to manage digital files.
Re:Why is modern web development so complicated? by weberc2 on Wednesday August 07, 2019 @04:47PM (#20638854)
Right, but will they be able to say that the customer was thrilled with their rewrite? Probably not; they're already mostly happy with the simpler site and now they've paid to make things (almost certainly) more complex than they need to be. They probably feel swindled into agreeing to a rewrite of something that was mostly working but The Next Developer told them that adding that new feature would require completely rewriting the front- and backends.
Re:Why is modern web development so complicated? by BubRoss on Wednesday August 07, 2019 @05:43PM (#20639461)
If something works well for the business and customers it isn't garbage. Fast websites that don't break are good for everyone.
Re:Why is modern web development so complicated? by scarface74 on Wednesday August 07, 2019 @06:04PM (#20639636)
Except for the developer who is statistically going to change jobs every two or three years and all of the openings want someone with “$x years of experience with $framework_of_the_day”

And the hiring manager who can’t find anyone that doesn’t want to pad their resume for the same reason.

Re:Why is modern web development so complicated? by mikekchar on Wednesday August 07, 2019 @06:03PM (#20639627)
I am reminded of the Picasso story where he meets a woman in a park and makes a 30 second sketch. The woman asks how much it would cost to buy it and he replies something like $1000 (insert large amount of money for 30 seconds of work). She asks him why so much money for 30 seconds of work and he replies that it took him 30 years to draw that sketch.

It's easy to build a simple website with no frills that does exactly what the client needs -- if you know how to do it. Even then, it is rarely easy to figure out what the client needs!

A colleague wanted to use a Javascript library for something I thought was probably pretty simple. I suggested we take a look at the library and see what it was doing and determine if it was worth the extra dependency. He joked, "If I wanted to know how it worked, I wouldn't have chosen a dependency". Luckily, it's not how my colleague really feels, but this is exactly what's happening most of the time.

Things are over complicated because people don't know how to build them -- they glue together a patchwork of stuff so that they don't have to know. In the end, they tend to build something whose complexity is many orders of magnitude higher than the complexity of the problem they are working on.

Your two years of job security was not for avoiding framework-of-the-day hype: it was for knowing how to do it. It's the simple 30 second, single line sketch that captures the picture perfectly with no extra complexity. That takes years and years of experience to develop -- and a desire to even get there at all.

Re:Why is modern web development so complicated? by ekzy on Wednesday August 07, 2019 @06:29PM (#20639887)
It is a good analogy. In essence, achieving simplicity is hard. Simple is not easy.
Re:Why is modern web development so complicated? by mattacular on Wednesday August 07, 2019 @06:48PM (#20640017)
"Simplicity is complexity resolved"
Re:Why is modern web development so complicated? by bgorman on Wednesday August 07, 2019 @06:36PM (#20639940)
Unless you use Clojure ;)
Re:Why is modern web development so complicated? by GordonS on Wednesday August 07, 2019 @04:36PM (#20638714)
I take a similar approach for 9/10 of the enterprise web apps I build, but use ASP.NET Core MVC instead of PHP, and I also favour SASS.

Point is that SSR (Server-Side Rendering), with a sprinkling of simple JavaScript and XHR calls as required, is enough for almost everything I do, and it means build are really simple. Doubly so with a strongly typed language like C#.

I've worked on Angular and Vue projects, and the complexity level was (subjectively) much higher, despite these particular web apps not requiring any real level of client-side functionality. I find JS tests to be much more complex and brittle than C# ones too. Honestly, I hated it! Now, some of this was undoubtedly because I'm more comfortable with what I know, but certainly not all of it.

Re:Why is modern web development so complicated? by pixelrevision on Wednesday August 07, 2019 @08:02PM (#20640522)
People vastly underestimate how complex client side code can get and how much automatic functionality browsers hand you. Whereas a nice web framework has users, permissions, session management, templating, validations and forms all set up for you with battle tested out of the box behaviors.

A frontend framework is great if you are a company that really needs to slim down bandwidth and can hire expensive devs to maintain it. But for a simple no nonsense business application it’ll just slow you down and will gravitate towards being a mess.

Re:Why is modern web development so complicated? by elboru on Wednesday August 07, 2019 @10:26PM (#20641276)
Have you tried Razor Pages? I used it in my last project and I loved it, it was a lot simpler and subjectively more fun than using regular MVC.
Re:Why is modern web development so complicated? by GordonS on Thursday August 08, 2019 @07:53AM (#20643636)
I haven't tried it, but have read uo a bit and seen some examples.

TBH, I'm not all that keen, possibly because it reminds me of the bad old days of webforms with code-behind files. Maybe I should try it in anger before I judge it though :)

Re:Why is modern web development so complicated? by nsfwfavorites on Tuesday August 20, 2019 @08:44AM (#20746277)
Determined gripping agama
Re:Why is modern web development so complicated? by bob1029 on Wednesday August 07, 2019 @04:09PM (#20638394)
Damn, you broke into my top-secret consulting role ;)

I completely agree with all of this. There is probably a billion-dollar market out there for rewriting garbage business apps that were developed using the hipster tech flavor of the week.

Re:Why is modern web development so complicated? by tlrobinson on Wednesday August 07, 2019 @05:53PM (#20639543)
Which is more hipster: using the latest modern web framework, or bragging about how you don't use modern web frameworks?
Re:Why is modern web development so complicated? by bsaul on Wednesday August 07, 2019 @06:49PM (#20640019)
That's definitely something to consider : i don't want beginners to start coding in old school php with sql statement inside html templates because they read on HN to "not use modern frameworks".

BUT, i don't think this "crude design" trend will ever have the same attractiveness to junior developers no matter how much hype it gets here. Being attracted to "new shiny things" is very intrinsic to human behavior, and tech companies will keep spending ads to sell their new tech to the market.

Re:Why is modern web development so complicated? by popotamonga on Wednesday August 07, 2019 @04:14PM (#20638440)
I'm making top dollar remaking failed garbage react native apps to real native native. Clients love it
Re:Why is modern web development so complicated? by buzzerbetrayed on Wednesday August 07, 2019 @06:02PM (#20639620)
Out of curiosity, how do you support both iOS and Android with this approach?
Re:Why is modern web development so complicated? by asark on Wednesday August 07, 2019 @10:42PM (#20641361)
Secretly leave the Android one React Native since it does a decent job of papering over Android's worst rough spots, despite how often React Native breaks and how LOLWTF its ecosystem and release management is?
Re:Why is modern web development so complicated? by bgdkbtv on Wednesday August 07, 2019 @06:43PM (#20639991)
With LOTS of money ;)
Re:Why is modern web development so complicated? by cutler on Wednesday August 07, 2019 @10:29PM (#20641292)
How do you identify these apps/clients?
Re:Why is modern web development so complicated? by zumu on Wednesday August 07, 2019 @05:59PM (#20639586)
Avoiding the latest mainstream trends is actually a very hipster sentiment.
Re:Why is modern web development so complicated? by mr_toad on Wednesday August 07, 2019 @08:06PM (#20640550)
> hipster tech flavor of the week

I’m not sure ActiveX, ASP, and SQL server were ever hipster. You’d be doing the world a favour by re-writing these apps.

Literally doing a favour: there’s never any budget for it.

Re:Why is modern web development so complicated? by j88439h84 on Wednesday August 07, 2019 @04:37PM (#20638728)
The market may be large, but that seems like saying the market for cooks is large. The work required for doing 4 sites is double the work required for doing 2. Unless theres some scaling secret I dont know about.
Re:Why is modern web development so complicated? by pgeorgi on Wednesday August 07, 2019 @05:22PM (#20639238)
The idea isn't to capture the entire billion dollar market, but to navigate a market that is large enough to safely feed you and many more for the next decade+, precisely because it isn't scalable (so there won't be any FAANG-or-whatever coming along, eating your lunch)
Re:Why is modern web development so complicated? by debaserab2 on Wednesday August 07, 2019 @06:38PM (#20639951)
I wonder what your brand new greenfield project is going to look like in five years when it's been passed through the hands of a few interns and contractors and survived a couple different ownership shuffles.

Think it will look as maintainable as it is today?

Or do you think a new consultant will roll through and easily sell the client on another rewrite-from-scratch project?

Re:Why is modern web development so complicated? by asark on Wednesday August 07, 2019 @10:48PM (#20641387)
Framework-dependent projects tend to go stale and become "ew I don't wanna touch that, it's so last year, we should probably replace it with [newer version of framework that's gonna end up being much harder to upgrade than expected / other framework]" surprisingly fast once eyes are off them, in my experience. Without someone competent doing continual upkeep, the next guy/gal's gonna try to sell the re-write anyway. May not succeed, but they'll try. Framework or no.
Re:Why is modern web development so complicated? by jdnenej on Thursday August 08, 2019 @04:55AM (#20642866)
Plain JS is the same. How often do you search something and find the 2012 way includes copying a 20 line util function and the latest way has it built in to the language.
Re:Why is modern web development so complicated? by xyzzyz on Thursday August 08, 2019 @08:05PM (#20650183)
Easy, just don't write JS. For most sites, there's hardly any need for it. On HN, for example JavaScript is only 150 lines[1].

[1] - https://news.ycombinator.com/hn.js

Re:Why is modern web development so complicated? by jdnenej on Thursday August 08, 2019 @10:29PM (#20650874)
And you can tell. The page reloads when you want to edit a comment. Also hacker News is one of the simplest use cases ever.
Re:Why is modern web development so complicated? by xyzzyz on Thursday August 08, 2019 @11:26PM (#20651108)
The page reloads when you want to edit a comment.

Yes, and it takes less than a second (checked in Chrome performance console) to do it. I'm happy with that.

Also hacker News is one of the simplest use cases ever.

Note that 95% of Facebook by usage (scrolling through feed, liking and commenting) doesn't have much more functionality than HN.

Re:Why is modern web development so complicated? by Townley on Wednesday August 07, 2019 @04:23PM (#20638535)
Recognizing the right tool for the job landed you job security for the next two years (and you're deserve it!)

But it could have very easily gone the other way. If your website had complicated validation rules on multi-page forms (not unheard of in healthcare) the site would be better off for some basic state management interacting with a standardized authentication/authorization framework that you didn't have to write.

From what you're describing, it sounds like you did right by the client in this circumstance. But sometimes, it does have to be complicated. And in those circumstances, frameworks and javascript (unlike garbage) have an important place.

Re:Why is modern web development so complicated? by Aeolun on Wednesday August 07, 2019 @10:49PM (#20641395)
> But sometimes, it does have to be complicated.

It almost never has to be complicated. People just enjoy making it so.

Looks at their inventory management system

Re:Why is modern web development so complicated? by Nyandalized on Thursday August 08, 2019 @05:18AM (#20642952)
Everything has an absolute complexity. You can't get rid of it, just move it around.
Re:Why is modern web development so complicated? by Aeolun on Thursday August 08, 2019 @08:01PM (#20650166)
True. But the absolute complexity of a certain procedure is often not nearly as complex as the workflow that is implemented for it.
Re:Why is modern web development so complicated? by wolco on Wednesday August 07, 2019 @05:04PM (#20639048)
If it is just validation a js framework would be overkill.

jQuery would fit well here.

Re:Why is modern web development so complicated? by dsego on Wednesday August 07, 2019 @05:17PM (#20639188)
You missed the multi-page forms part. As soon as you have state of some fields affect how other fields or parts of the page display it becomes complex really quickly. There is an explosion of possible states. If you've ever seen code like this, you know why more modern js frameworks were invented:

    onSomethingChanged() {
      $('#foo').prop('disabled', true);
      $('#spinner').removeClass('invisible'); 
      $('#error-1').prop('hidden', true);
      $('.buttons').hide(); 
      if (value) {
        $('#btn-2').show();
      } else {
        $('#btn-2').hide();
        $('#btn-3').show();
      }
      // etc ...
    }
Re:Why is modern web development so complicated? by im3w1l on Wednesday August 07, 2019 @06:17PM (#20639769)
I think he would model that as POSTing. Server side PHP would render document from scratch from the state.
Re:Why is modern web development so complicated? by dsego on Wednesday August 07, 2019 @07:00PM (#20640100)
It's silly to do a round trip to the server just to change some local UI state, right?
Re:Why is modern web development so complicated? by manigandham on Wednesday August 07, 2019 @08:30PM (#20640700)
Not really, this kind of thinking is exactly what led to the client-side JS framework mess.

Round trips are just fine. Browsers are smart, servers are fast, and HTML compresses well. The site you're reading right now (HN) requires a reload. Stackoverflow requires a reload. Neither are slow to use.

If your page is really that complicated, then I suggest Vue or Preact which are efficient and designed to progressively enhance pages instead of rebuilding everything in JS.

Re:Why is modern web development so complicated? by Nyandalized on Friday August 09, 2019 @03:58AM (#20652169)
Connectivity is not always available, and errors retrieving it may mean you have to re-enter everything. Being able to "navigate" the site without the dinosaur is a tremendous boon for end users. You wouldn't be able to send anything without a connection, but you could buffer it for an opportune moment.

Sites like HN and Stackoverflow have a vastly different audience than most bread-and-butter sites, and tackle different kind of issues.

Re:Why is modern web development so complicated? by manigandham on Friday August 09, 2019 @05:19AM (#20652615)
Most bread-and-butter sites are just fine as server-side rendered page. Large client-side frameworks reimplementing the browser and server functionality should be rare, when the situation actually calls for it.

If you really need a offline site then a simple service worker is all you need to cache the pages, not a big JS app.

Re:Why is modern web development so complicated? by Nyandalized on Monday August 12, 2019 @03:27AM (#20673247)
"Big JS app"'s aren't that big if done correctly. The entirety of Angular8 fits into ~170KB, less than some thumbnails.

You can write bad apps in any language and environment, similarly a site/app is not bad just because it's done in Y.

Re:Why is modern web development so complicated? by Roboprog on Wednesday August 07, 2019 @11:28PM (#20641594)
Compression over HTTPS can be problematic, as it makes the key easier to crack.

I would like to trade out AngularJS for Vue someday, though.

Re:Why is modern web development so complicated? by asark on Wednesday August 07, 2019 @10:44PM (#20641368)
In theory, yes. In practice, by the time you get your whole web-app game on, the full round trip is often at least as fast, and frequently faster.
Re:Why is modern web development so complicated? by cutler on Wednesday August 07, 2019 @10:39PM (#20641334)
Don't underestimate pjax/turbolinks as a first approach. This way you get to render on the server without refreshing the whole page. For most business websites this is more than enough to keep rendering snappy.
Re:Why is modern web development so complicated? by winrid on Thursday August 08, 2019 @01:35AM (#20642111)
Depends on the app. In some cases it results in a much simpler and easier to maintain environment (ie, Larvel or Symphony will do this better than Angular...)
Re:Why is modern web development so complicated? by scarface74 on Wednesday August 07, 2019 @06:06PM (#20639657)
My favorite combination for dead simple sites is HandlebarsJS.

1. Render model from your JS object.

2. attach events

3. Change model

4. Go to step 1

Re:Why is modern web development so complicated? by minism on Wednesday August 07, 2019 @10:15PM (#20641218)
You're just describing MVC which is essentially what most frameworks contain at their core on some level.
Re:Why is modern web development so complicated? by scarface74 on Wednesday August 07, 2019 @10:25PM (#20641270)
I know. I use server side rendering all of the time - well at least until I got back to my safe place doing back end work. It was one project for $reasons I had to use a very light framework that I could copy paste the entire library into the page. I couldn’t depend on the device having an internet connection. I could also precompile the templates.
Re:Why is modern web development so complicated? by winrid on Thursday August 08, 2019 @01:36AM (#20642120)
On a side note, all that complexity in the example could be managed with adding/removing a single CSS class :p
Re:Why is modern web development so complicated? by dsego on Thursday August 08, 2019 @03:10PM (#20647569)
Yeah, I didn't really try to make it realistic. But I've seen very similar code, it would maybe reset inputs, calculate some results, stuff you can't really do with a single css class. T
Re:Why is modern web development so complicated? by mattlondon on Wednesday August 07, 2019 @05:24PM (#20639263)
For one-dev sized projects (i.e. simple crud type apps) this may well work.

However I would be concerned about a couple of things if this were me and I was doing anything beyond the absolute most basic web app:

- long term maintenance. Doing something only you understand and only you can maintain (that job security you mention) is a bit of an unprofessional dick move IMO.

- if you need to get other people in to help, you now have to spend more time training then up on your custom system that they don't understand and keep an eye on them to make sure they are doing it right and not introducing security issues

- When your client wants to integrate with some common third party thing ("hey can we put Google maps in here?"/"we need to integrate with stripe payments") you'll need to reinvent the wheel from scratch to do it using your custom system rather than just use a well-supported off the shelf library.

- you'll need to stay 100% up to date on all security issues/approaches/classes of vulnerability to make sure your custom system is secure. Your audit was ok this time, but everytime you make a change to your custom library (e.g. to support Google maps or stripe) you're now going to need to go through the audits again to be sure you've not opened up any new security holes (and perhaps new ones you've not ever heard of because you are only working in this weird little custom system/thiefdom for the past 2 years)

- how to support the INEVITABLE requests for extra features that require something client-side that cannot be easily done with only PHP and static pages. It is not the 90s any more - the cat is out of the bag regarding interactivity ... the requests for client-side nicities that users are used to in other things WILL COME! Clients always want more! :-)

Still anyway I guess you don't need my good luck wishes as I am sure you are correct and that you really have out-thought and out-coded all of the well-supported and well-funded frameworks that have been built by many thousands of people and have been battle-tested in the field for years (e.g. Laravel, .net MVC, struts etc). Because otherwise if you hadn't totally out-smarted the entire industry, I'd be shitting myself and checking my professional liability insurance about now.

Re:Why is modern web development so complicated? by xemdetia on Wednesday August 07, 2019 @05:41PM (#20639442)
I think people are assuming he wrote a pile of hot PHP garbage, but it's entirely possible he just wrote it using Symfony or Drupal and well understood PHP libs and just has no 'modern javascript' to do it, which if he did would cover all of your points. If you haven't gone back to current gen PHP in a while there are some quite solid models that are very maintainable, have security updates (via composer) and so on. It's entirely possible that he didn't do a crazy thing but we'll never know.

A decently structured PHP application is often maintained by nontechnical people with a limited understanding of programming but they can get by with just a text editor and a codebase. I have not come across any nontechnical person who could easily get a react/modern js framework pipeline going to do a small change, not to mention dealing with npm changes. I would almost feel like it would be a jerk move to leave someone without a technical department a pile of react/npm soup right now.

Re:Why is modern web development so complicated? by partymck on Wednesday August 07, 2019 @08:27PM (#20640689)
This post is way too depressing.

There's nothing in his post suggesting that the way he developed is harder for someone else to pick it up. MVC Frameworks aren't necessarily easier to use than vanilla PHP. Your answer reminds me of people who don't know how to use vanilla JavaScript and have to add jQuery to the project for things that could be one-liners in vanilla JS.

The whole "what if the customer needs something in the future" is just a piss-poor excuse that bad developers make to prematurely optimize. There's nothing in an MVC framework that makes it easier to add new features.

There is nothing preventing him from using official libraries for Stripe or Google Maps if needed.

There is nothing preventing him from using libraries that can be updated, probably with a single CLI command.

There is nothing suggesting his system is unsafe. Quite the contrary.

He didn't outsmart the entire industry. He just built something that works without relying on your favorite tool. Maybe you should try someday, you might actually learn something.

Re:Why is modern web development so complicated? by flukus on Thursday August 08, 2019 @02:50AM (#20642386)
> Doing something only you understand

A simple php endpoint is something any web developer can understand. The more frameworks/libraries/patterns/abstractions you throw in the less likely it is they will understand it. Especially years later when the framework is inevitably out of date, good luck convincing why they need to spend money upgrading a framework every year.

> hey can we put Google maps in here?

Has this changed recently? Last I checked you would just drop a script tag into the page, who needs a library for that? Edit - I checked (https://developers.google.com/maps/documentation/embed/guide), how does a framework make a copy/paste job any simpler?

> "we need to integrate with stripe payments"

I'm not familiar with stripe, but don't you just give it a return url? I don't see how a framework would help at all here.

> you'll need to stay 100% up to date on all security issues/approaches/classes of vulnerability to make sure your custom system is secure.

This is harder with a framework, it's one more thing to keep updated. The less libraries the less vulnerabilities.

Re:Why is modern web development so complicated? by tsukikage on Thursday August 08, 2019 @03:20AM (#20642495)
> Doing something only you understand and only you can maintain

Having worked with both kinds of application, I personally find it much easier to learn my way around and understand a self-contained application than one which is a giant web of moving-target third party dependencies and frameworks, themselves largely undocumented and subject to the framework-hipster "move fast and break your users' things" mentality.

Re:Why is modern web development so complicated? by mixmastamyk on Wednesday August 07, 2019 @05:01PM (#20639019)
> PHP, MySQL

Agreed in general, but there are better free/libre choices. I don't recommend these for greenfield projects.

Re:Why is modern web development so complicated? by bgdkbtv on Wednesday August 07, 2019 @06:48PM (#20640011)
What would you recommend instead of those?
Re:Why is modern web development so complicated? by misingnoglic on Thursday August 08, 2019 @02:18AM (#20642279)
Flask and postgres
Re:Why is modern web development so complicated? by bsder on Wednesday August 07, 2019 @07:58PM (#20640495)
PostgreSQL is my database choice under practically all circumstances.

I'd replace PHP with practically anything written by grownups. (Django, Rails, etc.)

Re:Why is modern web development so complicated? by bgdkbtv on Wednesday August 07, 2019 @08:01PM (#20640514)
Agreed with PostgreSQL. But I'd go with Laravel rather than Django or Rails. More modern, more features, active development and constant new features are guaranteed for Laravel, in addition to growing community and abundance of learning resources.
Re:Why is modern web development so complicated? by TylerE on Wednesday August 07, 2019 @09:57PM (#20641136)
Five years ago, I decided I was never going to touch PHP ever again.

I have been much happier professionally since that day.

Re:Why is modern web development so complicated? by langitbiru on Thursday August 08, 2019 @12:41AM (#20641899)
Except in a case when we want to build an e-commerce website for client. PHP has so many mature frameworks, like Magento/WooCommerce etc. I look at Python ecosystem. Yeah, we have Oscar and Saleor but they are pale compared to their PHP cousin.

But other than e-commerce, yes, Django or even Rails is my preferred choice.

Re:Why is modern web development so complicated? by TylerE on Thursday August 08, 2019 @03:31AM (#20642546)
If you ha w to work with Magento just go ahead and sign your sanity over to Cthulhu. That’s what finally drove me over the edge.
Re:Why is modern web development so complicated? by realmod on Thursday August 08, 2019 @05:29AM (#20642984)
You might want to give it a shot. PHP has vastly improved with PHP7
Re:Why is modern web development so complicated? by Aeolun on Wednesday August 07, 2019 @10:51PM (#20641404)
I don’t know. I think I’d rather touch Symfony than Rails at the moment.

And both probably beat out Node.js

Re:Why is modern web development so complicated? by aldoushuxley001 on Wednesday August 07, 2019 @11:52PM (#20641692)
Django multi-page app for me, with Postgres
Re:Why is modern web development so complicated? by ativzzz on Wednesday August 07, 2019 @07:32PM (#20640338)
Rails + postgres!
Re:Why is modern web development so complicated? by mixmastamyk on Wednesday August 07, 2019 @08:20PM (#20640641)
I agree with the sibling posts.
Re:Why is modern web development so complicated? by woutr_be on Wednesday August 07, 2019 @11:59PM (#20641729)
My background is mainly frontend, but I'm well versed in backend as well. I've been actively advocating at my company to stop with this whole separate frontend and backend, and instead just return plain HTML and some basic JavaScript when needed.

In most of my personal projects I've been following this approach too, and I must say, I'm so much more productive. I don't find myself constantly switching between browser-, terminal and VS Code-windows. I don't have to do validation twice anymore, and know perfectly where all my data is coming from.

Re:Why is modern web development so complicated? by jdnenej on Thursday August 08, 2019 @05:01AM (#20642892)
I built a SPA and found making the API and linking everything up to be needless overhead. The way I find works best is using rails templates to simply insert a div with all the data needed in the attributes and then having react render everything.
Re:Why is modern web development so complicated? by woutr_be on Wednesday August 14, 2019 @11:11PM (#20702273)
That's what we used to do years ago, just render a script tag with all the data required, and then use JavaScript to link it up in the views. But I feel if that's what you're doing, you might as well use a templating engine, and put all the data where it belongs.
Re:Why is modern web development so complicated? by eddieh on Wednesday August 07, 2019 @04:57PM (#20638976)
I once worked on a team of about 30 people building a website for a university that could have been a team of one dev and one designer and a static site generator.
Re:Why is modern web development so complicated? by anthony_doan on Wednesday August 07, 2019 @04:12PM (#20638425)
You don't even use a backend rendering framework?

MVC PHP frameworks are very nice and they don't move as fast as those javascript frontend rendering.

Also the ORM deals with any security problems and most framework deals with other security deals too including session handling.

Re:Why is modern web development so complicated? by avgDev on Wednesday August 07, 2019 @04:21PM (#20638523)
This seems odd to me. I have been working in .Net MVC/Core and while I could write an application that is simply HTML/CSS/C#, I would think it would be insane to do so.

It takes a massive amount of resources to develop your own security, your own data access without any ORM tools, not cause memory leaks, properly disposing of resource.

I'm all about creating reliable applications, but a good framework is a great tool.

Re:Why is modern web development so complicated? by TomMarius on Wednesday August 07, 2019 @04:28PM (#20638617)
PHP is way more "batteries included" than C# without ASP.NET
Re:Why is modern web development so complicated? by crumpets on Wednesday August 07, 2019 @04:49PM (#20638881)
Yeah, unless you have workers, the whole "request is the lifecycle of the app" model of PHP makes it pretty damn hard to get a memory leak.
Re:Why is modern web development so complicated? by anthony_doan on Thursday August 08, 2019 @04:05AM (#20642689)
That's true, I've done PHP for a long time and there are like 1000 functions polluting the global namespace.
Re:Why is modern web development so complicated? by nfgu on Wednesday August 07, 2019 @04:50PM (#20638892)
It is entirely possible to import things like EntityFramework, Razor and Identity Framework without using ASP.NET MVC itself.

Just because the framework uses them by default it doesn't mean they can't be used separately.

You can use Razor Pages or a router like Nancy[1] without having to roll your own ORM or View Library.

[1] https://github.com/NancyFx/Nancy

Re:Why is modern web development so complicated? by arkh on Wednesday August 07, 2019 @07:37PM (#20640369)
> properly disposing of resource

It's php. Everything is trashed once the http request has been served.

Re:Why is modern web development so complicated? by nfgu on Wednesday August 07, 2019 @04:32PM (#20638656)
You can use rendering libraries, ORMs and session management libraries without a framework.

I think it's way nicer. I much prefer environments like Sinatra, Express or Flask than full-blown MVC frameworks.

Re:Why is modern web development so complicated? by anthony_doan on Thursday August 08, 2019 @04:17AM (#20642732)
I did Flask and I thought it was so much work to do a login system and other stuff.

There were so many ways of structuring your codes. I find myself constantly rewriting the code to adapt to a new way of organizing codes.

I personally prefer a somewhat opinionated framework.

But I understand that there is a pro and con and a need for a barebone/slim framework versus a featureful framework.

I actually moved from flask & vuejs 2 from last year to phoenix & jquery.

Re:Why is modern web development so complicated? by fizixer on Wednesday August 07, 2019 @05:06PM (#20639066)
Questions for PHP, and MySQL folks (not meant in a negative way):

- PHP: A few years ago I heard about how PHP was needlessly complex. I wonder what the recent status of the programming language is. Specifically, do experienced PHP programmers stick to a subset of PHP, as in "PHP: The good parts"? (similar to "Javascript: The good parts"). (side note: As a diehard python person frustrated due to latest versions becoming bloated in features, I fully acknowledge that I'm in the "Python: The good parts" camp right now).

- MySQL is owned by a company lately. I wonder if PostgresQL is clearly a better alternative?

Re:Why is modern web development so complicated? by CiPHPerCoder on Wednesday August 07, 2019 @05:34PM (#20639363)
> Specifically, do experienced PHP programmers stick to a subset of PHP, as in "PHP: The good parts"?

See: https://phptherightway.com

Modern PHP development comes in the form of loading dependencies from Composer/Packagist, rather than offloading a lot of bloat to the language. Lots of things have been deprecated (and even removed, like ext/mcrypt).

Re:Why is modern web development so complicated? by wolco on Wednesday August 07, 2019 @05:35PM (#20639378)
I think the discussion point was php was too easy and that encouraged new developers or less hardcore developers to adopt it.

Some of the defaults like globals being turned on by default led to security holes. How people were creating sql statements at the time concating strings led to sql injection issues.

There were never any bad parts . There are new features like the spread operator that are newer and not available in earlier versions. I try to stay away from them if I think the application will need to run on older versions but otherwise I feel like I can use any feature.

Postgres needs to run under a specific os user. That alone makes it a poor MySQL replacement

Re:Why is modern web development so complicated? by NateEag on Wednesday August 07, 2019 @10:32PM (#20641305)
I have been paid to write PHP for several years of my career. More than any other language, I think, neck and neck with JS.

I have also written heavy amounts of Python and Java at various points in my career. A few other languages too.

PHP has many, many bad spots. It's easily the ugliest, clumsiest language I have been paid to use.

It's slightly dated, but this is still the best summary I know of:

https://eev.ee/blog/2012/04/09/php-a-fractal-of-bad-design/

Re:Why is modern web development so complicated? by orf on Wednesday August 07, 2019 @05:42PM (#20639450)
> There were never any bad parts .

There where, and continue to be, large numbers of bad parts. Magic methods that do random things in certain cases, terribly defined interfaces (array_search), ridiculous typing, an impossibly incoherent standard library, etc.

Re:Why is modern web development so complicated? by majewsky on Wednesday August 07, 2019 @07:10PM (#20640177)
> Postgres needs to run under a specific os user. That alone makes it a poor MySQL replacement

Where did you get that idea? Postgres can run as any user.

In fact, I recently switched my applications to use Postgres even during unit tests (instead of SQLite), i.e. that testing instance runs under my normal login user. That change actually made the CI go faster because compiling the Go SQLite driver takes much much longer (about 30-60 seconds) than spinning up a Postgres from scratch in a temp directory (about 2 seconds) and using that instead.

@fizixer: I don't use MySQL, but I've heard it's not nearly as bad as it once was. I use PostgreSQL for everything from traditional relational data to time series to job queues and am 100% satisfied. Hasn't once let me down. The only caveat is that clustering is still easier to do with MySQL than with Postgres from what I hear, so if you have really really big setups that require that, that should be considered.

Re:Why is modern web development so complicated? by porker on Thursday August 08, 2019 @03:25AM (#20642522)
> I don't use MySQL, but I've heard it's not nearly as bad as it once was.

MySQL 5.7+ is decent. Where it loses out to PostgreSQL is the lack of plugins/extensions. PostgreSQL is extensible in ways MySQL users can only dream of (e.g. timescaledb, pg_trgm)

Also, the forking of MySQL and MariaDB has resulted in 2 very similar databases that people consider interchangeable - but aren't. There's plenty of "gotchas" if SQL is meant to run on both.

Re:Why is modern web development so complicated? by Nyandalized on Thursday August 08, 2019 @05:42AM (#20643024)
There is a free version of MySQL called MariaDB. PostgreSQL is a very viable alternative.

It has different philosophy, and needs a little getting used to, so it's not as easy as simply lift-and-shift

Re:Why is modern web development so complicated? by mstipetic on Wednesday August 07, 2019 @04:51PM (#20638897)
I don't think you're being fair. I certanly agree that a lot of things that should be simple are over-engineered simply for the sake of it, but there are a lot of things that are made possible by modern frameworks. I'm really not trying to plug our thing now, but if you look at this [1], a short tech demo of the platform we're building, there's no way it could have been built without modern frameworks with the amount of people we're building this

[1] https://www.youtube.com/watch?v=SkjMUY_cAmw

Re:Why is modern web development so complicated? by lhorie on Wednesday August 07, 2019 @05:00PM (#20639007)
That looks pretty simple in terms of UI...

There certainly are some types of apps that are mind-bogglingly complex (e.g. press play and scroll around on https://kepler.gl/demo/nyctrips for one vivid example) but ironically, the real heavy lifting is mostly done with specialized libraries and super-close-to-the-metal code (GSLS), whereas the "modern" stack only powers the "simple" boxy UI glue stuff.

Re:Why is modern web development so complicated? by scarface74 on Wednesday August 07, 2019 @05:52PM (#20639536)
Not that I disagree with your approach technically, but if I did that, I would have felt like I wasted my time. No job is secure and you did hardly any Resume Driven Development.

Also, if I were a team lead, I definitely wouldn’t have chosen that stack because it’s harder to recruit career driven developers who don’t want to work on tech that doesn’t help then build their resume.

When it’s time to land the next job, using $cool_kids_stack of the day, you will be at a disadvantage.

For context, when it comes to modern front end development, I’m barely above “not eat the chalk” level of competence so this is definitely not meant as a technical critique.

Re:Why is modern web development so complicated? by theandrewbailey on Wednesday August 07, 2019 @04:27PM (#20638598)
> The company administrators, doctors, practitioners, etc... are so happy with the new no-nonsense site that they raved to the parent company about it.

Any reason they liked it in particular? Faster? Better/cleaner UI?

Re:Why is modern web development so complicated? by onion2k on Wednesday August 07, 2019 @04:26PM (#20638587)
What tech you use is much less important than the way you use it. If you build great stuff that works well your clients will be happy, and they'll give you more work. It's not complicated.
Re:Why is modern web development so complicated? by dpcan on Wednesday August 07, 2019 @10:40PM (#20641342)
Very similar thing is happening for me as well, only for a large property management company.

Their old sites were weighed down with an incredible amount of confusing technology.

I redid the whole thing with PHP/HTML/CSS/JS/MySQL as well, and it's incredibly easy for them to update and work with now. Super simple admin interface, attractive front-end, and the top brass at the company has taken notice.

Re:Why is modern web development so complicated? by thewarpaint on Wednesday August 07, 2019 @08:36PM (#20640737)
Just a side note. Javascript does not strictly imply frameworks. Javascript does not strictly imply garbage.
Re:Why is modern web development so complicated? by TelmoMenezes on Thursday August 08, 2019 @04:07AM (#20642699)
In theory, no. In practice, yes.
Re:Why is modern web development so complicated? by shams93 on Wednesday August 07, 2019 @07:38PM (#20640376)
Yeah everyone assumes you have to build out an SPA and then you need a rest or graphql service behind that. It rapidly gets out of hand for the benefit of having a native like experience you wind up serving sites with 1 gig of us framework content per page.
Re:Why is modern web development so complicated? by dsego on Thursday August 08, 2019 @12:06AM (#20641758)
Oh but then you add code splitting. And we've come full circle.
Re:Why is modern web development so complicated? by rvn1045 on Wednesday August 07, 2019 @09:13PM (#20640955)
The point of using a good framework is that conventions and best practices are enforced. If your building a Rails sits there are a set of conventions everyone follows. When a new developer onboards onto the project they know how to extend the code base.
Re:Why is modern web development so complicated? by ScottFree on Wednesday August 07, 2019 @10:23PM (#20641255)
Are you familiar with the concept of a crab basket?
Re:Why is modern web development so complicated? by rvn1045 on Wednesday August 07, 2019 @11:00PM (#20641462)
what does it mean in this context?
Re:Why is modern web development so complicated? by chaoticmass on Wednesday August 07, 2019 @05:20PM (#20639214)
I have a similar story. I got hired on to replace some PHP web apps, each one written using a different framework. Each one out of date, unpatched, unknown dependencies, no easy way to bring up to date-- tied to specific old PHP versions. A big mess. The IT director was pretty savvy and said he wanted a clean rewrite without frameworks, something I was all too happy to do.
Re:Why is modern web development so complicated? by cutler on Wednesday August 07, 2019 @10:51PM (#20641403)
What did you replace it with?
Re:Why is modern web development so complicated? by bluedino on Wednesday August 07, 2019 @06:50PM (#20640031)
But, can the marketing intern update it?
Re:Why is modern web development so complicated? by marcus_holmes on Thursday August 08, 2019 @05:45AM (#20643035)
How do you cope with copy changes from marketers?

This is my problem at the moment. I have a nice static site, but I'm facing demands from the marketing team to use Wordpress so that they can make copy changes to the site without having to go through a developer (or learn any HTML).

Re:Why is modern web development so complicated? by oarabbus_ on Wednesday August 07, 2019 @07:00PM (#20640105)
Could you point me towards some modern-looking websites that don't use JS?
Re:Why is modern web development so complicated? by BlueTemplar on Thursday August 08, 2019 @08:08AM (#20643726)
"Modern-looking" these days means shitty JS that tries to be a "WebApp" and breaks basic website conventions like open in a new tab middle click, and uses the same GUI both for small touchscreen and large desktop, so ends up working poorly on both. Why would anyone want that ?
Re:Why is modern web development so complicated? by flukus on Thursday August 08, 2019 @12:31AM (#20641870)
This one? The JS is very light and optional. And this site is far more interactive than most websites.

I'm not sure why you need a modern "looking" site since JS is about the functionality not the looks.

Re:Why is modern web development so complicated? by foobar_ on Thursday August 08, 2019 @12:22AM (#20641833)
Basecamp uses rails and turbolinks.
Re:Why is modern web development so complicated? by tuesdayrain on Friday August 09, 2019 @04:14AM (#20652250)
>HTML, PHP, CSS, and MySQL. No frameworks. No javascript. No garbage.

The funniest comment I have read on this website.

Re:Why is modern web development so complicated? by miguelmota on Wednesday August 07, 2019 @07:45PM (#20640419)
> HTML, PHP, CSS, and MySQL. No frameworks. No javascript. No garbage.

Wait, PHP is not garbage?

Re:Why is modern web development so complicated? by zwaps on Thursday August 08, 2019 @05:21AM (#20642957)
I am one of those guys who were "left behind".

I used to code in ASP and PHP back in the day, and that approach made a lot of sense. You'd have things that run on the server, and then those things throw out a website for the user to interact. If there's a need for reactivity, use some JS, but basically it all goes back to the same server program. I always found that this approach was good enough. You could do a lot, heck, I even wrote a browser game back in the day. Most importantly, it was simple, and it led to great web pages that would always work and could be used as such. No JS, no cookies? No issue, your code would just deal with it. A button was a button, and link was a link, and your browser did the rest. Text got sent as html, pictures were loaded or not depending on your preferences. Everything got faster and faster. This was years ago.

In the meantime, I stopped doing web dev.

Suddenly, in the last ten years or so, I noticed that websites became bad. The whole web just seemed to regress. Everything was JS, everything became single page, and if you didn't enable every single function in your browser, or if you pressed the "back" button, or reloaded the page - basically if you did not pretend that the website's UI was an actual native program - then everything breaks. News sites stopped loading text or images halfway through, buttons stopped working. Links were not clickable. Pictures would not show up. LOADING bars and circle-things appeared on websites that were already downloaded on my computer. Registration forms did not load default options, choice elements were empty. Once the page was loaded, everything was sloooooow. Scrolling became "different" and often laggy. Websites would load, then do something in the background to reload into garbled messes. Printing didn't work correctly. It's like Flash websites of my day (that everyone know were terrible and had very few good use cases) became the norm, but without Flash.

What happened to the internet? Why is everything garbage? Did all web developers die out?

I went back to make a simple website for myself. Reading tutorials, it was clear I had to use some framework. It was recommended to use JS, install some sort of server application and database, then a framework on top of that, and then something that runs in the user's browser. But everything was its own programming language, with no common denominator. You'd either need a PhD in JS and server development, or be happy to buy in to some framework that was usually not even very good. I did not understand anymore how web development works. I did no longer understand how the websites came to my customer, what the server did, how and when it did it... and everything was hard, even though this should all be really simple. And what came out was just... bad.

I went back to using simple web dev tools if I need to, and thought "well my needs are just not so advanced". But given that most websites have become so terrible, I just can't help but feel it all went wrong. Whoever thought up this frameworks and JS revolution was probably really smart, and there are probably some really good websites out there.

But I hate the internet now, and I don't understand web development anymore. I'm not even that old.

Re:Why is modern web development so complicated? by BlueTemplar on Thursday August 08, 2019 @08:13AM (#20643756)
Hopefully, considering just how shitty things have become, this will just be a fad that will quickly die out... especially once devs start to catch up on JS advances of the last 4 years?
Re:Why is modern web development so complicated? by okaleniuk on Thursday August 08, 2019 @05:25AM (#20642967)
Good for you!

I'm really glad to see that this no nonsense approach catches on.

Re:Why is modern web development so complicated? by solitus on Wednesday August 07, 2019 @05:44PM (#20639466)
Did you build a CMS from scratch or is it simpler than that?
Re:Why is modern web development so complicated? by hartator on Wednesday August 07, 2019 @05:55PM (#20639561)
Wait that some manager hears about Angular 3000.
Re:Why is modern web development so complicated? by knocte on Thursday August 08, 2019 @02:45AM (#20642371)
Is PHP still a thing?
Re:Why is modern web development so complicated? by Nyandalized on Thursday August 08, 2019 @05:40AM (#20643017)
[dead]
Re:Why is modern web development so complicated? by engineeringwoke on Thursday August 08, 2019 @06:24AM (#20643215)
My homegrown PHP framework is highly superior to these awful hipster JavaScript frameworks!
Re:Why is modern web development so complicated? by whiteopinions on Wednesday August 07, 2019 @04:35PM (#20638708)
This sounds like you wrote something extremely limited. The client will inevitably ask for some modification to it, and if you're not there to do it the next developer is going to curse at you for writing such a brain dead application.

I've seen comments like this on HN and then I've seen these types of applications in the wild. I call it the most dishonest form of consulting you can do. You've put a real shine on some inflexible shit and the clients obviously have no way of knowing what they've bought into.

>It replaced a site that was a mess of javascript libraries on top of frameworks on top of a half dozen jquery version and on and on and on.

These people are incapable of correctly evaluating work they contract out, or who is doing it. Why do you think you're an exception in this case?

Re:Why is modern web development so complicated? by wolco on Wednesday August 07, 2019 @05:44PM (#20639464)
A simple custom php site is extremely easy to follow if you have a programming background.

If I'm the next developer I would thank him.

Ever deal with 5 versions of jQuery that are conflicting. Trust me life is easier in vanilla php.

Re:Why is modern web development so complicated? by whiteopinions on Wednesday August 07, 2019 @06:06PM (#20639655)
You know what's actually incredibly easy if you have a programming background?

Consolidating versions of jQuery.

>If I'm the next developer I would thank him.

For what? You wouldn't know anything about the previous site implementation

Re:Why is modern web development so complicated? by nfgu on Wednesday August 07, 2019 @05:07PM (#20639087)
I've seen countless unmaintainable applications written using popular MVC frameworks that required simple modifications, but the next person in line wasn't able to understand what the hell was going on.

Popular frameworks are not silver bullets, but apparently it's popular on HN to think so.

Re:Why is modern web development so complicated? by whiteopinions on Wednesday August 07, 2019 @05:15PM (#20639165)
No one said they were silver bullets. No one.
Re:Why is modern web development so complicated? by diminoten on Wednesday August 07, 2019 @04:26PM (#20638588)
Yeah, because the people hiring you have no clue what kind of a maintainability hellscape you're leaving for the next person...

Also I'm 97% sure I could own your site in under a day, based on how home-baked you just said it is, and I'm garbage at pen testing.

Healthcare site, you say? Jesus Christ, I hope they have data breach insurance.

Re:Why is modern web development so complicated? by pojzon on Wednesday August 07, 2019 @04:38PM (#20638747)
I can assure you "owning" a home-baked software is 10 times harder than anything that is popular.

Thats from someone who does that for a living.

Modern web-devs move faster than they think, leaving so many doors open. Someone who works on the same system plenty of years had time to patch the doors.

Re:Why is modern web development so complicated? by diminoten on Wednesday August 07, 2019 @04:47PM (#20638858)
I believe you, I do not do this for a living!

But am I not right to have red flags fly when someone says they built a home-baked web service for managing health care information? Isn't that nuts, from a security perspective?

Re:Why is modern web development so complicated? by crumpets on Wednesday August 07, 2019 @04:52PM (#20638910)
No, you're not right. How you render CSS and the page have very little to do with how secure your app is.

SQL escaping, session handling, etc all come easily with standard php libraries. So "I didn't bother with any PHP frameworks" doesn't mean the dev wrote an SQL connector.

Re:Why is modern web development so complicated? by diminoten on Wednesday August 07, 2019 @04:56PM (#20638958)
I'm sorry if you thought I meant CSS rendering was the source of potential vulnerabilities, but for any website that has, say, users, if you're not using any PHP frameworks or external libraries you might have to implement some crypto of your own to store passwords securely, just for starters. I don't think PHP offers a standard library to do that, does it?

There are a hundred examples that are specific to whatever app this guy built for the Healthcare company, not all of which are covered by the PHP standard library...

I believe him when he says it passed external/internal auditing, however I have a very hard time believing he's not either very very expensive or took a very very long time to get the app to the place he claims it is (the third option is that it does very little, which won't actually end up being a good thing once the client gets over the honeymoon phase of "it's so much prettier!!!").

Further, the expertise I do bring to this conversation is in software development, and I can say assuredly that a one-man development team using no 3rd party libraries is definitely creating a codebase nigh unmaintainable by other people down the line. His bragging about creating job security for 2 years is honestly an understatement; he's got job security for the life of the products he's creating, as he's likely the only person who can do anything more with the website in a time frame that isn't measured in years.

Re:Why is modern web development so complicated? by jasonlotito on Wednesday August 07, 2019 @05:26PM (#20639278)
> I don't think PHP offers a standard library to do that, does it?

https://www.php.net/manual/en/password.installation.php

"There is no installation needed to use these functions; they are part of the PHP core."

The functions are common knowledge in the community, and made to be easy to use.

> Further, the expertise I do bring to this conversation is in software development, and I can say assuredly that a one-man development team using no 3rd party libraries is definitely creating a codebase nigh unmaintainable by other people down the line.

They said, "No frameworks." They didn't say no libraries. Some people make a distinction between the two, others don't. You are taking the stance that they mean they mean the same thing. Realize that others don't consider them the same thing.

Further, the expertise I do bring to this conversation is in software development, and I can say assuredly that someone who doesn't know the nuances between libraries and frameworks in the software development world can't make the claim to have expertise in the software development world. =)

Re:Why is modern web development so complicated? by diminoten on Wednesday August 07, 2019 @05:31PM (#20639337)
I don't think someone nitpicking between the definition of the words "framework" and "library" is engaging in this conversation honestly, and I'm pretty sure that your failure to address the "this is but one of hundreds of examples, not all of which are covered by standard libraries in PHP" comment I made is further justification of that belief.
Re:Why is modern web development so complicated? by jasonlotito on Thursday August 08, 2019 @01:10PM (#20646346)
> I don't think someone nitpicking between the definition of the words "framework" and "library" is engaging in this conversation honestly

I think it is, especially since you are nitpicking on it. I'll explain.

If the original poster is using libraries but not frameworks, and feel there is a distinction (and judging by the post, it's clear they feel that way), then they are using libraries, just not frameworks.

Therefore, when you say this: "a one-man development team using no 3rd party libraries" in the context of the discussion, you are making stuff up. No where does the original post suggest or otherwise say that they aren't using 3rd party libraries (quite the opposite).

For your comment to hold up, you need framework and libraries to be the same. However, by pointing out that often times developers see them as different (generally libraries make up frameworks), I'm making it clear that your conclusion is misinformed.

> I'm pretty sure that your failure to address the "this is but one of hundreds of examples, not all of which are covered by standard libraries in PHP" comment I made is further justification of that belief.

I addressed directly the one example you provided. You didn't provide hundreds. You provided one. I provided the answer out of courtesy, as you asked a direction question. Saying answering your direct question is justification of my dishonesty is insulting and childish.

Further, the fact that you are mistaken on the concept of the common use of library vs framework, I felt that your claim of "hundreds of examples" was hyperbole and ignorance. Maybe you can provide hundreds of examples where PHP and libraries written in PHP cannot solve problems that only fully fledged frameworks can provide? Keep in mind that libraries exist for many different things and since frameworks are made up of libraries, there is almost nothing relevant that a framework can do that libraries can't.

Re:Why is modern web development so complicated? by mdemare on Wednesday August 07, 2019 @06:18PM (#20639777)
In the context of web development, they are generally considered as distinct.
Re:Why is modern web development so complicated? by diminoten on Wednesday August 07, 2019 @07:45PM (#20640420)
Not the argument, nor is it relevant, hence the discussion about it being disingenuous.
Re:Why is modern web development so complicated? by aiiane on Wednesday August 07, 2019 @06:17PM (#20639760)
> if you're not using any PHP frameworks or external libraries you might have to implement some crypto of your own to store passwords securely, just for starters. I don't think PHP offers a standard library to do that, does it?

It does, actually: https://www.php.net/manual/en/intro.password.php

Re:Why is modern web development so complicated? by wolco on Wednesday August 07, 2019 @06:08PM (#20639684)
"There are a hundred examples that are specific to whatever app this guy built for the Healthcare company, not all of which are covered by the PHP standard library."

You would need to implement whatever custom code required or use a libruary. You would need to do the same with a framework. No framework offers business health care functionality. Do you think laravel has an ocr skin cancer detector package?

PHP is fast to write. Hearing people from the outside saying its impossible to write a php site that quickly makes me laugh. PHP makes development easy.

Re:Why is modern web development so complicated? by hnick on Wednesday August 07, 2019 @09:10PM (#20640939)
"PHP is fast to write. Hearing people from the outside saying its impossible to write a php site that quickly makes me laugh. PHP makes development easy."

Yeah that's odd to me too. I mean, that's pretty much the biggest argument against using PHP (well it was, back in the day). Bad sites written easily by inexperienced programmers.

Re:Why is modern web development so complicated? by diminoten on Wednesday August 07, 2019 @06:18PM (#20639778)
PHP isn't the problem, the claim that there are no security issues despite hand rolling every feature is the issue, and it's in no way accurate.

A lot of bad software engineering going on in these comments, downvotes don't change that...

Re:Why is modern web development so complicated? by reaperducer on Wednesday August 07, 2019 @04:37PM (#20638738)
Also I'm 97% sure I could own your site in under a day, based on how home-baked you just said it is, and I'm garbage at pen testing.

The internal and external security audits already performed by the billion-dollar healthcare company in question disagree with you.

Re:Why is modern web development so complicated? by ceejayoz on Wednesday August 07, 2019 @05:00PM (#20639010)
I can't speak to your specific case, but I've seen a tool "pass" a billion-dollar company's auditing because the scanner they used never got past the login screen and their folks never noticed that fact.
Re:Why is modern web development so complicated? by noonespecial on Wednesday August 07, 2019 @04:49PM (#20638875)
Is it bad that the more spent on the audit and the larger the company the less I trust the results?
Re:Why is modern web development so complicated? by tluyben2 on Wednesday August 07, 2019 @05:12PM (#20639145)
No, they just had to check that box to make sure that they did ‘everything in their power’ to make it secure.
Re:Why is modern web development so complicated? by diminoten on Wednesday August 07, 2019 @04:46PM (#20638844)
I'm super glad to hear that happened, but please understand where I'm coming from when I said what I did; reinventing the wheel (as I'm sure you had to here) is straight up dangerous.
Re:Why is modern web development so complicated? by throwaway5d097 on Wednesday August 07, 2019 @04:39PM (#20638755)
I agree that there are much better choices, but most frontend apps are done with onion oriented development with thousands of dependencies that constantly get vulnerabilities, and aren't any more maintainable in my experience.

If it's simple enough and they understand PHP well, it could easily be better.

Re:Why is modern web development so complicated? by nullwasamistake on Wednesday August 07, 2019 @10:04PM (#20641162)
Eh, not using popular frameworks is a recipe for unmaintainable sites. You're missing a lot of features these provide for free.

Accessibility Cross browser polyfills Easy translation support Automatic mobile view Developer mindshare

The lack of polyfills is VERY concerning. Your site probably doesn't work on 10% of browsers. And getting from 90-99% is an excercise in futility.

If you used a popular UI framework and transpilation you could easily write a super modern site that works on practically everything back to IE6. And with Vue or React the whole thing could be a few hundred KB, probably smaller than some of your images.

If I was brought in to work on your site, I would immediately rewrite it if it's more than a few pages. Plain HTML with PHP becomes an unmaintainable rats nest if you try to do anything complicated.

Re:Why is modern web development so complicated? by hnarn on Thursday August 08, 2019 @02:59AM (#20642419)
Honestly I think it's kind of worrying that this opinion is so popular. Aren't you essentially saying that frameworks are in most cases useless, and "job security" is something you should strive after?

First of all, "job security" means that you're irreplaceable, and in the case of you actually being the architect/designer, that probably means you did a (perhaps intentionally) bad job to make yourself the linchpin. Not good.

Secondly, regardless of the first point, programming is hard. Anyone that says otherwise should be avoided like the plague. It's beyond the scope of one individual to be able to keep up to date to all the security issues and gotchas prevalent in a language or ecosystem. This is why you use frameworks. They're democratic units that within themselves handle patches and development in ways that are often better than one "irreplaceable" developer on a unique object (of course, bad developers can still use frameworks and derail the product completely to the point where all benefits of the framework are negated, but that's beside the point).

Re:Why is modern web development so complicated? by nightfly on Thursday August 08, 2019 @03:01AM (#20642425)
In this case "job security" means their customer trusts them, not that no one else could do the job.
Re:Why is modern web development so complicated? by hnarn on Thursday August 08, 2019 @07:44AM (#20643579)
I disagree that customer/provider trust is equivalent to "job security".