To read the article online, visit http://www.4GuysFromRolla.com/articles/042705-1.2.aspx

A Look Forward at Microsoft's Visual Web Developer 2005, Part 2

By Scott Mitchell


  • Read Part 1

  • In Part 1 we discussed Microsoft's new "Express" line for Visual Studio 2005, which includes Visual Web Developer 2005 Express, a slimmed down, affordable version of Visual Studio 2005 targeted for Web developers. In this second and final part we'll look at installing Visual Web Developer 2005 and getting started with creating a simple ASP.NET site.

    Downloading and Installing Visual Web Developer 2005 Express


    To get started with Visual Web Developer 2005 visit the official Visual Web Developer homepage and click on the Download Now link. While still in Beta stages, the Express versions of Visual Studio 2005 are free, but will cost an expected $49 once Visual Studio 2005 moves out of beta. The Visual Web Developer download is (roughly) three MB in size.

    The installation process steps you through a series of screens from which you can indicate what products to install (see the screenshot to the right). Of particular note, you can indicate to download and install SQL Server 2005 Express addition, which you'll want to do in order to create dynamic data-driven ASP.NET 2.0 applications. (Of course you could use other databases as the backend for your data-driven applications, such as SQL Server 2000, Oracle, Access, and so on.)

    The setup process will download the products selected and install the .NET Framework 2.0 Beta 2, Visual Web Developer 2005 Beta 2, and whatever other products you specified (such as the MSDN Library and/or SQL Server 2005 Express). Depending on the options you select the download can range from a low of about 65 MB to over 300 MB.

    Warning: Installing Beta Software
    At the time of this article's writing (April 27th, 2005), Visual Studio 2005 and ASP.NET 2.0 are in Beta 2. While Beta 2 includes a Go Live license, it is not considered production code. Microsoft has reported that Beta 2 and Visual Studio .NET 2003 can be installed side-by-side, but have indicated that Visual Studio .NET 2002 and Beta 2 will not play nice together. See the Express Compatibility and Versioning FAQ for more information.

    Personally, I'd only install Beta 2 on a separate, non-vital machine or install Beta 2 in a virtual operating system using tools like Virtual PC 2004 or Virtual Server 2005.

    UPDATE: As of November 7th, 2005, Visual Studio and the .NET Framework 2.0 are no longer in Beta! You can download the official, non-Beta version of Visual Web Developer from Microsoft's website - http://msdn.microsoft.com/vstudio/express/vwd/.

    Creating Your First ASP.NET 2.0 Website


    Once you have installed and launched Virtual Web Developer (VWD), you'll notice that the look and feel of VWD is fairly similar to that of Visual Studio .NET. But the similarities end with the aesthetics. Let's examine some of the differences by creating a new ASP.NET website using VWD. Start by going to the File menu, choosing New, and then selecting Web Site. This will show the New Web Site dialog (shown below).

    At the bottom of the New Web Site dialog box you can specify the location of the new website, and the location can be:

    • A directory on your local computer,
    • A remote Web site, connected to via FrontPage Extensions, or
    • A remote Web site, connected to via FTP
    For this example, I'll be creating a new ASP.NET website rooted at the Folder "My First ASP.NET 2.0 Site" located on my Desktop. When you create a new website with Visual Web Developer the first thing you'll likely notice is that there's only two files created, Default.aspx and Default.aspx.vb|cs, depending on if you opted to create a Visual Basic or C# website. Compare this to Visual Studio .NET, which automatically adds files like Web.config, Global.asax, AssemblyInfo.vb|cs, Styles.cs, and so on. Furthermore, since Virtual Web Developer includes its own mini-Web server for testing ASP.NET pages, there's no dependence on IIS, meaning that there's no new virtual directory added to IIS when a new ASP.NET projects is created. (This also means that you can develop ASP.NET applications on Windows XP Home.)

    At this point there are a ton of different paths you could take. You might want to add a new database (assuming you installed SQL Server 2005 Express), populate it with some data, and display the data in an ASP.NET page using the new GridView control. (See A Sneak Peak at Working with Data in ASP.NET 2.0 for more information on ASP.NET 2.0's new DataSource controls and GridView control.) Or you may want to define a site-wide template to ensure a consistent look and feel across the pages on your site. This is accomplished in ASP.NET 2.0 using MasterPages, and is discussed in more detail in a previous article of mine, A Sneak Peak at MasterPages in ASP.NET 2.0.

    For this article, though, let's just create a very simply ASP.NET page and then view it in a browser. Simply type in the text, "This is my first ASP.NET 2.0 page!" within the HTML view of Default.aspx. To view this page in a browser, go to the Debug menu and choose Start without Debugging. (If you opt to start with debugging, Visual Web Developer will need to add a Web.config file to the application that indicates that the application should be run in debug mode. Note how with VWD Web.config is only created when needed rather than being inserted by default. One more cool factoid in this parenthetical: with Visual Web Developer / Visual Studio 2005, there's IntelliSense in Web.config. Cool, eh?)

    When you start a page, with or without debugging, Visual Web Developer launches the ASP.NET Development Server. This mini-Web server accepts incoming requests only from localhost, so you don't have to worry about opening a potential security hole. The ASP.NET page is then visited and served via this mini-Web server. (Visual Studio 2005 allows you to configure whether or not ASP.NET 2.0 Web applications are served through IIS or the ASP.NET Development Server.)

    If you inspect the Address bar in the screenshot above you'll notice that the URL of the visited ASP.NET page is http://localhost:1089/My%20First%20ASP.NET%202.0%20Site/Default.aspx. The Web server request came in through port 1089 - when launched, the ASP.NET Development Server selects a port number that requests are sent to other than the standard port 80, which most Web servers use by default. (This allows for the ASP.NET Development Server to run on a machine with IIS installed without stepping on IIS's toes.)

    Conclusion


    In this article we took a look ahead at one of the products lines of the upcoming Visual Studio 2005, a product that (as of the time of this writing, April 27, 2005) recently reached Beta 2 status. Visual Web Developer is a scaled down version of Visual Studio 2005 that is aimed at the hobbyist and student market and will be priced around $49.

    You can download and try out Visual Web Developer 2005 Express for free while it's still in Beta. Best of all, Beta 2 has a Go Live license, meaning you can, if you want, create production code with the beta bits. In fact, there are a slew of Web hosting companies that already provide Beta 2 support.

    Happy Programming!

  • By Scott Mitchell

  • Article Information
    Article Title: ASP.NET.A Look Forward at Microsoft's Visual Web Developer 2005, Part 2
    Article Author: Scott Mitchell
    Published Date: April 27, 2005
    Article URL: http://www.4GuysFromRolla.com/articles/042705-1.2.aspx


    Copyright 2017 QuinStreet Inc. All Rights Reserved.
    Legal Notices, Licensing, Permissions, Privacy Policy.
    Advertise | Newsletters | E-mail Offers