Mac OS X
O/R Mapping

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

  1. Create a project named to EOFSample
    newproject.jpg

  2. Select ToolsObject Relational Mapping (ORM)Database Configuration... to configure database setting.
    selectdatabaseconfig.jpg

  3. Configure MySQL database.
    configdb.jpg

  4. Select ToolsObject Relational Mapping (ORM)Reverse database... to show Database to Model dialog
    selectreversedb.jpg

  5. Select Enterprise Object Framework of the Language field and then press Next >
    selectreversedbeoflang.jpg

  6. Check the database setting. If the setting is correct, press Next >
    selectreversedbdbconfig.jpg

  7. Select available tables that you want to reverse. And then press Finish to start reverse database
    selectreversedbtable.jpg

  8. The ER Diagram of the reversed database
    erdialog.jpg

  9. Use Mouse Gesture to generate Class Diagram from the reverse ER Diagram
    mousegesturegenclassdiagram.jpg

  10. The Class Diagram of the reversed database
    classdiagram.jpg

Generate EOModel

  1. Select ToolsObject Relational Mapping (ORM)Generate Code... to open Database Code Generation dialog
    selectgencode.jpg

  2. To generate Enterprise Object Framework, select Enterprise Object Framework of the Language field and press OK button to start generation of Enterprise Object Framework
    databasecodegen.jpg

  3. Here is the generated eomodel file.
    eomodelsamplefile.jpg

Generate Application Using Xcode

  1. Start Xcode
  2. New Project and select project type WebObjects > Direct to Web Application
    npselectwebobject.jpg

  3. Set your project name and location
  4. No need to deploy in a servlet container. And press Next
  5. No need to select any service support. And press Next
  6. Select JavaJDBCAdaptor.framework as EOAdaptor. And press Next
    npselectadaptor.jpg

  7. No need to add more Frameworks. And press Next
  8. Add the EOModel “EOModelSample.eomodeld” that generated from DB-VA. And press Next
    npselecteomodeld.jpg

  9. Select Neutral Look. And press Next
  10. Press Finish of the last step.
  11. After finish the new project steps, Xcode will start the WebObjects automatically.
    running.jpg

  12. 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.
    pagelogin.jpg

  13. The Find page
    pagefind.jpg

Downloads

Resources

 
 
Last modified: 2006/01/18 01:08
 
 
Home | Recent Topics | Highlights | UML Diagrams | Tips and Tricks | Object-Relational Mapping
visual-paradigm.com Home | Training Center | UML Center | VP Gallery | Discussion Forum | UML Open Directory