Which language to build online photo album?

Joined
Sep 12, 2007
Messages
851
Location
College Park, MD
Real Name
Kristin Rutkowski
Hi all. I'm trying to figure out which language I want to use to build an online photo album. I know I could always go to smugmug, etc, but I want to build my own. I'm hoping some other code-savvy people on here could help me. I want it to be dynamic (instead of manually updating the pages each time I add a new picture). So I would also build an admin page for me to upload/edit/delete.

Here are the technologies I'm considering:

I don't want to use ASP or VB.Net

I know Coldfusion, and might consider that. Drawback: Coldfusion hosting costs extra. I've never used Coldfusion with anything except Access or SQL Server, and I can't use those with my mac. I guess MySQL?

Maybe Flex? I don't know mxml, but if I ever want to work with ColdFusion again, I should probably learn it. Also, I don't have Flex Builder (which costs $250).

PHP could work. Plus: it's free. With PHP I would use either MySQL or XML.

I'm minoring in Computer Science and just had a year of Java. I feel like I could arrange the code well (a photo would be an object, an album would be an object that has photo objects....), but I don't know GUIs well, and I don't know how I would get it online.

I'd really like to use Flash, but I don't know Actionscript. But I wouldn't mind learning it for this. I've done a little bit with ColdFusion flash forms, but I think I'd want a full blown flash app for this. And I suppose if I used Actionscript, I would also use ColdFusion? (for admin pages, etc). Then a database - MySQL?


I'm not really sure what I'm looking for by posting, but hopefully some of you have tips that might help.

Thanks!
Kristin
 
Joined
May 27, 2006
Messages
7,412
Location
Greater Yellowstone Ecosystem
Hmmmm....php would be my first choice, Flash 2nd. Although with Flash you can incorporate some tweens/fades etc. which could be nice.

In reality, though, chances are good someone has already built this as an open-source plugin for something else - I personally will use someone else's code quite readily unless I need to modify it a great deal.

Sean
 
Joined
Jul 20, 2007
Messages
603
Location
New England
Hi, Kristin -- FWIW, I wrote my gallery code in PHP and have been very happy with the results (see my link, below in the.sig). It was based on something I found several years ago in a tutorial on the web with a Google search, so no doubt you could come up with a good starting place. [You'll also need to know some sort of HTML. Mine is XHTML w/CSS. Again, lots of on-line tutorials around!] Will be interested in which way you decide to go ...

Best Regards,
 
Joined
Sep 12, 2007
Messages
851
Location
College Park, MD
Real Name
Kristin Rutkowski
John,
Your gallery looks great! and easily do-able. I do know HTML and CSS, so I could do something like what you did pretty easily - thanks for showing me a good finished product! (also, I like your pictures)

Paul,
for some reason that link isn't working for me right now. I did take a look at the page yesterday, and remember generally liking it. But my situation is I want to build the gallery myself, from scratch (well, maybe with a few tutorials/examples to guide).

I really like this adobe example. And I found this article to go with it. So I guess I will delve into that code to try to figure it out, and learn flash and actionscript. (although it is really tempting to do it easier with PHP and html). I don't have photoshop yet, but I'm assuming I could also just use photoshop to create a gallery like this. But I really wanted to learn the code. Although..... I start classes in a week, and might be overwhelmed learning physics and calculus and java.

I also really like this guy's gallery. It looks like he's using javascript and php, but I'm not sure how.

anyway, I think it helps my decision process to writing all this down, so thanks for listening!
 
Last edited by a moderator:
D

demosaic

Guest
I'd just stay away from proprietary anything. Don't hitch your wagon to a technology with an owner.

SQL queries issued to a database server by a scripting language such as PHP or Python is a popular way to go.
 
Joined
Apr 13, 2006
Messages
566
Location
Northeast USA
agree with the above.. my entire website is built around a wordpress blog with an embedded Gallery 2 gallery. For client work, I create Lightroom flash galleries for them to review their photos, etc. Nice thing is.. its open source, has a huge user base for questions and enhancements and you can tinker with it however you want to customize it for your needs (as I did with the gallery and blog design).

www.jingothecat.com if you want to take a peek! Good luck as well!
 
Joined
Sep 12, 2007
Messages
851
Location
College Park, MD
Real Name
Kristin Rutkowski
So I decided on ColdFusion. I was debating between that and PHP (thanks for the suggestions, everyone!), but am ultimately choosing CF. That's where most of my experience lies, and that's where I'd like to continue building experience, and I feel that might be easier to incorporate Flash into if I want any fanciness (I do really like the scrollable gallery while you're looking at a picture).

Now I just have to install MySQL on my mac.... ugh, I hate installing. First, though, I want to get an external hard drive and back up my machine. Maybe when I go to B&H this weekend, or I'll find one on Amazon.

and thanks for the encouragement!

