On 2009-10-28, at 7:42 PM, David Griffith wrote:

Hi all,

I am slowly getting to grips with Eclipse/WOLips but I am struggling to import some existing apps that I have which were built in XCode. My problem is this, and it's probably very simple, but I'd appreciate any help:

I have 3 apps that all use the same EOModel and associated java classes. Each app has it's own project and it's own folder which contains all the relevant parts of the app with the exception of the shared files (i.e. EOModel and associated java classes). These are stored in a separate folder and were being referenced by each of the app projects in XCode. Therefore I had one instance of those files which was modified while working on any of the three apps, the changes therefore applying to each app once it was rebuilt.

I realise that I should probably have made a framework for this instead but at the time I was still learning and didn't go down that route.

When I start a new project I create a business logic framework and an application. The bl framework contains the model and the generated EO classes and the app references it. I do this because every time I've created a monolithic app, I've ended up needing to refactor the model and business logic classes out into it's own framework at some point and I've just come to realize it is easier to start that way.

I don't have an answer as to whether you can reference a separate model in multiple apps, because I've never tried, and the thought gives me the willies.

What I need to know is, using Eclipse and WOLips, I obviously want to have the same solution. Do I have to create a framework to do this or can I do something similar with WOLips? If I have to create a framework, how should I go about it? Add the EOModel to the resources folder of the framework, add all the classes to a custom- named package within the framework and change the Class definitions in the EOModel to contain the full package name instead of just the class name?

Yes that is pretty much it. Since auto EO class generation is baked into WOLips, I would recommend you investigate letting that happen and just move the custom code that is different from the autogenerated stuff into the user modifiable subclasses.

Also, I've been looking at some of the online tutorials etc. but they seem to be based on older version of Eclipse and WOLips. To add frameworks (like Wonder etc.) to my own WO App or Framework, do I just drop them on Referenced Libraries?

No, use Project -> Properties -> Java Build Path ->Libraries -> Add Library -> WebObjects Frameworks

Oh, I see that Chuck posted links, I should have thought of that :-)

;david

--
David LeBer
Codeferous Software
'co-def-er-ous' adj. Literally 'code-bearing'
site:   http://codeferous.com
blog:   http://davidleber.net
profile:        http://www.linkedin.com/in/davidleber
twitter:        http://twitter.com/rebeld
--
Toronto Area Cocoa / WebObjects developers group:
http://tacow.org




_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list      ([email protected])
Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/webobjects-dev/archive%40mail-archive.com

This email sent to [email protected]

Reply via email to