This one of the best angular tutorials I have seen. There seems to be a large abundance of painfully simple tutorials but none that go the kind of depth needed for enterprise applications. This was very helpful. Thanks!
Chlorophant Not a problem at all! My work load has been very heavy for the last few months, but I do have a couple new tutorial ideas in the works. Go ahead and sub if you haven't already, and I will make sure you get a bunch more good videos! :)
By the way, this is a nice tutorial; well thought out and done. It is just what most people need to understand the basics of promise objects. Thanks for making it.
One thing I would note is that when I make a call to the server, like at 29:20 my server returns the object I added in the response back. I then just push() or pop() it to the results. This prevents me pulling all of the data back, and it only gets added on a success. If This is especially useful to do when you have paged results or a lot of items in your list. One could argue that things could get out of sync, but with the server only returning the object on success it isnt likely. On fail I obviously do not add it. Also it is good practice to add the error catch after your then() functions. Your server may handle errors in the data, or even in your service, but if you do something wrong inside of the then() callbacks, and you error, you have no error handling. That is what the error catch is for at the end of a promise object.
+Mike Mason Especially with short lived applications, where you are only browsing for max 10 minutes at a time, just pushing and popping will work just fine. But if you are building a social application(or other rapidly updating apps), make sure you explore some techniques with socket events, and the like. If you make something cool, I would love to see it!
+rsdntevl I am trying to find the time to make some. Sadly, other side projects have been taking a good chunk of the time it would take to make one of these videos. If you have any ideas on topics, I would love to hear them!
+Chris Lilitsas Yeah, I learned that after building a blazing fast Imgur clone. I need to do an update on the video, but I have been super busy with another project. ;(
Waleed El-Melegy No problem! I am finally working on a new tutorial based on $resource, and proper 'service' 'controller' 'factory' separation for large projects.
Why not call .catch on the promise at the end of the chain to handle any uncaught errors,an error handler in .then handles the error from the previous then or from the initial promise,it wont handle the error from the success handler if there is any. .catch handles both the error in the initial promise and any subsequent then success handler because the execution skips all the other then blocks and goes directly to the catch.
How can you code all this without checking if it works? I find Angular extremely prone to break, any minuscule change can catastrophically and silently crash the whole Angular side of the code.
I have been using angular for quite a while and I have been through the terrible scoping issues and the amount of quality tutorials on the web are amazing. After a bit, you know what works and what breaks. And the real issue turns into building something that can scale and be modified without easily.
Eduardo La Hoz I write a ton of code day to day, and it is sad to say that while I know the syntax of Karma, I very rarely know how and when to test certain functionality.
***** Yeah, on my new set of videos, I am spending a lot of time editing out all of that stuff. Learned that I should create a git repository as I go and commit for every section of the video, so if I need to rerecord anything, I can just check back out to that commit. Thanks for the comment though! Keep them coming!
This one of the best angular tutorials I have seen. There seems to be a large abundance of painfully simple tutorials but none that go the kind of depth needed for enterprise applications. This was very helpful. Thanks!
Chlorophant Not a problem at all! My work load has been very heavy for the last few months, but I do have a couple new tutorial ideas in the works. Go ahead and sub if you haven't already, and I will make sure you get a bunch more good videos! :)
Jeremy Stover Sounds good! I'm loving angular so far. I can never go back to jquery!
I feel the same way ☺ have a github?
I do, but most of my projects arent on there, since I use gitlab at work. :\
This is the most useful tutorial with $http and $q service!Thanks.
I am very happy to have found this tutorial. It is one of the very best that I've ever seen.
By the way, this is a nice tutorial; well thought out and done. It is just what most people need to understand the basics of promise objects. Thanks for making it.
+Mike Mason No problem! :D Always super happy to hear that people are actually being helped by my work.
One thing I would note is that when I make a call to the server, like at 29:20 my server returns the object I added in the response back. I then just push() or pop() it to the results. This prevents me pulling all of the data back, and it only gets added on a success. If
This is especially useful to do when you have paged results or a lot of items in your list. One could argue that things could get out of sync, but with the server only returning the object on success it isnt likely. On fail I obviously do not add it. Also it is good practice to add the error catch after your then() functions. Your server may handle errors in the data, or even in your service, but if you do something wrong inside of the then() callbacks, and you error, you have no error handling. That is what the error catch is for at the end of a promise object.
+Mike Mason Especially with short lived applications, where you are only browsing for max 10 minutes at a time, just pushing and popping will work just fine. But if you are building a social application(or other rapidly updating apps), make sure you explore some techniques with socket events, and the like. If you make something cool, I would love to see it!
Drive data to your AngularJS application! Learn to build scalable applications that enable users to save and retrieve data.
amazing tutorial! love the clarity and modularity of the information. are there going to be more tutorials?
+rsdntevl I am trying to find the time to make some. Sadly, other side projects have been taking a good chunk of the time it would take to make one of these videos. If you have any ideas on topics, I would love to hear them!
The third message of then() function is often used to create a percentage(%) loader for the request
+Chris Lilitsas Yeah, I learned that after building a blazing fast Imgur clone. I need to do an update on the video, but I have been super busy with another project. ;(
thank you jeremy.. it was helpful for me
Waleed El-Melegy No problem! I am finally working on a new tutorial based on $resource, and proper 'service' 'controller' 'factory' separation for large projects.
greate :)
Hi Jeremy !!! Your tutorial is very usefull. I have a request: Is it possible to use $resource for getting the TokenLogin by using Oauth2 ???
Learn how to build dynamic web sites with AngularJS!
very Helpful.. nice tutorial.. :)
Thank you Jeremy
Why not call .catch on the promise at the end of the chain to handle any uncaught errors,an error handler in .then handles the error from the previous then or from the initial promise,it wont handle the error from the success handler if there is any.
.catch handles both the error in the initial promise and any subsequent then success handler because the execution skips all the other then blocks and goes directly to the catch.
How can you code all this without checking if it works? I find Angular extremely prone to break, any minuscule change can catastrophically and silently crash the whole Angular side of the code.
I have been using angular for quite a while and I have been through the terrible scoping issues and the amount of quality tutorials on the web are amazing. After a bit, you know what works and what breaks. And the real issue turns into building something that can scale and be modified without easily.
Also, Angular comes with unit testing and e2e testing.docs.angularjs.org/guide/unit-testing
Eduardo La Hoz I write a ton of code day to day, and it is sad to say that while I know the syntax of Karma, I very rarely know how and when to test certain functionality.
Jeremy Stover I hear ya, dude. . In fast paced corporate environments it becomes very hard to employ any kind of reliable testing environments.
Yeah. Though I am interested in seeing how other developers write tests, and testable code. Care to have a chat about it?
dude I was scared @31,20 thinking "is he ok?, will (he) be able to complete the tutorial" add a suspense to the video..... thanks btw.
***** Yeah, on my new set of videos, I am spending a lot of time editing out all of that stuff. Learned that I should create a git repository as I go and commit for every section of the video, so if I need to rerecord anything, I can just check back out to that commit.
Thanks for the comment though! Keep them coming!
could you give me the code
You sound like John Malkovich
+Anthony Belton That's actually the anthropomorphic mole on my back talking. He looks like John Malkovich as well. :P
are u complicating things a bit?