deathtol2s Is Microsoft going to kill LINQ to SQL (L2S)?  The rumors are that Entity Frameworks (EF) is the database plan of choice now and L2S is out the door.  There have been a few posts on the topics, here are a couple:

http://codebetter.com/blogs/ david.hayden/archive/2008/10/30/linq-to-sql-gets-kicked-to-the-curb-needs-a-good-home.aspx

http://ayende.com/Blog/archive/2008 /10/31/microsoft-kills-linq-to-sql.aspx

Personally, I think if they just added some method of change tracking to the entities and made disconnected work easier, then L2S would be pretty hot.  I do not like passing around connections (DataContext’s) to different layers and prefer to work in a disconnected form.  Of course, this means you either hit the database for the original data and then overwrite it with the modified data or you keep a copy of the original data manually (I have used this later method and there is a post here about it.

Of course, with L2S you must watch your queries very carefully.  If you do not pay attention, you might be generating tens of thousands or even hundreds of thousands of queries to your database from a single query.  SQL Profiler comes in real handy there.

From what I have seen about EF though, it appears it is geared for more substantial applications and could not be thought as lightweight unless you an extreme fantasy.  There needs to be a lightweight but yet truly functional database layer and L2S could be just the ticket with a few modifications.

Guess we will have to wait and see…




openid_wl News has it that Microsoft Live will be came to be used as an OpenID server so that you can use your Live ID to log into any OpenID enabled site.  That is good, BUT…  What about the other way?  Will this deal be just like Yahoo! where you will be able to use them as an OpenID server but not be able to log into them by OpenID?

Come on you big guys quit playing games and allow use to use OpenID to log into Microsoft live, Yahoo! and Google!  Is that so hard?  OpenID NOW!

http://www.techcrunch.com/2008/10/27/windows-live-adds-support-for-openid-calls-it-de-facto-login-standard/




NetFlix It appears Netflix has released a public API to access their information.  I have not had the time to full investigate their developer pack, but here is the link:

http://developer.netflix.com/

There is a post about it here:

http://josephsmarr.com/2008/10/01/using-netflixs-new-api-a-step-by-step-guide/

I do have a few ideas how I might use this in the future.   Now if I can just dig around here and find the time for it :)




Well, not exactly, but you can now partake of ten free online Computer Science and Electrical Engineering  courses for free.  No need to signup or anything, just browse and view lectures:

http://www.deviceguru.com/2008/09/17/stanford-frees-cs-robotics-courses/

http://see.stanford.edu




For those that are unfamiliar with Odiogo, it is a site that provides free text-to-speech abilities to your blog and does a pretty good job!  The site takes your RSS feed and converts all the articles in the feed to MP3s.  It also gives you the ability to add a “Listen” button that makes it easy for people to listen to your posts. 

This post will show you a method to insert the Odiogo “Listen” button to all your posts automatically.  The method used here is kind of hacked together, but seems to work.  There may be easier methods, but it was early AM hours and wanted to get it functional.  At the end of the day, it might be best to make a user control for the button, but this should get your started.

Getting started:

The first step is to go to the following link and signup for an account (is quite simple and only takes a couple minutes):

http://www.odiogo.com

After a period of time, your account will be created and they will email you the information about your account which will include your feed#. 

Here is a sample (from this site’s account) of what that will look like:

Important Information:

  • Your Odiogo Feed ID: 153595
  • Your Odiogo Control Page Url: http://podcasts.odiogo.com/aggregated-blogs/podcasts-html.php
  • Your Odiogo RSS Feed Url: http://podcasts.odiogo.com/aggregated-blogs/podcasts-xml.php
  • Your Blog Title: Aggregated Blogs
  • Your Blog Url: http://reflectedthought.com/mainfeed.aspx
  • Your Blog Feed Url: http://reflectedthought.com/mainfeed.aspx

For our purpose the feed ID is the only information we need to add the button to our posts. 

On my installation of Subtext Version 2.0.0.43, I modified the following controls to the skin I use along with added the Odiogo JavaScript link in the header of the DSP.aspx file to automatically include it to all skins and blogs.

Additions to the DSP.aspx page:

Before the close of the </head> tag, add:

<script type="text/javascript" src="http://podcasts.odiogo.com/odiogo_js.php?feed_id=153595&platform=be"></script>

Additions to the Days.ascx and EntryList.ascx:

At the top of the page after the import statements and before the HTML starts, I added this routine:

<script runat="server">

string SetUrlPage(string theValue)
{
   string urlPage = theValue.Substring(0, theValue.Length - 5).Replace('-', '_');
   urlPage = urlPage.Substring(urlPage.LastIndexOf(
"/")+1);
   return urlPage;
}
</script>

In the skin I based my skin off of, it has a “<div class="post">“ right under the <itemtemplate>.  This is where I inserted after the div:

