photo album

Do you have a question? Post it now! No Registration Necessary.  Now with pictures!

Threaded View
I wish to try to  write my own photo album as a learning excercise.  I
assume that this would be partially writen server side and with some
Javascript.  There must be languages and methods that one can use.

Any suggestions for an absolute beginner?

Re: photo album

On Thu, 19 Nov 2009 19:21:10 -0800 (PST), Helpful person wrote:

Quoted text here. Click to load it


Re: photo album

richard wrote:

Quoted text here. Click to load it


After seeing your other post in 24hshd this morning, of *your* PHP site: /
I don't think you should be promoting it.

   -Friends don't let friends drive Windows

Re: photo album

On Fri, 20 Nov 2009 06:08:25 -0500, Beauregard T. Shagnasty wrote:

Quoted text here. Click to load it

remove the www and it works just fine.
My little mistake for the day.

Re: photo album

Quoted text here. Click to load it

Totally invalid HTML, running the browsers in quirks mode.

You'd be run out of town over at alt.html

Re: photo album

On Fri, 20 Nov 2009 22:11:14 GMT, rf wrote:

Quoted text here. Click to load it

try again. Errors corrected.

Re: photo album

Quoted text here. Click to load it

Why then are you still running the browsers in quirks mode?

Why is it transitional? What are you transitioning from?

Re: photo album

Quoted text here. Click to load it

It's not what I'd recommend. Albums are a done deal nowadays. You'll
get a better album, more quickly, by downloading an existing one. You
probably ought to try a few anyway, just to study features that you

If you want a pure learning exercise, then it's certainly a reasonable
learning exercise - but is an album the best end result to aim at?

It takes a fair few technologies to make a decent album, so it's not a
trivial exercise. There are also several meanings of "photo album

* Do you want a simple album / gallery with lots of text annotation?
Think about using a wiki

* A continuously editable and updatable album, that allows you to re-
oder or re-describe images?  Sounds like a database back-end.

* Do you simply want to upload a one-off description file(s) with the
image(s) and then make a web site appear? Consider using XML, XSLT and
no database at all. Even with this you can repeat the process to
update an image.

Your main technologies will be a server-side scripting language and
HTML/CSS for the client side. You'll probably use a SQL database too.
You should (strongly) avoid dependencies on client-side JavaScript to
make it work, but _enhancing_ it with a better client-side UI through
JavaScript is good, so long as it still "works" without.  A good
understanding of metadata (read the Dublin Core site) is also

Begin by wireframing the site (rough pencil sketches) and thinking
about your navigation structure (pages in a site), page design
(objects on a page, less important than the site layout) and also the
information architecture.

Make sure that each "image" is addressable by a simple, stable URL,
ideally a sensible and comprehensible one (which might involve mapping
from the camera's DSC0001234 form to a more friendly identifier)  Also
support cool URLs for your "collections". Certainly allow multiple
"collections" and "albums" to be defined rather than restricting
images to only being in a single one, in a simple hierarchy. It's
really useful to have automatic default collections such as "Stuff I
uploaded on Tuesday" and also "Photographs taken on Sunday" (probably
only visible to you) where you can then assign individual images into
categories or collections such as "Party at Torture Garden" and
"Vicar's Tea Party" manually.

You should also think about image sizes. What happens about making
thumbnails? (this needs to be automated, as it's horribly tiresome
otherwise) What sizes do you support? Can different URLs request bare
images at particular sizes?

Think about video too.

As to the server-side scripting, then Ruby would be a good choice as a
decent contemporary language with enough power to do this easily and
an active community of competent coders, books, example code etc.
You'll probably use PHP instead though, mostly because you can get it
hosted so easily.

All that your users see is the HTML / CSS, so make sure that this is
good. Work on prototypes of single hand-coded static pages until this
client-side design is perfect, and only then automate their
generation. Meta-coding HTML by writing it _through_ a scripting
language is hard work.

The HTML / CSS should be fluid and should reflow nicely according to
browser window size. Don't put your thumbnail gallery in a <table>,
float each thumbnail in a container <div> instead. Think about the
"zoom to one big image" function - do you want a popup, an overlay, an
expanding div within a page?  How can you show two big images at once?
How does it work for a tabbed browser? How does it print?

Think about metadata: how much do you store, what are you forced to
enter, what's displayed (who to?) and how extensible is the data
model. It's really useful to be able to annotate images with things
like the list of people in a photo, or even to add annotation notes to
an image as drawn boxes.

Re: photo album

Quoted text here. Click to load it

Thanks for your detailed reply.

I should have been more specific about what I wish to do.  My goal is
fairly simple.  I wish to upload all my images to a directory (only
images in this directory) on the server.  I then want a way to be able
to identify the number of images and reference each directly in an
array.  Pesently I am not considering thumbnails but one picture
displayed at a time with next and previous arrows, each picture having
taxt associated with it.

I expect to upload additional pictures and text in their own files by
ftp directly to the website.  This should avoid having to learn about
databases which is an enormous job.

I agree that using something like jalbum would be more sensible but
this is partly a learning process.  I am guessing that php is the
language I should use as it is well suported.


Re: photo album

Quoted text here. Click to load it

Your core problem reduces to

* Upload and store some image files

* Upload and store some descriptions (human readable title, as a bare

* Indicate which descriptions apply to which images

* Generate page(s) that display their combination.

You can have huge variations in these, how interactive they are, how
detailed the metadata model, how sophisticated the views, but this is
the core of what's needed to class as a minimal "photo album".

So what's your plan?  Uploading the images is fairly clear cut, as it
has less potential variation, but the descriptions could work in a
great many ways.  Fields in a form? Upload a file with each image, and
a naming convention?  Upload a bulk file for a batch of images?

Quoted text here. Click to load it

That's the views, which are (or at least, should be) only loosely
coupled to the upload / edit process and the data store. Design an
information architecture that supports both (particularly a stable URL
scheme) and then implement parts of this as you have the time.  In
fact, go for all possible views pretty early on - there's little extra
work to do to make multiple views work onto the same content (mostly
integrating ImageMagick into the back end for re-sizing).

Quoted text here. Click to load it

The problem then is that you have to load the descriptive information
into the views, maybe even into the navigation system. Will the "Next
image" button say "Next", "DSC0001234" or "Fred and Freda's Wedding" ?

Databases aren't trivial, but it's a well-trodden path and there are
lots of examples out there. I'd reckon it _easier_ than trying to
integrate lots of separate text files into the running album server -
although uploading one fiel per image might be a good way to populate
that database.

 >I am guessing that php is the language I should use as it is well

You don't need it to be "well supported", you need it to be
"adequately supported". Many languages are at least good enough for
you, you don't need to choose the single one that's more suppported
than the others. Clarity and ease of learning becomes more important
then, for which PHP isn't too good (I'd suggest Ruby for that).

Re: photo album

Quoted text here. Click to load it
I /
All beginners look forward to say 'Hello World' - that's here:

Re: photo album

Quoted text here. Click to load it

You can do this with HTM code that you run locally on your browser.
Coding the first is the hardest; then copy the code for each picture
table, just changing src=3D parametr and the title..

It is the same principle as writing a website picture gallery and
running it locally; you DON't have to go on line.

You can also do something even simpler by just storing pictures (.jpg
etc) in a folder and getting (e.g) Microsoft Powar Point  Viewer to
just step though the folder files, running its own timer.

And I think W2000 on offers a photo gallery program.

Site Timeline