Discussion in 'Programming & Software Development' started by antipody, Oct 10, 2016.
Oh, don't know why you nuked your original post. It was a good one.
Interesting to see the comment shitstorm the article provoked on reddit and hackernews
To some extent I agree with the original article - if you are a slightly obsessive type (like me) who wants to do it right from the start, learning frontend web dev JS is overwhelming in a way that, say, backend work in Golang is not.
There are a million solutions to every problem, things that were best practice six months ago aren't anymore, and the stack seems just ridiculously tall.
This made my day, and almost made me fall into '/dev/null'.
I got out web dev for this reason.
I read that whole thing... and have NO FUCKING IDEA what was said aside from "I want to show data in a template".
I remember when it was as simple as banging out some HTML in Notepad on Win 3.11.
tl;dr: Managing front-end state in 2016 is fucking hard.
Maturity of the web over the ages:
20 years ago,
there were no established design patterns or agreed-upon principles for web development. What we had was a bunch of arbitrarily placed HTML, inline styles and Java applets placed in sequential order. Websites were procedural. This was the age of Geocities homepages, "pLz sIgN mY gUeStBoOk~*~*" PHP scripts, flaming skull animated gifs and trailing mouse cursor stars with Java applets. HTML lacked semantics. Everything was thrown onto a page in <table></table> tags.
15 years ago,
10 years ago, database-driven websites on the backend became the shit. Enter ASP for .NET, Zend/Symfony for PHP, Rails for Ruby, Django for Python. While tech giants had been building similar things in-house, these open source MVC frameworks greatly reduced the barrier of entry of being able to build and maintain secure web applications where all business logic happens behind the scenes. To this day, concepts learned in any one of these backend MVC frameworks are transferrable between each other. Two major things starting pop-up around this time that would cause an explosion in front-end development: Ajax and Android/iOS devices.
5 years ago,
We still don't know what the best ways are to manage the front-end. More specifically, we don't know how to manage view state. Angular and Ember.js were initially introduced to try and tackle managing the view state in a MVC-like manner, but many believe it's conceptually flawed. You're essentially trying to tackle one problem (managing View state) by re-architecting a pattern designed for something else (managing Model/View/Controller actions where the source of truth is stored permanently in a database or a file). As a result, it's difficult to separate concerns and you'll often find yourself hacking bits together or bloating up your models with no real alternative.
Throw away all the things they taught you at school. Forgot object-oriented programming. Forget all those design patterns and forgot SOLID principles. Remember DRY. Instead, the React way of doing putting stuff on a page is by combining multiple components together. Each component is self-sustaining, making abstraction and testing easy. State flows in a single direction rather than being bi-directional. If anyone's done any graphical work, the concept is similar to OpenGL's state machine. Rather than handling the logic of how to update the display after an event, you instead describe what state has changed from an event. React then does magic behind the scenes, and optimally re-renders only the elements on the page that have changed. All other unchanged bits on the page do not get re-rendered. What this means is that you do not need to concern yourself about interacting with the DOM and instead should structure of your state to fit the business logic of your app. The only problem is that structuring your state to fit the business logic of your app is the most difficult problem in creating a React app.
Is Redux the future?
Hence the reason I have dumped that thing called: Web Development.
I seriously don't see the appeal of something that changes so radically in a month. I don't need the ulcers either.
I know. I am just over being a hockey puck for arseholes. There is an oatmeal comic that explains what I mean... but I can't seem to find it.
I am out of IT now anyway, and can't remember half the shit I used to do.
Is this the one?
Ahah ahah. That is the one alright.
The thing with React and the flux pattern is their ability to scale with the number of devs banging on the code base. Facebook's codebase has over 15000 React components. If you know how to React, you know also how to React Native. Facebook estimates something like 80% code sharing between their iOS and Android deployments for one of their Apps done in React Native.
If you are just a single person banging away, sure vanilla js maybe sprinkled with jquery could be fine.
What does this even mean? There is no 'well-known' front-end stack. If you don't care about interactivity, there is nothing wrong with sticking with one of the backend stacks and using jQuery for a few animations/ajax tweaks - it isn't going away anywhere anytime soon.
If you care about where the web is heading, LAMP vs MEAN, which was a popular argument 5 years ago, simply isn't a viable argument anymore.
Expect more frameworks to pop-up soon, where PWAs (progressive web apps) are your next hipster modern web dev trend expected to be the norm within the next 5 years: https://youtu.be/J2dOTKBoTL4?t=758 https://www.youtube.com/watch?v=3tb-1MWg44Y ... or you can just ignore this as another fad.
It's a nightmare I agree. I'm teaching myself and I'm like a lost puppy.
My take is this get as good as I possibly can at core JS as possible. Learn the underlying principles of the language. More than anything I want to be a student of the art.
My 10 cents.
Professor Frisby's Mostly Adequate Guide to Functional Programming book. Free and uses JS for the concepts
I've been sticking with AngularJS mainly. Using it properly does make the good ol days of asp.net webforms for me seem a little backwards. Yes, you can do the same things, but not doing it in Angular now doesn't feel right when I'm doing full stack.
Now that I know Angular, I can learn and understand all the other things out there much easier. Eg: I had to learn Aurelia for work and was extremely thankful I spent the time learning Angular! Made it that much easier since I already knew npm, grunt, bower, requirejs, observables, redux, etc.
This sums it