Free Newsletters

   All InfoWorld Newsletters
Strategic Developer | Martin Heller » TAG: Visual Basic

May 13, 2008 | Comments: (0)

Visual Studio 2008 SP1: To beta, or not to beta?

As I mentioned in An old Visual Studio problem rears its ugly head back in February, I've been looking forward to SP1 for Visual Studio 2008 and NET Framework 3.5. Why? These are supposed to fix most of the problems I've been having with Visual Studio, and restore most of the functionality that was cut from the initial 2008 release.

SP1 is out, but only as a first beta-test version. As is true with most beta-test products, there are risks to running it, ranging from a high likelihood of encountering new bugs to a low likelihood of trashing your system to the point where your most effective option is to reinstall Windows from scratch on a newly formatted partition, also known by the woodworking analogy of scraping your drive down to the bare bits.

The list of improvements in this version is impressive. Both Scott Guthrie and Brad Abrams have discussed these in their blogs. Brad does a great job of covering new features; Scott does too, in a slightly different way, and also highlights the known incompatibilities.

Here are the "gotchas", copied from Scott's blog:

1) If you are running Windows Vista you should make sure you have Vista SP1 installed before trying to install .NET 3.5 SP1 Beta.  There are some setup issues with .NET 3.5 SP1 when running on the Vista RTM release.  These issues will be fixed for the final .NET 3.5 SP1 release - until then please make sure to have Vista SP1 installed before trying to install .NET 3.5 SP1 beta.

2) If you have installed the VS 2008 Tools for Silverlight 2 Beta1 package on your machine, you must uninstall it - as well as uninstall the KB949325 update for VS 2008 - before installing VS 2008 SP1 Beta (otherwise you will get a setup failure).  You can find more details on the exact steps to follow here (note: you must uninstall two separate things).  It is fine to have the Silverlight 2 runtime on your machine with .NET 3.5 SP1 - the component that needs to be uninstalled is the VS 2008 Tools for Silverlight 2 package.  We will release an updated VS 2008 Tools for Silverlight package in a few weeks that works with the VS 2008 SP1 beta.

3) There is a change in behavior in the .NET 3.5 SP1 beta that causes a problem with the shipping versions of Expression Blend.  This behavior change is being reverted for the final .NET 3.5 SP1 release, at which time all versions of Blend will have no problems running.  Until then, you need to download this recently updated version of Blend 2.5 to work around this issue.

I wouldn't install this version on my primary development system, but I might install it on a secondary development system after doing a full back-up.

To beta, or not to beta? Maybe both.

Posted by Martin Heller on May 13, 2008 11:37 AM



March 05, 2008 | Comments: (0)

LINQ webinar video and forum

I mentioned the 2/20 LINQ webinar given by Joseph Albahari in advance of its live presentation, but some of you didn't hear about it until the weekly newsletter went out on 2/21. (That's what the RSS feed is for, folks.) A few of you even asked for me to arrange a reprise or a video. Of course, I have nothing whatsoever to do with this, but the good folks at O'Reilly have obliged. The hype is theirs, not mine:

If you missed out on the recent O'Reilly Webinar, "Writing LINQ Queries with LINQPad," you can still learn the ins-and-outs of using LINQPad directly from author Joseph Albahari. LINQPad is the querying tool that's sweeping the .NET world. This is a must-view webinar for anyone working in C# 3.0 and Framework 3.5.

Download and watch the webinar video (43 minutes, .mov file, 50 MB) here:

http://downloads.oreilly.com/oreilly/videos/oreilly-linq-webinar.mov

You can also join authors Joseph and Ben Albahari in our C# 3.0 in a Nutshell Forum to continue the conversation.

Recent posts include:

  • Table Of Contents In Pdf
  • Linqpad Customization
  • Linqpad Open Source?
  • Sql Optimization
  • Intellisense
  • Linqpad Case Sensitivity

Join the discussion here:

http://forums.oreilly.com/category/22/C-3-0-in-a-Nutshell/

Enjoy.

Posted by Martin Heller on March 5, 2008 08:27 AM



February 12, 2008 | Comments: (0)

Yet Another Computer Language

You can't know how much it excites me to hear that Microsoft is designing yet another computer language. Why, what a novel idea! It isn't like there were hundreds of new computer languages designed every year. If that were the case, there would be conferences about the subject. Oh, wait: that's how we first heard about this one, at the Lang .NET conference on the Redmond campus.

But it's a declarative language! Ah, yes: that eliminates maybe half of the languages proposed every year. "Declarative" is an awfully broad term, with multiple meanings. Standard ML is considered declarative, and so are its derivatives OCAML and F#.

