Apple Developer Connection
Member Login Log In | Not a Member? Contact ADC

< Previous PageNext Page > Hide TOC

Building a Reusable Framework

Well-designed enterprise objects are reusable. That is, if you do not use SQL, access layer classes (besides EOUtilities), or WebObjects classes (com.webobjects.appserver) in enterprise object classes, your enterprise objects will be reusable.

The best way for multiple applications to share the same business logic is to build a framework. This framework holds custom Java classes generated by EOModeler and .eomodeld files. By using a framework, changes to enterprise object classes in that framework and to the model are picked up by all applications that use the framework.

To build a framework, make a new project of type WebObjects Framework (see the document Project Builder for WebObjects Developers for more information on project types). Then, add business logic classes and other resources to it.

The only tricky part is assigning classes and resources to the correct targets. Model files and server-side business logic classes should be assigned to the Application Server target, while client-side business logic classes should be assigned to the Web Server target. If you’re not building a three-tier desktop application, you’ll only have server-side business logic classes. See the document Project Builder for WebObjects Developers for more information on targets in WebObjects projects.



< Previous PageNext Page > Hide TOC


Last updated: 2007-07-11




Did this document help you?
Yes: Tell us what works for you.

It’s good, but: Report typos, inaccuracies, and so forth.

It wasn’t helpful: Tell us what would have helped.
Get information on Apple products.
Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Copyright © 2007 Apple Inc.
All rights reserved. | Terms of use | Privacy Notice