1 / 37

A Framework for Web and WinForms (Client-Server) Applications

A framework that simplifies and accelerates the development of Web and WinForms applications with database access and business process integration.

bridgetk
Télécharger la présentation

A Framework for Web and WinForms (Client-Server) Applications

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. A Framework for Web and WinForms (Client-Server) Applications • “Enterprise Software Architecture”

  2. Outline • Short introductions • Start with a demo (Web and WinForms) • Background and technical details • Code walkthrough • Building an application • Topics in depth

  3. Demo 1 Sample Application

  4. The goal is • Provide a framework of reusable software components to simplify, speedup, reduce the cost, and assist in the creation of Web and WinForms applications which access databases and follow a business process

  5. Technical Summary • Framework processes client requests (Web or Windows GUI), handles business logic, accesses database, and generates output (GUI, XML or XHTML) – full cycle • Encapsulates all database access as well as display and form handling • A generic solution for writing applications, but with a powerful extensibility model!

  6. Technical Details • Reusable layered .NET objects • Our own design and architecture for a Web and WinForms business applications. • Not using bound controls or web form controls • Object oriented • Data access encapsulation • Back-end independent approach for common database providers • Automatic SQL generation for searches and CRUD (all form handling) • Abstracted, key-based, optimistic-locking.

  7. Technical Details • Metadata driven definition of forms, searches and security • Reusability • Flexible solutions • XML Based • Code generation vs. Runtime driven • One body of code • No orphan code • No regens

  8. Technical Details • Stateless approach for both vertical and horizontal scalability of Web Apps • No object or object state maintained in memory between requests – all gets persisted • Objects created when needed • Generic objects restore state quickly from metadata, http request, and database • Objects can reside in “MTS” i.e. “Serviced Component” in .NET (“application server”)

  9. Technical Details • Multi-layer security and role-based logic • Application logic security is used to authenticate and authorize user access to application and data • login via Oracle, SqlServer, CustomDB, LDAP, Windows, Passport, Certificate, etc. • Framework metadata-driven role-based security • Native support for SSL

  10. Technical Details • Layered Application Architecture • Core framework data components • Core framework utility components • Application extensibility components • Platform or presentation specific layer (Web, WinForms, Web Service, etc.) • Each encapsulate core framework

  11. Web/client to Server WinForms Browser WAF Object WAF Object Client IIS .NET ASPX pages WAF Object Server WAF Object WAF Object WAF Object Database Database

  12. Demo 2 Behind the sample application.. (Database, metadata, security..)

  13. Framework Objects • Two general business application activities: • Searching for and listing record sets as well as selecting records to navigate or ‘open’ them (DBFind) • Opening a single record, showing a form, to create new, update, or delete (DBRecord).

  14. Framework Objects • DBFind • Searching for data to: • View (decision support) • Select as option (work flow, navigation) • Select to modify (transactions) • Invoking actions on found records

  15. Framework Objects • DBRecord • CRUD (Create, Read, Update, and Delete) • Validation of data entry • Applying business rules • Transactions • Single record or set handling • Linked records and foreign keys • Edit Form • Result Set Table display

  16. Framework Objects • Metastore • Holds Metadata for runtime data driven approach • XML DOM as a global singleton object • Holds all table definitions • Fields for each table • Search definitions for each table • Edit form definitions for each table • Security on most items • System and Application Strings • Multi language support on all items

  17. Framework Objects • Additional activities for most business applications • User Profile • Session Control • String dictionary • Request Object • URL builder • Instrumentation (trace, audit, profile, etc.)

  18. Demo 3 Framework project walkthrough

  19. Runtime Browser Client IIS .NET Metastore ASPX pages Server DBFind DBRecord Database Database

  20. Metastore XML DOM XML XML Metadata User interface and navigation XPATH, DOM API Tables DBFind or DBRecord HTML Fields Forms Basic HTML Searches Java Script Searches SQL Forms Database XML to HTML

  21. Framework Object Life Cycle Create The object XML Restore all needed state SQL HTML Process Input Perform the work Compose output HTML Persist state SQL Destroy Object

  22. Code Example DimRecordAsWAFdbComponents.DBRecord  'Create a DBRecord object Record = New WAFdbComponents.DBRecord() 'Build the object from metadata IfRecord.Build("Company", "EditForm", MainMetaStore, Profile)Then 'Identify and read the record from the database Record.PrimaryKeyValue = sPKey If Record.ReadRecordThen 'Output HTML-form populated with the fetched data Response.Write Record.EditFormHTML End If End If

  23. Demo 4 Code walkthrough (DBFind, DBRecord)

  24. Framework Extensions • Business Rules objects • Search Rules objects • Field validation objects • Authentication object • Property retriever • Function overrides

  25. Runtime Browser Client IIS Metastore DBRecord ASPX pages Server IBusinessRules Database Database

  26. Framework Object Life Cycle Create The object XML Restore all needed state SQL HTML Process Input Delegate toBusiness Rules Perform the work Delegate toBusiness Rules Compose output HTML Persist state SQL Destroy Object

  27. Business Rules objects • Objects implementing the IBusinessRules interface • Assigned to a DBRecord object (in metadata) • Runtime framework delegation CanRead(..) IsValid(..) CanCreate(..) ReadComplete(..) CanEdit(..) WriteComplete(..) CanWrite(..) DeleteComplete(..) CanDelete(..) CanDisplay(..) WriteAllComplete(..)

  28. Search Rules objects • Objects implementing the ISearchRules interface • Assigned to a DBFind object (in metadata) • Runtime framework delegation CanDisplaySearch(..) CanExecute (..)

  29. Field validation objects • Objects implementing the IFieldValidation interface • Assigned to a Field object • Runtime framework delegation IsValid(..)

  30. Demo 5 Business rule code walkthrough

  31. Web Framework • ASP.NET layer • Pages derived from - System.Web.UI.Page • Encapsulates dbComponents work • Handles HTTP requests • Orchestrates HTML response

  32. html Browser http request (state, action-verb) webComponents ASP.NET dbComponents System.Web.UI.Page DBFind WafControllerPage DBRecord WafFormPage WafForm (Application derived form) Profile Session Metastore Database

  33. Demo 6 Web framework walkthrough Building an Application!

  34. WinForms (Client/Server) • WinForms.NET layer • MDI Application Class • Forms derived from – System.Windows.Forms.Form • Encapsulation of dbComponents • UI driven (no UI generation)

  35. Main Application window File Edit Tools User guiComponents dbComponents WinForms.NET DBFind Metastore FormDbFind Inherits System.Windows.Forms.Form DBRecord MyForm Inherits FormDbRecord Inherits System.Windows.Forms.Form Profile Database

  36. Demo 7 WinForms framework walkthrough

  37. Topics in depth • UI generation - XML and HTML pages (using customizable XSLTs if desired), • SQL generation • Back-end independent • Generic exception handling • Business rule extensibility • Profile • Session • ...

More Related