<script type="text/javascript"><!--
showOdiogoReadNowButton('153595', '<%# DataBinder.Eval(Container.DataItem, "Title") %>', '<%# SetUrlPage((string) DataBinder.Eval(Container.DataItem, "Url")) %>', 290, 55);
//--></script><br />
<
script type="text/javascript"><!--
showInitialOdiogoReadNowFrame(
'153595','<%# SetUrlPage((string) DataBinder.Eval(Container.DataItem, "Url")) %>',290, 0);

//—>

</script><br />

Here, you would replace the feed ID (153595) with your own feed ID.

Additions to ViewPost.aspx:

ViewPost was a bit different though.  I did not see a way to access the entry class data, so I ended up retrieving the data and working with it directly.  Where I wanted the listen button to appear (in mine just above the body), I inserted:

<%

Entry entry = Subtext.Framework.Data.Cacher.GetEntryFromRequest(CacheDuration.Short);
string urlPage = entry.FullyQualifiedUrl.Segments[6];
urlPage = urlPage.Substring(0,urlPage.Length-5).Replace(
'-','_');

%>

<script type="text/javascript"><!--
showOdiogoReadNowButton(
'153595', '<%= entry.Title %>', '<%= urlPage %>', 290, 55);
//--></script><br />
<
script type="text/javascript"><!--
showInitialOdiogoReadNowFrame(
'153595','<%= urlPage %>',290, 0);
//--></script>

Again, you need to change the feed ID (‘153595’) to the feed ID you received from Odiogo.




SQL Server 2008 is now RTM!  Truth be told, I have not kept up on the changes now bothered with the betas.  The article that mentioned it was RTM had a link to this article of a quick overview of changes in SQL Server 2008:

http://technet.microsoft.com/en-us/magazine/cc434690.aspx

http://blogs.microsoft.nl/blog_van_mark_voermans/archive /2008/07/15/sql-server-2008-ships-in-august.aspx

 

A few things that jumped out at me:

  • Compression at row or page level
  • Merge - Insert/Update rolled in one (no more check to see if record already exists and the update if it does, otherwise insert the new row, it is all handled by this one TSQL command)
  • LINQ Provider (allowing direct LINQ queries against SQL Server 2008 tables/columns)
  • Date and Time enhancements
  • Filestream data type



SlLogo As a developer, it is obvious that Silverlight is HOT now that 2.0 betas are flowing.  There is a ton of information coming from different sources along with many demos / tutorials.  It kind of makes you wonder if WPF will remain a top-level technologies or perhaps in the future it will be absorbed into Silverlight, with all the pressure from other competing technologies for cross platform stand alone applications.

Anyway, amongst all the info out there, AppDev is providing four hours of free Silverlight 2 training.  Here is the blog post I found about it:

http://weblogs.asp.net/lduveau/archive/2008/07/16/4-hours-of-microsoft-silverlight-2-training-for-free.aspx

 

When was the last time you visited the Silverlight.net site?  They have added 17 Silverlight 2.0 listings to their gallery:

http://silverlight.net/themes/silverlight/community/gallerydetail.aspx?cat=6

 

Some that caught my eye:

  • Silverlight Presentation Tool
  • Search Light
  • Silverlight Panorama Viewer
  • Silverlight File Explorer and Uploader
  • FlipBook
  • Silverlight Rich Text Editor
  • Spider Solitaire

Also, if you are keeping up with Silverlight, you might want to add the RSS feed from:

www.SilverlightCity.com

(Shameless plug – :)




I seem to have forgot to post about this app, but it is one I use often and it is free!  Hey, how can you beat that?

There are many file search programs out there and you have Google desktop search and even Vista comes with a file search ability built in, but I still end up falling back on this useful utility program.  I know it is not specifically a development tool, but it is handy when you need to search files beyond the simple Find in Files options of Visual Studio.

The product is called Agent Ransack from Mythicsoft Ltd and they release it for free.  They have a more advanced product available for purchase.  When you visit their site, but sure to check around at other free and commercial products they have available.  Here is the link to Agent Ransack:

http://www.mythicsoft.com/agentransack/

Agent Ransack allows you to search entire drives or sections for both file name pattern and contents.  It then lists all the matches and when you click on them, will show a brief clip from the file for the matching content.  Is really handy since you can search and then browse the results seeing the matching content without opening the files.  You can even right click on the matching files and bring up it's properties or open the location or launch the file itself.

Searching methods include standard text or regular expression patterns.

Be sure to give it a look, I have used it for years!




Wow!  That is about all I can say, Wow!  I can even say it backwards Wow!

