February 2008 - Posts

Last week, I have released LINQ.Flickr 1.2 , this new release comes with some bugs fixes requested by community.  The best of them was not to be able to search only by user and with specific photo size. The bug started after converting it to use LinqExtender instead of its own query logic. So, now here it is

A complex query for getting 12 most recent photos for a user "neetulee" (my wife's photo stream, need to track what latest she uploads :-))

var query = (from ph in context.Photos
             where ph.User == "neetulee" && ph.PhotoSize == PhotoSize.Square
             orderby PhotoOrder.Date_Posted descending
             select ph).Take(12).Skip(0);

Also, I got request to have different config section for Flickr settings, which looks like

<configSections>
    <section name="flickr"
 type="Linq.Flickr.Configuration.FlickrSettings, Linq.Flickr"/>
  </configSections>

  <flickr apiKey="##Your API Key##" secretKey="##Your Secret Key##"/>

Finally, I have added a NUnit project to test out the API, I will soon come up with a local solution that mocks flickr request, it is really slow and time consuming to test against remote source (esp , when you have to upload, get photos).

And, one thing that I sure forgot to mention the demo_app, that I have created on LINQ.Flickr , it is still work in progress and working on converting it to MVC with some more features that will give a good startup with LINQ.Flickr. I will keep posted when done :-)

image

Overall, thanks to the community for outstanding support, I hope to have it in coming days.

LINQ.Flickr project URL : www.codeplex.com/linqflickr/ 

Thanks

kick it on DotNetKicks.com

My good buddy Kazi Manzur Rashid has made out a cool project named Kigg , it looks like DotnetKics but even more powerful than Digg  :-) . But its shows a nice way of harnessing the power of MVC (comes as a part of Asp.net 3.5 Extensions).

The project is live at  http://kigg.dotnetslackers.com/

image

You can even  download the project source and play around it from http://www.codeplex.com/Kigg .

So far, to me it looks like the best starter-kit for developing Asp.net MVC applications.

Enjoy !

Recently , I was playing around with my experimental OpenLinqToSql provider to create one tiny tool for Flickr using Linq.Flickr (coming soon) and I came to find out that for some reason the following query does not work in SQL server compact framework , though it is working fine with the SQL server main edition.

BEGIN

INSERT INTO PhotoUploadStatus
(PhotoPath,Synced,Action)VALUES('c:\images\FlickrLogo.GIF','False','add')

SELECT * FROM [PhotoUploadStatus] WHERE ID='1' 
AND PhotoPath='c:\images\FlickrLogo.GIF' 
AND Synced='False' AND Action='add'

END

If you have a close look, you will find that I have used BEGIN .. END block, which tells SQL server to run the two queries in a batch. SQL Server main does this pretty well, but the compact one will surely nod its head off. The reason, behind this, SQL CE  process query one after another , which means if you have three queries and if two of them fails, the third one will still run and vice-versa. In other words, it does not support Batch processing.

So, to make the query work in both editions , I have to change the query a bit like the following

INSERT INTO PhotoUploadStatus
(PhotoPath,Synced,Action)VALUES('c:\images\FlickrLogo.GIF','False','add');

SELECT * FROM [PhotoUploadStatus] WHERE ID='1'
 AND PhotoPath='c:\images\FlickrLogo.GIF' 
AND Synced='False' AND Action='add';

Note, there is no BEGIN .. END block and every statement ends with an ';'.

Thanks

kick it on DotNetKicks.com
More Posts