Best practices question

R

Rhino

I would be interested in hearing from some of the very experienced gurus on
this newsgroup about an issue that concerns me.

I am currently writing a Java application that accesses a variety of GIF,
JPG, PNG, and audio files. The graphic files are used mostly for icons and
the audio files are used to provide sounds or music.

I'd like to know the 'best practice' with regards to organizing these
multimedia files. Basically, should these files be stored in the file system
or in jars or be in their own packages beneath my bin directory?

I should add that I am not just accessing these files during the life of the
program; I am providing a dialog that takes advantage of the Preference
classes to enable users to choose their preferred graphics or audio files. I
also want to allow the users to add their own graphic and audio files to the
directory or jar or package that houses these multimedia files. Therefore,
if they don't like any of the audio files that I provide with the program, I
want them to be able to add their own audio files (as long as they are a
format the program supports). I'm not sure though which is the best place to
put these files: a regular directory in the file system; a jar; or a package
accessible by the program?

I should also mention that I am considering making a stripped down version
of my program available online as an applet so that people can see what it
does. I don't want to provide all of the bells and whistles in the applet
version so that people still have some incentive to buy the application but
I want to give them a sense of what it does and then tell them what extra
features the application version has. For example, the applet version might
only let them choose between two audio files and not let them add their own
file but the application version should let them choose between however many
audio files I ship PLUS add as many of their own files as they like.

Since I have an applet version in mind, I was thinking about putting
everything into jars with maybe a separate jar for all of the multimedia
files. But I would have to rework my code somewhat to enable users to add
files to a jar if that's where the multimedia files lived. That makes me
wonder if it isn't better to put the files in a directory or a package.

Before I try to work out all the implications of each approach, I'd be
curious to hear what the experts are doing with respect to the organization
of files used by a program that aren't application code.

--
Rhino
---
rhino1 AT sympatico DOT ca
"There are two ways of constructing a software design. One way is to make it
so simple that there are obviously no deficiencies. And the other way is to
make it so complicated that there are no obvious deficiencies." - C.A.R.
Hoare
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,772
Messages
2,569,593
Members
45,111
Latest member
KetoBurn
Top