--
You received this message because you are subscribed to the Google Groups "angular-data-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular-data-d...@googlegroups.com.
To post to this group, send email to angular-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/angular-data-dev/CAOTbQj0WG79HyiY1XWN%3Dicyj6QLR2H8w-Km-BKjtEv68WPTaZQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
To view this discussion on the web visit https://groups.google.com/d/msgid/angular-data-dev/3a892786-8c39-48f3-8fb1-51c7490a309b%40googlegroups.com.
Ideally angular 2. Part of the compelling reason for adding support to the language is that MVC frameworks like angular and react are taking bets on it, and supporting it natively.
Patrick and I tried to use your HTTP library in an example, but it looks like it might be a little too early still. It's also using RX Observable, not victors new observable.It would be great if your HTTP stuff could make it into the angular code base before the end of the month when the meeting is. What are the chances of that happening?
If I had event, HTTP, and animation support as Observables I could put together a very impressive code sample that motivated language support. I'm meeting with Matias today and I'm cautiously optimistic that I will be able to get him to agree to use Observable in the animation framework instead of promises. Then I could say that angular would not have any promise support and that would be a strong motivator for observable support in the language.
JH
On May 4, 2015, at 8:49 AM, Jeffrey Cross wrote:
Hey Jafar,Does it need to be Angular 2 examples, or would examples of using AngularJS 1.x say with RxJS be useful?
On Sun, May 3, 2015 at 7:02 AM, 'Jafar Husain' via angular-data-dev wrote:Hey guys,I am on the TC 39 (JavaScript standards committee) and I need some code examples of angular data in action. I have been asked to provide examples of how better language support for observable in JavaScript could make programming Data in MVC frameworks easier.Any code snippets you can give me that you have written would be immensely useful.J--
Jeff Cross
Here is a motivating example a colleague of mine building a B2B app has right now: he listens for a load event, makes an asynchronous request, uses the data in the result make multiple concurrent requests to elastic search, and once the data is loaded, animates the data on screen. This is a very common pattern and user-interface is: an event, followed by request, followed by an animation.Using observable for all of the steps allows him to cleanly cancel if the user navigates away from the screen. This prevents otherwise useless requests to elastic search from going out, and also saves the user from having to sit through a fade in animation when they just indicated their desire to leave the form.
@jhusainI like observables. I just don't think cancel is the most compelling argument for them.Consider your "motivating example".Here is a motivating example a colleague of mine building a B2B app has right now: he listens for a load event, makes an asynchronous request, uses the data in the result make multiple concurrent requests to elastic search, and once the data is loaded, animates the data on screen. This is a very common pattern and user-interface is: an event, followed by request, followed by an animation.Using observable for all of the steps allows him to cleanly cancel if the user navigates away from the screen. This prevents otherwise useless requests to elastic search from going out, and also saves the user from having to sit through a fade in animation when they just indicated their desire to leave the form.The first step is detecting the need to cancel and this is the same whether you use observables or promises, In your case, the trigger is screen navigation ... which fact is easily captured.The (successful) promise callback can check if the screen is still active before issuing the elastic search request(s). If the screen is no longer active, no request goes out, the callback returns a reject value, and there is no animation. Problem solved.Is it as clean? No. But is it nasty or hard? No and no.
IMO, observables reveal their true value when there is a flow of multiple return values. Promises suffice for single request/response scenarios even when chained.
--
You received this message because you are subscribed to the Google Groups "angular-data-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular-data-d...@googlegroups.com.
To post to this group, send email to angular-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/angular-data-dev/552cdd7a-1c3a-41f6-90d5-d7a699e089b3%40googlegroups.com.
--
You received this message because you are subscribed to the Google Groups "angular-data-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to angular-data-d...@googlegroups.com.
To post to this group, send email to angular-...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/angular-data-dev/d61b940c-e9a6-4369-aedc-ed1a6d63f880%40googlegroups.com.