6 ms·
Seems like a list of every web development ideal that gets upvoted on Hacker News. Still, I think the list can pretty much condensed down to one point: Use wh
by CM30 6y ago
Seems like a list of every web development ideal that gets upvoted on Hacker News.
Still, I think the list can pretty much condensed down to one point:
Use whatever technology is appropriate for this site or web app.
Because a lot of developers seem to have a 'when all you have is a hammer' attitude towards web development. They learn React/Vue/Angular/whatever, then seemingly decide everything they will ever build will use that framework, regardless of whether it's the right tool for the job.
A blog doesn't need to be an SPA. A static business site that never gets updated and doesn't do anything remotely interesting doesn't need to be an SPA. Your documentation doesn't need to be an SPA.
It's like that guy who was recreating CPanel as a WordPress plugin/install. Sure, you could do things that way, but may want to rethink whether this is really the best architecture to build a server control panel in.
- laurentdc 6y agoI can't count the times I've started to write some basic internal tool with React only to rm -rf everything 1 hour later and replace it with 20 lines of jQuery/vanilla js
- TheGoodBarn 6y agoSuch an underrated comment. I think theres some validity to "you're the most productive with whichever tools you're most comfortable/familiar with", but I think people don't realize the levels of abstraction that come with web development. ( My learning path was: Angular 2 -> 7 + sucking at CSS, Angular + Tachyons (learning how to style), -> Angular + Custom CSS for everything, to Vue + Custom css -> Plain HTML + Plain CSS. ) Its like the more you learn the more you understand the boilerplate of libs/frameworks, but also understand what these large tools accomplish for you, and then you learn to appreciate how powerful & simple the "vanilla" web can be if you open your mind to it.
- imtringued 6y agoI can't count the number of times I had to write a HTML template for a small component with just jQuery and it was horrible every single time. Something like htm+preact [0] would clearly do the job much better and only add 5kB of Javascript to your site instead of leaving an unmaintainable mess. [0] https://github.com/developit/htm https://github.com/developit/htm
- stevenwliao 6y agoHow did you handle XSS?
- paxys 6y ago> Your documentation doesn't need to be an SPA. Disagree with this. Having the entire documentation site working as normal on my browser when I have bad/no internet connectivity is extremely useful.
- ogre_codes 6y agoDon't need a SPA for that. Local HTML based documentation was a thing long before SPA was even a term.
- paxys 6y agoHow does that work exactly?
- duskwuff 6y agoIt's literally just a folder full of perfectly normal HTML files. You don't need Javascript or a SPA to double-click one of those and look at it in a browser. Even better, if your operating system has full-text file indexing, it'll be able to search them normally.
- paxys 6y agoSure, but you also have to manually redownload the entire site whenever there is a change.
- leephillips 6y agoThat’s what rsync is for.
- jolmg 6y agoor wget, since rsync doesn't work with HTTP.
- heavyset_go 6y ago> They learn React/Vue/Angular/whatever, then seemingly decide everything they will ever build will use that framework, regardless of whether it's the right tool for the job. At least where I live, small businesses contract with agencies that develop React sites for them, and suddenly these non-IT companies are owners of expensive and hard to maintain websites that they don't, and shouldn't need to, know the first thing about maintaining. No one wants to work with the projects, because they were written in, say 2015 React, back when React used X feature that isn't cool anymore, so it gets rewritten by another agency, and so on. Meanwhile, WordPress on a managed host or a static site would suit those businesses just fine. Then, they wouldn't have trouble hiring to maintain it, or could even maintain it themselves. If you work for an agency or you're freelancing, please stop burdening small businesses like this.
- throwawaygh 6y agoSerious question: if the business just needs a static site, why are they paying tons of money for bespoke software engineering? Just use one of the millions of good-enough and free site builders out there.
- heavyset_go 6y agoThey don't know any better, and when they turn to the experts, they get upsold. Some business owners think they're the exception to the rule and seek out agencies for bespoke work, but again, they don't know any better. But, yes, I've seen countless businesses for which something like Wix is perfect.
- mediascreen 6y agoI think there are a few issues: 1. Site builders are still hard to use for most marketing staff, if the site should look professional and you need a few small integrations. 2. They don't mind paying for a solution where someone else does the work. I guess it's hard for marketing departments to pick an appropriate agency and to know the consequences of the technical choices the agency makes. They generally evaluate based on design and then have a few requirements like: resonable performance and support for a handful of features in the backlog.
- willio58 6y agoWhen I started at my current company I was shocked that they were using Wordpress for 90% of client sites. Now 2yrs in, I’m thankful we are using Wordpress for these sites. It keeps things maintainable and simple. And for 90% of businesses, that’s exactly what they need.
- kall 6y agoWhen I open up the functions.php file of a wordpress site we didn't develop "maintainable and simple" is not what comes to mind.
- jonathannat 6y agoYeah a developer should distinguish between using a static html, some javascript + html, server side rendering html, and full react app