EnticyGROUP
THE
A Framework for Web and A Framework for Web and WinForms (Client-Server) WinForms (Client-Server)
ApplicationsApplications
““Enterprise Enterprise Software Architecture”Software Architecture”
EnticyGROUP
THE
OutlineOutline
Short introductionsStart with a demo (Web and WinForms)Background and technical detailsCode walkthrough Building an applicationTopics in depth
EnticyGROUP
THE
Demo 1Demo 1Sample Application
EnticyGROUP
THE
The goal isThe 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
EnticyGROUP
THE
Technical SummaryTechnical 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!
EnticyGROUP
THE
Technical DetailsTechnical 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.
EnticyGROUP
THE
Technical DetailsTechnical 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
EnticyGROUP
THE
Technical DetailsTechnical 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”)
EnticyGROUP
THE
Technical DetailsTechnical 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
EnticyGROUP
THE
Technical DetailsTechnical 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
EnticyGROUP
THE
Web/client to ServerWeb/client to Server
DatabaseDatabase
IIS
BrowserBrowser
.NET
WAF ObjectWAF ObjectASPX ASPX pagespages
WAF ObjectWAF ObjectWAF ObjectWAF Object
WAF ObjectWAF Object
Cl ie
ntD
atab
ase
Ser
ver
WinFormsWinFormsWAF ObjectWAF Object
WAF ObjectWAF Object
EnticyGROUP
THE
Demo 2Demo 2Behind the sample application..
(Database, metadata, security..)
EnticyGROUP
THE
Framework ObjectsFramework Objects
Two general business application activities:
1. Searching for and listing record sets as well as selecting records to navigate or ‘open’ them (DBFind)
2. Opening a single record, showing a form, to create new, update, or delete (DBRecord).
EnticyGROUP
THE
Framework ObjectsFramework Objects
DBFind– Searching for data to:
View (decision support) Select as option (work flow, navigation) Select to modify (transactions)
– Invoking actions on found records
EnticyGROUP
THE
Framework ObjectsFramework 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
EnticyGROUP
THE
Framework ObjectsFramework 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
EnticyGROUP
THE
Framework ObjectsFramework Objects
Additional activities for most business applications– User Profile– Session Control– String dictionary– Request Object– URL builder– Instrumentation (trace, audit, profile, etc.)
EnticyGROUP
THE
Demo 3Demo 3Framework project walkthrough
EnticyGROUP
THE
RuntimeRuntime
Cl ie
ntD
atab
ase
DatabaseDatabase
Ser
ver
IIS
Browser
DBFindDBFind
DBRecordDBRecord
MetastoreMetastore
ASPX ASPX pagespages
.NET
EnticyGROUP
THE
XML to HTMLXML to HTML
XMLXMLMetadataMetadata
MetastoreMetastoreXML DOMXML DOM
User User interface and interface and navigationnavigation
BasicHTMLBasicHTML
Java ScriptJava Script
FormsForms
FieldsFields
TablesTables
SearchesSearches
FormsForms
SearchesSearches
DBFind or DBFind or DBRecordDBRecord
XML
HTML
SQL
XPATH, DOM API
DatabaseDatabase
EnticyGROUP
THE
Framework Object Life CycleFramework Object Life Cycle
CreateThe object
XML
HTML
SQL Restore all needed state
Persiststate
DestroyObject
Perform the work
ProcessInput
Compose output
HTML
SQL
EnticyGROUP
THE
Code Code ExampleExample
Dim Record As WAFdbComponents.DBRecord
'Create a DBRecord objectRecord = New WAFdbComponents.DBRecord()
'Build the object from metadataIf Record.Build("Company", "EditForm", MainMetaStore, Profile) Then 'Identify and read the record from the database Record.PrimaryKeyValue = sPKey If Record.ReadRecord Then 'Output HTML-form populated with the fetched data Response.Write Record.EditFormHTML End IfEnd If
EnticyGROUP
THE
Demo 4Demo 4Code walkthrough (DBFind, DBRecord)
EnticyGROUP
THE
Framework ExtensionsFramework Extensions
Business Rules objectsSearch Rules objectsField validation objectsAuthentication objectProperty retrieverFunction overrides
EnticyGROUP
THE
RuntimeRuntime
Cl ie
ntD
atab
ase
DatabaseDatabase
Ser
ver
IIS
Browser
DBRecordDBRecord
IBusinessRulesIBusinessRules
MetastoreMetastore
ASPX ASPX pagespages
EnticyGROUP
THE
Framework Object Life CycleFramework Object Life Cycle
CreateThe object
XML
HTML
SQL Restore all needed state
Persiststate
DestroyObject
Perform the work
ProcessInput
Delegate toBusiness Rules
HTML
SQL
Delegate toBusiness Rules
Compose output
EnticyGROUP
THE
Business Rules objectsBusiness 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(..)
EnticyGROUP
THE
Search Rules objectsSearch Rules objects
Objects implementing the ISearchRules interface
Assigned to a DBFind object (in metadata)
Runtime framework delegation CanDisplaySearch(..)
CanExecute (..)
EnticyGROUP
THE
Field validation objectsField validation objects
Objects implementing the IFieldValidation interface
Assigned to a Field objectRuntime framework delegation
IsValid(..)
EnticyGROUP
THE
Demo 5Demo 5Business rule code walkthrough
EnticyGROUP
THE
Web FrameworkWeb Framework
ASP.NET layerPages derived from -
System.Web.UI.PageEncapsulates dbComponents workHandles HTTP requestsOrchestrates HTML response
EnticyGROUP
THE
DatabaseDatabase
Browser
DBFindDBFind
DBRecordDBRecord
MetastoreMetastore
System.Web.UI.PageSystem.Web.UI.Page
ASP.NET
ProfileProfile
SessionSession
webComponents
dbComponents
WafControllerPageWafControllerPage
WafFormPageWafFormPage
WafFormWafForm(Application derived form)(Application derived form)
html
http request (state, action-verb)
EnticyGROUP
THE
Demo 6Demo 6Web framework walkthrough
Building an Application!
EnticyGROUP
THE
WinForms (Client/Server)WinForms (Client/Server)
WinForms.NET layerMDI Application ClassForms derived from –
System.Windows.Forms.FormEncapsulation of dbComponentsUI driven (no UI generation)
EnticyGROUP
THE
DatabaseDatabase
User
DBFindDBFind
DBRecordDBRecord
MetastoreMetastore
WinForms.NET
ProfileProfile
guiComponents dbComponents
Main Application window
File Edit Tools
FormDbFindFormDbFindInherits Inherits System.Windows.ForSystem.Windows.Forms.Formms.Form MyFormMyForm
Inherits Inherits FormDbRecordFormDbRecord Inherits Inherits System.Windows.System.Windows.Forms.FormForms.Form
EnticyGROUP
THE
Demo 7Demo 7WinForms framework walkthrough
EnticyGROUP
THE
Topics in depthTopics 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 ...