<ul><ul><li># 6 </li></ul></ul><ul><ul><li>the perfect experience. </li></ul></ul>
Starbucks experience ...
the Virgin lounge ...
Vegas baby, yeah ...
<ul><ul><li>gears. </li></ul></ul><ul><ul><li>[ the quest ] </li></ul></ul>
<ul><ul><li>“ Make it possible to create web apps </li></ul></ul><ul><ul><li>as powerful as desktop apps </li></ul></ul><u...
<ul><ul><li>BROWSER CHALLENGES </li></ul></ul><ul><ul><li>  desktop experience </li></ul></ul><ul><ul><li>  connectivity <...
<ul><ul><li>MODULES </li></ul></ul><ul><ul><li>  offline database   blob </li></ul></ul><ul><ul><li>  offline local server...
<ul><ul><li>gears. </li></ul></ul><ul><ul><li>[ offline ] </li></ul></ul>
<ul><ul><li>blind adaption. </li></ul></ul><ul><ul><li>decide on offline features </li></ul></ul><ul><ul><li>modal versus ...
<ul><ul><li>OFFLINE FEATURE AVAILABILITY </li></ul></ul><ul><ul><li>  caching transient data makes no sense </li></ul></ul...
<ul><ul><li>MODAL </li></ul></ul><ul><ul><li>  distinct online / offline modes </li></ul></ul><ul><ul><li>  user is state ...
<ul><ul><li>MODELESS </li></ul></ul><ul><ul><li>  the application assumes it is offline  </li></ul></ul><ul><ul><li>  or t...
<ul><ul><li>MANUAL SYNCHRONIZATION </li></ul></ul><ul><ul><li>  user drives synchronization through user interface </li></...
<ul><ul><li>BACKGROUND SYNCHRONIZATION </li></ul></ul><ul><ul><li>  continuous synchronization through background process ...
<ul><ul><li>SYNCHRONIZATION IS HARD </li></ul></ul><ul><ul><li>  need GUIDs </li></ul></ul><ul><ul><li>  need timestamps (...
<ul><ul><li>TRADITIONAL  ARCHITECTURE </li></ul></ul><ul><ul><li>GEARS ARCHITECTURE </li></ul></ul>
<ul><ul><li>GEARS FEATURES </li></ul></ul><ul><ul><ul><li>LocalServer </li></ul></ul></ul><ul><ul><ul><li>cache and serve ...
<ul><ul><li>LOCALSERVER </li></ul></ul><ul><ul><ul><li>ResourceStore </li></ul></ul></ul><ul><ul><ul><li>manual resource c...
<ul><ul><li>WORKERPOOL </li></ul></ul><ul><ul><li>  run JavaScript in the background </li></ul></ul><ul><ul><li>  provides...
<ul><ul><li>DATABASE </li></ul></ul><ul><ul><li>  embedded SQLite </li></ul></ul><ul><ul><li>  full text search with FTS2 ...
<ul><ul><li>SECURITY </li></ul></ul><ul><ul><ul><li>one simple rule: Same-origin-policy </li></ul></ul></ul><ul><ul><ul><l...
<ul><ul><li>gears. </li></ul></ul><ul><ul><li>[ advanced use case: orm ] </li></ul></ul>
<ul><ul><li>DATA OBJECT + GEARS ORM ANNOTATIONS </li></ul></ul><ul><ul><li>  @gears.table (name=“Wishes”) </li></ul></ul><...
<ul><ul><li>USAGE </li></ul></ul><ul><ul><li>  public void onModuleLoad() { </li></ul></ul><ul><ul><li>  GearsDAO wishDAO ...
<ul><ul><li>FIND BY EXAMPLE </li></ul></ul><ul><ul><li>  @gears.namedQuery (name=“ findByDescription ”  </li></ul></ul><ul...
<ul><ul><li>USAGE </li></ul></ul><ul><ul><li>  public void onModuleLoad() { </li></ul></ul><ul><ul><li>  GearsDAO wishDAO ...
questions? or later, maarten@maartenvolders.com
<ul><ul><li>MAARTENVOLDERS. com </li></ul></ul><ul><ul><li>PASSIONATE ABOUT PEOPLE AND TECHNOLOGY </li></ul></ul>
Upcoming SlideShare
Loading in...5
×

GWT@Jazoon08 - Part 6/6 - The Perfect Experience

600

Published on

A presentation about GWT which I presentaed at Jazoon '08
Part 6/6 - The Perfect Experience

Published in: Technology, Business
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
600
On Slideshare
0
From Embeds
0
Number of Embeds
0
Actions
Shares
0
Downloads
53
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide
  • GWT@Jazoon08 - Part 6/6 - The Perfect Experience

    1. 1. <ul><ul><li># 6 </li></ul></ul><ul><ul><li>the perfect experience. </li></ul></ul>
    2. 2. Starbucks experience ...
    3. 3. the Virgin lounge ...
    4. 4. Vegas baby, yeah ...
    5. 5. <ul><ul><li>gears. </li></ul></ul><ul><ul><li>[ the quest ] </li></ul></ul>
    6. 6. <ul><ul><li>“ Make it possible to create web apps </li></ul></ul><ul><ul><li>as powerful as desktop apps </li></ul></ul><ul><ul><li>by unlocking the local machine’s capabilities.” </li></ul></ul><ul><ul><li>- Gears Vision </li></ul></ul>
    7. 7. <ul><ul><li>BROWSER CHALLENGES </li></ul></ul><ul><ul><li> desktop experience </li></ul></ul><ul><ul><li> connectivity </li></ul></ul><ul><ul><li> reliability </li></ul></ul><ul><ul><li> responsiveness </li></ul></ul><ul><ul><li> computing power </li></ul></ul><ul><ul><ul><li> busy? </li></ul></ul></ul><ul><ul><ul><li>loop? </li></ul></ul></ul><ul><ul><ul><li>what should I do? </li></ul></ul></ul>
    8. 8. <ul><ul><li>MODULES </li></ul></ul><ul><ul><li> offline database blob </li></ul></ul><ul><ul><li> offline local server resumable upload </li></ul></ul><ul><ul><li> offline workerpool geolocation </li></ul></ul><ul><ul><li> desktop shortcuts file system load / save </li></ul></ul><ul><ul><li> desktop notifications </li></ul></ul><ul><ul><li> … much more on the way </li></ul></ul>
    9. 9. <ul><ul><li>gears. </li></ul></ul><ul><ul><li>[ offline ] </li></ul></ul>
    10. 10. <ul><ul><li>blind adaption. </li></ul></ul><ul><ul><li>decide on offline features </li></ul></ul><ul><ul><li>modal versus modeless </li></ul></ul><ul><ul><li>manual versus background synchronization </li></ul></ul><ul><ul><li>architecture </li></ul></ul>
    11. 11. <ul><ul><li>OFFLINE FEATURE AVAILABILITY </li></ul></ul><ul><ul><li> caching transient data makes no sense </li></ul></ul><ul><ul><ul><ul><li>Real-time stock quotes </li></ul></ul></ul></ul><ul><ul><li> some data just does not make sense offline </li></ul></ul><ul><ul><ul><ul><li>Instant messaging </li></ul></ul></ul></ul><ul><ul><li> doesn’t mean you have to cache everything </li></ul></ul><ul><ul><ul><ul><li>Frequently accessed data </li></ul></ul></ul></ul><ul><ul><li> computational / disk space requirements make it unfeasable </li></ul></ul>
    12. 12. <ul><ul><li>MODAL </li></ul></ul><ul><ul><li> distinct online / offline modes </li></ul></ul><ul><ul><li> user is state aware and and participates in switching states </li></ul></ul><ul><ul><li> online it only communicates with the server </li></ul></ul><ul><ul><li> data synchronization when the user switches between states </li></ul></ul><ul><ul><li> local data is not always up-to-date </li></ul></ul><ul><ul><li> more user interaction required </li></ul></ul>
    13. 13. <ul><ul><li>MODELESS </li></ul></ul><ul><ul><li> the application assumes it is offline </li></ul></ul><ul><ul><li> or that it can loose connection at any time </li></ul></ul><ul><ul><li> user does not have to be state aware </li></ul></ul><ul><ul><li> application uses the local store as much as possible </li></ul></ul><ul><ul><li> continuous small data syncs in the background </li></ul></ul><ul><ul><li> data synchronization is also done when coming back online </li></ul></ul>
    14. 14. <ul><ul><li>MANUAL SYNCHRONIZATION </li></ul></ul><ul><ul><li> user drives synchronization through user interface </li></ul></ul><ul><ul><li> user must be aware of the network state </li></ul></ul><ul><ul><li> user must remember to synchronize before going offline </li></ul></ul><ul><ul><li> amount of data must be small enough to download quickly </li></ul></ul><ul><ul><li> local data is not always up-to-date </li></ul></ul><ul><ul><li> more user interaction required </li></ul></ul>
    15. 15. <ul><ul><li>BACKGROUND SYNCHRONIZATION </li></ul></ul><ul><ul><li> continuous synchronization through background process </li></ul></ul><ul><ul><li> user is unaware </li></ul></ul><ul><ul><li> data is ready at all times (offline / accidentally disconnected) </li></ul></ul><ul><ul><li> fast performance even when slow connection </li></ul></ul><ul><ul><li> sync process might slow down the application </li></ul></ul>
    16. 16. <ul><ul><li>SYNCHRONIZATION IS HARD </li></ul></ul><ul><ul><li> need GUIDs </li></ul></ul><ul><ul><li> need timestamps (SQLite has no Date) </li></ul></ul><ul><ul><li> need a strategy : </li></ul></ul><ul><ul><ul><ul><li>last one wins </li></ul></ul></ul></ul><ul><ul><ul><ul><li>lock / checkout </li></ul></ul></ul></ul><ul><ul><ul><ul><li>let user decide </li></ul></ul></ul></ul>
    17. 17. <ul><ul><li>TRADITIONAL ARCHITECTURE </li></ul></ul><ul><ul><li>GEARS ARCHITECTURE </li></ul></ul>
    18. 18. <ul><ul><li>GEARS FEATURES </li></ul></ul><ul><ul><ul><li>LocalServer </li></ul></ul></ul><ul><ul><ul><li>cache and serve application resources locally </li></ul></ul></ul><ul><ul><ul><li>Database </li></ul></ul></ul><ul><ul><ul><li>store data locally in a fully-searchable relational database </li></ul></ul></ul><ul><ul><ul><li>WorkerPool </li></ul></ul></ul><ul><ul><ul><li>perform resource-intensive operations asynchrounously </li></ul></ul></ul>
    19. 19. <ul><ul><li>LOCALSERVER </li></ul></ul><ul><ul><ul><li>ResourceStore </li></ul></ul></ul><ul><ul><ul><li>manual resource capturing </li></ul></ul></ul><ul><ul><ul><li>ManagedResourceStore </li></ul></ul></ul><ul><ul><ul><li>capture entire applications </li></ul></ul></ul><ul><ul><ul><li>list applications in separate manifest file </li></ul></ul></ul><ul><ul><ul><li>gears captures and updates the list automatically </li></ul></ul></ul>
    20. 20. <ul><ul><li>WORKERPOOL </li></ul></ul><ul><ul><li> run JavaScript in the background </li></ul></ul><ul><ul><li> provides thread-like functionality </li></ul></ul><ul><ul><ul><li>no more blocking the browser UI </li></ul></ul></ul><ul><ul><ul><li>inter WorkerPool Communication is via message Strings </li></ul></ul></ul><ul><ul><ul><li>no shared state or threading primitives </li></ul></ul></ul><ul><ul><ul><li>does not trigger the browser's &quot;unresponsive script&quot; dialog </li></ul></ul></ul><ul><ul><ul><li>no DOM access </li></ul></ul></ul><ul><ul><ul><li>no singleton, multiple instances can be instantiated </li></ul></ul></ul>
    21. 21. <ul><ul><li>DATABASE </li></ul></ul><ul><ul><li> embedded SQLite </li></ul></ul><ul><ul><li> full text search with FTS2 </li></ul></ul><ul><ul><ul><li>limited data types (Integer, Real, Text, Blob) </li></ul></ul></ul><ul><ul><ul><li>low level API </li></ul></ul></ul>
    22. 22. <ul><ul><li>SECURITY </li></ul></ul><ul><ul><ul><li>one simple rule: Same-origin-policy </li></ul></ul></ul><ul><ul><ul><li>all local files are stored in your local profile directory </li></ul></ul></ul>
    23. 23. <ul><ul><li>gears. </li></ul></ul><ul><ul><li>[ advanced use case: orm ] </li></ul></ul>
    24. 24. <ul><ul><li>DATA OBJECT + GEARS ORM ANNOTATIONS </li></ul></ul><ul><ul><li> @gears.table (name=“Wishes”) </li></ul></ul><ul><ul><li> public class Wish implements GearsDataObject { </li></ul></ul><ul><ul><li> @gears.id (length = 50) </li></ul></ul><ul><ul><li> private String name; </li></ul></ul><ul><ul><li> @gears.column (name = “description”, length = 200) </li></ul></ul><ul><ul><li> private String description; </li></ul></ul><ul><ul><li> } </li></ul></ul><ul><ul><li>BINDING </li></ul></ul><ul><ul><li> <generate-with class=“ com.GearsDAOGenerator ”> </li></ul></ul><ul><ul><li> <when-type-assignable class=“ com.GearsDataObject ”/> </li></ul></ul><ul><ul><li> </generate-with> </li></ul></ul>
    25. 25. <ul><ul><li>USAGE </li></ul></ul><ul><ul><li> public void onModuleLoad() { </li></ul></ul><ul><ul><li> GearsDAO wishDAO = GWT.create(Wish.class); // Initializes database </li></ul></ul><ul><ul><li> Wish wish = new Wish(“Car”, “Red shiny with big wheels”); </li></ul></ul><ul><ul><li> wishDAO. save(); </li></ul></ul><ul><ul><li> Wish wish = wishDAO. findById(“Car”); </li></ul></ul><ul><ul><li> wishDAO. delete(wish); </li></ul></ul><ul><ul><li> } </li></ul></ul>
    26. 26. <ul><ul><li>FIND BY EXAMPLE </li></ul></ul><ul><ul><li> @gears.namedQuery (name=“ findByDescription ” </li></ul></ul><ul><ul><li> sql=“select :Wishes where description = ?”) </li></ul></ul><ul><ul><li> @gears.table (name=“ Wishes ”) </li></ul></ul><ul><ul><li> public class Wish implements GearsDataObject { </li></ul></ul><ul><ul><li> public static final String FIND_BY_DESCRIPTION = “ findByDescription ”; </li></ul></ul><ul><ul><li> @gears.column (name = “description”, length = 200) </li></ul></ul><ul><ul><li> private String description; </li></ul></ul><ul><ul><li> } </li></ul></ul>
    27. 27. <ul><ul><li>USAGE </li></ul></ul><ul><ul><li> public void onModuleLoad() { </li></ul></ul><ul><ul><li> GearsDAO wishDAO = GWT.create(Wish.class); </li></ul></ul><ul><ul><li> GearsQuery query = </li></ul></ul><ul><ul><li> wishDAO. getNamedQuery(Wish.FIND_BY_DESCRIPTION); </li></ul></ul><ul><ul><li> query.setString(“Red shiny with big wheels”); </li></ul></ul><ul><ul><li> List<Wish> wishes = query.execute(); </li></ul></ul><ul><ul><li> } </li></ul></ul>
    28. 28. questions? or later, maarten@maartenvolders.com
    29. 29. <ul><ul><li>MAARTENVOLDERS. com </li></ul></ul><ul><ul><li>PASSIONATE ABOUT PEOPLE AND TECHNOLOGY </li></ul></ul>
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×