Israel JavaScript Conference | 03 – 6325707 | info@e4d.co.il | www.js-il.com |yaniv@e4d.co.ilhttp://blogs.microsoft.co.il/...
Israel JavaScript Conference | 03 – 6325707 | info@e4d.co.il | www.js-il.com |
Israel JavaScript Conference | 03 – 6325707 | info@e4d.co.il | www.js-il.com |What’s ? JS library aimed to manage data in...
Israel JavaScript Conference | 03 – 6325707 | info@e4d.co.il | www.js-il.com |CommunicationDALUIBL (MV*)Offline StorageEnt...
Israel JavaScript Conference | 03 – 6325707 | info@e4d.co.il | www.js-il.com |Why ? It’s free Simplify data query tasks...
Israel JavaScript Conference | 03 – 6325707 | info@e4d.co.il | www.js-il.com |Query Data LINQ style syntax Execute query...
Israel JavaScript Conference | 03 – 6325707 | info@e4d.co.il | www.js-il.com |Query Data//define queryvar query = breeze.E...
Israel JavaScript Conference | 03 – 6325707 | info@e4d.co.il | www.js-il.com |Query Data Breeze resolves this query into ...
Israel JavaScript Conference | 03 – 6325707 | info@e4d.co.il | www.js-il.com |
Israel JavaScript Conference | 03 – 6325707 | info@e4d.co.il | www.js-il.com |Client Side Caching Cache entities locally ...
Israel JavaScript Conference | 03 – 6325707 | info@e4d.co.il | www.js-il.com |Client Side Caching/* Query the server, cach...
Israel JavaScript Conference | 03 – 6325707 | info@e4d.co.il | www.js-il.com |
Israel JavaScript Conference | 03 – 6325707 | info@e4d.co.il | www.js-il.com |Track Changes Breeze Entities are self-trac...
Israel JavaScript Conference | 03 – 6325707 | info@e4d.co.il | www.js-il.com |Track Changes Examine entity state via enti...
Israel JavaScript Conference | 03 – 6325707 | info@e4d.co.il | www.js-il.com |Track Changes/* Change tracking */// save al...
Israel JavaScript Conference | 03 – 6325707 | info@e4d.co.il | www.js-il.com |
Israel JavaScript Conference | 03 – 6325707 | info@e4d.co.il | www.js-il.com |http://www.breezejs.com Breeze SDKhttp://ww...
Israel JavaScript Conference | 03 – 6325707 | info@e4d.co.il | www.js-il.com |yaniv@e4d.co.ilhttp://blogs.microsoft.co.il/...
Israel JavaScript Conference | 03 – 6325707 | info@e4d.co.il | www.js-il.com |
Upcoming SlideShare
Loading in …5
×

Js il 2013 breeze.js

3,660 views
3,549 views

Published on

js-il.com

Published in: Technology
0 Comments
3 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
3,660
On SlideShare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
24
Comments
0
Likes
3
Embeds 0
No embeds

