Live data from Hacker News

AngularJS Tutorial: Learn to Build Modern Web Apps

thinkster.io

81–90 of 93 posts

Re: AngularJS Tutorial: Learn to Build Modern Web Apps

#81
post #78

I'm still not convinced about Angular's Dependency Injection thing. The problems it allegedly solves don't clearly outweigh the ones it certainly creates. It claims to provide concern isolation, which facilitates testing and cleanliness. I don't think it helps that much. But it has a middle-stage learning curve, more callbacks than I'd like, and implicitness of dependencies. For example, i.e. you need to know what $s…

    For example, i.e. you need to know what $scope-like params are "supposed to contain" on every function that uses them.
You should never write code that communicates through $scope objects and expects certain values to be set. The only exception to this is the relationship between views and their respective controllers.

Outside of the controller-view relationship, nothing in AngularJS requires passing data in $scope objects, and you definitely shouldn't.

Why do you think dependency injection doesn't help exactly? I personally don't know of any other pattern to effectively test/mock things like HTTP interactions. It's also a pattern that's used by many, many other languages and frameworks - what's the alternative you're thinking about?

Re: AngularJS Tutorial: Learn to Build Modern Web Apps

#83
post #65

There's also: yearofmoo [0], the AngularJSLearning Index [1], David Mosher [2], tutorialzine [3], and the ng-newsletter. [4] I would like to see the Integration With Other Languages/Frameworks section expanded (D3, PouchDB, etc). Are you guys planning on expanding on that? [0] http://www.yearofmoo.com/ [1] https://github.com/jmcunningham/AngularJS-Learning , [2] http://www.youtube.com/user/vidjadavemo/videos [3] http…

I'll take that as a no since you haven't responded.

Re: AngularJS Tutorial: Learn to Build Modern Web Apps

#84
post #70

Hmm, didn't make it past the first check mark. "Permission denied (publickey). fatal: Could not read from remote repository." -git

You should try: git clone https://github.com/msfrisbie/mean-stripdown.git That way you can clone repositories for reading only as well. This should be fixed in the tutorial though.

Thank you!

Re: AngularJS Tutorial: Learn to Build Modern Web Apps

#85
post #35

Earlier quoted context omitted.

Javascript is a harder language then most web development languages when you really get into it (OOP, inheritance, scope, first class functions, callbacks, closures, compile time errors). If you go into it thinking your going to save brain power you may be in for a rude awakening. The advantage is you can do real time async stuff a lot better then with other frameworks.

> OOP, inheritance, scope, first class functions, callbacks, closures, compile time errors How does any of that make it harder than "most web development languages"? > The advantage is you can do real time async stuff a lot better then with other frameworks. How so? AFAIK, the only difference is that in Javascript you can only do async stuff, you don't really have a choice.

OOP: This is done with Functions not Classes. Inheritance: Theres at least 3 different ways of doing this, 2 of them suck again use Functions instead of Classes. Scope: Variables outside a function are global and theres no block scoping. First Class Functions: This is not something most people are used to and can become confusing Calbacks: Callback Hell, you can shoot yourself in the foot and mess up your code if you don't put extra thought keeping things organized and thinking through async/sync Closures: Theres function scoping but not block scoping, this can be confusing if you're used to block scoping Compile Time Errors: Theres very few compile time errors. If you are using a Function that requires the "new" keyword and you forget it your code will still run and all sorts of wacky things will happen.

Yes other languages have these features but they are harder in Javascript, thats why Javascript is a harder language.

Look into Meteor.js - try doing that in PHP. That's how so. And you can write Sync code if you want to.

Re: AngularJS Tutorial: Learn to Build Modern Web Apps

#86
post #65

There's also: yearofmoo [0], the AngularJSLearning Index [1], David Mosher [2], tutorialzine [3], and the ng-newsletter. [4] I would like to see the Integration With Other Languages/Frameworks section expanded (D3, PouchDB, etc). Are you guys planning on expanding on that? [0] http://www.yearofmoo.com/ [1] https://github.com/jmcunningham/AngularJS-Learning , [2] http://www.youtube.com/user/vidjadavemo/videos [3] http…

I get a lot of requests to expand the tutorial with other frameworks, as you mentioned. Ultimately, the tutorial itself will be structured in a way that allows for the best presentation of concentrated learning. However, this doesn't mean that we won't be releasing other content covering integration with other frameworks.

Re: AngularJS Tutorial: Learn to Build Modern Web Apps

#87

Awesome tutorial! I haven't gotten around to reading it all yet however I noticed it provides you with a base to begin coding which is good but is there anyway you can do a short writeup on how exactly that base is created?

The tutorial explains only what you need to know about the base to get started. If I explained the entire boilerplate of the MEAN stack, the tutorial would become a monstrosity.

Re: AngularJS Tutorial: Learn to Build Modern Web Apps

#88
post #62
post #61

Heads up - the link[1] where it says "If you need a refresher on Angular services, go through this video" leads to a video on filters, not services. - [1] http://www.thinkster.io/pick/sFObNwt4rA/angularjs-built-in-f...

I've noticed a few more errors - is there a central place I can submit them?

You can email me directly at matt at thinkster dot io

Re: AngularJS Tutorial: Learn to Build Modern Web Apps

#90
post #81
post #78

I'm still not convinced about Angular's Dependency Injection thing. The problems it allegedly solves don't clearly outweigh the ones it certainly creates. It claims to provide concern isolation, which facilitates testing and cleanliness. I don't think it helps that much. But it has a middle-stage learning curve, more callbacks than I'd like, and implicitness of dependencies. For example, i.e. you need to know what $s…

For example, i.e. you need to know what $scope-like params are "supposed to contain" on every function that uses them. You should never write code that communicates through $scope objects and expects certain values to be set. The only exception to this is the relationship between views and their respective controllers. Outside of the controller-view relationship, nothing in AngularJS requires passing data in $scope o…

> The only exception to this is the relationship between views and their respective controllers.

My point exactly. The relationship between views and controllers is important. Using $scope there is sucky (also, its name is too generic).

> Why do you think dependency injection doesn't help exactly?

I think that dependency injection helps, and I use it all the time. I just don't like Angular's take on it.

It relies too much on anonymous functions. I think that 'new' (or equivalent) and 'globally accessible glasses or factories' (or equivalent) are just fine in lots of cases. They make the dependencies implicit, yes, but that's secondary to the fact that the code is much more readable.

Post reply on HN