Changes for page Development-Frameworks

Last modified by Pascal Robert on 2010/09/13 00:35

From version 3.1
edited by Quinton Dolan
on 2007/07/12 20:17
Change comment: There is no comment for this version
To version 6.1
edited by Pascal Robert
on 2010/09/13 00:35
Change comment: There is no comment for this version

Summary

Details

Page properties
Title
... ... @@ -1,1 +1,1 @@
1 -Programming__WebObjects-Web Applications-Development-Frameworks
1 +Development-Frameworks
Author
... ... @@ -1,1 +1,1 @@
1 -XWiki.qdolan
1 +XWiki.probert
Content
... ... @@ -1,16 +1,16 @@
1 -== Overview ==
1 +== Overview ==
2 2  
3 -A Framework is Apple's mechanism for packaging and distributing shared functionality. Frameworks can contain not only code, but also Resources and Web Server Resources much like a full-blown WOA.
3 +A Framework is Apple's mechanism for packaging and distributing shared functionality. Frameworks can contain not only code, but also Resources and Web Server Resources much like a full-blown WOA.
4 4  
5 5  **Images deployed in a Framework**
6 6  
7 7  If a framework contains images, accessed from your main application, you must remember to change the framework binding in some of your WOComponents. The failure to do so will become evident in development. The default is "app", but you must change it to the name of your framework. When it comes time to deploy, you application frameworks must be included on the deployment machine. Images do not seem to display properly if you only put your frameworks in this location: /Library/Frameworks. You'll also want to put your webserver resources from your framework in the /WebServer/Documents/WebObjects/Frameworks folder. I just included the whole .framework folder in that directory and the images were served from the webserver properly. All the above paths are for MacOS X.
8 8  
9 -== Framework Initialization ==
9 +== Framework Initialization ==
10 10  
11 11  //I have a framework that I would like to do some explicit initialization on. Something akin to doing a class static initializer in Java. Where is the proper place to place such code? Or can I just use a class static initializer?//
12 12  
13 -=== Gary Teter ===
13 +=== Gary Teter ===
14 14  
15 15  Add a text file called CustomInfo.plist to your framework's resources. Add this text to the file:
16 16  
... ... @@ -25,9 +25,9 @@
25 25  Create a java file, MyFrameworkInitializer.java and initialize any classes in your framework in a static block in this class. Of course you can call the class whatever you want, just make sure you put the full class name, package and all in the .plist file.
26 26  
27 27  This is a hangover from NeXT days and may stop working if frameworks ever go away and WO switches to NORMAL java deployment. Basically the framework loader will reference every class declared as NSPrincipalClass? in this way. The neat part is your framework get's
28 -initialized w/o having to remember to do it yourself in th app constructor.
28 + initialized w/o having to remember to do it yourself in th app constructor.
29 29  
30 -=== Arturo Pérez ===
30 +=== Arturo Pérez ===
31 31  
32 32  I could not get things to work as described above. The problems:
33 33  
... ... @@ -37,8 +37,6 @@
37 37  
38 38  HTH the next intrepid developer. BTW, the Xcode documentation for this is only tangentially useful to a WO developer. The panels described don't actually exist when you're doing a WO framework. The information described in terms of the necessary entries helps, though.
39 39  
40 -=== King Chung Huang ===
40 +=== King Chung Huang ===
41 41  
42 -Tip: I often have my Framework initializers create a worker object to listen for ApplicationWillLaunchNotification or ApplicationDidLaunchNotification. if I need to do initialization just before or after the WOApplication instance is constructed.
43 -
44 -Category:WebObjects
42 +Tip: I often have my Framework initializers create a worker object to listen for ApplicationWillLaunchNotification or ApplicationDidLaunchNotification. if I need to do initialization just before or after the WOApplication instance is constructed.