Model WebObjects Object and Data Model with DB Visual ARCHITECT
Enterprise Object Framework (EOF) is a set of tools and resources that map relationship database to object model. And Enterprise Object Modeler (EOModeler) is a powerful graphical tool for reverse-engineer existing databases or to design schemas of a new database. In order to support Mac user deeply, Visual Paradigm makes DB Visual ARCHITECT (DB-VA) to support EOF now! You can use DB-VA to reverse and generate EOF. DB-VA provides a better graphical user interface and wider database schema support. This is the way to extend your database or EOF faster, better and cheaper. In this article, you will learn how to model object and data model from database and generate an EOF project. Finally, the generated EOF project will be used to build WebObjects web application.
Reverse Database to Diagrams
Create a project named to
EOFSample
Select
Tools →
Object Relational Mapping (ORM) →
Database Configuration... to configure database setting.
Configure MySQL database.
Select
Tools →
Object Relational Mapping (ORM) →
Reverse database... to show
Database to Model dialog
Select
Enterprise Object Framework of the
Language field and then press
Next >
Check the database setting. If the setting is correct, press
Next >
Select available tables that you want to reverse. And then press
Finish to start reverse database
The ER Diagram of the reversed database
Use Mouse Gesture to generate Class Diagram from the reverse ER Diagram
The Class Diagram of the reversed database
Generate EOModel
Select
Tools →
Object Relational Mapping (ORM) →
Generate Code... to open
Database Code Generation dialog
To generate
Enterprise Object Framework, select
Enterprise Object Framework of the
Language field and press
OK button to start generation of
Enterprise Object Framework
Here is the generated eomodel file.
Generate Application Using Xcode
Start Xcode
New Project and select project type
WebObjects >
Direct to Web Application
Set your project name and location
No need to deploy in a servlet container. And press Next
No need to select any service support. And press Next
Select
JavaJDBCAdaptor.framework as EOAdaptor. And press
Next
No need to add more Frameworks. And press Next
Add the EOModel “EOModelSample.eomodeld” that generated from
DB-VA. And press
Next
Select Neutral Look. And press Next
Press Finish of the last step.
After finish the new project steps, Xcode will start the WebObjects automatically.
The browser will be open the web page automatically. If the browser cannot open the webpage, change the server name to
localhost. There is the login page of the new WebObject.
The Find page
Downloads
Resources