Original Working Draft of Bancha Project

846 views

Published on

This is the original working draft, presented at the JavaScript User Group in Vienna.

We are happy that this project could be realized and now can be found at banchaproject.org

Published in: Technology
  • We are happy to have been able to realize this project. For more information go to banchaproject.org

    Bancha seamlessly integrates CakePHP with ExtJS and Sencha Touch.

    Features:
    - handles all communication between server and client
    - shares all schema and validation rules in CakePHP with ExtJS/Sencha Touch
    - enables asynchronous and batched request to the server
    - automatically implements CRUD for all remotable cake models
    - is well-tested with PHPUnit and Jasmine

    http://banchaproject.com
       Reply 
    Are you sure you want to  Yes  No
    Your message goes here
  • Be the first to like this

Original Working Draft of Bancha Project

  1. 1. ExtCake<br />Rapid DevelopmentforExtJSandCakePHP<br />Working<br />Draft<br />
  2. 2. The Goal<br />Enableasynchronous RPCs<br />Enablesynchronized Models<br />Makewebdevelopmenteasier<br />
  3. 3. The Strategies<br />TRY - Don‘trepeatyourself<br />Save bandwidth<br />Send only relevant data<br />Batch requests<br />Handle consistancy in distributedsystems<br />
  4. 4. Howdoesitwork?<br />
  5. 5. General RIA Architecture<br />Model<br />Model<br /> Data<br />Controller<br />Controller<br />View<br />View<br />
  6. 6. General RIA Architecture<br />Model<br />Model<br /> Data<br />Controller<br />Controller<br />View<br />View<br />
  7. 7. OurArchitecture<br />Schema, Type<br />Model<br />Model<br /> Data<br />Controller<br />Controller<br />View<br />View<br />Templates<br />
  8. 8. ExtDirect<br />Direct<br />Controller<br />Validation & <br />Relations<br />Model<br />Model<br /> Data<br />Controller<br />Controller<br />View<br />View<br />Templates<br />
  9. 9. ExtDirect<br />Direct<br />Controller<br />Validation & <br />Relations<br />Remoteable<br />Behaviour<br />Model<br />Model<br /> Data<br />Controller<br />Controller<br />View<br />View<br />Templates<br />
  10. 10. ExtDirect<br />Direct<br />Controller<br />Validation & <br />Relations<br />Remoteable<br />Behaviour<br />Model<br />Model<br /> Data<br />DirectComponent<br />Controller<br />Controller<br />View<br />View<br />Templates<br />
  11. 11. ExtDirect<br />Direct<br />Controller<br />Validation & <br />Relations<br />Remoteable<br />Behaviour<br />Model<br />Model<br /> Data<br />DirectComponent<br />Controller<br />Controller<br />Template<br />Helper<br />View<br />View<br />Templates<br />
  12. 12. The Consistent Model<br />Usedforcrutialdatalikeorders.<br />Solvestypicalproblemsofdistributedsystems<br />
  13. 13. The Consistent Model<br />RaceConditions<br />Lost Requests<br />
  14. 14. slowreq.<br />Consistancy<br />Fast request<br />
  15. 15. Consistancy<br />Version 1<br />
  16. 16. Consistancy<br />Version 2<br />Version 1<br />
  17. 17. Consistancy<br />Write to Queue<br />Version 2<br />Version 1<br />
  18. 18. Consistancy<br />Write to Queue<br />Version 2<br />Version 1<br />delayed<br />
  19. 19. Consistancy<br />Write to Queue<br />Version 2<br />Version 1<br />delayed<br />Create, thenedit (Queue)<br />
  20. 20. Consistancy<br />Write to Queue<br />Version 2<br />Version 1<br />delayed<br />Create, thenedit (Queue)<br />Commit V. 1 & 2 <br />
  21. 21. The Consistent Model<br />RaceConditions<br /> Lost Requests<br />
  22. 22. Lost Requests - Resend<br />Server<br />Waiting...<br />Timed out, resend<br />lost<br />Create Record 1<br />sent<br />Create<br />Record<br />
  23. 23. Lost Requests – Slow Response<br />Timed out, beforereceivedsoresend<br />send<br />Create <br />Record<br />send<br />Create<br />second<br />Record<br />
  24. 24. Lost Requests – Slow Response<br />Add temp.<br />UUID<br />Send<br />Create <br />Record,<br />Save UUID<br />send<br />Already<br />created<br />
  25. 25. Lost Requests – Slow Response<br />Send<br />Delete <br />Record<br />send<br />Just ignore<br />
  26. 26. The Consistent Model<br />RaceConditions<br /> Lost Requests<br />
  27. 27. The Client API<br />ExtCake.registerModel(modelName,options)<br />ExtCake.loadModel(modelName,options)<br />clientName: theclientsidemodelname<br />forceConsistancy: usetheconsistantmodel<br />ExtCake.loadTemplate(tplName)<br />
  28. 28. The Server Classes<br />RemotableBehaviour<br />DirectController<br />Router<br />Data-Schema<br />DirectComponent<br />handles RPCs<br />TemplateHelper<br />providestemplatestocakeand ext views<br />
  29. 29. So wegot<br /> Fast andreliable RPCs<br />Synchronizedmodels<br />Sharedtemplates<br />
  30. 30. We will also have<br />Support forSenchaTouch<br />PHPUnit-, Jasmin- & Selenium-Tests<br />Polling Model<br />Polls theserverforchanges<br />Rapid Development<br />Command Line Tool<br />
  31. 31. Whatelse? <br />LazyLoading<br />Runtimedependencymanagement<br />Persistent Data (?)<br />Cache Data & changes offline<br />Next time online update localand remote data<br />Even more?<br />
  32. 32. More Infos<br /> @extcake<br />www.extcake.org<br />Thxfortheseusedicons: <br />Underconstructionbyiconfactory.com<br />Check symbol by dezinerfolio.com<br />Delete iconbyeveraldo.com<br />Warning icon by vistaico.com<br />Twittericonbyaddictedtocoffee.de<br />Website icon by bogo-d.deviantart.com<br />

×