Visual Studio 2008 Database Edition and SQL Server 2008

Posted by Kenny on January 23, 2009

I recently went through the unfortunate demise of the primary disk on my main development machine, so I had to rebuild my dev environment from scratch. I have a test server running SQL Server 2005, so I decided to install SQL Server 2008 on my dev machine for compatibility testing. Imagine my frustration when I tried to load up my database project in Visual Studio 2008 and was told that I needed a local instance of SQL Server 2005!

Fortunately, Microsoft has a new GDR release of Database Edition that adds support for SQL Server 2008. Unfortunately, this isn’t just a service pack, it’s more like a product upgrade. An upgrade of your database project is required, and the project will no longer be usable by other developers on the team if they haven’t upgraded to the GDR release also. Oh well, I guess you can’t have everything.

WCF Services with the .asmx extension

Posted by Kenny on October 16, 2008

When creating a new Windows Communication Foundation web service, the default extension is .svc. This can be a problem if you want to migrate an existing .NET web service where clients may have hard-coded the .asmx extension. The following article from MSDN Blogs shows how to configure a WCF web service that uses the .asmx extension:

Wenlong Dong’s Blog : How to use .asmx extension to handle WCF requests?

Open-source AJAX libraries hosted by Google

Posted by Kenny on October 15, 2008

Via Ajaxian: Google is now hosting a number of open-source AJAX libraries, so you can take advantage of the vast Google infrastructure to reduce the load on your server. Complete details on how to access the script files can be found in the AJAX Libraries API Developer’s Guide.

Templates in ASP.NET User Controls

Posted by Kenny on May 27, 2008

Some of the standard ASP.NET server controls allow the user to specify a template containing custom markup that will be used inside the server control. It is possible to create “.ascx” user controls that make use of this type of template. The MSDN documentation explains how.

C# 3.0 features for .NET 2.0

Posted by Kenny on May 17, 2008

When discussing the new features in Visual Studio 2008, LINQ gets most of the press. However, LINQ only works if you are targeting the .NET 3.5 Framework. Another new feature of Visual Studio 2008 is the ability to choose which Framework version to target, and sometimes you just don’t have the luxury of upgrading all your users to the latest Framework. Fortunately several of the new language features in C# 3.0 don’t require library support, so here are some useful enhancements that work just fine when targeting the .NET 2.0 Framework.

WebResource.axd mystery solved

Posted by Kenny on May 07, 2008

Clearly blog posts have been very sparse here, so I’m going to try something new. Whenever I find a good article or web site that helps me solve a particular problem I’m having, I’ll try to dash off a quick post referencing it. This’ll help me locate the information if I need it again later, and maybe it will help someone else find what they’re looking for too.

Have you ever noticed those strange “WebResource.axd” URLs that ASP.NET likes to generate? I recently needed to return a JavaScript resource from a custom ASP.NET control and wondered if I could take advantage of “WebResource.axd” myself. Via ASP.NET blogger Jeff Putz, Using WebResource.axd for embedded resources shows you how.

Turbo C++ returns!

Posted by Kenny on August 08, 2006

From eWeek, the free development tools market is about to get bigger as Borland resurrects the Turbo brand. In addition to Turbo C++, the lineup includes Turbo Delphi for Win32, Turbo Delphi for .NET, and Turbo C#. Each Turbo product will be available in a free Explorer version and a more advanced Professional version. More details are available at www.turboexplorer.com.

First time riding the Rails

Posted by Kenny on April 12, 2006

Ruby on Rails is a hot topic in the Web development community right now. I’ve always enjoyed learning interesting new languages and environments because I think it makes you a better programmer even if you never use them in a production application. Apple Developer Connection recently posted an article by Mike Clark entitled Using Ruby on Rails for Web Development on Mac OS X. I followed the instructions referenced in the article and had no problem getting the latest versions of Ruby, Rails, and MySQL running on the Mac Mini. The next step will be to follow along with the examples and try to create a simple Rails app of my own. At first glance, Rails has a lot of intriguing features and I’m looking forward to learning more.

Coolest new technology at the PDC

Posted by Kenny on September 17, 2005

OK, so Visual Studio 2005 and the .NET Framework 2.0 are scheduled to be released on November 7. There’s a lot of cool stuff there, but we’ve known about that for quite a while and with the beta already in Go Live it hardly qualifies as “new” anymore. There’s Windows Vista which includes some cool enhancements to the end-user experience and provides opportunities for developing some new types of OS add-ons, but it doesn’t seem like a huge win for general development. There’s “Avalon”, now called Windows Presentation Foundation, which is great for UI developers and graphic designers, but I work more on the back-end stuff. “Indigo”, now called Windows Communication Foundation, has some improvements to the development model for Web Services and some efficiency improvements if you’re doing WCF to WCF and aren’t concerned about interopability. Other than that, I don’t see a lot of difference in the development effort required.

So what is the coolest new technology that Microsoft showed at the PDC? My vote goes to LINQ, which stands for Language Integrated Query. I’m sure there will be lots of details written about LINQ in the near future, but in a nutshell LINQ allows you to write SQL-like queries in a consistent and type-safe way against .NET collections, SQL data sources, or XML documents. Syntax for the LINQ query language will be handled by the C# 3.0 compiler, but according to Microsoft’s Anders Hejlsberg, LINQ will not require any changes to the .NET runtime. All the runtime features needed to implement LINQ are already part of the 2.0 Framework.

The LINQ query language is based on a function pattern that developers can implement for any object type to provide custom query support. Standard implementations are provided for IEnumerable<> collections, Microsoft SQL Server databases, and XML data. The function pattern approach also allows other .NET languages such as Delphi to develop their own query syntax that will support the LINQ functionality.

For SQL Server databases, LINQ provides new attributes that can be applied to class definitions to define an object-relational mapping, allowing the developer to view the SQL tables as objects and properties. The LINQ preview also contains a tool that will generate the mapping classes for an existing SQL Server schema. For XML, LINQ provides a new object model for XML data that is much simpler and easier to work with than the XML DOM model. In the PDC preview version, there is no way to create a strongly-typed object view of the XML data like there is for SQL, but I expect that a similar tool to generate classes based on an XML schema will be added eventually.

I think LINQ will be especially useful with collections and XML data where all the data manipulation has to be done in C# code already. The LINQ syntax is much simpler and easier to read than the code that is required today. For SQL databases, there will always be a place for stored procedures on the database server, but LINQ will provide an excellent alternative to building custom SQL query strings or writing hundreds of stored procs for all the different variations of simple SELECT queries. I’m looking forward to giving it a try.