enterprise object framework. what is eof? enterprise objects framework is a set of tools and...
TRANSCRIPT
What is EOF?What is EOF?
Enterprise Objects Framework is a set of tools Enterprise Objects Framework is a set of tools and resources that help you create applications and resources that help you create applications that work with the most popular relational that work with the most popular relational databases—or with your own custom data store. databases—or with your own custom data store. ……Enterprise Objects Framework lets you design Enterprise Objects Framework lets you design object-oriented object-oriented database applications that are database applications that are easy to build and maintain and that draw upon easy to build and maintain and that draw upon standard user interface features.standard user interface features.
[EOF Developer’s Guide.pdf][EOF Developer’s Guide.pdf]
Problems AddressedProblems Addressed
SQL + Object Oriented ParadigmSQL + Object Oriented Paradigm
ReusabilityReusability
MaintainabilityMaintainability
ScalabilityScalability
InteractivityInteractivity
PortabilityPortability
Transaction SupportTransaction Support
Business LogicBusiness Logic
Implementation in 4GLImplementation in 4GL Limited reuseLimited reuse Not maintainableNot maintainable Different implementationsDifferent implementations Poor data integrityPoor data integrity Doesn’t scale wellDoesn’t scale well
Implementation in DBImplementation in DB Limited interactivityLimited interactivity No back-end portabilityNo back-end portability SQL is a poor development languageSQL is a poor development language
..or Enterprise Object Framework..or Enterprise Object Framework
Provides:Provides: EncapsulationEncapsulation ReuseReuse A more natural model of the real world.A more natural model of the real world. Database-to-object mappingDatabase-to-object mapping Object-to-interface mappingObject-to-interface mapping
What is an Enterprise Object?What is an Enterprise Object?
Properties that map to stored or persistent Properties that map to stored or persistent data.data.
Knows how to interact with WebObjects to Knows how to interact with WebObjects to give and receive values for its properties.give and receive values for its properties.
Contains business logic for an application.Contains business logic for an application.
Provides an access layer for an Provides an access layer for an application that resides just above the application that resides just above the database.database.
From Database to ObjectFrom Database to Object
Correspondence Correspondence between database between database tables and tables and enterprise object enterprise object classes .classes .
Database rows Database rows map to instances map to instances of the appropriate of the appropriate class.class.
FlexibilityFlexibility
Objects can map to tables, subsets of Objects can map to tables, subsets of tables, or across tables.tables, or across tables.
Object properties can map to one column, Object properties can map to one column, or to a derived column.or to a derived column.
Object inheritance hierarchy can be Object inheritance hierarchy can be mapped to one or more database tables.mapped to one or more database tables.
to-one and to-many relations provided.to-one and to-many relations provided.
UniquingUniquing
Ensures that the mapping of each Ensures that the mapping of each enterprise object to row in a database enterprise object to row in a database table is one-to-one.table is one-to-one.
Limits memory usage.Limits memory usage.
Ensures data integrity.Ensures data integrity.
Relationships and FaultingRelationships and Faulting
Resolution of Resolution of relationships during relationships during fetchingfetching
Faults as stand-insFaults as stand-ins
Tuning relationship Tuning relationship resolutionresolution Pre-fetchingPre-fetching Batch faultingBatch faulting
From Objects to DatabaseFrom Objects to Database
ValidationValidationReferential integrity enforcementReferential integrity enforcement To-one: Mandatory vs. OptionalTo-one: Mandatory vs. Optional Delete: cascading vs. nullify vs. denyDelete: cascading vs. nullify vs. deny
Automatic primary and foreign key Automatic primary and foreign key generationgenerationTransaction managementTransaction managementLockingLocking Pessimistic, optimistic, on-demandPessimistic, optimistic, on-demand
From Objects to InterfaceFrom Objects to Interface
Changes made from the interface by the Changes made from the interface by the user are automatically synchronized with user are automatically synchronized with the enterprise objects.the enterprise objects.
Changes made to the enterprise objects Changes made to the enterprise objects automatically updates the user interface to automatically updates the user interface to reflect these changes.reflect these changes.
Ingredients for an EOF ApplicationIngredients for an EOF Application
A user interfaceA user interface
A modelA model
Enterprise ObjectsEnterprise Objects
EOF’s classes and interfacesEOF’s classes and interfaces
A database server and adapter.A database server and adapter.
Components involvedComponents involved
Access layer – Fetches rows from the Access layer – Fetches rows from the database and tranforms them into database and tranforms them into enterprise objects. Registers the enterprise objects. Registers the enterprise objects with the control layer.enterprise objects with the control layer.
Control layer – Manages the graph of Control layer – Manages the graph of enterprise objects in memory, tracking enterprise objects in memory, tracking changes made to them, and messaging changes made to them, and messaging the access layer to commit changes.the access layer to commit changes.
Components (Cont.)Components (Cont.)
Interface layer – Maps data between the Interface layer – Maps data between the control layer and the application’s user control layer and the application’s user interface as designed with an SDK (such interface as designed with an SDK (such as Java or AppKit from Apple).as Java or AppKit from Apple).
WebObjects – Combines the use of an WebObjects – Combines the use of an interface SDK and the interface layer to interface SDK and the interface layer to present the application with an HTML present the application with an HTML interface over the web.interface over the web.
Access LayerAccess Layer
Adapter layer – Classes that connect with Adapter layer – Classes that connect with specific databases.specific databases.
Database layer – Classes that create Database layer – Classes that create enterprise objects from the data source.enterprise objects from the data source.
Modeling classes – Supplies database Modeling classes – Supplies database login information and database to object login information and database to object mappings.mappings.
Control LayerControl Layer
EOObjectStoreCoordinator – manages EOObjectStoreCoordinator – manages interactions with the access layerinteractions with the access layer
EOEditingContext – manages graphs of EOEditingContext – manages graphs of enterprise objects and track changes enterprise objects and track changes made.made.
ReferencesReferences
[1][1]http://developer.apple.com/techpubs/webobjects/WebObjects_4.5/Shttp://developer.apple.com/techpubs/webobjects/WebObjects_4.5/System/Documentation/Developer/EnterpriseObjects/DevGuide/EOFystem/Documentation/Developer/EnterpriseObjects/DevGuide/EOFDevGuide.pdfDevGuide.pdf
[2]http://developer.apple.com/techpubs/webobjects/[2]http://developer.apple.com/techpubs/webobjects/WebObjects_4.5/System/Documentation/Developer/WebObjects_4.5/System/Documentation/Developer/EnterpriseObjects/EOTools/EOToolsAndTech.pdfEnterpriseObjects/EOTools/EOToolsAndTech.pdf
[3]http://developer.apple.com/techpubs/webobjects/[3]http://developer.apple.com/techpubs/webobjects/WebObjectsOverview/WebObjects_Overview.pdfWebObjectsOverview/WebObjects_Overview.pdf
[4]http://developer.apple.com/techpubs/webobjects/[4]http://developer.apple.com/techpubs/webobjects/DiscoveringWO/webobjectsforhtml.pdfDiscoveringWO/webobjectsforhtml.pdf
[5]http://developer.apple.com/techpubs/webobjects/[5]http://developer.apple.com/techpubs/webobjects/GettingStartedOnWindows/WOGettingStarted.pdfGettingStartedOnWindows/WOGettingStarted.pdf
All images presented from [1]All images presented from [1]