The document introduces the Vara Framework, which provides a consistent workflow for handling create, read, update, and delete (CRUD) operations across Flex applications. It addresses common challenges like handling data loading, validation, and saving across different types of applications and screens. The framework standardizes workflows through actions like load, unload, save, and provides base classes that developers can extend to handle views and data resources specific to their application. It aims to simplify development and maintenance of enterprise Rich Internet Applications.
4. About Mike Merchant 12+ Years in Software Development 10 Years between KP and SCE Developed or managed on 50+ projects Experience in Flex, Java, .NET and others Founder and President of MCW Software, an RIA consulting firm in Lake Forest, CA
5. Introduction “What is this Vara Framework?” User workflow framework for Flex New architecture? New use of patterns? Based on concepts I’ve been thinking about and working on for most of my software development career Developed version for VB 6.0 around 2000 Developed first Adobe Flex version last year Used and maintained by MCW Software
6. Introduction “How come I’ve never heard of it?” This is the first time we have presented it publicly (11/5/2009) “Why should I care?” Vara makes building large-scale, enterprise RIAs simpler, faster, easier to maintain, and more consistent.
7. Observations We are going to talk about CRUD (a.k.a. Create, Read, Update, Delete) Applications handle CRUD similarly Forms should handle CRUD consistently Applications tend to repeat this logic for each and every screen Logic is very difficult to abstract
8. Observations Views have arbitrary complexity Resources have arbitrary complexity Mapping is usually not simple Simple binding does not solve this MVC does not go far enough
9. Observations Any widely used frameworks that concretely handle CRUD operations??? Desire for frameworks is NOT to dumb down or eliminate the developer. Desire for frameworks comes from being pragmatic and the need to efficiently build applications that are easily maintainable and flexible.
10. Scenario #1: SDI Application Assume we are building an application that shows one employee form at a time (i.e. single-document interface - SDI) Open an employee record from a list Make some changes Open another employee record from list What actions need to take place?
11. Scenario #1: SDI Application Load new record…but wait… Clear existing record…but wait... Save existing record…but wait… Has existing record changed? Should the user be prompted to save changes? How did user respond to the prompt? Yes? No? Cancel? Is the data valid?
12. Scenario #1: SDI Application Save existing record How to extract data to save from view? Where to send that data? Remote Object? Web Service? Was save successful? What to do after save? Update record in list?
13. Scenario #1: SDI Application Clear existing record How do we reset the form? Do we need to clear the resource? Load new record Where do we load from? How to populate the data onto the view? What to do after load?
14. Scenario #2: MDI Application Assume we are building an application that uses multiple employee form at a time (i.e. multiple-document interface - MDI) Open an employee record from list Make some changes Close the form
15. Scenario #2: MDI Application Close form… but wait… Clear form… but wait... Save existing record…but wait… Has existing record changed? Should the user be prompted to save changes? How did user respond to the prompt? Yes? No? Cancel? Is the data valid? Save record How to extract data to save from view? Where to send that data? Remote Object? Web Service? Was save successful? What to do after save? Update record in list? Clear record How do we reset the form? Do we need to clear the resource? Close form
16. Scenario #3: PITA Application Write an application that has 100 data entry forms of arbitrary complexity (trees, tabs, data grids, file uploads, custom components, etc.) Handle the loading, saving, closing, deleting, prompting, and validation consistently throughout the application
17. Scenario #3: PITA Application 3 months into PITA project…. PITA Boss read usability study about benefits of single-document interfaces (SDI) He wants you to convert those screens from MDI to SDI He also wants prompting to occur only if the user has actually changed the record Due to budget constraints, the timeline needs to be reduced
18. Core Ideas of Vara Developer should be able to handle… Design and development of views Selection and development of resources View/Model interaction Resource/Model interaction User prompting
19. Core Ideas of Vara Actions always occur in a certain order Top-level action can start other actions Workflow can orchestrate these actions Common workflow can be provided Interact with developer’s code in order to manage the views and resources
20. Flex Application Flex MVC Architectures Layers User Interface Network Services Middleware Business Logic Data Access Database Database
21. Flex Application Resource Flex MVC Architectures Layers User Interface Services Business Logic Data Access Database
22. Flex MVC Architectures Layers User Interface View Model Controller Resource What about the resource? Services Business Logic Data Access Database
24. Vara Architecture Created by Developer Provided by Framework View Actions View Adapter Implementation Workflow View Adapter Initialize Load Clear Model Save Resource Adapter Implementation Resource Adapter Unload Close Resource
26. Steps to Implement Vara Step 1: Include Vara.swc in Flex project Step 2: Create View Adapter class Step 3: Create Resource Adapter class Step 4: Declare BasicWorkflowImpl Step 5: Add calls to xxxxAction.start() Step 6: Override adapters as needed
34. Benefits Consistent handling of user workflow across an application Makes applications easier to maintain Speeds up coding by reducing duplication Increases flexibility and agility in responding to customers demands
44. Next Steps Download the SWC:https://sourceforge.net/projects/vara/files/Downloads/Vara.swc/download Download the source (SVN):https://sourceforge.net/projects/vara/develop Join the discussion:https://sourceforge.net/projects/vara/forums/forum/1032315