• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Including Pre-existing Assets (was Re: Basic Question)
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Including Pre-existing Assets (was Re: Basic Question)


  • Subject: Including Pre-existing Assets (was Re: Basic Question)
  • From: Jeffrey Pearson <email@hidden>
  • Date: Wed, 22 Mar 2006 15:23:46 -0800

I learn best running through samples that apply what was said:

Case 1: If I have a static image (ie a company logo) that is shared across multiple applications, my best bet is to simply refer to an existing storage location such as a company web site and use the HTML img tag.

Case 2: If I have a static image (ie an Application Specific Logo), I can a) store it in a web server location, use an HTML img tag and refer to it if I want the web server (ie Apache HTTP Server) to serve it or b) add it to the project in the application server target and use the WOImage tag if I want the app server (ie Webobjects or Tomcat) to serve it up (understanding a slight performance penalty is applied).

Case 3: If I have an image that changes dynamically, add images to the project as in b above and use the WOImage tag.

Can I use a WOImage tag and refer to a static location(ie http:// www.someserver.com/images/someimage.jpg) and then modify the url(ie http://www.someserver.com/images/someimage2.jpg) through my code?





On Mar 22, 2006, at 3:10 PM, 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.


Chuck

--
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




_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
email@hidden


This email sent to email@hidden

_______________________________________________ Do not post admin requests to the list. They will be ignored. Webobjects-dev mailing list (email@hidden) Help/Unsubscribe/Update your Subscription: This email sent to email@hidden
  • Follow-Ups:
    • Re: Including Pre-existing Assets (was Re: Basic Question)
      • From: Paul Lynch <email@hidden>
References: 
 >Re: Basic Question (From: Jean Pierre Malrieu <email@hidden>)
 >Re: Basic Question (From: Jeffrey Pearson <email@hidden>)
 >Re: Basic Question (From: Andrew Satori <email@hidden>)
 >Re: Basic Question (From: Mark Morris <email@hidden>)
 >Re: Basic Question (From: Paul Lynch <email@hidden>)
 >Re: Basic Question (From: Chuck Hill <email@hidden>)

  • Prev by Date: Re: Basic Question
  • Next by Date: Re: Including Pre-existing Assets (was Re: Basic Question)
  • Previous by thread: Re: Basic Question
  • Next by thread: Re: Including Pre-existing Assets (was Re: Basic Question)
  • Index(es):
    • Date
    • Thread