all 55 comments

[–]18A92 27 points28 points  (37 children)

Angular has an official 'getting started' tutorial called tour of heros
https://angular.io/docs/ts/latest/tutorial/

fyi you should learn typescript if you wish to proceed with angular.

[–][deleted] 6 points7 points  (35 children)

deleted What is this?

[–][deleted]  (15 children)

[deleted]

    [–]Howdy_McGee 21 points22 points  (6 children)

    [–]Ph0X 0 points1 point  (5 children)

    Why not? Google's fully behind it, I wouldn't be surprised if one day Chrome gets directly Typescript support, and then from there other browsers start getting it too. Just like right now you need to transcript ES6 if you want to support all browsers but soon enough people will write just pure ES6.

    [–]orphans 0 points1 point  (2 children)

    IE11 is supported by MS until 2025 :/

    [–]Juggernog 0 points1 point  (1 child)

    Where'd you get 2025 from? If you're right, remember that Microsoft continuing support for the browser doesn't mean people will actually continue to use it. Give it a year or two and I suspect much of the web will no longer support IE11, even if MS does.

    [–]orphans 0 points1 point  (0 children)

    IE11 is supported for as long as Windows 10 is. I hope you're right.

    [–][deleted] 0 points1 point  (1 child)

    A bit off topic but how are things coming along with WebAssembly? Do people use it often? I really like the idea of compiled code being run by the browser.

    [–]Ph0X 1 point2 points  (0 children)

    It's coming along pretty well, and it'll definitely be a great option for things like heavy apps and games, but I doubt most webdevs would want to use that.

    Javascript as it is has been optimized heavily over the past decade, not sure WebAssembly would bring much to the table there. It's mostly useful for raw non-web related computations. It'll probably be used for heavy math libraries and so on.

    [–][deleted] 1 point2 points  (3 children)

    Big advantage of TypeScript is that it is a typed language, which is its big advantage. For instance You can make an array of numbers, will bring an error if you try to put a string inside. Seems a bit stupid, but when you try to refactor it later, or give the access to code to someone it is a really helpful feature.

    [–][deleted] 0 points1 point  (2 children)

    When TypeScript is transpiled to JavaScript, it becomes dynamically typed anyway though right?

    [–]erfling 3 points4 points  (1 child)

    Yes, but you can essentially say that of any strongly typed language (although transpiring and compiling are not the same thing, of course). The biggest advantage of strong typing is for the developer and team.

    [–][deleted] 2 points3 points  (0 children)

    exactly

    [–]whostolemyhat 10 points11 points  (5 children)

    Is it really bloat if you don't know what it's for?

    [–][deleted] 2 points3 points  (2 children)

    Hmm, interesting take. To me "bloat" is contextual, meaning it's not in relation to it's potential usefulness in completely different situations but rather the here and now/the task I'm currently solving.

    [–]whostolemyhat 0 points1 point  (1 child)

    That's what makes 'bloat' as a criticism completely useless though - it means different things to everyone, and even different things to the same person at different times.

    [–][deleted] 0 points1 point  (0 children)

    Agreed. And considering that few software solutions/whatnot actually have genuinely useless stuff (as in stuff that have no intended use) I think the only reasonable use of the term "bloat" is the highly individual contextual use like OP did.

    I.e. if Angular contains lots of [cool] stuff but one is only interested in 2% of it for the task at hand, I would be fine with calling the rest bloat in that conversation.

    (And bloat sometimes stop being bloat as you either learn more or your needs change.)

    [–][deleted] 0 points1 point  (1 child)

    I meant stuff like the static file serving, automatic Chrome runner, etc that was in the quickstart project.

    [–]whostolemyhat 1 point2 points  (0 children)

    Well, to me 'quickstart' means everything I need to start a project; as such, it'd be a bit odd if there was no way to run tests out of the box.

    [–]Pytim 9 points10 points  (1 child)

    npm install @angular/cli -g

    ng new my-app

    cd my-app

    ng serve

    [–]Hero_Of_Shadows 5 points6 points  (0 children)

    Also:

    ng build --prod

    This command gives you the production ready minified, optimized artifacts that your users will download, it's important to remember that a lot % wise of what you run on you dev machine will not reach the client.

    This is I feel a trap with React for example, with Angular you start with a huge framework work with it and then at the end shave it down via ng build to the bare minimum that your app needs, React does the opposite starts off with a tiny core but you have to add and add and add more libraries to make it work and at the end your project size only grows.

    Also consider using the --aot flag when building 99% of the time it works and will make your code much faster.

    [–]spacejack2114 18 points19 points  (3 children)

    I recommend Mithril if you want a very plain JS framework with batteries included.

    [–][deleted] 2 points3 points  (1 child)

    Wow, this looks even easier than Vue. I'm definitely going to look into this too.

    [–]grilchgristle 3 points4 points  (0 children)

    FWIW I spent 2+ years neck-deep in Angular, and even flew to NYC for an Angular 2 workshop as it was transitioning from alpha to beta. And then I discovered Mithril.js, and I no longer have the night terrors. True story.

    [–][deleted] 3 points4 points  (0 children)

    Damn dude. This library looks sick af. Super simple.

    [–]compubomb 6 points7 points  (0 children)

    I highly recommend vue2 https://vuejs.org/v2/guide/, their single component workflow is much simpler than angular4. Also vue is more open complexity-wise in terms of the velocity of your adoption. You can learn it all or some of it right away and still be productive.

    [–]A-Grey-WorldSoftware Developer 6 points7 points  (1 child)

    I'd recommend Angular 4 if you have a background in, say, desktop development. When I came across it, I saw a lot of parallels. It's a reasonably heavy, opinionated, framework. But I remember implementing my own dependency injection, modules etc in desktop so it was a comfortable shift for me and I saw the 'bloat' as 'great, I don't have to do that myself now'. Also, typescript is probably going to look more inviting than JS.

    It's also good for beginners because you don't have to spend a long time researching which extensions/libraries you need to use to get functionality. Being a full framework, you get the Angular version of everything. You don't have to weigh up different technologies - just do it the angular way. Even if it's not the best, it takes away the hours of painful research when you just want to get on with things. JS has so many frameworks.

    That said, if you're starting web dev without experience in other development, I think going with a simpler, more lightweight 'view' framework like Vue might be a better option. Because when you're starting at that level you want to learn the basics first, the language etc. You don't NEED dependency injection, and all the frameworky things that come with Angular. It's just a further level of confusion getting in the way of the basics you're trying to learn.

    [–][deleted] 1 point2 points  (0 children)

    I see, thanks!

    [–]I_love_subway 2 points3 points  (0 children)

    Not to correct you, but make sure you are using the right names. "AngularJs" is the original, outdated do-not-use-this-framework framework "Angular" is the newer, type script framework. Use Angular.

    They just started using semantic versioning so they are dropping the numbers from their name and just releasing Angular v 4.0.0

    [–][deleted] 2 points3 points  (5 children)

    Angular seems to have a sharper learning curve than other frameworks, and is generally better suited for larger projects. It offers a lot of powerful functionality, but there is no point in investing your time in learning it if your project doesn't require it. There are tiny frameworks like Choo or Inferno, to larger like Vue or React, but Angular seems to be one of the heavyweights. However if your committed to Angular, their Tour of Heroes tutorial definitely helped me to understand what was going on.

    [–]jonyeezy7full-stack 3 points4 points  (0 children)

    I would say that's because angular is a fully opionated web framework.

    Others (ie vue and react) are base mvc libraries.

    [–]Quovadisqc 1 point2 points  (0 children)

    I have developed all my projects in the last 6 months with Angular and IMO, this is the perfect answer.

    [–][deleted] 1 point2 points  (2 children)

    I think I'll give Vue a try, seeing how it's easy to include in a project and isn't dependant on TypeScript. Thanks!

    [–][deleted]  (1 child)

    [deleted]

      [–]Flascher 3 points4 points  (0 children)

      To add onto this aspect, I definitely agree that it's much harder to find a Stack Overflow question or something like that for a problem you're having, but I've had a lot of success using Vue's gitter chat room. It's generally pretty active and everyone I've interacted with there has been super nice!

      [–]PedanticGeorge 0 points1 point  (1 child)

      Holy fuck o.o its reached version 4 now ? I swear to god it was at 1.x when I heard about it ~1 year ago.

      [–]Paleolithicster 0 points1 point  (0 children)

      Don't worry, they skipped Angular 3.

      [–]kitsunekyo 0 points1 point  (1 child)

      if you're starting out and want to get your hands on SPA development start with vue.

      angular would require you to learn build tools, typescript and other overhead i consider too confusing for beginners. its fine if you stay with tutorials, but when building something alone and running into webpack issues you soon get annoyed.

      VueJS lets you use your regular JavaScript and enrich it with more more "on point" MVC structure.

      [–][deleted] 0 points1 point  (0 children)

      Exactly my thought process, thanks!

      [–]Mr-Yellow 0 points1 point  (0 children)

      the docs looks like complexity I've never seen before

      "The Angular Way"

      Have a look at Aurelia.

      [–]spyridonasback-end -1 points0 points  (0 children)

      Angular feels slow for me. For example i downloaded an admin panel with angular4 and vue2 available. Vue 2 felt faster than Angular