Yahoo! is now going to support OpenID for its services.  That means millions more people will be using OpenID every day.  This could be just the boost OpenID needs to jump into prime time and consume the lead in login systems.  I know I am ready!  I have wanted OpenID to take over for some time now.   It is a simple and easy method for the consumer along with making life a LOT easier for webstie owners.

WIll have to check into the state of OpenID libraries again shortly and see if they have improved.  Would like to start moving some sites over to use OpenID, but still wondering if I would hurt myself if I required an OpenID for registrations....  Might be worth the risk.




Found this set of articles on LINQ to SQL.  The articles contain some interesting concepts and a good overal!

Part 1:

  • Querying
  • View entities (ObjectDumper)
  • View SQL statements (Log & Visualizer)
  • Local data shaping
  • Non-mapped properties in partial entity classes
  • Object Relation Diagram versus Class Diagram
  • Data shaping with non-mapped properties
  • Change tracking
  • Bulk operations

http://www.scip.be/index.php?Page=ArticlesNET02&Lang=EN 

Part 2:

  • LINQPad
  • Inheritance
    • Adding inheritance
    • Querying with derived classes
    • Adding objects of derived classes
    • Extending the inherited classes

http://www.scip.be/index.php?Page=ArticlesNET03&Lang=EN 

Part 3:

  • Sequence
  • Variable assignment (Let)
  • Eager loading / prefetching
  • Compiling queries

http://www.scip.be/index.php?Page=ArticlesNET04&Lang=EN 

Part 4:

  • Visualizers
    • LINQ to SQL Visualizer
    • Expression Tree Visualizer
  • Refresh
    • Refresh (re-execute) query
    • Refresh one object
  • Dynamic Where-clause
    • Anonymous functions and IEnumerable
    • Lambda expression trees and IQueryable
    • PredicateBuilder class and combining expressions
    • Predicate library
  • Dynamic OrderBy-clause
    • Anonymous functions and IEnumerable
    • Lambda expression trees and IQueryable
    • Predicate library

http://www.scip.be/index.php?Page=ArticlesNET10&Lang=EN

 

 




Looks like Microsoft added so many features to Silverlight, they are setting it now as version 2.0.  More info in my post at:

http://www.SilverlightCity.com

 




Some have run into the problem where you try to use the "(?i)" in a ASP.NET RegularExpresssionValidator to ignore case in the search.  JavaScript does not understand this and will generate an error on the client side, while it still works as expected on the server side.  I do not know of a method that will allow a search to be case-insensitive by supplying a regular expression to JavaScript, due to the "i" flag being a modifer and required to be supplied as a parameter to the RegExp(). 

So, the soution I came up with is to replace the ASP.NET "RegularExpressionValidatorEvaluateIsValid" method with:


<script type="text/javascript" language="javascript"> 
function RegularExpressionValidatorEvaluateIsValid(val) 
{
  var value = ValidatorGetValue(val.controltovalidate); 
  if (ValidatorTrim(value).length == 0) 
return true;
  var rx = null; 
  if(val.validationexpression.indexOf("(?i)")>=0) 
{
rx = new RegExp(val.validationexpression;.replace("(?i)",""),"i");
}
else
{
rx = new RegExp(val.validationexpression;);
}
  var matches = rx.exec(value);
  return (matches != null && value == matches[0]); 
}
</script>


Then when I want a case-insensitive search on a page, I include the above funtion at the bottom of my page (typically under the form tag) and add "(?i)" to the beginning of my regular expressions.

It is kind of a hack, but seems to work from what I can see.




Are you planning to upgrade your Visual Studio 2008 to the RTM version?  You need to plan some time to fix a few breaking changes.  When I first started upgrading some of my sites:

I found this link useful:

http://weblogs.asp.net/bschooley/archive/2007/11/21/converting-web-site-projects-from-visual-studio-2008-beta-2-to-visual-studio-2008-rtm.aspx

The post details changing the DataSetExtentsion referrence from 2.0 to 3.5 and changing LINQ 2 SQL Add/Remove method name changes, OneValidate method change and how to change your *.dbml files to load in the designer.

 




This is an older article I happened to find recently that opened a few more areas of thought about LINQ.  Yes, I know LINQ is used for many things, not just data storage, XML or easy of collection handling.  That said though, I really did not thnk about it in the use of a type of logic parser.   What a good idea!

This is article gives examples of how to use LINQ to reduce the coding and complexity of scoring Yahtzee results on dice.   Pretty cool!

http://www.c-sharpcorner.com/UploadFile/mgold/Yahtzee LINQ07222007010520AM/YahtzeeLINQ.aspx

 




Scott Guthrie has just listed part 1 of a same e-commerce storefront application using the new ASP.NET MVC framework to show off how to put things together.  Give it a looksie.. :

http://weblogs.asp.net/scottgu/archive/2007/11/13/asp-net-mvc-framework-part-1.aspx