No notes for slide
  • כמה שפחות שקפים ויותר הדגמות חיות הדגמות חיות מבוססות על דרישות עסקיות של לקוח (סיפור הנבנה בהדרגה) לכל נושא 3 שקפים: תיאור קצר של יתרונות, הצגת קוד לדוגמא והדגמה חיהצמידות מינימלית לצד שרת
  • executeQuery method is asynchronousand returns a promise to call back either success handler or failure handler 
  • Js il 2013 breeze.js

    1. 1. Israel JavaScript Conference | 03 – 6325707 | info@e4d.co.il | www.js-il.com |yaniv@e4d.co.ilhttp://blogs.microsoft.co.il/blogs/rdt/Israel JavaScript Conference
    2. 2. Israel JavaScript Conference | 03 – 6325707 | info@e4d.co.il | www.js-il.com |
    3. 3. Israel JavaScript Conference | 03 – 6325707 | info@e4d.co.il | www.js-il.com |What’s ? JS library aimed to manage data in rich client applications Implements the Open Data Protocol (OData) querystandard Ships with adapters for the ASP.NET Web API and forOData
    4. 4. Israel JavaScript Conference | 03 – 6325707 | info@e4d.co.il | www.js-il.com |CommunicationDALUIBL (MV*)Offline StorageEntitiesModule Module ModuleServer
    5. 5. Israel JavaScript Conference | 03 – 6325707 | info@e4d.co.il | www.js-il.com |Why ? It’s free Simplify data query tasks Manage client side data caching Support batch operations Support all modern browsers on desktop and mobiledevices (ECMAScript 5) Out-of-box support for Knockout, Angular, and Backbone Well documented Has roadmap
    6. 6. Israel JavaScript Conference | 03 – 6325707 | info@e4d.co.il | www.js-il.com |Query Data LINQ style syntax Execute query asynchronously with a Promise Query related entities Flatten entity graphs Query server, cache, or both If a query can be expressed in OData syntax, it can beexpressed in Breeze
    7. 7. Israel JavaScript Conference | 03 – 6325707 | info@e4d.co.il | www.js-il.com |Query Data//define queryvar query = breeze.EntityQuery().from("Customers").where("CompanyName", "startsWith", "C").orderBy("CompanyName");//execute queryvar manager = new breeze.EntityManager(serviceName);manager.executeQuery(query).then(querySucceeded).fail(queryFailed);
    8. 8. Israel JavaScript Conference | 03 – 6325707 | info@e4d.co.il | www.js-il.com |Query Data Breeze resolves this query into an HTTP GET requestformatted as an OData URI EntityManager reshapes the result JSON data into entitiesand merges them into its cache The Promise object forwards entities to the caller’ssuccess callback
    9. 9. Israel JavaScript Conference | 03 – 6325707 | info@e4d.co.il | www.js-il.com |
    10. 10. Israel JavaScript Conference | 03 – 6325707 | info@e4d.co.il | www.js-il.com |Client Side Caching Cache entities locally on the JavaScript client Query client Cache, Server or both Navigate among entities in cache
    11. 11. Israel JavaScript Conference | 03 – 6325707 | info@e4d.co.il | www.js-il.com |Client Side Caching/* Query the server, cache, or both */var query = breeze.EntityQuery("Customers");// execute query asynchronously on the servermanager.executeQuery(query).then(querySuccess).fail(queryFail);// execute query synchronously on local cachevar customers = manager.executeQueryLocally(query)// fetch customer by id from cache (if found) or remotelyvar checkCacheFirst = true;manager.fetchEntityByKey("CompanyName", 42, checkCacheFirst).then(fetchSuccess).fail(fetchFail);
    12. 12. Israel JavaScript Conference | 03 – 6325707 | info@e4d.co.il | www.js-il.com |
    13. 13. Israel JavaScript Conference | 03 – 6325707 | info@e4d.co.il | www.js-il.com |Track Changes Breeze Entities are self-tracking – they manage their ownstate via entityAspect.entityState Refresh an entity to its current state on the server or revertchanged entities to their original values Get notifications about the entities that enter, leave, andchange in cache
    14. 14. Israel JavaScript Conference | 03 – 6325707 | info@e4d.co.il | www.js-il.com |Track Changes Examine entity state via entityAspect.entityState Respond to entity property change viaentityAspect.propertyChanged event Respond to change validation errors viaentityAspect.validationErrorsChanged event
    15. 15. Israel JavaScript Conference | 03 – 6325707 | info@e4d.co.il | www.js-il.com |Track Changes/* Change tracking */// save all changes (if there are any)if (manager.hasChanges()){manager.saveChanges().then(saveSucceeded).fail(saveFailed);}// listen for any change to a customercustomer.entityAspect.propertyChanged.subscribe(somethingHappened);// listen for validation errorscustomer.entityAspect.validationErrorsChanged.subscribe(updateValidationUI);
    16. 16. Israel JavaScript Conference | 03 – 6325707 | info@e4d.co.il | www.js-il.com |
    17. 17. Israel JavaScript Conference | 03 – 6325707 | info@e4d.co.il | www.js-il.com |http://www.breezejs.com Breeze SDKhttp://www.breezejs.com/sites/all/apidocs/index.html Trouble Shootinghttp://stackoverflow.com/questions/tagged/breeze
    18. 18. Israel JavaScript Conference | 03 – 6325707 | info@e4d.co.il | www.js-il.com |yaniv@e4d.co.ilhttp://blogs.microsoft.co.il/blogs/rdt/
    19. 19. Israel JavaScript Conference | 03 – 6325707 | info@e4d.co.il | www.js-il.com |

    ×