Ask HN: Is web programming a series of hacks on hacks?
822 pointsLately I've been doing some web development on a fairly long-lived and large code-base, but I'm finding it MUCH harder to wrap my head around than application development ever was. I think my difficulty is that the whole environment feels so... HACKISH... everything is a horrible hack on top of a horrible hack. (yes, I'm familiar with the history, been using the Internet since before the web) I'm not even talking about the fact that everything has to be stateless, in fact I develop desktop apps as stateless even driven UIs as well, but just the fact that it really feels like there's no consistent way to do anything, there are 1000 different frameworks, all with their own way of doing the most basic tasks, and my experience is that they all ... well... suck.
Am I missing something? Is it me resisting change? Is web programming really that bad? Is it really just that I need a new mental paradigm?
Can you recommend any good resources to help me orient my mind to this new way of thinking?
Comments (661) 164 threads
Earlier commentsUnderstanding the browser is very important, perhaps start with http://www.html5rocks.com/en/tutorials/internals/howbrowsers...
If you are a good coder, javascript can be awesome. Put a lot of time into understanding the language. Don't stray into variants like typescript or coffeescript or elm or anything else till you are pretty happy with js. Prioritize learning ES6 over any variants. The bulk of information on the net and libraries, etc is standard js.
Get a good understanding of webserver, HTTP / Web sockets. Sniff packets and also understand HTTPS.
Invest a lot of time into HTML and CSS, there's a lot of advice on how to build your own CSS frameworks from the ground up, this is really worthwhile. But also spend a bunch of time with something established like bootstrap ( or any other UI framework ) so you can see what problems frameworks are trying to solve.
Language? Frameworks? This is where it gets tricky. I suggest understanding a Node stack, as it's popular, and a lot of examples use it as a backend. It may not be what you actually end up using. Checkout Angular2, React / redux as they are popular javascript frameworks that run in the browser to deliver application like UI. However, go for statically generated pages if you don't need that kind of UI, classic GET/POST delivered webpages still deliver a lot of value.
Security / Authentication - Can be very tricky and in some environments it's left to roll your own
Data - Can be super convoluted, often taught in a web context without much concern for security and authentication (depending on stack). In general avoid having too many layers between your data store and the UI. SQL / NoSQL / BigData Stores are all toys to play with (but each data store tech has its own problems and tradeoffs) and more often are getting mixed together.
Now, because you can pick and choose nearly any aspect of the above, it can become very hackish, especially as new toys are coming along all the time.
If I was going to recommend a single thing to start playing around with? probably meteor. It packages up a lot of modern web things for you, it's all javascript, it uses a mongo back end (which is a json store, not necessarily the greatest choice of DB though), has a easy package system, and supports a number of popular front ends. None of which is how you should choose a production stack, but it can be a good way to get started.
Yes, 300k libraries means a lot of crap one, which is why there's http://npms.io, which searches by code quality + popularity + how well the library is maintained.
Meteor covers security, authentication, database, client-server sync, mobile app generation, but leaves the choice of front-end library to you. It works with Polymer Paper Elements (Material Design for the web), as well as with React.
It's an opinionated platform that makes a lot of choices for you, but has become more and more flexible. You can swap the view layer, and the database layer too (Postgres and MySQL are supported besides the default MongoDB).
More at https://wiki.dandascalescu.com/essays/why_meteor
All comments shown.
Couldn't load more comments. Check your connection and try again.