As I went further, it got more "magic" for me, meaning there was a lot of code sugar that works behind the scene. I had to learn Angular specifically, not Javascript per se.
I decided to try out React, and my god has it made me a better programmer. Instead of learning very specific Angular syntax, I actually started to learn about programming patterns.
Injecting HTML into JS for React turned out MUCH better than the other way around for Angular.
The downside to React is the fact that there is no official way for handling data. Angular has this out of the box, whereas in React you'd have to do a ton of reading and trying things out. However, this is exactly why I chose React, as it forced me to learn more JS rather than more Angular.
I suggest you try it out and see what you like more.
Probably because React is a rendering library, whereas Angular is a application framework.
Yes, you are correct, they aren't very comparable. Again, I like the fact that I am learning more JS and patterns rather than more Angular. Now I am getting into Redux for React, after reading about Flux, Reflux, MobX, Relay... Exactly what you said about the flexibility.
It is indeed a matter of taste. I really liked the opinionated approach of Angular. However, the more Angular I learned, the more special syntax I encountered, which eventually turned me off.
Again, Angular is awesome for what it does. I just chose to focus more on learning Javascript and reduce the magic to a minimum.
I agree with you 100% on the syntax. Every time I read the docs, I can't help but keep thinking this is all some elaborate troll, and that they're just making shit up as they go.
As I went further, it got more "magic" for me, meaning there was a lot of code sugar that works behind the scene. I had to learn Angular specifically, not Javascript per se.
I think this is an extremely important point. I'd rather be learning general patterns and core concepts instead of learning a framework.
A lot of the complexity in frameworks isn't inherent to the problem they solve, it's an artifact of how it was designed and the thought process of the people who made it. You're basically learning to think about the problem the way the authors did.
In many cases though, the authors didn't really know what they were doing either, and once the framework gets into wide use a lot of problems become evident. To address these problems the framework often needs to have some serious rework done on it. So, frameworks change very quickly as seen with Angular 1 and 2. A lot of the effort you spend learning a framework ends up being of only intermittent value in the end.
I'm not that experienced with either yet but as far as I can tell Angular is just easier to get up and running without knowing exactly what modules you want to integrate into your project or without following one of a dozen different tutorials online that all diverge widely from each other. React is just a library for making components and things, whereas Angular has the components, a router, two-way data binding, etc. built in from the start and it offers an "opinionated" starting point for developing web apps.
I've been using it with angular-cli (which is excellent so far, currently using their beta webpack branch) mainly because I just wanted a good, easy bootstrap for a modern web app that didn't overload me with options and choices. I wanted something with "sane defaults" so to speak and Angular delivered. It's surprisingly intuitive and I like the way different functionality is organized in comparison to other frameworks I've used in the past.
Plus, it integrates heavenly with TypeScript and rxjs, both of which I am a very big fan of.
At the end of the day it's really just a personal preference. Right now React is slightly more mature but the way they organize their data in each component is different as is the general "flow" of data (by default anyway). I say give it a try and see how you feel about it! At the very least you might come away liking TypeScript if you aren't familiar with it already. You can write JSX with it as well these days.
Question: as a backend dev(C++/Java) trying to get into frontend stuff, how the fuck do you keep up with all this stuff? i'm still trying to master basic html/css/js and there's tons of stuff like SCSS and node and typescript, react etc that people keep talking about and a lot of it(forgive me if i'm wrong) seems to be syntactic sugar for the base languages like how the fuck do you keep up? would you define a good front end dev as someone who can build something from scratch without ever peeking at a manual/online help forum coz i can't even seem to set up routing without going through an hour long deep dive into someone's personal blog :(
like how the fuck do you keep up? would you define a good front end dev as someone who can build something from scratch without ever peeking at a manual/online help forum
Good god no! There's a lot of tools and it's completely unreasonable to have to know them all. I find though that having a few working projects on my system utilising a bunch of things I want to use often helps as a really fast reference. So as with anything, practise!
as someone who comes from companies where "google it programmers" are sneered at, front end dev scares me. am trying to practice and lose my attitude of "you have to know it all before you try something"
Honestly that just sounds like a really shit culture. Sure, if you're a stack overflow ctrl+v programmer but if googling a problem quickly leads to a solution or a link to the documentation where something is explained, it's kinda fucking stupid to discourage it.
For starters, I just want to say that I love Stack Overflow. It has helped me solve issues on a number of occasions. That being said, there are a lot of programmers out there that just copy/paste the accepted answer from SO without understanding how or why it works. Not only does this not help them become a better programmer, I have also seen it cause issues because the top answer is not necessarily the correct answer. If you are going to SO to find the solution to a problem, please at least take the time to understand what the solution is doing before blindly copy/pasting it.
Tell me about it. I've been working in the frontend world for a few years now and sometimes it makes me want to throw my keyboard in the air, punch my monitor, push my desk over, head out to the countryside and live in a cabin in the woods.
You're absolutely right: most stuff is fluff that makes life "easier". I have to remind myself that 90% of the confusion in the frontend world is because of tooling. I don't need gulp, I don't need sass, I don't need frameworks. They just provide a means to an end: the choices I make in building a web application today probably won't be the same choices I will make next year.
Add in stuff like continuous integration, testing frameworks, deployment/orchestration tools, and it all gets too much. Ironically, once the tooling is taken out of the picture, things look decidedly easier.
Part of the problem is looking at other people's code and trying to follow what they were doing. I remember my face contorting into a tight frown when I'd be following a tutorial, head over to the repo and wonder why there were twelve different folders and a load of files with extensions I didn't recognise. I'm supposed to building a navbar, what's this .jscsrc thing?
Good advice I received early on was to focus on learning pure JS, not on the frameworks. Angular 1 was particularly bad because of its obtrusive syntax, it almost felt I was writing code in another language. I understand that 2 is much better.
More good advice I received was to pick a framework based on your best guess at the time and try to stick with it, don't fly around trying to learn them all. Each one has strengths and weaknesses, it's better to know all the nooks and crannies of one than to know broad strokes about a them all.
As regards keeping up with everything, my advice is don't bother. Learn JS, work out what tools work for you, and just keep up with the honoured list of components that make up your development environment.
If it's any consolation, I don't have a clue what I'm doing, and most people I talk to don't have a clue either. You C++ guys are a little scary because you seem to have it all worked out with your fancy ISO standards and working committee.
I wouldn't put Typescript in the same bag as all those frameworks. Typescript is just a way to make working with Javascript not a completely horrible experience.
I started web dev a couple of month ago. Coming from .NET (WPF), Python, Qt, etc. Angular 2 looked very familiar. Typescript made totally sense to me (still does). Angular 2 has everything out of the box. The concepts are familiar. It's easy to pick up. And that's why I think it will be the new de facto standard in the enterprise.
After the RC desaster (using RC as they were beta versions, API changes) I was frustrated and also realized that Angular 2 and the ecosystem is far from production readiness. So I've started looking into React and Redux.
React / Redux requires to change the way you think about state and dataflow in your app. It's a functional approach (also look at Elm) that amazingly reduces complexity. Once you've understood the beauty of these aproaches, there's no way back. The React / Redux data flow concept feels after years of WPF / Qt UI development like the blessing solution to all the problems with state and dataflow you face with the traditional aproaches.
96
u/[deleted] Sep 15 '16
Any reason to use Angular over React?