RIA implementation patterns

  • 1,156 views
Uploaded on

 

More in: Technology
  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Be the first to comment
    Be the first to like this
No Downloads

Views

Total Views
1,156
On Slideshare
0
From Embeds
0
Number of Embeds
3

Actions

Shares
Downloads
8
Comments
0
Likes
0

Embeds 0

No embeds

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel
    No notes for slide
  • JavaScript is not included in picture of classical web app client Web apps have smaller UI state User can trigger less events Web apps can be less responsive
  • Roughly equal testability as Passive View
  • All state is in Models – even GUI specific state.
  • JFaces – provides microarchitecture for complex, often-used widgets such as Trees and Tables. Contains model-driven widgets. Covers areas of UI development that developers encounter over and over, and it provides a clean way to accomplish those tasks. JFace depends on SWT, but it doesn't hide SWT widgets. For example, JFace viewers, which are model-based content adapters for SWT widgets, provide methods to access the underlying SWT widgets. This duality provides developers with the separation and ability to choose between model-driven UI development and raw widget manipulation. http://help.eclipse.org/ganymede/topic/org.eclipse.platform.doc.isv/guide/jface.htm

Transcript

  • 1. Rich Client Implementation Patterns Ürgo Ringo Aqris Software
  • 2. Complexity Classical web app client Rich client
  • 3.
    • Rich clients have more state
    AMS2.0 Model for week view
  • 4. GUI complexity boosters
    • Distribution of business domain code among client and server
    • 5. Remote IO
    • 6. Custom widgets
    • 7. UI state synchronization
  • 8. MVC(1)
    • Model
      • is the application without UI
      • 9. contains all application state
      • 10. may communicate with DB or server
    • View
    • 11. Controller
      • adapts events from View to Model API
      • 12. doesn't contain any business logic
  • 13. MVC(2)
    • + Model is separated
    • 14. + Controller can be testable
    • 15. - Controller and View are tightly coupled
    • 16. - View update logic cannot be tested
  • 17. Model-View-Presenter with Supervising Controller
    • + Complex View update logic is testable
    • 18. - View and Controller even more coupled
  • 19. MVP with Passive View
    • + Even more View update logic is testable
    • 20. - Controller is even more coupled to View
  • 21. Presentation Model
    • + View update logic is testable
    • 22. + Controller can be testable
    • 23. - Model has more knowledge about UI
  • 24. Distribution of complexity
  • 25. Command
    • each user request is handled by separate command
    • 26. used in Swing and SWT
    • +OO
    • 27. + support for undo/redo
    • 28. - can result in many small classes
    Relationship to MVC?
  • 29. Various if (RoleManager. getCurrentRole ().equals(Role. PROJECT_OWNER )) { button.setEnabled( true ); } else { button.setEnabled( false ); } AuthorizationManager. prepare (button, Role. PROJECT_OWNER );
    • Adaption
    • Widget assembly
    panel.add( new OkCancelPanel()); panel.add(Factory. createOkCancelPanel ()); panel.add(Builder. create ( "btn:ok, btn:cancel" ));
    • Composable units
    • e.g EnterActivity MVC, ProjectViewPanel, TeamViewPanel
  • 30. Swing
    • View and Controller merged into one component
    • 31. Look-and-feel handled by separate UI delegate
    • 32. Types of Models
      • GUI state (e.g ButtonModel, TreeSelectionModel)
      • 33. application state (e.g ListModel, TableModel)
      • 34. mixed (e.g ButtonModel if used for JCheckBox)
    • Uses Actions (commands)
    public interface ActionListener extends EventListener { public void actionPerformed(ActionEvent e); }
  • 35. Eclipse RCP
    • Workbench
      • e.g Windows, Editors, Perspectives
    • JFace
      • e.g Viewers, Dialogs, Wizards
    • SWT
      • e.g Buttons, Trees, Lists, Tables
  • 36. Resources
      Source code http://www.aqris.com/x/SgC Recommended reading http://www.kriso.ee/Professional-Java-User-Interfaces/db/9780471486961.html Photo credits yushimoto_02 @flickr: http://www.flickr.com/photos/yushimoto_02/3419855883/sizes/l/