Building a Photo Tagging Application using ASP.NET 2.0, LINQ, and Atlas

 

Over the last few days I’ve spent some spare time playing around with LINQ and LINQ for SQL (aka DLINQ) – both of which are incredibly cool technologies. 

 

Specifically, I’ve been experimenting with building a photo management application that provides “tagging” support.  If you aren’t familiar with photo tagging, you might want to check out FlickR – which implements a tagging mechanism that enables users to easily annotate pictures with textual words that provide a way to easily organize and sort them.

 

For my photo-browser I wanted to implement a “tag cloud” on every page of the site that lists the most popular tags in use on the left-hand side, and enables users to be able to click a tag within the “tag cloud” to filter the pictures by them:

 

 

When a user clicks on an individual picture I then wanted them to see a more detailed version of the picture, as well as all the tags it has been annotated with:

 

 

I then wanted end-users to be able to click on the “edit tags” link on the page to switch into an edit mode using Ajax, where they can easily create or edit new tags for the picture.  Any word can be suggested:

 

 

When the tags are saved, I wanted the “tag cloud” to dynamically update with the current list of tags being used across all photos on the site, and size each tag within the cloud based on the tag’s frequency (higher usage frequency produces bigger font sizes for that tag):

 

 

Implementing the above application is really easy using ASP.NET 2.0, LINQ and Atlas, and provides a nice demonstration of some of the really cool new data capabilities that LINQ enables.

 

Click Here to Read My Step-By-Step Tutorial of How to Build the Above Application using LINQ, ASP.NET 2.0 and Atlas (full source code provided)

 

Hope this helps,

 

Scott

 

 

Published Wednesday, July 19, 2006 1:34 AM by ScottGu
Filed under: , , ,

Comments

# Building a Photo Tagging Application using ASP.NET 2.0, LINQ, and Atlas

Wednesday, July 19, 2006 6:07 AM by ナオキにASP.NET(仮)

ScottGu's Blog からです。   今回のスコットさんの投稿はかなり濃いです。   Building a Photo Tagging Application...

# re: Building a Photo Tagging Application using ASP.NET 2.0, LINQ, and Atlas

Wednesday, July 19, 2006 8:00 AM by Ashok Padmanabhan
Very cool and very nice application One question can LINQ be used on a live asp.net website on a shared server?

# re: Building a Photo Tagging Application using ASP.NET 2.0, LINQ, and Atlas

Wednesday, July 19, 2006 8:21 AM by John S.
Excellent as usually. I personally really find the practical application examples more helpful than just random tips. Don't get me wrong, I love the random tips too, but I really, really love real-world examples that tie everything together.

# re: Building a Photo Tagging Application using ASP.NET 2.0, LINQ, and Atlas

Wednesday, July 19, 2006 10:12 AM by Sahil Malik
Wow, you took that photo at the Microsoft Campus? :)

# re: Building a Photo Tagging Application using ASP.NET 2.0, LINQ, and Atlas

Wednesday, July 19, 2006 10:47 AM by ScottGu

Hi Ashok,

The current LINQ CTP requires full-trust support on the server, which means it doesn't support partial trust deployment yet (which is what many shared servers use today).  

However, future builds of LINQ will fully support partial trust deployments -- so you will definitely be able to use it in shared hosting scenarios.

Hope this helps,

Scott

# re: Building a Photo Tagging Application using ASP.NET 2.0, LINQ, and Atlas

Wednesday, July 19, 2006 10:49 AM by ScottGu

Hi Sahil,

Actually I took all of those pictures on a trip to South Africa and Botswana that I did two years ago.  

There are a few wild animals wandering campus here in Redmond -- although mostly they are just ducks on the pond. :-)

Thanks,

Scott

# re: Building a Photo Tagging Application using ASP.NET 2.0, LINQ, and Atlas

Wednesday, July 19, 2006 6:20 PM by Sahil Malik
Well see, I'll be there in August, and you'll have a wild bear on the campus. ;)

# re: Building a Photo Tagging Application using ASP.NET 2.0, LINQ, and Atlas

Wednesday, July 19, 2006 6:54 PM by Eric
So nice! Thank you so much. BTW do you perfer using FF rather than IE?

# re: Building a Photo Tagging Application using ASP.NET 2.0, LINQ, and Atlas

Wednesday, July 19, 2006 7:31 PM by Ashok
Can LINQ be added to an exisitng 2.0 site since it needs the 3.0 compiler? Or can only new sites use LINQ?

# re: Building a Photo Tagging Application using ASP.NET 2.0, LINQ, and Atlas