Prolog and rule-based AI systems are considered declarative. You declare the rules: the logic engine decides how to run them. SQL queries are declarative: you describe the data you want to see, and the query optimizer figures out how to get it out of the database.

Haskell is considered declarative as well as functional, not to mention that it has monads. Don't ask me to explain monads in the context of functional programming: it's not a short answer. The "Summarizing Proust" contest isn't on today, thank you very much.

Back to declarative languages. XAML is a declarative language for the domain of graphics. It was designed as an extension of XML. It's such an expressive language that Charlie Petzold, arguably one of XAMLs most vocal proponents, built himself a alternative to Microsoft's XAMLPad called XAML Cruncher, so that he could "interactively type XAML code and see the object it creates." In Visual Studio 2008, Microsoft included a bidirectional, split-screen XAML designer, so that you can create XAML by dragging and dropping objects and by typing XAML code, with the ability to freely switch back and forth between the two methods. I freely admit to needing these tools; I can almost never write XAML that will display correctly on the first try.

Watching the Connected Systems Division (CSD) at Microsoft over the years, it has been clear that they have been on a code-reduction path. Why? SOAP was invented by Don Box and others to be an XML-based lingua franca for communication among disparate computer applications and systems. The functional deficiencies of SOAP were addressed by the WS-* series of standards, to give it security, authentication, reliability, and so on.

All of those standards made it harder to write conformant client and server code, raising the complexity by orders of magnitude. CSD engaged in a series of efforts to counter this by raising the level of abstraction for programmers developing connected systems. Web Services Enhancements (WSE) for Microsoft .NET cut the amount of code you needed to write drastically, but not enough for mere mortals.

Windows Communication Foundation (WCF) brought the amount of code down by another order of magnitude or so, partly by using attributes in code and by depending on XML-based configuration files. Attributes are of course one approach to making a language more declarative, and configuration files are another.

Looking at WCF in Visual Studio 2008, it seems like the classes and attributes and design tools are fairly mature, but are still built on top of the general-purpose C# language and the .NET Framework. I wouldn't be at all surprised to hear that the CSD architects decided to try starting over from scratch with a new language that would raise the level of abstraction and reduce the amount of code that needed to be written for a connected application by another order of magnitude. But it's not like nobody else has ever tried that: there's a robust research community working on that kind of problem.

I can guess about the process they're going through, but I can't guess what the outcome will be. It's an emergent experiment, and there are a dozen ways it could go. Nevertheless the criteria are kind of obvious:

High level of abstraction? Check.

Regularity of syntax? Check.

Easy to write? Check.

Easy to read and understand? Check.

Suitable for connection to disparate systems over multiple protocols? Check.

Posted by Martin Heller on February 12, 2008 07:35 AM



February 04, 2008 | Comments: (0)

Debugging into the .NET Library Source

I was hesitant to add any preview plug-ins or apply any patches to Visual Studio 2008 until I'd finished my review, but now that it's done I've gone a little wild. I have installed the ASP.NET 3.5 Extensions, the ADO.NET Entity Framework Tools Dec 07 Preview, the Silverlight Tools, Volta, and the patches needed for the EF Tools and for debugging into the .NET Library source code.

The instructions for enabling Visual Studio 2008 to debug into the .NET Library source code are on Shawn Burke's blog. The only part that gave me any trouble was installing the Hotfix, and even that didn't take long.

The EULA that comes up the first time you try to view Library source code is a little more specific than what was originally announced: it does not give you a license to view the source if you're building a competing product for a non-Microsoft OS. That addresses the "patent troll" issue that Dave Rosenberg raised last October, and which I discussed at the time.

It's worth understanding which assemblies are currently available for symbol/source loading. Shawn lists them in his blog entry:

  • Mscorlib.DLL
  • System.DLL
  • System.Data.DLL
  • System.Drawing.DLL
  • System.Web.DLL
  • System.Web.Extensions.DLL
  • System.Windows.Forms.DLL
  • System.XML.DLL
  • WPF (UIAutomation*.dll, System.Windows.DLL, System.Printing.DLL, System.Speech.DLL, WindowsBase.DLL, WindowsFormsIntegration.DLL, Presentation*.dll, some others)
  • Microsoft.VisualBasic.DLL

More assemblies will be added in the future.

There's a new MSDN forum to discuss the Reference Source Server. There are already 27 questions, but I'm sorry to say that many of them are just rehashes of FAQs that were already answered in Shawn's blog.

