photo album

H

Helpful person

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?

www.richardfisher.com
 
R

richard

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?

www.richardfisher.com

PHP
 
A

Andy Dingley

I wish to try to  write my own photo album as a learning excercise.  

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

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

* 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
valuable.

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

Helpful person

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

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

* 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
valuable.

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.

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.

Thanks,

www.richardfisher.com
 
A

Andy Dingley

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.  

Your core problem reduces to

* Upload and store some image files

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

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

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.

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

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.

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

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).
 
T

Terence

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?

www.richardfisher.com

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

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,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top