Wednesday, July 19, 2006 9:25 PM by kevind

Scott,

Any word on when Go-live license will be available for LINQ?

# Link Listing - July 19, 2006

Wednesday, July 19, 2006 10:50 PM by Christopher Steen
Async WebService Calls and the 2 Call Limit [Via: tomasr@mvps.org (Tomas Restrepo) ] Building a Photo...

# re: Building a Photo Tagging Application using ASP.NET 2.0, LINQ, and Atlas

Thursday, July 20, 2006 2:39 AM by ScottGu

Hi Eric,

I actually use IE as my main browser and prefer it over FF.  I used FF in the screenshots above mainly because people often ask whether the sample I build work in both IE and FireFox.  Proving the cross-browser compatibility via the screen-shots helps answer that question.

Hope this helps,

Scott

# re: Building a Photo Tagging Application using ASP.NET 2.0, LINQ, and Atlas

Thursday, July 20, 2006 2:40 AM by ScottGu

Hi Ashok,

You'll be able to add LINQ to an existing V2.0 site (ASP.NET 2.0 can be configured to use the new compiler).

Hope this helps,

Scott

# re: Building a Photo Tagging Application using ASP.NET 2.0, LINQ, and Atlas

Thursday, July 20, 2006 2:41 AM by ScottGu

Hi Kevind,

We are looking to have a go-live license for LINQ as we get a little further along.  There are definitely a lot of people asking for it!

Thanks,

Scott

# re: Building a Photo Tagging Application using ASP.NET 2.0, LINQ, and Atlas

Thursday, July 20, 2006 11:00 PM by Kaol
If I didn't install LINQ and Atlas, can I implement it with your source code ?

# re: Building a Photo Tagging Application using ASP.NET 2.0, LINQ, and Atlas

Friday, July 21, 2006 3:38 AM by ScottGu

Hi Kaol,

You'll need to install the LINQ May CTP build in order to implement my sample above.

Hope this helps,

Scott

# re: Building a Photo Tagging Application using ASP.NET 2.0, LINQ, and Atlas

Friday, July 21, 2006 5:32 PM by Travis

Will LINQ* be available in .NET 3.0?

# re: Building a Photo Tagging Application using ASP.NET 2.0, LINQ, and Atlas

Sunday, July 23, 2006 12:19 AM by Fabian
Great job!

# ASP.NET 2.0 Tips, Tricks, Recipes and Gotchas

Tuesday, August 01, 2006 11:55 AM by ScottGu's Blog

This page lists some of the more popular “ASP.NET 2.0 Tips, Tricks, Recipes and Gotchas”

# re: Building a Photo Tagging Application using ASP.NET 2.0, LINQ, and Atlas

Saturday, August 05, 2006 3:37 AM by Keith J. Farmer
Travis: .NET 3.0 is WinFX -- WPF/Avalon, WCF/Indigo, etc. LINQ is part of Orcas, which comes later.

# Slides + Samples Posted from my TechEd LINQ Talk

Sunday, August 27, 2006 5:29 AM by ScottGu's Blog

One of the highlights for me of my recent trip to TechEd NZ and Australia was the opportunity I had to

# MSDN Flash Ireland - International Resources - 1 Sept 06

Thursday, August 31, 2006 4:30 AM by Robert Burke's Weblog

Web Resources [SQL Server and Data Access] 2006 PASS Community Summit: Microsoft SQL...

# Building a Photo Tagging Application using ASP.NET 2.0, LINQ, and Atlas

Tuesday, September 19, 2006 3:02 AM by ナオキにASP.NET(仮)

ScottGu's Blog からです。 今回のスコットさんの投稿は かなり濃い です。 Building a Photo Tagging Application using ASP.NET 2.0,

# Tips/Tricks and LINQ Slides+Demos from my Talk in Dallas

Saturday, November 04, 2006 2:33 PM by ASP.NET Team Blogs

I had a great time presenting fora fewhours to the North Dallas .NET User Group this past Thursday.I

# ASP.NET Connections Slides + Demos

Saturday, November 11, 2006 3:26 AM by ASP.NET AJAX Team Blogs

Earlier this week I presented at the ASP.NET Connections conference in Las Vegas. This is a great conference

# Office 2007, VS 2005 Tools for Office, and VS 2005 Extensions for SharePoint

Tuesday, November 14, 2006 1:03 AM by ScottGu's Blog

Last week Microsoft released Office 2007. For those of you who haven't tried it yet, this is probably

# Crear una aplicaci

Sunday, December 16, 2007 3:10 PM by S

Crear una aplicaci