[Home] [Recent] [Site Map] [SharePoint] [XBOX]
Phill Haack just released HTTPSimulator - a class to help with running tests against a simulated Http Context, to help simulate requests and more without resorting to needing a web server running for the tests. [via DNK]
I like this approach but I also like Phil"s comments at the end. Read them. He"s right.
Also noted:
"originally tried to do all this by using the public APIs. Unfortunately, so many classes are internal or sealed that I had to get my hands dirty and resort to using reflection. Doing so freed me up to finally get certain features working that I could not before."
This again goes to the Testable Object Oriented Design (TOOD) idea that I wrote about. Testable design might mean two categories:
In this case the HTTP related classes are test-disablers in that we cannot easily stub out their features to test something that relies on them.
Earlier this month at TechEd we announced the official name of Visual Studio "Orcas" - which will be called Visual Studio 2008. We also said that the official name for the .NET Framework "Orcas" release will be called .NET Framework 3.5 (it includes the new LINQ support, integrated ASP.NET AJAX support, new ASP.NET data controls, and more).
VS 2008 and .NET 3.5 Beta 2 will ship later this summer, and the Beta 2 release will support a go-live license for those who want to put applications into production using the new features immediately.
With the past few releases of Visual Studio, each Visual Studio release only supported a specific version of the .NET Framework. For example, VS 2002 only worked with .NET 1.0, VS 2003 only worked with .NET 1.1, and VS 2005 only worked with .NET 2.0.
One of the big changes we are making starting with the VS 2008 release is to support what we call "Multi-Targeting" - which means that Visual Studio will now support targeting multiple versions of the .NET Framework, and developers will be able to start taking advantage of the new features Visual Studio provides without having to always upgrade their existing projects and deployed applications to use a new version of the .NET Framework library.
Now when you open an existing project or create a new one with VS 2008, you can pick which version of the .NET Framework to work with - and the IDE will update its compilers and feature-set to match this. Among other things, this means that features, controls, projects, item-templates, and assembly references that don"t work with that version of the framework will be hidden, and when you build your application you"ll be able to take the compiled output and copy it onto a machine that only has an older version of the .NET Framework installed, and you"ll know that the application will work.
To see an example of multi-targeting in action on a recent build of VS 2008 Beta 2, we can select File->New Project to create a new application.
Notice below how in the top-right of the new project dialog there is now a dropdown that allows us to indicate which versions of the .NET Framework we want to target when we create the new project. If I keep it selected on .NET Framework 3.5, I"ll see a bunch of new project templates listed that weren"t in previous versions of VS (including support for WPF client applications and WCF web service projects):
If I change the dropdown to target .NET 2.0 instead, it will automatically filter the project list to only show those project templates supported on machines with the .NET 2.0 framework installed:
If I create a new ASP.NET Web Application with the .NET 2.0 dropdown setting selected, it will create a new ASP.NET project whose compilation settings, assembly references, and web.config settings are configured to work with existing ASP.NET 2.0 servers:
When you go to the control Toolbox, you"ll see that only those controls that work on ASP.NET 2.0 are listed:
And if you choose Add->Reference and bring up the assembly reference picker dialog, you"ll see that those .NET class assemblies that aren"t supported on .NET 2.0 are grayed out and can"t be added to the project (notice how the "ok" button is not active below when I have a .NET 3.0 or .NET 3.5 assembly selected):
You might be wondering: "so what value do I get when using VS 2008 to work on a ASP.NET 2.0 project versus just using my VS 2005 today?" Well, the good news is that you get a ton of tool-specific value with VS 2008 that you"ll be able to take advantage of immediately with your existing projects without having to upgrade your framework/ASP.NET version. A few big tool features in the web development space I think you"ll really like include:
You"ll be able to use all of the above features with any version of the .NET Framework - without having to upgrade your project to necessarily target newer framework versions. I"ll be blogging about these features (as well as the great new framework features) over the next few weeks.
If at a later point you want to upgrade your project/site to target the NET 3.0 or NET 3.5 version of the framework libraries, you can right-click on the project in the solution explorer and pull up its properties page:
You can change the "Target Framework" dropdown to select the version of the framework you want the project to target. Doing this will cause VS to automatically update compiler settings and references for the project to use the correct framework version. For example, it will by default add some of the new LINQ assemblies to your project, as well as add the new System.Web.Extensions assembly that ships in .NET 3.5 which delivers new ASP.NET controls/runtime features and provides built-in ASP.NET AJAX support (this means that you no longer need to download the separate ASP.NET AJAX 1.0 install - it is now just built-in with the .NET 3.5 setup):
Once you change your project"s target version you"ll also see new .NET 3.5 project item templates show up in your add->new items dialog, you"ll be able to reference assemblies built against .NET 3.5, as well as see .NET 3.5 specific controls show up in your toolbox.
For example, below you can now see the new <asp:listview> control (which is an awesome new control that provides the ability to do data reporting, editing, insert, delete and paging scenarios - with 100% control over the markup generated and no inline styles or other html elements), as well as the new <asp:linqdatasource> control (which enables you to easily bind and work against LINQ to SQL data models), and <asp:datapager> control show up under the "Data" section of our toolbox:
Note that in addition to changing your framework version "up" in your project properties dialog, you can also optionally take a project that is currently building against .NET 3.0 or 3.5 and change it "down" (for example: move it from .NET 3.5 to 2.0). This will automatically remove the newer assembly references from your project, update your web.config file, and allow you to compile against the older framework (note: if you have code in the project that was written against the new APIs, obviously you"ll need to change it).
Unfortunately the VS 2008 multi-targeting support only works with .NET 2.0, .NET 3.0 and .NET 3.5 - and not against older versions of the framework. The reason for this is that there were significant CLR engine changes between .NET 1.x and 2.x that make debugging very difficult to support. In the end the costing of the work to support that was so large and impacted so many parts of Visual Studio that we weren"t able to add 1.1 support in this release.
VS 2008 does run side-by-side, though, with VS 2005, VS 2003, and VS 2002. So it is definitely possible to continue targeting .NET 1.1 projects using VS 2003 on the same machine as VS 2008.
We are trying to make sure that .NET Framework 3.5 is a super compatible upgrade from .NET 2.0, and not require you to change any code in order to target the new framework version. We"ve deliberately made only non-breaking modifications to existing .NET assemblies in the .NET 3.5 release, and where possible added new features in separate assemblies to minimize the chance of breaking changes.
We are also not making project model or build changes with VS 2008. I, like you, hope to never to go through that again! Both the "web site" and "web application project" models will be fully supported going forward.
Hope this helps,
Scott
TSPUG Monthly Meeting Please join us Wednesday, June 20th as we host our last monthly TSPUG meeting before the summer break! Location: Time: 6 PM Pizza dinner, presentations to start at 7 PM Topic: Top Tips to write better code for SharePoint Description:
If you have not dived into SharePoint programming yet and/or would like
to learn more techniques, don"t forget to mark your calendar for June
20th where Reza Alirezaei will introduce some tips and tricks to make
your journey in programming the SharePoint object model easier. This
demo contains hints and guidelines that will help you with gaining a
better understanding on how to write better code to build collaborative
applications. Speaker: Reza Alirezaei, SharePoint
consultant and .Net architect. To date, he has worked with all major
versions of SharePoint and its various complimentary technologies (BI,
Scorecards, Web Services,...). Reza, based in the Please let us know if you are no longer able to make it or bringing extra guests as space is limited! [TSPUG Home Page] [Register]
"The open-source Mono project will show off an early version of Microsoft"s Silverlight browser plug-in running on Linux later this week.
Work on the plug-in, called Moonlight, was started only in May, after Microsoft"s Mix conference. Moonlight uses version 1.1 of Silverlight, a browser plug-in for displaying interactive Web applications, which is due in the fall.
Once completed, Moonlight will allow Linux users to see Silverlight content on the Web, such as videos, and run rich Internet applications.
According to Miguel De Icaza, Mono project leader and Novell open-source president, Mono engineers have been working 14-hour days to create an implementation of Silverlight on Linux using Mono, an open-source implementation of Microsoft"s .Net software.
An alpha version of Moonlight will be ready for showing off later this week at a Microsoft Mix conference in Paris. (Microsoft also plans to show off its Silverlight-based Popfly mashup builder there.).."
[1] http://www.webware.com/8301-1_109-9731410-2.html?part=rss&tag=feed&subj=Webware
This is a handy feature I discovered in Windows Server 2008. You can force http.sys to flush cached log entries immediately to disk. The next time you are waiting for requests to flush to your IISLogs, go to the command prompt and type
netsh http flush logbuffer
You"ll see an Ok.
Then open your log files and your entries should be present.
Take care,
Steve
Whoo Hoo! RC3 of IISLogs is done and out the door. After about 9 - 12 months of tinkering, debugging, adding features and general kicking the tires. Release candidate 3 is released and ready for testing. It can be downloaded from http://www.iislogs.com/. As always, we recommend perspective users test on a non-production system. I don"t promote this product very much, but after 3 years of development, version 2.0 is almost ready for prime time. On a personal note, doing development for a commercial product is time consuming, teadious, rewarding, and overall a fun time. It barely makes enough money to stay afloat, by no means do I get rich. What started out as a project to help me manage logs has turned into something special. Almost every feature that people have asked for has been integrated into the product.
Along the way, I"ve learned how to use Xenocode 2006 to obfuscate code. I was supposed to write a blog posting or summary of my experiences with their product. It is absolutely the best from my experience. I have pretty much automated my build process with a batch file. They accept command line arguments which makes it simple. I use Visual Studio 2005 w/sp1 to build version 2.0. And yes I even develop on Vista. :) I ran into an issue trying to get Xenocode to work on Windows Server 2008 or I"d be developing on that platform. One note on obsfucation, make sure to use Peverify.exe to ensure your DLL, EXE"s are ok after running the process. Dave Wanta (Creator of ASPNetEmail and MANY other products) pointed me to this SDK tool when I first started.
For those wonder if it is worth architecting, planning, documenting, coding, selling, maintaining a product? Many times I wonder, but it is like a little side gig that was different than running a content site. I started and ran http://www.aspfree.com for 4+ years, it started out as hobby. :-> Maintaining a content site that grew to 10,000 to 15,000 daily visitors was HARD work. Writing articles and publishing was challenging. It is much different than writing a product, but the same effort is required. Both items are time consuming, but it"s great experience. A big thanks goes to Jose Fuentes Microsoft MVP with helping with IISLogsGUI. This is the GUI tool that maintains the configuration file. If you need a real developer, Joe is definitely worth hiring. Along the way, here is a few tips I wanted to share.
I think that is it for now, just an FYI. This is my hobby, call me crazy or just a plain geek. I have a lot of respect for companies and individuals that do this type of thing full-time! I"ve always meant to type up a blog about my IISLogs experience. Here it is. Hope you find it useful.
Take care,
Steve Schofield
Microsoft MVP - IIS
For the full PR wire, visit http://biz.yahoo.com/prnews/070618/aqm723.html.
Site List:
>>Xbox Live_s Major Nelson
>>Xbox 360 & SharePoint 2007 Weblog
>>Carsten Keutmann_s Blog
>>Mohamed Zaki_s Blog [Sharepoint MVP]
>>The Mit_s Blog
>>Mart Muller_s Sharepoint Weblog
>>Microsoft SharePoint Products and Technologies Team Blog
>>SharePoint Solutions Blog
>>4GuysFromRolla.com Headlines
>>ASP.NET Blogs
>>SharePoint Blogs
>>SharePoint Blogs
>>Joel on Software
>>ADO Guy_s Rants and Raves
>>Microsoft Live Labs
>>GadgetNews
>>Windows Vista Team Blog
>>VoIP & Gadgets Blog
>>schrankmonster blog
>>Via Virtual Earth Blog
>>Feed
>>MSDN Blogs
>>Mashable!
Links:
Jack's Readings
Month Archives:
Oct 2007
Sep 2007
Top Tags:
social software social networking .NET mashable Sharepoint ASP.NET Web 2.0 Web2.0 Startups Community News Search Marketplace General Software Development AJAX Windows Vista Visual Studio Microsoft myspace Silverlight People Powered! YouTube Vista MOSS Featured News C# Events MOSS 2007 Google WPF Office 2007 Web Community Security General Personal Xbox 360 facebook Tools development SharePoint 2007 Fun Atlas Architecture ASP.NET AJAX myspace codes TheLongTail IIS SQL Server Developers Revenue Sharing Video Pictures WCF Mobile 2.0 Announcements Orcas MIX07 Arcade Team System JavaScript News
@2007 All rights Reserved |