Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

What is best way to name jpg images in a web application?

 
Benjamin Weaver
Ranch Hand
Posts: 161
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

We are building a web application that will display metadata along with a jpg image. For performance reasons I have been advised to reference the jpg images by means of a path stored in a database column, rather than to store the image directly, as, say a BLOB, in the database. The jpg images would reside in a file directory outside the database.

Let's say each row of data will be associated with one jpg image. What is the best way of naming/referencing the associated jpg? by the unique id of the database row? It would be nice to give the jpg a name meaningful to the user, but the database id would be better, I would assume.

What do you all think?
 
Deepak Bala
Bartender
Posts: 6663
5
Firefox Browser Linux MyEclipse IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How about id_Name.jpg ?
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64851
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Will the name be user-facing? Most users could care less what the images are named.
 
Bear Bibeault
Author and ninkuma
Marshal
Pie
Posts: 64851
86
IntelliJ IDE Java jQuery Mac Mac OS X
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Also, are the image files going to be part of the wbe app (and therefore directly referencable via URL) or stored separately?
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic