Re: Basic Question
Chuck Hill <[email protected]>
| Newsgroups | gmane.comp.web.webobjects.devel |
|---|---|
| Message-ID | <[email protected]> |
On Mar 23, 2006, at 5:05 AM, Kieran Kelleher wrote:
> Question (another basic one!) .... when you say the app serves the
> resource in "dev mode", do you mean in "direct connect mode"?
No. Development Mode is a special mode detected by the application
at runtime. IIRC, it is activated by finding the project files for
the application.
You will see something like this in the app log when you launch it
from Xcode:
[2006-03-24 15:28:28 PST] <main> Created adaptor of class
WODefaultAdaptor on port 5555 and address saskatoon.local/192.168.0.2
with WOWorkerThread minimum of 16 and maximum of 256
[2006-03-24 15:28:28 PST] <main> NSBundle is unable to find
"ExtensionsForResources.plist" in the main bundle. Ignoring optional
configuration file.
[2006-03-24 15:28:28 PST] <main> Application project found: Will
locate resources in '' rather than '/Volumes/Main/Projects/Apps/
AppName/Code/AppName/build/AppName.woa' .
[2006-03-24 15:28:29 PST] <main> *** The application has found the
following opened, development-mode Xcode projects:
(<com.webobjects.appserver._private.WOProjectBundle:
projectName='AppName'; bundlePath='/Volumes/Main/Projects/Apps/
AppName/Code/AppName/build/AppName.woa'; projectPath=''>)
Eclipse will give you this:
[2006-03-24 15:44:22 PST] <main> Cannot use rapid turnaround. Please
start Xcode and open the project for this application.
[2006-03-24 15:44:23 PST] <main> *** The application has found the
following opened, development-mode ProjectBuilderWO projects:
(<com.webobjects.appserver._private.WOProjectBundle:
projectName='GVCSiteMaker'; bundlePath='/Volumes/Main/Projects/
GVCSiteMaker/Code/GVCSiteMaker/GVCSiteMaker.woa'; projectPath='/
Volumes/Main/Projects/GVCSiteMaker/Code/GVCSiteMaker'>)
[2006-03-24 15:44:23 PST] <main> Application project found: Will
locate resources in '/Volumes/Main/Projects/GVCSiteMaker/Code/
GVCSiteMaker' rather than '/Volumes/Main/Projects/GVCSiteMaker/Code/
GVCSiteMaker/GVCSiteMaker.woa' .
This is controlled by:
[2006-03-24 15:33:26 PST] <main> NSProjectSearchPath=("..")
With perhaps some effect from:
[2006-03-24 15:33:26 PST] <main> WOMonitorEnabled=false
[2006-03-24 15:33:26 PST] <main> WOAllowRapidTurnaround=true
> So the question is if you are _developing_ in "deployment mode",
> aka -DWODirectConnectEnabled=false, then does Apache not serve the
> resource?
>
No, -DWODirectConnectEnabled=false does not make Apache serve these
resources.
Chuck
> Regards, Kieran
>
> On Mar 22, 2006, at 6:22 PM, Paul Lynch wrote:
>
>>
>> On 22 Mar 2006, at 23:10, Chuck Hill wrote:
>>
>>> Hi Paul,
>>>
>>> On Mar 22, 2006, at 2:56 PM, Paul Lynch wrote:
>>>> On 22 Mar 2006, at 22:45, Mark Morris wrote:
>>>>
>>>>> Images and the like can be kept in some static location, such
>>>>> as {document root}/images/, as is suggested below. However,
>>>>> they may also be kept in the "Web Server Resources" group
>>>>> within your project. Either way, the web server will be
>>>>> handling requests for the image, not the WebObjects
>>>>> application, so performance isn't really an issue.
>>>>
>>>> This isn't strictly true - Web Server Resources have to take an
>>>> extra trip through a WORequestHandler in order to work out where
>>>> they live when the page is generated, although the actual
>>>> serving of the resource is handled by the web server. So there
>>>> is some overhead associated with using Web Server Resources,
>>>> although it isn't as much as some people may think. With a
>>>> heavy load in mind, I would try to minimise their use; but for
>>>> most real world WO apps, I personally don't feel a compelling
>>>> argument against their use.
>>>>
>>> Are you sure about that. Isn't it just another call to
>>> WOResourceManager.urlForResourceNamed and not a trip through a
>>> WORequestHandler? Yes, it is still overhead. Also, IIRC, the
>>> app _does_ serve the image in development mode. That may be
>>> confusing the issue. It is perhaps an argument in favour of not
>>> using Web Server Resources as it creates a difference between
>>> development and deployment.
>>
>> Of course you are right - I have been confusing the issue by using
>> WOResourceManager and WORequestHandler interchangably, which they
>> are not.
>>
>> And yes, the app serves the resource in dev mode - which I would
>> claim as yet another good reason not to use dev mode, rather than
>> a reason not to use Web Server Resources. It may be that older
>> versions of WO served resources themselves in deployment as well -
>> I have vague recollections of being shocked when I discovered
>> this, and quickly banned the use of Web Server Resources, but that
>> was a long time and several versions ago.
>>
>> Paul
>> _______________________________________________
>> 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/kieran_lists%
>> 40mac.com
>>
>> This email sent to [email protected]
>>
>
--
Coming in 2006 - an introduction to web applications using WebObjects
and Xcode http://www.global-village.net/wointro
Practical WebObjects - for developers who want to increase their
overall knowledge of WebObjects or who are trying to solve specific
problems. http://www.global-village.net/products/practical_webobjects