Kristin
 
Joined
Sep 12, 2007
Messages
851
Location
College Park, MD
Real Name
Kristin Rutkowski
so here are my preliminary thoughts on the database design/code.

Database Design:

Albums
⁃ albumID (autonumber)
⁃ albumName
⁃ title
⁃ description
⁃ protected (boolean)
⁃ password

Photos
⁃ photoID (autonumber)
⁃ albumID
⁃ title
⁃ description
⁃ orderNum (to order the photos within an album)


In my admin pages, when I create a new album, it will have an albumID generated by an autonumber field. I'll use that number to create a folder in the directory structure, and that will be my album folder. Inside, I'll create two more folders: photos and thumnbnails.

When I add a new photo to an album, it will add it to that photos folder, then create a thumbnail (I have to figure out how to create this on the fly in the code, but Adobe's got to have a way, or else I'll have to upload both the photo and thumbnail), with the same filename (named after the photo's autonumber) and put it in the thumbnails folder.

When I view an album, the SQL will be:
SELECT *
FROM Photos
WHERE albumID = #albumID#
ORDER BY orderNum

then to display the photos and thumbnails, I can just call
\images\albums\#albumID#\photos\#photoID#.jpg
or
\images\albums\#albumID#\thumbnails\#photoID#.jpg


Does this seem like the best way to do this? I've never created a photo album before.

Kristin
 
Joined
Sep 12, 2007
Messages
851
Location
College Park, MD
Real Name
Kristin Rutkowski
Now I'm stuck in my design. In the above description, I store the albumID with each photo, and have a file structure that keeps the photos in each album folder. but then I thought "What if I want to have a photo in more than one album?". For example, if I want an album of Favorites, or all Night Photography. If I want that, I can store all the photos in one folder, and let the database keep track of which album(s) each photo belongs to. Then my file structure doesn't represent anything at all, but I guess it doesn't need to.

Then I went back again, and thought, "Should I just keep it simple" - one album for a photo, and the file structure is organized. I don't see many personal websites too complicated. I suppose I don't need to recreate smugmug, but I kind of feel like I should code this as complex as I can think, in case I want the extra capability in the future.

Does anyone have any input - simple, or more capability? or input on drawbacks/pluses for designing the db this way or that?

Kristin
 
Joined
Sep 12, 2007
Messages
851
Location
College Park, MD
Real Name
Kristin Rutkowski
Thanks, Tom! You provide great step-by-step thinking processes to help me figure out how I want to do this. I agree with you about the structure - my atomic data are the pictures. The attached data are the physical location, my description of the picture, etc. Your three points under metrics/spaces are very good considerations. I agree about avoiding having redundant data. That spurred my conundrum about "what if I want a picture in two places." I just have to figure out if I want to allow for that, and if I do then how to structure it as efficiently as possible. Also, you make a very good point about the flash technology. I hadn't even considered that aspect of it (that each picture is stored in the flash file).

Thanks for your extensive advice!!!! It is great advice for sitting down and planning out my project in the best way possible.

Kristin
 
Joined
Sep 12, 2007
Messages
851
Location
College Park, MD
Real Name
Kristin Rutkowski
Always welcome - when I am at home at the weekend I will produce a screenshot form the model of my database - that will demonstrate those issues if wrot down visually and this is most of the time a better way to see the mentioned issues instead of going through the "words".

cheers tom

I would definitely love to see your database schema! I like to see how other people develop things like this - it does help me figure out I would like to do it.

ps: I lived in Wiesbaden for two years - also on the Rhein! (I loved Germany).
 
Joined
May 7, 2005
Messages
931
Location
Home: Columbia, MD, USA; Present: Bogota, Colombia
Kristin,

In one of your examples you did a "select *" from a table. You should never code a select *. You should always specify the columns you want back. Because if you change the database scheme it will break your code. You also run the risk of breaking the code if you upgrade the database product.

For the record, I am a database engineer who happens to enjoy photography.
 
Joined
Sep 12, 2007
Messages
851
Location
College Park, MD
Real Name
Kristin Rutkowski
Kristin,

In one of your examples you did a "select *" from a table. You should never code a select *. You should always specify the columns you want back. Because if you change the database scheme it will break your code. You also run the risk of breaking the code if you upgrade the database product.

For the record, I am a database engineer who happens to enjoy photography.

Thanks for the tip, Scott! I hadn't considered the consequences of using "select *". I see your point, and I will be sure to always specify my columns.
 

Latest threads

Links on this page may be to our affiliates. Sales through affiliate links may benefit this site.
Nikon Cafe is a fan site and not associated with Nikon Corporation.
Forum post reactions by Twemoji: https://github.com/twitter/twemoji
Forum GIFs powered by GIPHY: https://giphy.com/
Copyright © Amin Forums, LLC
Top Bottom