• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • Liutauras Vilda
  • Jeanne Boyarsky
  • paul wheaton
Sheriffs:
  • Ron McLeod
  • Devaka Cooray
  • Henry Wong
Saloon Keepers:
  • Tim Holloway
  • Stephan van Hulst
  • Carey Brown
  • Tim Moores
  • Mikalai Zaikin
Bartenders:
  • Frits Walraven

Should I deploy all my images?

 
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Everyone,

I hope this is the right forum. I am a new(er) Java Web developer and have developed a web application for work. A new requirement of our application is to have pictures displayed of all of our parts (in the web application). There are approximately 100 mb of small images. My question is:

Should I put all of these images in my deployment and make the ear file 105 mb's? How else would I go about doing this? Is this standard practice or is there another way/place to store the images to keep them out of the deployment.

Any good information would be appreciated.

Thanks again for all your help.

Cheers,

Cory
 
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You should always have all components of you web application in your deployment file – this is the general practice.

But how come the size of images is 100 MB? What is the type of images? What is the size of deployment file with and without images?
 
Java Cowboy
Posts: 16084
88
Android Scala IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You do not want to hard-code all the images in your application. What happens if your company starts selling a new part, or if an image of an existing parts needs to be updated? You don't want to modify, build and re-deploy your EAR file everytime that happens.

You can put them anywhere in the file system and make a servlet that can serve the images (the servlet would read them from the directory where you put them), or you could even put the images in a database and make a servlet that retrieves them from there. I guess you already have a database that contains all the information about the parts you're selling?
[ October 13, 2005: Message edited by: Jesper de Jong ]
 
Chetan Parekh
Ranch Hand
Posts: 3640
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Jesper de Jong:
You do not want to hard-code all the images in your application. What happens if your company starts selling a new part, or if an image of an existing parts needs to be updated? You don't want to modify, build and re-deploy your EAR file everytime that happens.

You can put them anywhere in the file system and make a servlet that can serve the images (the servlet would read them from the directory where you put them), or you could even put the images in a database and make a servlet that retrieves them from there. I guess you already have a database that contains all the information about the parts you're selling?

[ October 13, 2005: Message edited by: Jesper de Jong ]


Jesper de Jong

You have shown me new way of thinking.
[ October 13, 2005: Message edited by: Chetan Parekh ]
 
Cory Max
Ranch Hand
Posts: 83
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks to both of you.

In reply to Chetan Parekh's question:

"But how come the size of images is 100 MB? What is the type of images? What is the size of deployment file with and without images?"
- We have 1000 pictures of parts, all jpegs of about 100k each. Deploymen ear currently is 3.5 MB's.

In reploy to Jesper de Jong's reply:

Thanks so much. This totally makes sense and I appreciate the response. Any sample code would be appreciated (if you have some kicking around), but I think I could probably get it working on my own.

Cheers to both of you!

- Cory Max
 
Well behaved women rarely make history - Eleanor Roosevelt. tiny ad:
Gift giving made easy with the permaculture playing cards
https://coderanch.com/t/777758/Gift-giving-easy-permaculture-playing
reply
    Bookmark Topic Watch Topic
  • New Topic