Debugging into .NET Framework

Posted by Martin Heller on February 4, 2008 08:11 AM



January 04, 2008 | Comments: (0)

LINQPad LINQ Query Builder

LINQPad As I was testing the LINQ to SQL functionality in Visual Studio 2008, I found myself missing the SQL Query Builder. For the relatively simple three-table inner join SELECT queries I needed, I was able to write correct LINQ syntax myself with only a database diagram, IntelliSense and online help for guidance. Writing more complicated LINQ queries freehand felt like it would challenge my nascent LINQ skills.

Do we really have to generate the SQL with SQL Server Management Studio and then translate it into LINQ?

I asked Microsoft, and it turns out that we don't. Joseph and Ben Albahari, the authors of C# 3.0 in a Nutshell, have released a free LINQ query builder (written by Joe), LINQPad.

It requires .NET Framework 3.5. If you have Visual Studio 2008 or Visual C# 2008 Express, then Framework 3.5 will already be installed. LINQPad supports SQL Express, SQL 2000, SQL 2005, and (with some limitations) SQL 2008.

Posted by Martin Heller on January 4, 2008 11:36 AM



October 18, 2007 | Comments: (0)

Creating and Using a Data Access Layer with Visual Studio 2005

Every time I do this I have to figure it out again. (Sometimes I empathize with HAL, when he is being dismantled at the end of 2001: "My mind is going, Dave. I can feel it.") I'm blogging this as much for myself as for anyone else it might help.

Here is the magic spell you need:

  1. Create a Class Library project in your solution in the supported language of your choice. I like C#, but Visual Basic .NET also works. I usually end the project name with DAL so that I can remember what it is.
  2. Delete the Class1.cs (or .vb) source file that is created automatically.
  3. Right-click on the project and add a new DataSet item. The design surface for an XSD file will open.
  4. Open a data connection to the database you're wrapping.
  5. Select each table you want to use and drag it to the design surface.
  6. Build the data access layer project.
  7. Add a reference to the data access layer project to your UI project. It doesn't really matter whether the UI project is a Windows Forms application, an ASP.NET application, a console application, or a Windows Presentation Foundation application.
  8. Add a using (or Imports) statement for the table adapters of the data access layer to your UI project. IntelliSense will help out if you added the reference properly.

Now you can instantiate the table adapters in your code and call the appropriate pre-generated methods for whatever CRUD operations you need. If you need other operations, you can go back to the DAL and add them: right click at the bottom of the table in the DataSet diagram and add a query.

Posted by Martin Heller on October 18, 2007 08:06 AM



March 12, 2007 | Comments: (0)

Free Lessons for Beginning .NET Programmers

When the free Express editions of Visual Studio were first announced, the Microsoft .NET Development Series got quite a few proposals for books aimed at amateur and novice programmers. As Series Editor, I always had to ask how much money someone would pay to learn how to use a free development environment. My gut feeling was "nothing:" the free IDEs would need free training, meaning that the business opportunity for Express-specific books was practically non-existent.

It has been a long time coming, but Microsoft now has a site for this, the Beginner Developer Learning Center. At first examination, I'm quite impressed.

Beginner Developer Learning Center The site is divided into two major tracks, one for Web development and one for Windows development. Within each track, there are lessons in each of three tiers. Tier 1 lessons assume no prior software development knowledge; tier 1 lessons assume that you understand the foundations of .NET development. Tier 3 lessons "expand your knowledge of Windows and Web development with more advanced concepts such as data access and debugging." (Pay no attention to the man behind the curtain rolling his eyes at this last statement.)

In addition, the Learning Center has a Kid's Corner with cartoony introductions to C#, VB, and Web development. I found these corny myself, but I haven't yet tried them out on my middle-school-aged kids.

For reference, the site has video "how-to" guides to Windows Forms and Web Forms controls in C# and Visual Basic, and a video "how-do-I" series about ASP.NET. Finally, it has a "Tips and Tricks" series of assorted video and PDF guides, for things like creating templates and deploying applications with ClickOnce.

These short video guides are very much in the same spirit as the short videos we produce here on InfoWorld.com. As with our videos, the production values might not be anything to write home about, but the information presented is right on the money.

Posted by Martin Heller on March 12, 2007 06:00 AM



Technology White Papers

 

InfoWorld Technology Marketplace

» Technology White Papers Library

Technology White Papers by Topic

Technology White Papers E-mail Alert

Find out when the latest white paper is available:
 
 
» BUY A LINK NOW

Sponsored Technology Links