No I haven’t been online much…. been busy with Professional Visual Basic 2010 (http://www.wiley.com/WileyCDA/WileyTitle/productCd-047050224X.html). I finally finished my last chapter (someday I’ll post the list of chapters which I did.) and we’re now just in edits. This week was the MVP Summit so I’ve been tweeting more than blogging, but learning and giving feedback on Visual Basic.
Many thanks to two groups in particular. First to Nestor Portillo, Emilie Freet, Susanna Moran, PJ Forgione and everyone else in Microsoft’s MVP organization. As usual they spent a great deal of time setting up an awesome event. They helped facilitate a great deal of face time for us with the product teams, made sure we saw compelling content and coordinated a host of logistics. This remains one of the top 2 or three features of being an MVP. – Special thanks to Emilie and the Developer Evangelist field org for the new MVP jackets a great surprise on Tuesday (and for getting me one even though I hadn’t scheduled anything because that’s when my flight arrived)
I’d also like to thank the whole Visual Studio languages team, and in particular:
- We had a surprise on Tuesday when Anthony Green let us know that he was now a “blue badge” (ie. Microsoft employee) so congratulations on your new role as a PM for the Visual Basic compiler. His passion for the language should help him have great success.
- Charlie Calvert and Lisa Feigenbaum (who’s name I’ve probably misspelled) these two people took the lead on coordinating the interactions for the language MVPs at the Summit, including in the case of Charlie working to support the ever popular MVP to MVP sessions, and for Lisa for the great swag. (photos to follow)
- To the entire languages org, the Help and Community contacts, the CLR team and everyone else who met with us. Thanks for taking the time to give us an idea of where you are headed and letting us give you some feedback on where we hope you are headed. You openness and willingness to consider and respond to our thoughts is great. btw, Lucian has a portion of this discussion available on his blog at: http://blogs.msdn.com/lucian/default.aspx
Overall this year’s MVP Summit has been a great event and as always I come away motivated to do more.
I managed to note on Twitter that I was speaking last night to the San Diego .NET Developers Group. The session went well, it was an updated version of the presentation I did last year related to working with Boot to VHD and it's usefulness in working with Beta software and in this case actually digging into Visual Studio 2010 Beta 2. The slides have been updated (and will be again prior to code camp) so for those who are interested here are my slides. You'll note a couple that are heavy on graphics - yes those are the ones I incorporated from Microsoft materials, I don't make pretty pictures -especially not if my face is in them  VS2010_1_5._2010.pdf (2.01 MB)
A few weeks ago I presented to the San Diego .NET User Group. Let me say I really like their new meeting location at Intuit, and below my post those of you who attended my presentation will find a copy of my slides.
The title of the presentation is of course a play on an old saying about being adrift at sea “Water, water everywhere, but not a drop to drink.” It occurred to me that there was a parallel to this situation and beta software. After all while you may here about all sorts of new features within beta software, for most corporate developers; deploying solutions that leverage these technologies isn’t always possible. In fact for some the organizations are so short term focused that even working with these technologies may be difficult, since I’ve seen developer’s install beta software on their primary work system, corrupt it and as a result the organization starts to take a ‘no beta’ approach to reviewing new technology.
Given that even a few weeks ago, the beta 1 release of Visual Studio 2010 was starting show its age I wanted a presentation that would better explain to developers some best practices when working with Beta and Community Technology Preview (CTP) software. After all while part of the session was to look at some of the new features of Visual Studio 2010, I wanted attendees to come away with some best practices in terms of working with the array of beta products that Microsoft is making available in this release wave. Unlike beta 1 or earlier CTP versions from Microsoft, my experience is that when you get to Beta 2 or RC you have something that’s usable for more than just planning. In fact I really believe that if you are developing a new solution and looking at 3-6 months for a release timeframe you should be using the Beta 2 technology and considering leveraging a ‘Go Live’ license if you are ready before the product releases.
Every few years the product groups align such that whether it is a new OS plus a new Office plus a new Visual Studio or a new version of SQL Server or new versions of a bunch of other products that what you get from Redmond is a wave of new products. Most of these products spend some overlapping time in beta release, for example Visual Studio Beta 1 came out while Windows 7 was in RC, and since coming out there has been a CTP of Office 2010. This week we’ll see Windows 7 launch (it’s release was back in August) and soon we should see a beta 2 for Visual Studio 2010 (no later than the PDC)(http://visualstudiomagazine.com/Blogs/RDN-Express/2009/09/VS2010-and-.NET-4-Beta-2-Expected-Soon.aspx), and of course updates to the Office 2010 pre-release versions (isn’t there a SharePoint conference coming up, not to mention PDC… there ought to be something prior to the holidays. http://www.mssharepointconference.com/Pages/default.aspx)
So at this rate if you want to try an keep up and work with the new technology you probably are thinking VPC. As most of us are aware, over the past few years virtual machines have been to Beta software what the Internet was to networked computing. However, the one disadvantage of VPC was that of performance. The fact is things like Windows 7 Beta and Visual Studio 2010 Beta 1 run agonizingly slow on VPC. Here you are trying to follow best practice and not risk corrupting your core system, but as a result working with the technology borders on impossible. Fortunately Windows 7 took a huge step toward resolving this issue with BootToVHD.
Boot to VHD makes allows you to set up a virtual machine and then during the boot process select it as the boot partition instead of your primary OS. As you might imagine this implementation is closer to another way of handling multiple operating systems on a singly physical system’s hardware – multiple partitions. What’s really being virtualized however is the partition. In the past you would tell the physical hard drive that the a given percentage of it’s space was to be treated as logically separated from the rest of the hard drive. There are several disadvantages to these physical partitions, including the ability to resize them, the fact they lock in a percentage of the hard drive even if you won’t use that much space, the fact that refreshing them isn’t easy. Let’s face it there were enough issues that VPC was easily the solution of choice.
A VHD for those unfamiliar with the acronym is a Virtual Hard Drive, and it is the format used by VPC (but not VMWare) to represent a virtual machine’s disk drive. The advantages are many, I can set the drive to expand only as space is required. Once I’ve pointed my boot options to a VHD file, I can swap it out for a different VHD file and the operating system is none the wiser. This alone allows me to create a baseline image, prep it and then when I need to I can replace my VHD to quickly start on a clean system.
However, it gets better – as noted by Scott Hanselman there is a CScript tool which will allow you to create that Baseline image using the tools from the Windows 7 Automated Installation Kit (AIK). The focus of the slides below is to leverage information I found in 3 different blog posts (two from Scott and one from Michael Waterman. While I identify how to find Scott’s posts via Bing in the slides, I don’t mention Michael’s excellent PDF document specifically. The order I worked with them was to first read Scott’s posts which helped me get a baseline, and I then download the PDF file from Michael Waterman located at the bottom of his blog post here: http://blogs.technet.com/michw/archive/2009/08/01/windows-native-vhd-boot-deployment-scenarios.aspx Of course Michael’s document goes at if from the lowest level and as you’ll learn from Scott’s postings, teh Wim2VHD script makes this unnecessary.
While Michael’s post and PDF go through the details of manually creating a VHD to support the Native VHD Boot scenario they are still great reference. Plus there is one take-away remaining from his post/pdf; the use of the tool DISM.exe. To quote from his PDF: “The tool we will use is new to Windows 7 and is called the DISM tool, which stands for ‘Deployment Image Servicing and Management’.” This tool allows you to retrieve the names of the images which are available on your DVD. This becomes important as you’ll see with the enclosed instructions in order to tell the Wim2VHD.wsf.
The net result as I point out in the slides, is that although images created to support Boot to VHD aren’t as portable as those which are truly virtual a new image can be spun up in under an hour as opposed to a lengthy set up, and by following another tip – don’t activate the image until you need to it becomes possible to quickly spin up, test and replace images. Rather than run through everything else, with regard to the advantages and disadvantages of VHD images for native boot, let me give you a link to the slides here: NetUGSeptPresentation.pdf (479.09 KB)
and mention my configuration. I’m running a Dell laptop as my primary development machine. On it I have a reasonably nice solid state hard drive. Which means when I configured my laptop I chose disk speed over space. I’ve had the laptop about 10 months and let I’m as certain as ever I made the correct choice due to another enabling technology. The drive on my laptop is limited, however, I purchased a relatively inexpensive external WD hard drive. The 1TB WD My Book series supports e-Sata connectivity. For those that aren’t aware it essentially provides the access speed of an internal drive (not quite but about 3x USB or Firewire speeds). This means I can and do place multiple different images out on the external drive. Just like the laptop the external drive is portable, I just need to have electrical for two devices instead of two. If you have eSata and you are still using USB for a primary external drive you are missing out on usable access speeds.
At any rate, feel free to dig through the slides and get a feel on what is coming in Visual Studio 2010 and more importantly how to leverage today’s technology to allow you to quickly and safely leverage all of the Beta software coming from Microsoft as the next release wave of new technology rolls into use.
As I believe I noted in the past we’ve started a series of .NET Fundamentals presentation at the start of each user group meeting at the San Diego .NET Developers group. I was the presenter for the October 6th meeting. Keep in mind these sessions aren’t about ‘new’ features but rather about reviewing some of the fundamentals which you as a .NET developer need to know.
Attached to this post is a copy of my slides. NET FundamentalsEvents.pdf (559.42 KB)
Did I mention I was planning on speaking tonight at the San Diego .NET Developer’s group? I was asked to do a short presentation on Generics as part of tonight’s meeting, as part of something we’ve introduced called .NET Fundamentals. The idea is that User Groups are meant to help people come up to speed, but of late it seems more and more like we’re only focusing on the latest what’s new, whiz-bang stuff. So to help with some of the folks who really are just getting started with .NET come up to speed on portions of .NET.
So for those of you who were present for tonight’s short presentation and whom are interested in a copy of my slides, I’ve added a PDF containing those slides. I enclosed all of the sample ‘code’ as part of the slides and they contain both VB and C# examples (although a few snippets are in just one language or the other for the purposes of space.) dotNET_Fundamentals_Generics.pdf (1.26 MB)
So a couple weeks ago I posted a note prior to the start of TechEd (Time for Tech Ed North America) talking about how if I could have gone this year the one session I would have been certain to not miss was DTL336 Future Directions for Visual Basic with Anders Hejlsberg and Jonathan Aneja. Well good news this video has been made publicly available. The video is the full hour of the session and starts with Anders discussing the future of programming languages.
Before I give you the link, let me provide one important tip: Don’t watch it online… you can but you’ll not just below the default viewing window on the right hand side is a download button. You’ll be tempted to click that – here again – pause and instead right click the download button. Save the target (DTL336.wmv) to your local machine. Attempting to watch a full hour of video over the network just isn’t going to be a good experience, and trying to do so in that tiny little window in the browser is just a measure of torture. The video is available from Tech Ed online at:
http://www.msteched.com/online/view.aspx?tid=1d3d650b-a6b3-4c98-9240-571866969b89
Anders discussion of the future just as it relates to concurrent programming issues is enough to make the download worth it. I think this was a great session, and speaks well to a very active future for Visual Basic. I think someone in Redmond finally woke up wrt VB in terms of finally starting to provide the resources people need and which in the past were focused on C# so that more and more people will be able to move into VB on .NET and away from older technologies.
One of the ‘tools’ I’ve was most impressed with after departing Internowlogy is the suite of services hosted under the Live brand from Microsoft. Let me clarify, when I left my job and didn’t have a new employer, it meant that while I had a personal email account, I didn’t have a professional account. I was able to set up a professional email using Live and start managing my contacts, appointments and email both from my computer using Outlook and from my Mobile phone. Of course, it hasn’t been all mistake free, one of my more important lessons has involved my Live identity management and one of my more challenging transitions with identity. But more on that in a moment.
I’ve not only continued to use Messenger and learned to leverage Live for email and such but I’ve leveraged the networking features of Live as well as the features of Skydrive to place documents that I need to share in a central location. This is without even considering new development features like Mesh and Azure.
Now onto my challenge with Live. Most people are at least reasonably familiar with Live Messenger and have used it. If like me you’ve used it for a while – you may have set it up using your work email address – I now feel this is a mistake. When I first signed up from Messenger, my thought process was that instead of setting up another email account that I would need to monitor. Instead I chose to point point my messenger account at my work email for a Live ID and go from there. For most things this worked fine, but when it came time to leave Internowlogy this presented a problem. As you might imagine my old email address didn’t leave with me. I however, wanted to keep in touch with the people I had added to messenger over the years.
The good news is that you can go to the account services and update the email address associated with your messenger account, the challenge is that even though it should only take one or two days, in my case it was taking well over a week. Here I was looking to update my network and literally everyone – even the people who knew my new email couldn’t see me in Messenger and weren’t seeing my new email address because I was in this limbo state. A coworker who left IK a few weeks before me (several people left IK in January of 2009) had the same problem and eventually just reverted his old account and created a new account and added all the new people. I however, had contacted Microsoft and asked – hey what’s the status and was told yes, the change was working through. So eventually even though it had been over a week I set up a second account on Live so that I could get contact with key people and over the next serveral days as my old account remained in limbo started to focus on this new account as my main contact point.
Eventually I had pretty much stopped checking the old account for a while, but I did a few weeks ago and lo and behold – the changes had finally made it so that I could see people and they could see me. Now from the standpoint of email the change was easy – I just told account 1 to forward all my email to account 2 and then as I reply people saw the new address and did or didn’t update their contact. No problem, and no different from having an alias on my main email account. In otherwords from the standpoint of email everything still works fine.
On messenger however, I now need some way to combine these two Messenger contact lists. I want to display/sign into both accounts at the same time. I don’t want to bother some of my contacts with adding a new link for my other messenger account, so if someone has a good solution for that please let me know – because I know from experience that if a solution exists someone will let me know once I post this.
(BTW, as a note for all my contacts, you’ll see me online a bit less, my current employer blocks the IM ports so I’ll be online more from about 8PM Pacific onward.)
So I won’t be at Tech Ed this year. I just started my job with Rubio’s (www.rubios.com) - home of the world famous fish taco. I accepted a position in the corporate organization and only started last week which makes heading off to a week long convention a little unrealistic. I will be up in LA at Tech Ed today (the day before it actually gets started, Microsoft is hosting a few sessions for MVPs today.) Fortunately although I won’t be there Microsoft is making a great deal of technical information from Tech Ed available. The current site for Tech Ed is: http://www.msteched.com/online/channels.aspx and as you’ll see by the page I’ve chosen it has online channels with materials related to Tech Ed. I’ll be checking back during the week to catch some of what I’m sure will be Tech Ed highlights and some great technical information. However, for those attending there are a couple of sessions I truly wish I could attend, of those there is one in particular that if anyone does attend I’d appreciate hearing more about: DTL336 Future Directions for Visual Basic - Wed 5/13 | 8:30 AM-9:45 AM | Room 152. The presenters will be Anders Hejlsberg and VB veteran Jonathan Aneja. The nature of the tech ed site makes linking to the session description difficult, so I’ve copied the description from the session catalog: In this talk, we discuss the future direction of the Visual Basic language both in the near and long term. Exciting features from the next release are demonstrated and discussed, including extensions to LINQ support, syntax simplifications, and improvements to the IDE. Larger trends that are likely to deeply influence the direction of the language are also covered, including dynamic binding, meta-programming, and scripting. Finally, we discuss how all these tie together into the roadmap for Visual Basic going forward. If anyone gets to this session please feel free to send me a link if you post a recap, I’ll also be searching but I’ll have to wait for the content to get indexed. Now that the languages team has been merged and Anders is involved in the direction for all of Microsoft’s managed languages – including Visual Basic I’m very interested in his initial public thoughts for the direction for Visual Basic.
In addition to doing Silverlight the other set of updates I’m focusing in on relate to the Sales OBA project up on CodePlex: http://obasales.codeplex.com/ I just made some minor updates to the source code for the custom Excel Spreadsheet on the site – mainly cleaning up the code and adding some comments. My goal is to start replicating some of the current C# projects with VB versions… of course the Excel spreadsheet is already in VB, so once I get the VB versions of the other projects I’ll loop back around and be updating the Excel spreadsheet with C# and the other C# projects for Visual Studio 2010… I’m leveraging a tool that I like for this process and I’m going to talk about it tomorrow. This isn’t going to be a quick process but it does mean you’ll continue to see some new sample materials related to the Professional OBA book (http://www.amazon.com/Professional-Office-Business-Application-Development/dp/0470377313/ref=sr_1_1?ie=UTF8&s=books&qid=1238107346&sr=8-1) My target is once I’ve completed my Silverlight project – discussed in my preceding post, I’ll move to the generation of Word Documents using the XML structure created for the OBA Sales project… rest assured I’ll post something when I make a new upload.
So in the process of setting up my demonstration virtual machine for VSLive I pulled down the materials from the CodePlex site for OBA Sales. What I realized in the process was that the custom database wasn't included in the materials. Fortunately as I noted in my earlier post a copy of the database was available from the Wrox site.
I was able this morning to get a new copy of the AdventureworksVSTO database uploaded. It's a .bak backup file that you will need to restore and it was zipped before uploading. The download is now significantly larger.
Next updating the current XML web service to be a full on WCF service to generate the documents. I'll let you know when it's ready.
Thanks to those who attended my session on working with VSTO and SharePoint today at VS Live! As a reminder all of the code associated with my session is available for download from CodePlex. Keep in mind that you'll need to update the connection strings in each of the projects (excluding the OFR project which doesn't connect to the database) in order to run the code locally.
The sample database associated with the applications isn't currently part of the CodePlex project, however I will update a copy this weekend after I get back from San Francisco. Currently you can get a copy of the baseline database from the Wrox site associated with the Professional Office Business Application Development: Using Microsoft Office SharePoint Server 2007 and VSTO book.
So although I've been heads down, I have noticed that .NET 4.0 and the latest Visual Studio 2010 CTP have been released. There are alot of great things coming but one which may cause a little confusion based on it's name is CoVariance. Both C# and VB are getting CoVariance but what does that mean. Well let's start with generics. When teaching I like to introduce generics by saying “OK now this feature is called ‘generics’ but it’s all about specifics.” I then discuss how polymorphism allows us to generically handle an object but how that can introduce two issues (1. minor is boxing 2. major is loss of type checking - since everything is an object) What ‘generics’ allow us to do is to tell the compiler which specific type will be in a collection and that resolves both of those issues in our benefit. This is an abreviation of a full explanation and added simply to place CoVariance in context, since it deals strictly with generics.
Unfortunately one of the challenges with generics is that you can cast a List<string> into a method thats looking for a list of objects list<integer> and just allow the code to run against whichever generic collection containing either strings or ints you pass in. Now, even in VB6 it was not uncommon to have several different buttons connected to the same event handler. In fact if you have a grid or similar construct with embedded controls this is still a common pattern, where the event handler is told which row the event came from. The reason is very simple, each row will have a similar piece of code that differs only by which row should be impacted and you wouldn’t want to rewrite that code.
Similarly, you probably have several different collections each of which is associated with a specific type through a generic declaration. There will be certain actions that you want to take on any of those different specific collections. This new feature allows you to define a single method and tell it to execute on any of the generic collections which support it’s expected interface. The idea is you can have a single copy of your code that knows how to work generically with the different collections associated with different specific types, that you will pass it. The good news is the compiler can see the type information for every planned access and even do type checking for each different type, thus you get the power of a polymorphic object with all the compiler based safety of strong typing.
I ran into some code today which caught me off guard. In the event handler for the Exit menu item was the command:
Application.Current.Shutdown()
(Note I've omitted the ; for C# syntax vs VB)
Now traditionally I've always used:
Close()
(I've omitted the 'this' or 'me' as well as the ; for those looking for language specifics...)
So is there a difference and is one better? Well there is definitely a difference and in my opinion each is definitely better in a certain scenario.
The core similarlity is that both need to be called from your main application window thread in order to shut the application. Thus calling close on a dialog doesn't shutdown your application, although calling shutdown from your main thread even in a dialog will... each will also call all the appropriate events for closeing windows and disposing of objects.
The core difference comes down to how your main application thread responds to the events which are fired as it prepares to close. The Shutdown command is unstoppable the app will close regardless of what one of the event handlers attempts. However, the Window_Closing (in WPF) event allows you to update the status of the CancelEventArgs (e) to indicate that the shutdown should be prevented. Thus if for example the user asked to exit and then the app said "but you have unsaved changes Save, Continue, Cancel?" which is something typically caught in the Window Closing event (since it's triggered when you click that cute little X in the upper right corner to close your window).
The problem - if you've called Shutdown, it doesn't matter if the user says - "Cancel" your app is slamming down.
Thus unless you are attempting to handle a sudden error condition ("Must stop now to avoid corrupting data.") you probably want to rely on the Window.Close() method instead of the Application.Shutdown method.
Well in theory the correct title for the group is the ASP.NET Special Interest Group of the San Diego .NET Users Group, but that didn't flow in the post title. I'm speaking at their meeting on the 21st in relation ot SharePoint and ASP.NET. Here's the description of the session I'll be doing:
SharePoint and its feature enriched cousin Microsoft Office SharePoint Server (MOSS) are becoming a standard part of company web properties. As such ASP.NET developers need to understand how to create custom applications which can leverage this Microsoft product. This presentation is going to look at setting up a shared SharePoint and ASP.NET development environment. It will then look at debugging for custom workflow applications and examine a custom ASP.NET Web Service which leverages the OpenXML office document format to generate a Word document on the server and add that document into a SharePoint document library. The presentation will leverage the Sales Forecast OBA code base which is publicly available on CodePlex with a focus on the ASP.NET , Visual Studio 2008 and SharePoint integration.
The meetings are held at the Microsoft San Diego offices in La Jolla. For more information go to their website at:
http://www.sandiegodotnet.com/Meetings/ASPNETSIG/tabid/59/ctl/Details/Mid/387/ItemID/113/Default.aspx?selecteddate=10/21/2008
This is one of those musing posts and comes from one of the challenges I have when teaching a feature that Microsoft chose to call 'Generics'. I think this name was picked by someone, who while reasonably familiar with English wasn't a native speaker of the English language. Thus they found a definition and thought it applied - allow me to elaborate.
What is a .NET Generic - well in short - under the original implementation of .NET collection classes contained a set of other objects. However, these classes didn't know specifically what kind of object they contained. Instead a given collection might contain more then one different type of object, for example numbers stored in a collection with strings and image objects. It wasn't possible to say thata given collection would contain only a specific type of class.
With the introduction of 'Generics' it was possible to indicate that a given collection would only contain a specific type of object. That's right the feature Generics describes a set of rules and syntax for ensuring a collection is of a specific type. Now the challenge comes from how the definition of generic is phrased in some dictionaries: "Relating to or descriptive of an entire group or class"
Notice that the preceding definition basically associates the definition of a generic with a class. Thus if you were searching the dictionary for a word that described a class - well there you have it. Unfortunately this use of the word "class" doesn't relate to the use of the word "class" in object oriented programming. In this use a class is more of a category of like items - not the definition of a single item.
Webster's Revised Unabridged Dictionary - Cite This Source - Share This
(http://dictionary.reference.com/help/web1913.html)
Generic
Ge*ner"ic\, Generical \Ge*ner"ic*al\, a. [L. genus, generis, race, kind: cf. F. g['e]n['e]rique. See Gender.]
1. (Biol.) Pertaining to a genus or kind; relating to a genus, as distinct from a species, or from another genus; as, a generic description; a generic difference; a generic name.
2. Very comprehensive; pertaining or appropriate to large classes or their characteristics; -- opposed to specific.
| Webster's Revised Unabridged Dictionary, © 1996, 1998 MICRA, Inc. |
That's right the word I most frequently use to describe the feature Generic is the one which defines the opposite of the definition of the word generic....
I don't think Microsoft can really do much about this, it's just one of those things that make you wonder...
This is one of those 'hey look at me' posts that always make me feel like... well if you recognize the title of the movie that the quote which is the title of this movie comes from - that pretty much sums it up.
Anyway a few 'ads'.
First off, I have a new article available over at SQL Magazine. It's a very introductory article to LINQ for SQL so if you are looking for a good starting point for just getting started with LINQ, here's a short article that might be of assistance: http://www.sqlmag.com/Article/ArticleID/98205/sql_server_98205.html
The second item fits the post a bit better. Back in the first Quarter I signed on to do another book - yes my wife is ready to kill me - which since she is pregnant get's the pregnancy multiplier (we're currently around 7 or 8 so the danger level is getting pretty high). At any rate if you are interested it's still way out in the future - like October 2008 - if "we" (me) make "our" (my) final due date - here is the page: http://www.amazon.com/o/ASIN/0470377313/105-1544171-6096430
As you can note on that page this next book is an Office Business Applications book. Of note, it will have both C# and VB samples (ok VB sample - but more on that later) and covers using WPF with Outlook Form Regions and Excel not to mention server side document generation. That's the good news - the bad news - well I'm late on my chapters - of course that's pretty typical for me - the question is can I catch up in the next few weeks - especially given the increasing pregnancy multiplier...
Finally, I thought I should mention that my last book is finally getting read to be available. At 1600 pages it pretty much is a phone book, and it should ship for the first week of May which apparently is fast approaching: http://www.amazon.com/Professional-Visual-Basic-2008-Evjen/dp/0470191368/ref=sr_1_1
I'm in week 5 of teaching my Visual Basic I programming class at the University of California San Diego Extension. The week 5 class is going to focus in on WPF and helping students get a better feel for working with this new user interface paradigm, and it's custom 'script' language XAML. 
WPF comes with several new concepts and I think that for developers who are just getting started and or coming from a solid web application background many of these concepts feel very natural. On the other hand there are a host of developers out there who are coming from a Forms/Win32 based background. For these developers, even though most people think of WPF as a Forms replacement the new declarative model and in particular the new buzzwords leave them overwhelmed.
After all most people that show of WPF applications are busy making sure they've included as many graphical elements as they possibly can, for example one famous paraphrase of Tim Huckaby is "It's just not a WPF application without some form of gratouitous animation."
However, from my standpoint, in the way I approach introducing developers is to explain some elements on XAML and then focus on the similarities between WPF and Windows Forms development. For example in Chapter 17 of the soon to be released Professional Visual Basic 2008 which will ship this May, my approach is to literally have you start by designing what could easily be a Windows Forms application using WPF. Over the course of the chapter the application is migrated with the title bar being hidden, buttons being customized, etc as you introduce more and more concepts that are native to WPF.
In the beginning you start by working with the Visual Studio 2008 editor. This editor is well known to be VERY limited in comparison to Blend. However, if you are moving from Windows Forms to WPF then you'll feel much more comfortable in this environment. Start here and work towards the same type of applications, then introduce Blend. Blend not only provides several key examples that you can use to get a better feel for the WPF paradigm, but allows you to start to take that item which you feel comfortable with and migrate it to a WPF paradigm with routed events, complex styling and other elements that are much more in keeping with the declarative programming model. Of course this book isn't about WPF so I don't go deep on things like styling and databinding and other topics, but it will help you start so that those topics combined with everything else in WPF aren't quite so overwhelming.
Keep in mind that while there are rumored to be several WPF related updates coming in the next update to Visual Studio 2008 (I think I covered when to expect that to appear) even with these updates you as a developer are still going to need to start to transition to this new UI paradigm. Fortunately because WPF performs better on Vista then on XP, and has no backward compatability below XP there is still time for you to get up to speed... but that grace period won't last forever. More importantly those performance issues are primarily for heavy duty graphics, if you are working in a more Windows Forms paradigm you won't see much of a difference at all.
Which brings me to "Why do it now?" - Well we already have an announcement that Windows Forms 2.0 was the last of the new development on that model. By starting to work with WPF now, even though you might not create a gratouitous graphic, you are creating an application tier that as WPF takes over (and with it's relationship to Silverlight 2.0 the pace of adoption is imho going to accelerate) your code even though it still has the standard Windows Forms look will integrate and be able to be adapted much easier then people who are continuing to create new solutions using Windows Forms. So now is the time to take those existing designs and just start by implementing them in WPF with little or no leverage of the high end graphics - and then as you get more comfortable with just how much power WPF provides you can update them to leverage that power.
As I noted in my last post I’ve been working with a State based custom MOSS workflow. I’ve actually reached the point where I’m into resolving minor issues during my unit tests. One of my tests involved having a user other then the assigned user take a pending task and resolve/address it. So for example a document waiting to be approved is recognized by a manager who is covering for the assigned manager. The covering manager has “permission” to complete the task but isn’t the assigned user. This is where I had what I consider to be unexpected behavior.
What happens in SharePoint is that when I start in the debugger (or after deploying my workflow outside the debugger) the workflow is run in the context of the administrator. Now before you read that as “administrator” let me clarify – it’s run under a fixed account. The context of the thread executing the workflow isn’t assigned based on the current user. So whether it’s the administrator account or the Guest account the point is that at runtime if a parameter containing the user who triggered a workflow event isn’t passed into the workflow there is no way to determine the actual identity of the person triggering that next step in the workflow. This is important because if you are planning a workflow, then like most you are planning to capture a history of events which occurred. The problem if you don’t explicitly pass the name of the current user triggering an event then the name available as part of your running context will not be correct. Thus your history can at best reflect the name of the user who was supposed to resolve/address that action. Lost is the identity of the user who actually accessed your site and did take action on that workflow item.
If someone actually has an answer for getting that user (aside from explicitly setting a parameter) that I'm not aware of please feel free to let me know?
I spent quite a while looking at the parameter and runtime environment data and created a new WindowsPrincipal.GetCurrent() instance to see if I could find the actual current user. I also checked for example the current user value in this.workflowproperties.web, and it also was the administrator. Of course it might turn out to be a setting within SharePoint that I'm not aware of. Not that I would have explicitly set it since I can only begin to guess at where the setting comes from when my workflow is deployed from Visual Studio 2008. (btw, the account I deploy from isn't the administrator account.)
I actually consider this to be a pretty major workflow failing… in theory there is a reduction in security since the process executing the workflow has the permissions associated with (in this case the administrator) the most privileged account that will need to run any workflow. Additionally it breaks down on tracking reliability since it is in theory possible to apply the wrong account name to some of the history data, or if you haven’t planned for it to not explicitly capture the actual user executing the workflow.
Keep in mind if you are building and testing your workflow under the administrator account you might not ever notice this. However, knowing about this issue you can set up an InfoPath form and at least capture the name of the user who actually acted on the associated workflow.
So I noticed an issue the other day. I have a custom SharePoint 2007 workflow as part of some work I'm doing on an Office Business Application (OBA). Now if you were at the Office Developers Conference (ODC) in San Jose this year you saw Jay Schmelzer demonstrate how you could with Visual Studio 2008 start up the debugger on a SharePoint State Workflow project and have Visual Studio automatically update and deploy the files associated with your workflow. It's a great capability and very powerful when it comes to working with SharePoint workflow projects.
However, I recently ran into a problem every time I went to debug my workflow the deployment step failed and the debugger failed to start. It took a little while but I soon realized that the problem was related to two of the files the workflow.xml and the feature.xml files being marked read only in the deployment directory. It was only a short time after that till I realized that the problem was related to the fact that I had finally bound my development environment to our Team Foundation Server (TFS).
It turns out that when Visual Studio deploys the files associated with the workflow it leaves the file attributes unchanged from your development directory. This is an issue because in working with TFS and not having these files checked out they are marked as read only. The first time you deploy no problem, the old version wasn't read only... but the second time the deploy fails. Once you check the files out - even though you aren't planning to edit them, Visual Studio will deploy writable copies again. However, you'll first have to access that directory on your system and manually reset the files to not be read only.
The Heroes Happen Here (http://HeroesHappenHere.com) launch event for Visual Studio 2008 happens this week. As with the Visual Studio 2005 launch event this is a shared launch that includes Windows Server 2008 and SQL Server 2008. Visual Studio 2008 actually released back in November of 2007 and since then we've all had a chance to start building applications. The new features in Visual Studio 2008 are very powerful across the board, but those associated with Visual Basic and LINQ happen to be particularly powerful. I'm sure the the launch will do a great job of showing off the new features, after all it seems like just last week at the Office Developers Conference that we were showing off several of the features related to created solution based on the Office 2007 products. (There was a truly awesome demonstration of the built in debugging capability of Visual Studio 2008 with custom MOSS workflows during the ODC that I happen to know a little about.)
I don't want to steal any of Microsoft's thunder related to Wednesday's launch event in LA, but instead to look beyond the current release. Not way into the future (ie. Hawaii - a future version (next?) of Visual Studio) but something much closer - the coming updates to Visual Studio 2008. That's right we haven't even gotten to the launch and of course the focus is already shifting to the next set of features. This makes more sense when you consider that SQL Server 2008 - which is part of this week's launch event isn't actually releaseing until sometime in the 3rd quarter of 2008. Thus I'm going to point out some things which it certainly appears will be releasing for Visual Studio 2008 at the same time as SQL Server 2008 releases.
Why do I say that - well the first example is a set of updates to ADO.NET to support the new features of SQL Server 2008 - http://blogs.msdn.com/adonet/archive/2008/02/21/coming-soon-to-linq-to-sql.aspx Yes as part of the release of SQL Server 2008 ADO.NET will be getting updates to support the new data types which are going to be available. The nice thing about that post is that it helps clarify those new SQL Server features which are most likely to be used by application developers right out of the gate.
On the other hand a single blog post really doesn't firm up that those enhancements have to arrive with SQL Server 2008 - they might not arrive until say October or November or even later, rather it is the fact that we also have word on several other new Client features which are going to be releasing "this summer." Scott Guthrie outlines several new enhancements to Visual Studio 2008's client model http://weblogs.asp.net/scottgu/archive/2008/02/19/net-3-5-client-product-roadmap.aspx
I personally am very interested in some of the new deployment enhancements, but lets get real there is no way Microsoft is making more then one release of enhancements this summer so the combination of the two blog posts gives us a pretty good idea of when to expect the next set of developer tool updates (http://www.sqlmag.com/Article/ArticleID/98161/sql_server_98161.html).
It's nice to see that new tools and enhancements to Visual Studio 2008 are on the way even if as some at Microsoft admit the new tools are coming at a breakneck pace: http://blogs.msdn.com/rbarker/archive/2008/02/04/test-post-from-windows-live-writer.aspx (btw, I'm planning to download the Live Writer SDK as soon as I get caught up and have some free time...)
A couple years ago there was a huge crisis since Microsoft was bringing an end to mainstream support for VB6. At the time some people felt the sky was falling. The reality of course is that applications still worked but the available support for unexpected behavior stopped.
Well it's that time again. The end of support for .NET 1.1 has been announced - October 14, 2008. A little over 5 years after .NET 1.1 was released. This isn't the end of support, just end of mainstream support. Support will continue until 2013 - if you are like me your next question is what's the difference. Microsoft provided the following table to explain:
What is the difference between Mainstream Support, Extended Support, and online self-help support?
|
Support provided |
Mainstream Support phase |
Extended Support phase |
|
Paid support (per-incident, per hour, and others) |
X |
X |
|
Security update support |
X |
X |
|
Non-security hotfix support |
X |
Requires extended hotfix agreement, purchased within 90 days of mainstream support ending. |
|
No-charge incident support |
X |
|
Warranty claims |
X |
|
Design changes and feature requests |
X |
|
Product-specific information that is available by using the online Microsoft Knowledge Base |
X |
X |
|
Product-specific information that is available by using the Support site at Microsoft Help and Support to find answers to technical questions |
X |
X |
Note A hotfix is a modification to the commercially available Microsoft product software code to address specific critical problems.
This might have other impacts, for example SharePoint 2.0 (2003) is built using .NET 1.1 for customization, so the impact of this on the SharePoint community and custom web parts could be significant. Of course since SharePoint 2.0 mainstream support ends around 7/2008 (less then 6 months from now) that probably won't be a problem... at least on the .NET side - not sure about those actually using the product who haven't migrated to SharePoint 2007 (3.0) (Note: I was actually expecting the reverse (.NET 1.1 support ending first) when I started this post...)
At any rate I think it's safe to say that you shouldn't even consider starting a project on .NET 1.1 or SharePoint 2.0 (2003) at this point. Of course in my opinion anyone not working on VIsual Studio 2008 is behind the power curve.
Once I installed Visual Studio 2008 it was time to add the Team Explorer for Visual Studio 2008. The Team Explorer aka Team Foundation Client is found on the Team Foundation Server installation DVD.
So I took the .ISO file which I downloaded from MSDN and copied the TFC folder which contains the Team Explorer installation onto an actual DVD. This gave me a copy of just the Team Foundation Client 2008 which I could install onto my development machines.
I put the DVD into my Vista/Office 2007 machine and kicked off the install. The install ran and after things were going I moved onto another machine. When next I checked I found that the installation had failed. So I reported the failure via the automated process that the install package provided and tried again. The install failed again - which left me... concerned.
So I took the DVD out of my Vista machine and moved to my Windows XP / Office 2003 machine and ran the installation. While that was running I started searching the web for any known installation errors with Team Explorer 2008. I finally found a note in the Microsoft MSDN Forums that mentioned someone else was having an install problem and found that it went away when they used the install from a DVD which had all of the TFS products, as opposed to a CD with only the TFC folder.
Now what was interesting is I found this as my Team Explorer install on Windows XP with Office 2003 completed successfully. In other words on an XP machine running Office 2003 you only need the TFC directory to install Team Explorer.
So I went to my .ISO file and burned a DVD of the entire image this time and put it into the Vista/Office 2007 machine. I must admit I really like the updated install package for the TFS product, having the different product options available is a nice way of handling the different install packages. At any rate I clicked on the Team Foundation Client and started the install. The first and subsequent screens to start the installation looked just like the stand-alone DVD's and the install started with the same packages. However, in this case the installation ran to completion.
Thus if you are using Windows XP with Office 2003 you can install a standalone installation package for Team Explorer however, if you are running Vista or Office 2007 and you get an installation error - then make sure you get a copy of the full Team Foundation Server (TFS) DVD and run the install from that media.
So for those who weren't aware Visual Studio 2008 released on Monday November 19th. I got my download started early while the downstream transmission speeds were still above 300KB and it finished late yesterday afternoon, early evening when the transmission speeds were down under 70KB.
So like many who have been using Visual Studio 2008 Beta 2, I made the decision to install Beta 2 on my main desktop (physical machine). This was a good decision as I've been using Beta 2 for projects for the past 4 months. However, now it was time to face the music - would I need to rebuild my box to get the release version installed?
As part of working on the next Version of Professional Visual Basic for Wrox, I have a virtual environment which was configured for my authoring and screen shots. So it became my test platform. I started the uninstall of VIsual Studio 2008 Beta 2, I uninstalled MSDN, and as I looked at the list of other products some of which hadn't uninstalled I found several that were from 7/27 the day I installed VS 2008 B2 and I could tell they were related, so I uninstalled them as well. I then took a couple minutes to rename my old projects directory to "B2" since I plan to rebuild the projects from scratch and I made sure other directories that VS would target were also clean.
So I took a fairly conservative approach to minimize the risk that it would fail. I rebooted and connected my VPC to the ISO which I downloaded and kicked off the install with crossed fingers. The installed started no problem. Nearing the end of .NET Framework version 3.5 was install my Vista machine asked me to reboot and restart my installation, which I did. The installation then ran to completion and asked for another reboot.
I then installed MSDN locally and again everything went fine. So for those wondering installing the release version of VS 2008 on a machine which previously ran VS 2008 Beta 2 seems to a non-issue. So get out there and get the latest bits and start working there are a ton of new features to explore.
This winter I'll be taking my first crack at a new class at the UCSD Extension. It's surprising that I'm heading into my third year teaching the Visual Basic .NET Programming II class and now I'll get to do my own lead in. I'm looking forward to this opportunity especially since I'll be updating the materials to account for Visual Studio 2008. As always I'll make certain the course supports those who only have access to the VB Express Edition in terms of lab work.
So if you are looking to learn about the most powerful and most popular .NET language, stop in for a class.
For more information on the when and where and if you are interested in registering for the course go to the UCSD website at: http://www.extension.ucsd.edu/studyarea/index.cfm?vAction=singleCourse&vCourse=CSE-40615&vStudyAreaId=14
Often as a new release of Visual Studio approaches there are posts regarding, where are the two primary languages in .NET going? In short as has been noted on one or two places around the net the VB MVPs posed the question of, what is the strategic long term expectation for VB and how is VB doing in the market? Which language should I learn, which will help me get a job? etc.
(The short answer regarding which language to learn is - if you are going to do just a little programming VB is easier to learn and maintain. If you intend to be a Professional Software Engineer and limiting your career to being a full time Cubicle Code Monkey you need to know both. Just knowing C# or VB isn’t enough, as a developer I’ve learned somewhere between one and two dozen programming languages, to be honest I lost track of them all and stopped counting long ago – although interestingly enough I still have my high school ‘Basic’ programming book...sentimental value only - the point being casual developers will be more comfortable in VB and professional developers learn languages and VB and C# are both necessary with .NET today.)
At any rate focusing on the core topic, depending upon where you ‘stand’ your view of VB or C# might be that it’s doing great or not so great. After all if you are working in a shop where your senior management likes C# it might seem like very few people are working with VB.
On the other hand this perception might be a self-fulfilling prophecy for your company. After all if every project uses a hammer then there must be a lot of nails (how’s that for twisting a proverb “if all you have is a hammer everything looks like a nail”) If your company “supports” both VB and C# languages but encourages that new projects use one language well then you begin to wonder. As I noted in the past I’d consider that pretty short-sighted for a consulting company. After all if your goal is to sell software as a service (which consulting companies do) you don’t want to lose a major portion of your market to language bias… so before I go further I want to clarify where I got some of the data I’m about to toss out.
I think it’s common knowledge that I’m an MVP (I can hear some of you: ‘could he mention it one more time…’) anyway I bring this up to note that it shouldn’t be a shock to realize that as an MVP I have a Non-Disclosure Agreement (NDA) with Microsoft. This comes up because as a group we MVP’s have some communication channels (formal and informal) with Microsoft. One of the formal ones revolves around my specialty area Visual Basic.
In this area the VB-MVPs have essentially an opportunity to truly speak freely to Microsoft on NDA topics. It’s where we can say we think that feature A is useless or that we think the VB team has dropped the ball by not having a given feature, or where we think they need to take the ball and really run with it. It also allows us to ask questions and get answers that might embarrass one or more people at Microsoft. In general it is a valuable tool. Every so often we get permission to post some information from that discussion to help frame discussions outside that group – things that aren’t too germane to actual company business, and that’s the case for the numbers I’m about to post.
There are way more people online downloading C# right? Wrong – At this point you aren’t going to be surprised when I say the VB Express is the top download of the Express editions. It probably also doesn’t surprise you if I say that it’s downloaded far more frequently then C++ Express. But does it surprise you when I note that C++ is the number 2 download behind Visual Basic. It surprised me, after all I expected Visual Web Developer to be in the top 2 (after all both VB and C# web developers would use that one tool).
That’s right Visual Basic alone is more popular by a margin of 20% over C++ <credit VB Team>. What I will say is that the other three express editions are all much closer in terms of downloads, and registrations. The point is that Visual Basic is noticeably more popular. Of course this is the Express Edition, that’s for students and hobbyists, they aren’t professional developers.
So how big is Visual Basic when someone reviews the market?
Well according to Forrester research Visual Basic is the #1 .NET language. <credit VB team> Note that’s not some legacy number based on COM developers, that’s just in terms of .NET developers. That’s right the majority of professional developers out there are using Visual Basic, and that even makes sense.
Think about it this way, prior to .NET the two primary development languages were C++ and VB. C++ was far more powerful, but it took longer and cost more to develop applications. Sure for someone developing tools or with a huge install base the disadvantages could be overcome for the power. VB on the other hand was much easier to learn and use, the code was easier to maintain and its performance while not equal to, was certainly comparable to C++.
Along comes C#, from the standpoint of C++ developers C# offers a familiar syntax and reduces the disadvantages of C++ - applications were easier to develop and accordingly cost less. C++ developers and Java developers have without a doubt flocked to C#. In fact if you are a Java developer and haven’t moved to C# boy are you missing out on the future. However, these were smaller developer communities to start with then Visual Basic which also released a .NET version.
Visual Basic also moved to .NET and its disadvantage – not having the same runtime environment and power as the other major language went away. Note the fact that VB is easier to learn, read and maintain is still true but now you also get all the power of C# and since .NET creates code on par with C++ it means you as a VB developer are creating first class applications.
Sure some people have jumped from VB to C# that is to be expected, and many companies which in the past would have C++ for some projects and VB for others are moving to use only 1 .NET language. However, as I’ve noted in the past most VB developers will find the transition to VB.NET fairly easy and natural. When I teach I find that the students with previous VB experience do very well, and in fact that once they get the key elements of Object Oriented Development are ready to become productive. More importantly the VB teams recent move from a migration wizard to the Interop toolkit (similar to WPF Interop) and the Power Packs make the transition from VB6 much easier.
What is interesting is how the VB team blog (http://blogs.msdn.com/vbteam/) ranks in the top 1% of all MSDN blogs and the fact that the VB Developer center on MSDN is one of the top trafficked sections of MSDN (http://msdn2.microsoft.com/vb). <credit VB Team> In other words VB is doing just fine and as I’m sure we would all agree so is C#. In the near term there is no reason to suspect anything about this equation will change – C++ and Java developers will tend to prefer C# and those who have mastered both VB and C# will prefer VB J
So what about the future?
Well for starters the Visual Basic team recently published the Beta version of the Visual Basic language specification. A great step for defining how the language works, and one I look forward to seeing become the basis for standardization. We also know Paul Vick is discussing VB X (aka VB 10) over at Panopticon Central (http://www.panopticoncentral.net/) and is very open to input on things to deprecate in the languages specification and new language features to add. I highly suggest going over to get in a good suggestion or two. As for Visual Basic – I’m confident that it’ll be around and diving into all corners of the Microsoft development tools.
One of the most highly anticipated features of Visual Studio 2008 is XML Literals. It doesn't sound like much until you start thinking about some of the ways that you can leverage this capability. One creative way is to replace code, Beth Massi of the VB Team recently made a post highlighting a little of the power that you can have with XML Literals in Visual Basic 2008.
http://blogs.msdn.com/bethmassi/archive/2007/10/23/avoid-underscores-in-your-multiline-strings.aspx
What's interesting is her post leverages another new feature call type inference which allows her to create the new object with specifically needing to specify details of the type. She continues the example but just the first section allowing you to format strings without any special characters is pretty awesome. Of course the syntax <%= %> might give me nightmares of ASP but overall the capability is very cool, and combined with some of the power of XLINQ that VB provides (see Scott Hanselman's post: http://www.hanselman.com/blog/XLINQToXMLSupportInVB9.aspx) VB is definitely looking to simplify working with XML... you know that data structure which is at the core of things like XAML and Silverlight.
Update: Beth's keeping the XML literal ideas going with her latest post: http://blogs.msdn.com/bethmassi/archive/2007/10/26/xml-literals-tips-tricks.aspx
Microsoft recently released Visual Studio 2008 Beta 2 (http://msdn2.microsoft.com/en-us/vstudio/aa700831.aspx). Being the type of developer who is always interested in such tools and more importantly currently being involved in a couple Windows Presentation Foundation 3.0 projects I was one of the first to download a copy. One of the new features of Visual Studio is that it allows you to target your builds at the .NET 2.0, .NET 3.0 or .NET 3.5 versions of the .NET Framework.
My expectation although the documentation doesn’t claim it, is that I would be able to start using VS 2008 while other members of my team continued to use the older Visual Studio 2005 with the November 2006 CTP extensions for WPF support. I was partially (mostly in fact) correct – but it requires a few ‘tricks’, and more importantly even for true .NET 2.0 projects that isn’t a true statement.
The warning shot was fired when I opened the project solution. The first thing that VS 2008 did was initiate a conversion wizard to convert the solution and project files on the project. It kept them targeting .NET 3.0, but they would no longer open in VS 2005. Fortunately I hadn’t checked anything into TFS so I copied the files and undid my changes. (Note: I later tested with .NET 2.0 projects and the result is the same. There is actually a reason or arguable merit for this, as I’ll explain as I discuss how to manage this scenario.)
So what I then did was take my solution and project files which I had converted and copied out and named them with the original project name plus “2008” on the end. This meant I still had the original project files and the newly converted files. In comparing these files it was apparent the scope of differences was minimal – in fact it was mainly a couple strings to reflect that these were in fact 2008 versions of the same file. So I modified the solution file and instead of referencing the projects in the solution by their original name I adjusted the solution file references to be the other “2008” versions of my project files.
I then reopened my new solution file in Visual Studio 2008 and found that my solution would build and was maintainable. In fact I was able to work in this mode quite literally for a couple of weeks with no issues what so ever. It then came time to package this project for deployment. We were using a Click Once deployment model and this is where two issues were discovered. The first issue was that Visual Studio 2008 Beta 2 did not include a signed .NET 3.0 Framework redistributable package that you can add as a dependency to your project. There wasn’t much to be done about this but I did mention it along with my other problem to Microsoft.
The second issue was that while in the project properties, if I clicked on the Security tab, Visual Studio 2008 crashed. Not threw an error - it crashed and burned. As part of being a Microsoft MVP I have access to a shortcut for contacting a couple people on the development team about issues when I’m working with something like VS 2008 Beta 2. In this case I mentioned my concerns about having new project types, my concern with the .NET 3.0 redistributable and my issue with the Security Tab for my project’s properties causing Visual Studio 2008 to crash. This got the attention of Eric.Knox one of the ‘developers’ @Microsoft who emailed me about reproducing the problem. Because the customer was comfortable with me sending this problem to Microsoft I forwarded Eric a complete copy of my solution files (fortunately it was a relatively small code base).
Eric was immediately able to reproduce my problem (which was good) since I was now bothering someone who's time is arguably more valuable writing new features into the product J. After a couple hours Eric contacted me to tell me what the problem was. In short when I readdressed my solution file to reference my project files, I failed to also adjust the project references in my project files to do the same thing. For most of Visual Studio this wasn’t a problem, but in the case of the security tab this caused a fatal error. Eric was able based on my code to find this in a relatively short period of time – and in the RTM version of Visual Studio 2008 the environment won’t crash if you repeat my mistake. At the same time however, this is still an error in Visual Studio 2008 and the error message you get may not be the most helpful.
The key is you need to be certain to convert the project references in both your solution and project files if you want to develop on Visual Studio 2008 in parallel with someone using Visual Studio 2005. Aside from the preceding issue I’ve had only one issue (that I’m about to discuss) working this way, and being able to work in Visual Studio 2008 has made me far more productive then I would have been with the Visual Studio 2005 environment and the XAML editor which is almost non-functional (for complex XAML). In general I’ve just manually added new classes placed in the Visual Studio 2005 versions of the project files to mine and vice versa. The coordination on that level has been very easy and relatively painless – so if you are in the scenario where not everyone on a team is in a position to move to Visual Studio 2008 simultaneously, I’d still go for it on .NET 3.0 projects.
However, there is the remaining issue which appears to coincide with the reason Microsoft is moving the project files forward. I stumbled on this issue quite by accident when during development I created a new class in the project. As part of this new class I happened to syntax which is based on the new release. I didn’t reference any .NET 3.5 libraries but I wrote my VB/C# code using syntax which the Visual Studio 2008 compiler recognized. However, Visual Studio 2005 and Visual Studio 2008 don’t use the same build engines and as a result when a team member tried to compile my new class the compiler kicked out my code. So if you are going to attempt this route recognize that although you are still building a .NET 2.0 compatible project (based on the libraries which are referenced) you will have access to language features that are interpreted by the compiler at build time which aren’t compatible with the build engine a Visual Studio 2005 developer will use. Again this wasn’t a major problem, in fact it was incredibly easy to recognize and resolve but this is probably the type of issue that the folks at Microsoft were most concerned with when they made it so that the same project file wouldn’t work in both build environments.
Finally of note, keep in mind that a new version of TFS (TFS 2008) will be shipping with Visual Studio 2008 along with a new version of Team Build. Both have several new features that you’ll want to access and since your old Team Build 2005 won’t like Visual Studio 2008 projects – you’ll need to upgrade to TFS 2008 in conjunction with or before you move your developers to Visual Studio 2008, so make sure you start looking at that Beta 2 product now as well.
I keep meaning and forgetting to add a link to an excerpt from the latest edition of the Profession Visual Basic .NET 3.0 book. The editorial staff chose to excerpt a portion of one of my chapters to let you see some of what is new in the current edition. We of course are already working on the next edition now that Visual Studio 2008 and .NET 3.5 are in Beta 2, but for the time being this book offers some insight into the new .NET 3.0 technologies.
http://www.wrox.com/WileyCDA/Section/id-305563.html
So in the past I've written articles that talk about how the web as an application model is peaking for certain types of application models. Specifically that while the 'reach' of web applications - ie. the way that even now I can be sitting in a Del Taco in Riverside (where it is 108 degrees farenheit) updating my blog just prior to heading over for a user group meeting, provide a powerful paradigm. This isn't going to disappear and isn't to be discounted, but it isn't enough. New technologies such as Silverlight and WPF will help extend the life of the web as a UI, but the reality is, web services allow me to use a rich client vs. a web site for editing my comments and then just submit the data to the server.
Most enterprise applications (as opposed to public facing) continue to be rich client applications. In the future there will still be many such applications which are written from the ground up, expecially those which are focused more on sizzle then steak. But I feel that the new paradigm for actual business applications will be to leverage someone else's User Interface for much of the framework with a minimalist custom set of controls. A couple years ago the common 'UI design pattern' we heard from smart client customers was for them to ask for a user interface based on Outlook. This is still the case but things are shifting, you see instead of asking for a client based on Outlook - instead we are starting with Outlook as the client and just customizing it for the needs of the organization.
Visual Studio Tools for Office (VSTO) have been around since .NET 1.x but as I have been informed many times - haven't really taken off as some expect. However, like so many things, until the rest of the infrastructure to support a technology is in place even a great tool gets only limited use. In the past VSTO has primarily focused on the document. Specifically it started as a replacement for VBA and the document centric customizations of VBA and Macros... but with Office 2007 and Visual Studio 2008 (Orcas) - well this isn't the same model.
An OBA is an Office Business Application, in short it is an architectural model which leverages the full Office System to implement custom business solutions. The first key enabling technology is of course SharePoint aka Microsoft Office SharePoint Server 2007. I'm not a big fan of SharePoint as a development platform, but as a host for documents and document templates it is unparalleled. By marrying key document templates with a web site you gain the benefit of a web application with a rich client. I'll post more in the future on some of the key enabling technologies which can then be built on this - think about Add-In's and custom message contents but the key is now that we have a solid server combined with a host of new tools the OBA model leveraging VSTO is a very viable solution framework.
Don't think so - well take a close look at Team System. Team Explorer is in part an OBA, yes there is a 'custom' add in for Visual Studio which isn't part of Office - however, I know for a fact that when I start working with tasks, work items, bugs etc. in TFS I do it all with Excel. Why because Team Explorer's custom interface pieces aren't natural to me, but the add-ins for Excel and the way that the forms are hosted on SharePoint and retrieve and update data from SQL Server provide me a user interface which is effective. So when you are thinking about how to engineer that next big smart client application don't discount the value of being able to leverage the Office System as the plumbing for much of what you'll do. Tonight I'll be presenting on a demo OBA solution which InterKnowlogy helped Microsoft develop to highlight some of the new features of VSTO 2008. This is a powerful architecture and I'm expecting to do additional presentations similar to the one I'm doing tonight for the Inland Empire .NET User Group. I grabbed a screen shot of their homepage describing tonight's presentation iedotnetug_org.JPG (172.5 KB) but feel free to visit their site ( http://www.iedotnetug.org) or stop in for a meeting in the future.
I'm planning to teach the Spring quarter's edition of Visual Basic II. The class is designed to pick up for students who have been through an introductory .NET Framework class and an initial Programming with Visual Basic I class. Previously the class has focused on .NET 2.0 but with the recently released .NET 3.0 now available we'll be spending some of the additional class time looking at things like XAML, WPF, WF and LINQ (part of the .NET 3.5 feature set). Additionally for those interested in handling existing VB6 code we'll be talking about the Visual Basic Power Packs which allow you to interoperate between Visual Basic 6 and Visual Basic .NET code within your existing application. My goal is to ensure that students completing this class have an understanding not only where .NET is today and how to work with Visual Basic - but where Visual Basic and .NET are going and how to be positioned so that what happened with Visual Basic 6 doesn't again happen to those working in Visual Basic.
The class can be registered for through UCSD at:
http://extension.ucsd.edu/studyarea/index.cfm?vAction=singleCourse&vCourse=CSE-40616&vStudyAreaId=14
One of the items which came up at the MVP Summit involved the availability of VB Samples online. It's funny how sometimes you'll see the difference between those in Redmond and internal to Microsoft and those of us on the outside. In this case the response of the VB Team was effectively: "What are you talking about we ship samples along with each CTP, the C# team has their posted because they aren't all in the product." (Note I'm paraphrasing what I recall hearing here.)
Anyway the MVP's made it quite clear that from a perceptions standpoint the fact that the C# samples were easily available via the web while the VB samples were MIA was a problem. So the VB Team committed to making their samples available online. The result is that if you head over to the LINQ Samples page you’ll find both C# and VB Samples.
http://msdn2.microsoft.com/en-us/bb330936.aspx
Which reminds me of a second link to LINQ - For those of you who are still getting up to speed you'll find alot of great introductory information related to LINQ at: http://msdn2.microsoft.com/en-us/vbasic/aa904594.aspx
One last entry as I'm preparing to wrap for the day. Found this new site which indicates that as of today, what was previously called WPF/E is now known as "Silverlight" - http://msdn2.microsoft.com/en-us/asp.net/bb187358.aspx
Lots of good information and links for Silverlight at that location.
One of the items I learned when I was requested to speak to the LA C# User Group, was that they were essentially affiliated with the SoCal .NET User Group (http://www.socaldotnet.org/). Apparently the same speaker coordinator works both groups and they meet one after the other. Thus I was also requested to speak to the Orange Country group on the following night April 4th. Since some people attend both meetings I agreed to adjust my topic slightly.
In this cas I adjust my presentation to focus on WPF and Interop. The focus of course being the ability to take applications built with Windows Forms 2.0 and have the user interface work with new components being built with WPF. The presentation again introduces .NET 3.0 and WPF but doesn't include much of the XAML focus from the previous night's presentation. It instead spends more time looking at Crossbow.
Crossbow is the code name which Microsoft used when it was building the Interop libraries to allow the new WPF windows graphical libraries to work alongside the existing Windows.Forms libraries. The key message was: if you are using the Interop controls, the WindowsFormHost and ElementHost controls should ALWAYS be used to host User Controls. Yes they CAN host individual controls such as a TextBox or DataGridView, but if you need to Interop you have business logic in place and you should always encapsulate the controls in a User Control prior to having those controls placed in one of the Interop controls.
In addition I spoke about how this Interop direction is really a lesson learned from the initial Visual Basic 6.0 to Visual Basic .NET migration based path which Microsoft provided. Microsoft learned that trying to take an entire real world application and migrate it's entire code base to a new implementation language was a cost prohibitive scenario. It tended to be difficult for engineers to imagine and they constantly wanted to start with the backend components which made it that much more complex.
Instead with WPF Microsoft has pursued an Interop strategy. There won't be any tools to migrate your Windows Forms based application to a WPF UI. After all many components such as the DataGridView control just don't have a single equivalent under WPF. The key being that when you went to move the implementation from Windows Forms to WPF you'll want to change the implementation completely.
As I also note, not only did Microsoft learn this lesson when planning WPF, the Visual Basic Team has been leading the way. They have released a set of tools which will allow you to create new .NET Forms and have these forms compile into classic VB6.0 applications. In this way you can begin to extend your existing VB 6.0 applications with new .NET based capabilities without needing to spend 6+ months migrating your code base. The new VB Interop tools although not the focus of this presentation are every bit as exciting as the WPF Interop tools. You can get the latest version of the VB Power Tools from MSDN or from the Visual Basic Team blog at: http://blogs.msdn.com/vbteam/archive/2006/11/02/interop-roadmap-usercontrols-mdi-and-data.aspx
Here is a copy of my slides from the SoCal .NET User Group Presentation: WindowsInterop.zip (992.07 KB)
I know most speakers like to announce where they'll be speaking in advance (helps drive attendance...) but a couple weeks ago I was contacted by the speaker coordinator for this group and asked if I could speak in a couple days. In talking with them they said they hadn't really gotten much info yet on WPF and XAML so I agreed to do a brief presentation on these topics to this group.
So on April 3rd, I gave the LA C# User Group (http://www.lacsharp.org/) a presentation discussing XAML and WPF. The focus of the presentation was that you shouldn't think of XAML as being an adjunct or WPF. The two technologies are separate and have different goals. WPF is a set of class libraries which are part of the larger .NET 3.0 Framework. XAML is a declarative language which can be used to create .NET applications. The point being that XAML is a full fledged .NET application language like C#... (VB of course is still easier to read...)
Attached to this post is a copy of the slides that I presented to this user group meeting.
WPFIntro.zip (1.09 MB)
So I'm currently planning my next MSDN presentation which will occur May 9th and focus on the Microsoft Office Suite. I'll have more details and a link to that presentation in the near future.
In the interim I suggest checking out the upcoming "Live From Redmond" web cast series which the VB Team is putting on. This series will focus in on the new features in Orcas (next version of Visual Studio) and Visual Basic 9.0 (VB 9.0). The presentations are linked as a group on the Visual Basic team blog and this is a great resource if you are trying to get a feel for what new features are shipping with the .NET 3.5, which is the version of .NET Framework.
The first session is this Wed April 18th and is an Orcas overview. They are also adding more as the series continues so keep up to date by checking this post on their blog:
http://blogs.msdn.com/vbteam/archive/2007/04/09/live-from-redmond-webcast-series-beth-massi.aspx
I plan on attending several of these as I had the pleasure of hearing many of these speakers at the MVP conference and know they have some great content.
What seems like a really long time ago (~18 months) I made a post regarding the introduction in .NET 2.0 of Partial Classes. It's available here: http://blogs.interknowlogy.com/billsheldon/archive/2005/10/25/546.aspx. As part of this post I assert that in my opinion Partial classes are a feature and given the specific question I was addressing at the time that they are better in certain scenarios then abstract classes for managing complexity within a single class. (Note that abstract classes solve a different issue and have an appropriate place in OO engineering.)
So why revisit this issue, well in part because someone posted a comment to that post earlier today which brought it to mind, along with the additional thoughts which I'm bringing up. You see the Windows Presentation Foundation (WPF) uses the eXtensible Application Markup Language (XAML) and extensions to this language to *declare* a user interface. This user interface is then combined with traditional development languages to add custom behavior to the UI. To get a real in-depth on WPF I recommend the soon to be released book by Chris Anderson: http://www.aw-bc.com/catalog/academic/product/0,1144,0321503570,00.html The book will be getting released in early April and having seen some of the early materials I can say I definitely recommend it to people looking to really understand WPF's model.
However, part of what you quickly realize with WPF is that the XAML which declares (describes) a user interface element, (a window, a page or a control) is then associated with a traditional OO class. This class in .NET is implemented as a partial class. This isn't done for any of the reasons that people discussed as advantages of partial classes in the past or by anyone at the time of the release of .NET 2.0. .NET 3.0 introduces a new concept to .NET languages in that you now have a model where a class can be defined across two different language implementations. Not just syntactically different language implementation, but litterally process oriented vs declarative language implementations.
Think about it, with WPF part of your class is defined in a declarative programming style which essentially names the library classes to leverage. This includes non logic driven portions of your class implementation, for example applying style attribues, defining the display color and positioning and even limited behavior. At the same time your UI class also consists of traditional language elements to handle custom event behavior and implement application logic. These two unrelated syntax elements combine to create your user interface and with partial classes you gain a way to leverage these two disparate languages within a single class.
It's not limited to WPF, Windows Workflow Foundation (WF) does the same thing. In both cases the implementation of partial classes allows a developer to describe/implement a portion of the class in the language which is most appropriate for that implementation. Anyway it's just one of those things.
BTW - I don't know if I've mentioned in this arena but is everyone aware of why the abbreviation for Windows Workflow Foundation is only two characters? Think about it WPF, WCF all have 3 characters until WF which would logically be WWF. Most Americans immediately respond - wrestling since one of our sports-entertainment industries went by the name Worldwide Wrestling Federation. However, what most people don't immediately realize is that WWF is no longer around, there is now a WWE, but the Wrestlers gave up the WWF moniker - not by choice but because since 1961 the World Wildlife Fund which started in relation to Panda conservation holds a copyright on those initials. Microsoft needless to say wanted no potential conflict with this same organization and as a result Windows Workflow Foundation is abreviated WF... for backing information I reference this link: http://www.sportslawnews.com/archive/Articles% 202000/wwftrademark.htm Think about it, WPF is the Wells Fargo's stock ticker and there are several organizations using WCF none of which scared Microsoft. At least not nearly so much so as those who represent the Panda Bear - http://wwf.org or for a better feel of just how much money is involved: http://www.justgive.org/worldwildlifefund/weddings/index.jsp
I guess it's just too bad that MS didn't think to use "Library" instead of "Foundation" in the names for these new class libraries: WWL, WPL, WCL... but even I think those look weird now.
For those of you like me who have made the leap to Vista... well to quote Bugs Bunny "Watch out for that first step Doc, it's a doozy!"
There have been a few developer and even a consumer related compatibility issue which have at various points caught me offguard. There is of course the fact that Visual Studio 2005 isn't quite fully compatible - to the extent that the release version of SP1 for Visual Studio 2005 on Vista was delayed. Other issues of course related to things like SQL Express and drivers.
However there were two that really concerned me. The first was MSN, when I upgraded from Vista MSN was basically dead. (Yes I actually have an MSN dial-up account - and get this I actually use the dial-up account when I'm up in the mountains without cable and with little to no cell phone coverage and spotty satelite coverage...) Fortunately, by the time I next needed my dial-up account Microsoft had released a fix (MSN 9.5) which is Vista compatible - which is good since this is a consumer product and kinda sad that the OS folks cut the entire MSN product line off at the knees... At any rate if you have an MSN account it's a 45MB download so I suggest getting the updated install before you actually are limited to just a phone line (Not to mention that if your MSN is down you can't access it via phone...)
The other big concern for me was Virtual PC. I use VPC alot, no I mean like constantly - I'm currently working with a client who has a VB6 application and I use VPC to host the Visual Studio 6.0 development environment and the application. Unfortunately VPC 2004 was another application which isn't compatible with Vista, fortunately Microsoft had a Beta of VPC 2007 available and it has worked reasonably well. However, in catching up with Tim Sneath's blog this morning he had a link to Mike Swanson's blog (http://blogs.msdn.com/mswanson/archive/2007/02/19/virtual-pc-2007-released.aspx) who on Monday posted about the release of VPC 2007.
Mike does an excellent job of explaining VPC 2007 and has a link to the official homepage for VPC 2007. If like me you are a bit impatient, well the link to the actual download is here: http://www.microsoft.com/downloads/details.aspx?FamilyId=04D26402-3199-48A3-AFA2-2DC0B40A73B6&displaylang=en. By the way did I mention it's FREE - yep anyone and everyone can get VPC 2007...
If you are running a previous version (or at least the Beta version) of VPC you'll have to uninstall it prior to the installation (so I reccomend downloading the setup file vs. running via your browser.) Once installed remember to upgrade the environment tools in each environment. I know with the Beta one of our engineers found that trying to run a VPC built with the 2004 extensions made 'bad' things happen. And with that my installation is about complete and I'm back to working in my VPC...
Tim Sneath recently added a post regarding the InterKnowlogy WPF application C-ME. This application was originally developed for The Scripps Research Instititute and provides a Collaborative Modeling Environment. What we mean by that this that you can model an image and as Tim's blog states, this might be a molecular structure or an engineering structure. Of course model viewers exist everywhere and while it's a great graphical tool the goal of C-ME was to allow you to place annotations (from Notes and Word Documents through HTML links) directly into the context of the 3-D image. Thus if you want to comment on some aspect of the image your comment stays in context. This means instead of trying to describe the element associated with your comment you can literally attach the comment in 3-D space and the next person to review it can literally see what the comment is related to within the image.
Tim Sneath has more information, some comments from other people involved in the project, and links to exclusive downloads related to the application at his blog:
http://blogs.msdn.com/tims/archive/2007/02/14/great-wpf-applications-9-scripps-institute-cancer-research.aspx
So earlier this week I finally completed my final chapter for the next Visual Basic book from Wiley/Wrox, "Professional VB 2005 with .NET 3.0" book. The book is due to be released right around Tech Ed and you can view more information on it here:
http://www.wiley.com/WileyCDA/WileyTitle/productCd-0470124709.html. For those of you familiar with the "Star Trek" movies - lets just say this is an even numbered release, but more on that at another time.... which since it's now complete should give me a little more time for blogging.
However as the title of this post notes it's about upcoming webcasts. In my case I have a webcast this Friday February 23rd, the title is: "Introduction to the Authentication and Membership Controls of ASP.NET 2.0" . This is one of two webcasts I'm doing on the topic of ASP.NET 2.0 membership. This session is part of a special series being promoted by Microsoft and Dr. Dobbs focusing on introducing developers who are more familiar with tools like PHP and Cold Fusion to the power of ASP.NET. In particular you'll find that I do all of my demonstrations using either Firefox or Opera as the browser to help illustrate how ASP.NET's built in membership controls are browser agnostic. To register for this session or another session in the series click on the banner just below. The scehduled time for my first membership session is Friday at 1:00PM Pacific Standard Time (4PM Eastern Standard Time) and you can find it under the category "Adv. ASP.NET 2.0".
The second session is titled "Customizing ASP.NET 2.0 Authentication and Membership" is available from the same location. It's scheduled 1 week later (March 2nd) with the expectation that if you can attend the first session then you'll be able to attend the second session as well.
Also let me point out I'm not the only InterKnowlogy presenter. Joel Rummerman, one of our up and coming engineers, will be presenting "ASP.NET AJAX Client Component Development". Joel's session is rated as Level 400 because he goes in-depth in working with the AJAX component model, not just how to use AJAX but how to actually develop custom controls. Joels session is available under the 'Web Designer' track and is scheduled for Thursday, March 1st at 9:00AM PST.
Another InterKnowlogy presenter is Tim McCarthy. Tim is an experienced presenter who will be discussing "Taking Advantage of the Enterprise Library in Your Site". Tim's presentation is also Friday March 2nd, however his presentation starts at 10:00 AM PST. You can find a link to Tim's presentation on the ASP.NET 2.0 Track.
We look forward to seeing you in our sessions - and heck you can peruse some of the other valuable sessions, there are alot of great presenters participating in this program.
BTW, as noted in the graphic you get a 'web development kit' if you register for two or more sessions as part of this event.
Wanted to make the slides from my two presentations at this weekend's code camp available. The first session was an introduction to ASP.NET 2.0 Membership, the second Session was going a bit more in-depth into customizing the Membership controls and setting up your authentication environment.
Session 1: Intro to Authentication ASP_NET 20.pps (1.44 MB)
Session 2: InDepth Authentication ASP_NET 20.pps (1.22 MB)
Feel free to ping me if you have any question. Hope everyone had a great weekend.
One of the early hits on .NET development was that you needed to download the framework because it wasn't on the underlying operating system. Thus if you wrote a .NET application for the general public, for it to work you would have to have them install the full framework. The consensus amoung many was you wouldn't want to create a desktop application that relied on .NET. Of course that was several years ago and while it still seems to be held by a few short sighted writers, the reality is that .NET applications are appearing in the public arena. In the past 2 months of the 3 applications I've installed two of them were .NET applications. The first was for Sirius satellite radio and streaming audio. The benefit of being able to crank out an application in a fraction of the time required to write all that streaming logic using something like C++ undoubtedly played a major role. The second application is called SplashStream - it's focus, you guessed it streaming video, in this case video associated with the TSTN training that I talked about. The application streams the course content and provides a basic schedule UI. As PCs focus less and less on supporting a browser and running Office and more on video, audio and photo content I expect this trend to continue. Just for disclosure - the other application I installed Microsoft Active Sync (which reminds me every morning of the fact that I haven't associated with a device...)
(By the way I'm also on a project with a .NET 2.0 Smart Client application which is sent out into the world at large...)
It's funny get into a technical discussion with anyone who does alot of web development. Opinions are rife and vary across the board. You can create conflict on any number of topics. "Hey I like smart client/windows desktop applications better then web applications" or "I like C# over VB for my projects", whatever. The fact is the type of people that spend time sitting in front of computer screen constantly making minor adjustments in a source file and reviewing the results to see if the results are exactly as desired tends to have more then a few strong opinions.
Now let me add a disclaimer here: this post is only refering to web development - not server scripting.
In most cases just like the any other opinion, everyone has their own, and the live and let live approach is the most productive. Yet I've tested the above statment - Working with Javascript sucks - out on dozens if not hundreds of developers and I've never gotten anyone with a truly different opinion. Sure now and then someone will say it's not that bad - but consistently even those who proceed to tout its benefits on the client are still at some level of the opinion that it sucks as a developer tool for web development.
Which brings us to the question of: What's the alternative? For a while we could simply refer to Javascript as a way to make screens a bit more interactive and for clueless developers to place data validation code so hackers could completely bypass it. The useless nature of Javascript for browser based data validation could be a complete discussion. Of course it's been done repeatedly yet even newly developed systems that shoot themselves in the foot are being released - proving there will be a subset of developers who will never understands. The point being that the only real value of Javascript was as a language to make a screen react, and even then doing more then shuffling data around was difficult at best.
Then along came Ajax. With the introduction of Ajax (I last wrote of Ajax a little over a year ago: http://blogs.interknowlogy.com/billsheldon/archive/2005/09/09/415.aspx) it has become apparent that Javascript isn't going away anytime soon (like so many technologies which have outlived their true value: http://en.wikipedia.org/wiki/COBOL). The fact is that Ajax took what people had been hand coding in Javascript for page interactivity and packaged it. Of course toolsets like the Microsoft ASP.NET for AJAX suite have been slow in truly making it to market, but the market has continued to grow in spite of this. The only disadvantage of course is that while this will provide you with a set of specialized controls from the ASP.NET standard.
Of course the challenge right now is that to leverage AJAX you still need some, you guessed it, basic Javascript that you have to customize. After all AJAX has Javascript right there in the acronym. Meanwhile the underlying issues with Javascript and the fact that it has a lousy development environment remain. Thus when you talk to people working with Microsoft's ASP.NET AJAX, it's all about the Javascript (http://blogs.interknowlogy.com/joelrumerman/archive/2006/09/22/5126.aspx for a good example...)
But again - Is there an alternative?
Well little by little two alternatives are emerging. One is still based on Javascript but in this case you never touch the Javascript. That is where thrid party vendors have wrappered the complex Javascript for you. Telerik provides such a soluction at: http://www.telerik.com/products/ajax/r.a.d.ajax.aspx. (The Telerik suite with it's support for everything from native ASP.NET to Dot Net Nuke and Sharepoint is rather impressive.) It may not be as efficient in what it sends to the server in a given round trip as say custom coded controls which are handling the AJAX communications, but then again its way easier to implement and get the same behavior. In a cost - benefit analysis you'll probably find this solution wins out the majority of the time, and since it's based on AJAX you can even have developers like those here at InterKnowlogy customize those pages where you need a custom solution. More important just like the Microsoft ASP.NET AJAX solution it approaches the market with compatibility across multiple vendor's products as a focus. This solution favors compatibility over what we'll call capability - and that is a very marketable feature.
The other alternative is, as with most technology, coming from an alternative direction. It's called WPF.
Nothing against the Ajax/Telerik solution, but for those of you not paying attention even as Microsoft provides basic support for the AJAX model that they invented so long ago they have also seen a better way. The Windows Presentation Foundation (WPF) is an XML based user interface definition. Now as we all know XML already runs in browsers so we have the basics of what you might think of as a next generation HTML. Go a step beyond the current namespaces we use for custom controls in ASP.NET. Go beyond well formatted HTML. Take the next step and say - what if the declaration of a Textbox was just that... a declaration that both the Smart Client Application and the browser understood. Now go a step further - suppose the browser wasn't just a rendering engine but instead allowed for a recogniztion of the fact that a change in that drop down was actually designed to trigger an Ajax style update from the client. One that didn't require a full round trip of the entire user interface (postback) to the client nor any Javascript - not even generated script. Admitedly it wouldn't be compatible with all of the existing browsers on the market right away - but that's only one form of compatibility and in this case perhaps not the driving one...
WPF addresses a different type of compatibility. Compatibility between desktop based and browser based applications. The ability to design a user interface which works well and looks the same in both environments without needing to completly re-implement the interface. For an "enterprise" or "corporate" developer this is actually a more important type of compatibility. Within an organization it's possible to dictate that everyone must use version 8 of browser X or to produce a smart client application... these developers are constantly being challenged to choose between smart client and browser alternatives (even if they do both it's still extra work like double data entry).
It's this arena of compatibility which WPF targets in the short term. Of course as more and more companies move to WPF for it's reuse across desktop and web more and more corporate users will demand third party browsers support the WPF model. These browsers will respond because they want people to be able to use their product in their work environment. Over time what will start as a tool which is focused as much on Smart Client applications has the potential to again revolutionize the market. Note I'm not saying that AJAX wont' survive for decades to come or that it isn't viable - I'm just noting a future alternative, one which I think web developers will be a little late in coming to the party... by the way note all the AJAX and WPF presentations on the blogs.interknowlogy site... compare who is posting on WPF to who is posting on AJAX (here's a hint: Joel works for Adam)
So the time has come... you installed TFS and have the basic installation running and then, one day you realize you need to install Team Build separately from the baseline TFS install. So you go back to the install CD and open the build directory and do the Team Build install. No worries until you get to that screen that asks you for the account to use. Of course the documentation says - use the TFSServices account, but it's been months since you installed that and you can't possibly remember the complex never to be used again password you used.
So think about it and figure - look I'll change the password on the TFS Services account and just update the associated services. So you do that, you install Team Build and everything is looking good. No worries, you even install Visual Studio so you have a compiler available for Team Build to actually use for builds. Then you install SQL Server SP1, and restart the computer.
The computer comes back on line and - TFS is dead. The web sites all say service unavailable - and by all I mean both your WSS project sites and the WSS administration site. Your connection via Team Explorer both remote and local is also unavailable. Oh crap now what!
Well when I hit this point I then went looking in the event log. The application log wasn't too helpful - it was able to tell me that the problem was related to TFSService connecting to SQL Server, but that was about it. After a few permission enhancements and protocols being turned on still nothing. Then I jumped over to the System log. Here we had something useful - the error message on the event: "A failure was encountered while launching the process serving application pool 'TFSWSS'. The application pool has been disabled." ahh now this points me to something useful. Off I go to the IIS Manager into my app pools and there they are the two app pools that use TFSServices as their runtime context (TFSWSS and TFS AppPool). Update the password, restart the app pools and all is good with the world again. Note that the 'TFS Admin' app pool doesn't use the TFSServices account. At any rate in case you run into a similar scenario remember - don't panic - dig the event logs the clues are probably found there.
On Tuesday August 1st I was one of the presenters at the San Diego .NET Developers Group (http://www.sddotnetdg.org/). The evening focused on a discussion of new features in Visual Basic and C# under .NET 2.0. I handled the Visual Basic portion of the presentation, while my coworker Adam Calderon handled the new features in C# presentation. Attached to this post are the slides that cover some of the new features in Visual Basic .NET.
NewVBin2.pps (1.76 MB)
Following our presentations there was a brief open discussion regarding the choice of VB vs. C#. The consensus was that most developers should learn both languages and that unlike the VB6 vs. C++ debate in COM that VB vx. C# really didn't offer a great deal of difference in productivity. Each has some specific advantages, but nothing which should cause an organization to choose one over the other.
I have to admit I'm a bit amazed at this and wonder how it fits with the stated goal of a Beta program. Most companies that I know of deal with Beta software in one of two ways. 1. They only release the beta product to a subset of customers who are given first access to key new features while working through bugs and missing features. This is usually contract based. 2. The beta is released to the widest possible user base who can voluntarily choose to participate.
Microsoft has quietly announced that as of this week they are going to charge the general public to download the Beta version of their current Office release. The charge a $1.50 US is nominal but as far as I know is a first for downloaded beta software. Why this is interesting is that it implies it costs Microsoft a $1.50 for each downloaded copy of their product (the charge is for 'cost recovery'). Of note however, the online 'Test Drive' of the software which would seem to require more system resources will remain free. Given my last Developer Update newsletter which dealt with how some systems are moving to a hosted model. I'll end up covering this as part of my 'Glad You Asked' column in the newsletter this Friday.
To subscribe go to: http://www.sqlmag.com/email/
Almost a year ago I posted my second note regarding GUIDs and Databases. That post is available here: http://blogs.interknowlogy.com/billsheldon/archive/2005/07/29/369.aspx but in the time since that post SQL Server has seen a new release and now we have SQL Server 2005 available and the SQL Team has added another wrinkle to the discussion.
In talking to one of my coworkers (Tim McCarthy) the other day he mentioned that he had run into a new SQL Function which would increment GUIDs, which is the reason for this post. Now to briefly recap my previous posts one of the biggest disadvantages to using GUIDs is that people tend to figure that since they should remain unique they will make a good primary key. Unfortunately the nature of a Primary Key is that it by default relies on a clustered index. For those unfamiliar with indexes, a clustered index is an index in which entries are written to the disk in their sorted order so that lookups against it are very fast. As such the fastest way to add entries to a clustered index is with the use of incremental values so that the system appends new entries to the end of the index. This reduces the number of page splits which are far more expensive and occur when you insert items into the middle of the index.
Unfortunately by default GUIDs are randomly generated which results in new entries constantly being inserted into the middle of the clustered index. I knew one company which got a new implementation of their database from an offshore company where all the indexes had been changed to GUIDs and as a result their new database couldn't even support 10% of their customer base. Their short term solution, outside of rearchitecting the work, was to create a middle tier function which would sequentially generate those GUIDs to cut down on page splits. (Long term they reduced the number of tables using GUIDs and generally cleaned up a mess of other problems - the GUIDs alone weren't the only issue.) However, if they had had SQL 2005 available then instead of needing several days to write and a custom solution they could simply have implemented the new "NewSequentialID()" function. NewSequentialID does just what the name implies it creates a new GUID which is one greater then the last GUID created on that server. Note that it is server sequential and not table sequential, for each table the guarantee is only that each new entry will be larger then the last.
More information on this new function is available at: http://msdn2.microsoft.com/en-us/library/ms189786.aspx
As noted in that function there are a couple of issues - for example using this function on you user table makes it possible to guess the internal identity of the next user, so if you are using the randomness of GUIDs as part of a security scheme that prevents easy guessing of other user id's this function isn't for you.
Additionally it limits one of the other claims for GUIDs which is that you can use them to make data portable between databases. Since randomly generated GUIDs are (almost always) unique even though generated at the same time on different machines it is possible to transfer all of the data associated with a user's GUID into another database with minimal risk of collision.
Of course these were the only two functions that made using a GUID a useful idea. So don't see this as a function which will suddenly allow you to use GUIDs without a performance penalty. Fact is int and bigint columns with an identity property will still be faster for your overall database. Instead this function is there for all of you who already have that GUID primary key and now need a quick and easy solution to reduce it's impact on your overall database performance.
This August I'll once again be teaching at the University of California San Diego (UCSD). I've now got a couple semesters with the Visual Basic .NET Programming II class under my belt and so I'm more comfortable suggesting that folks come on down for the class. The entire class is .NET 2.0 and focuses on the language and it's use in smart client applications. If you are interested check out the registration pages from UCSD at: http://extension.ucsd.edu/studyarea/index.cfm?vCourse=CSE-40616
For those who have attended one of my recent presentations on Visual Studio Team System and Scrum, I have uploaded my slides. Hopefully you found the presentations helpful and will be able to better understand all of what goes into Team System (Team Suite and Team Foundation Server) and how you can leverage these tools in your organization to improve your project success. As I note - Team System isn't about technology it's about the business of software and having the tools to be successful.
TeamSystemandScrumOverview.pps (2.3 MB)
Just a quick note related to some of the work we do at InterKnowlogy. Often when one of us is handling a public presentation we mention that we do cutting edge work. Of course, I'm sure many of you think - "yeah, but everybody says that." So as evidence that when one of us suggests that we do cutting edgw work and encourages you to feel free to send in a resume here is a little evidence...
http://channel9.msdn.com/Showpost.aspx?postid=213957
The Channel 9 video highlights our work with The Scripps Research Institute using Office Sharepoint Server 7 and Windows Presentation Foundation to create a smart client collaboration tool. The client wraps Sharepoint's web service interfaces and allows researchers to associate annotations to complex molecular structures and in the course of cancer research to keep their annotations visually associated with these diagrams and images. As part of this implementation it's still possible to use the browser based web interface to access the annotation data files, but the rich client's WPF capabilities support graphically linking the annotations with their source. That level of graphic support isn't currently possible with a web application. The client simply leverages many of the web services which come with SharePoint out of the box (and a few that don't).
One of the things which will occur for certain developers is a need to be able to connect to both TFS and VSS from the same development PC. This may occur as a company transitions from VSS to TFS or for consultants when you move from working with company A who is using TFS to company B who is not.
In my case I went from having been configured for TFS to needing to install VSS for a client. Once I installed VSS, my ability to connect to TFS source control seemed to disappear.
Both the VSS and Team Explorer clients can be installed on you machine. However, you have to make a choice between which server side source control data store you will use. To do this from within Visual Studio go to the Tools menu and select "Options..." In the Options window select "Source Control" from the list of areas for customization and you can go from there, as shown in the screen shot below:
After my fun with installing WSS I also needed to install OSS. For purposes of ensuring I had a clean install I started with a brand new VPC for Windows Server 2003. The steps involved include setting up IIS, installing all patches including .NET 2.0, installing the Windows Workflow Foundation package and then installing OSS.
This is the first change from the previous version: You don't need to install WSS before installing Office SharePoint Server (OSS) (aka SharePoint Portal Server v 3.0). In fact if you do then you will probably face configuration issues.
After I installed OSS, I went through the initial configuration and was then able to start up my site. No problems - right? Well not quite.
I then restarted and watched the Event Log and the behind the scenes errors began. The first set of errors I noticed occurred in the System Event Log and were flagged as DCOM errors. In looking at these I found that they were associated with the Network Services account. I then when to the Component Services MMC. Within the MMC proceed under Computers->MyComputer->DCOM Config Right Click-> “IIS WAMREG admin Service” and select properties. On the properties pane, select the Security tab and hit the top edit button to customize your Launch and Activation permissions. Inside the properties for this DCOM object, add Network Service as an authorized user to launch and activate this component locally.
This granted my Network Service account permission to access these components and on the next restart the DCOM errors (all of them) were gone from the System Event log.
Next up was the Application Event log. About a minute or so after restart I was seeing a series of errors occuring related to WSS and OSS. These were related to indexing files and content which would be placed on the server, and were again associated with the Network Service account. In this case however, the only solution is to go to Computer Management and open your Local Users and Groups. The Network Service account needs to be added to the Administrators security group - at which point you will be able to restart your system. Note I attempted to use any of the other security groups and all failed, and the account must remain as an administrator or the errors return on the next restart.
At this point I was able to feel comfortable that my OSS installation was working error free. Of note don't forget to enable the 'premium' services on your OSS install - not sure which capabilities that is, but I turned them on as part of this debugging process (they had no effect on the errors I saw).
Tim Sneath added a cool post showing you how to add the Glass UI that is part of Arrow to you winform based application. Very cool effect for those looking to do a slick WPF application (not that IK is doing any of those oh yeah - TSRI... here's the link:
http://blogs.msdn.com/tims/archive/2006/04/18/578637.aspx
By default ADO.NET, including ADO.NET 2.0, uses Named Pipes to connect to SQL Server. (Including SQL Server 2005) However, in some environments where there are firewalls and other network appliances between say your ASP.NET web client or other Windows Form client and the database you might find that Named Pipes don't work.
If you need to use TCP/IP to connect to SQL Server instead of Named Pipes then the solution is to use the connection string parameter "Network Library". You simply add "Network Library=dbmssocn" to your connection string. This is defined in the MS KB article at: http://support.microsoft.com/default.aspx?scid=kb;en-us;Q315159
Conchango - apparently a British company has worked with (or has some relationship with Ken Schwaber) and they have released an add-in to the release version of TFS which applies the SCRUM principals to the Agile methodology in TFS. So when you install TFS you'll find you get two process templates by default, after installing this freely available add-in you'll find you have a third template with it's own custom documentation. My only complaint is Ken's picture - nothing personal Ken but I don't find you attractive enough to really want to see you picture all over the place 
You can find the link for the free (with registration) download here: http://www.scrumforteamsystem.com/en/default.aspx
Hat tip to Rob Caron's blog for this info: http://blogs.msdn.com/robcaron/
Just a couple quick hits from this weekend's code camp.
Firstly, I'll have the materials from all three of my sessions posted on either Wed. or Thursday of this week. I've got another presentation Tuesday night at the San Diego .NET User Group which I'm currently focusing on, but you are welcome to attend that meeting it's down in San Diego here's their website for more information: http://www.sandiegodotnet.com
Secondly after my session on Visual Studio 2005 and SQL Server 2005 I was asked a pair of questions. The first question was "We are seeing tools put the T-SQL text of database statements into our source code. Is this as good as using stored procedures?". The answer to this question was easy. Never use text based queries in your code as that leaves the possibility that you will be susceptible to SQL Injection. There are several tools that will try to help ensure that this isn't possible by blocking special characters etc. but the fact is the easiest solution which is also one of the most performance enhancing is to ALWAYS USE STORED PROCEDURES.
The second question they asked however caught me off-guard. It was "We've seen that Microsoft tends to separate the Create, Update and Delete statements into separate stored procedures. However, other tools have combined these with a simple flag to indicate which action should be taken. Is there a specific reccomendation?". Here my answer was that I couldn't think of anything specific and that although I always separated the items I couldn't think of a reason that mattered beyond style. In this case the person asking was saying they liked to have a smaller number of stored procedures.... which has it's own disadvantage with multiple developers. But anyway after the day was over and I was driving home the correct answer came to mind, which is that you should NOT COMBINE the CREATE, UPDATE, and DELETE statements in a SINGLE STORED PROCEDURE.
The reason is quite simple, security (again). In this case it has to do with the fact that you of course are not using your 'SA' account for your website. You should be using an account with limited permission (for a whole host of reasons). So what's the big deal, well in most cases we design systems that don't allow a user to Delete an entry from one of our tables. So if I have a stored procedure that creates my entries and I of course give anonymous or external customers access to that stored procedure then that's in the scope of what I expect a hacker might at somepoint compromise and I accept that risk. However, if that stored procedure also contains the entry delete logic, then I have no way of limiting a user's permissions at the database level to prevent a hacker who might violate a small portion of my application's logic from doing significant damage to my application. By separating out the Create, Update and Delete logic, I can create a security model which will prevent an anonymous hacker who get's unfettered access to my create logic from also being able to delete valid data from my database.
That's the short of what I consider to be a very good reason to not combine your Create, Update and Delete logic in a single stored procedure.
One of my least favorite errors when I first ran Static Code Analsysis was this security warning:
CA2209 : Microsoft.Usage : No valid permission requests were found for assembly 'IKRulz'. You should always specify the minimum security permissions using SecurityAction.RequestMinimum.
So what is the solution to this warning, and where in the heck do I set these permissions. Well under .NET 2.0 you need an application manifiest (app.manifiest) file as part of your project settings. The application manifest basically tells the CLR what type of security your application expects to need, so for example if your application requires full trust your app.manifest will look something like:
<?xml version="1.0" encoding="utf-8"?> <asmv1:assembly manifestVersion="1.0" xmlns="urn:schemas-microsoft-com:asm.v1" xmlns:asmv1="urn:schemas-microsoft-com:asm.v1" xmlns:asmv2="urn:schemas-microsoft-com:asm.v2" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"> <trustInfo xmlns="urn:schemas-microsoft-com:asm.v2"> <security> <applicationRequestMinimum> <defaultAssemblyRequest permissionSetReference="Custom" /> <PermissionSet class="System.Security.PermissionSet" version="1" Unrestricted="true" ID="Custom" SameSite="site" /> </applicationRequestMinimum> </security> </trustInfo> </asmv1:assembly>
Which is of course a totally simple thing to figure out right? OK, so does this mean you need to start going to all your app files and adding what are best described as some somewhat obscure XML properties to define your apps security settings. Well no not under Visual Studio 2005. With VIsual Studio 2005 you can simply go to your project properties and there on the edit pane is a right hand panel for Security, as you can see below:

Now that you are on the security pane you can choose to enable your ClickOnce security settings. This will generate your App.Manifest automatically.
But wait there's more. As you'll probably see in every demo with Visual Studio 2005 it is possible to mark your assembly as having less then full rights. The key to this is the "Calculate Permissions" button you see above. This button compiles your code and using reflection determines what permission level your code actually needs. In my case the code references local files system files, and therefore requires full trust. However, the ClickOnce options allow you to determine that on the fly and have Visual Studio 2005 automatically determine whether your application will meet your deployment model.
So one of the new features I've found with Static Code Analysis in Visual Studio 2005 is that it allows you to suppress messages. As I blogged earlier, the typical behavior is for the tool to add a line to your source file to suppress a warning that you find to be unnecessary. So I was playing with the Namespace related rules which allow you to try and keep variables named appropriately and it flagged the namespace name I used. I have an acronym as my Namespace and that meant it’s all capitals which of course the rule didn’t like. So I decided to ignore the warning, only this time since the warning occurs across several files instead of adding a line to each file which referenced the namespace the Static Analysis tool created a new source file called GlobalSuppressions.cs and added the suppression line to that file. Here are the contents of this new source file in my project:
[assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1705:LongAcronymsShouldBePascalCased", Scope = "namespace", Target = "IKRulz")]
As you can see the only thing in the file is the declaration to create an exception for that rule, but in theory I could add other rules to this file if I found the same message in several locations in my code allowing me to limit the number of times I needed to exclude a particular message. Of course I could also just avoid running certain rules, but that’s a different discussion.
When working with the Team System Static Code Analyzer there are times when the tool will throw out an issue that isn’t something you are going to resolve. Of course when you first run the code analyzer it’s not uncommon to have a list of literally hundreds of potential issues. As I’ve discussed in the past, the best solution when this list is long is to use the configuration settings to limit the areas of focus to things like performance and security and then move on to other areas.
However, as you are processing your potential issues, the fact is that some of those items won’t be issues. It’s very possible that the tool might warn about code which in fact in the limited context where it is used is implemented correctly. As such it’s important to be able to make those issues disappear from the overall list. In fact let me provide some sample code:
private void stackButton_Click(object sender, System.EventArgs e)
{
foreach (ToolStripItem item in this.stackStrip.Items)
{
if (item != sender && item is ToolStripButton)
{
((ToolStripButton)item).Checked = false;
}
}
}
So if you take the method above you’ll see that it is referencing an untyped collection of items, and by reviewing the ‘if’ statement we can tell that it is looking for one of multiple possible types in that collection and then casting and using objects of that type. Pretty straightforward and in the context of what it does I don’t see a better way of handling what it’s doing (you are welcome to educate me in the comments section…)
When I run this code through static analysis what I get is the following performance related warning:
CA1800 : Microsoft.Performance : 'item', a local, is cast to type 'System.Windows.Forms.ToolStripButton' multiple times in method StackView.stackButton_Click(Object, EventArgs):Void. Cache the result of the 'as' operator or direct cast in order to eliminate the redundant castclass instruction.
However if you look at the code the fact the casting from a functional standpoint is done only one. There’s no real redundancy of the casting instructions and no reason to cache the results. So what should we do, well we should indicate in the code that this condition has been reviewed and isn’t something we want to be warned about. Right clicking the error in the error list I select the “Suppress Message(s)” option from the context menu and the current warning is shown with a strike-through font. On subsequent builds/checks the error is not displayed.
Which begs the question of how does Team System implement this rule exception? The answer is that it adds an attribute to my source code. This attribute is actually a method call which tells the code analysis engine to ignore one or more rules in the scope of the current method call. Below is the instance of the SuppressMessage call attribute for this example message.
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
This call allows the code analysis to recognize which message has been suppressed in future runs, and because it’s part of the source code the suppression is checked into source safe and easily recognized by others looking at the code. In addition to the SuppressMessage method there is a SuppressMessageAttribute method which has the following signature: [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
This example of that call is for a different message generated by migrating code from the Beta versions of VS2005 to the release version… in this case I want more time to investigate the implications of making the change suggested by the message to ensure that I eventually do this I can add a task to my TFS project, but that’s a story for another post.
Back with Beta 2 it was found that Microsoft had set the refresh rate for the reports and data warehouse at 2 minutes. The appropriate setting to avoid having your CPU thrash is about an hour. As I explained in my May 2005 article this issue is more fully explained here: http://blogs.msdn.com/buckh/archive/2005/04/19/409886.aspx.
The Beta 3 Refresh of TFSMicrosoft resolved this issue. In order to verify this I went to the service. Note, under Beta 3 Refresh the controller service has moved slightly to this url: http://localhost:8080/Warehouse/v1.0/warehousecontroller.asmx. Once at this url you need to access the 'GetNextInterval' method which accepts an integer. Pass a 1 or 0 or whatever, and the service will return your servers updated interval value. My experience is the current default is 3600 which is the correct value.
So since the launch was today you've probably started the process of installing Visual Studio 2005 by now. Hopefully you are also looking at leverageing Team Foundation Server (TFS). In case you weren't aware the Beta 3 Refresh for TFS is also available. This is the version of TFS which is compatible with the released version of VS2005.
Here at InterKnowlogy Lacie stood up TFS Beta 3 Refresh today and so we immediately tried to connect from VS2005 to our new TFS server. That's when we realized we couldn't find the TFS Client in Visual Studio. I had installed VS 2005 Team Suite so in theory I had everything but still we couldn't find Team Explorer.
In looking to the help, of course there was no indication of what the heck to do if you couldn't open the Team Explorer - no note saying - Hey Make sure you've also installed the TFS Client after your VS 2005 install!
With the release of VS2005 the TFS Client is no longer automatically installed, even if you install the full Team Suite. Instead you need to separately install the client from the TFS CD on the client. It took us a few minutes to realize this solution, so if you are standing up TFS be aware that each developer will need to have the TFS client installed. While this makes it easier to separate the TFS Client Access Licenses from Visual Studio, it still would have been nice to know about the installation requirement. BTW, this also makes it quite apparent that you don't need VS 2005 Team Suite in order to use TFS, just install the TFS on whichever version of Visual Studio 2005 you are using and you'll get the Team Explorer functionality (or even install it without VS 2005 for those non-developers on your project.)
From today's Team Foundation Server chat, there was a question on how to configure Code Analysis for a web project (since there isn't a project properties for a website). The TFS experts weren't exactly the right folks to ask so I spoke up that the option was on the websites menu. However the answer wasn't clear, so I wanted to post a couple screen shots here to show where the actual menu's and configuration elements are... Here is VSTS RC1 with the Websites menu open:

So when you click "Code Analysis Configuration" menu item you'll get the following window for configuration:

Note that you will need to enable Code Analysis from this window since by default (at least in RC1 it is off). BTW yes I know that the RTM versions of VS have been posted, but not the Team System editions and even so I haven't had a chance to install them.
I recently received an email from a reader saying that while they liked my article, they really felt that I was off-track and that this blog entry was a better discussion of Partial Classes: http://www.theserverside.net/discussions/thread.tss?thread_id=34255
My article is from about a year ago and located here: http://www.windowsitpro.com/Windows/Article/ArticleID/43726/43726.html#feedbackAnchor
My article at least in my view makes pretty clear what Partial classes support. First let me state my one concern with the new implementation of partial classes:
The Partial keyword should be required in every source file of a partial class.
The reason for this has nothing to do with the compiler or pre-processing. It has to do with developers and debugging. When I open up a class I have no-way of knowing if it's a partial class, because out somewhere in the project another source file might exist which uses the partial keyword to extend that classes source code. If the keyword were required I would immediately know that a second source file (which I could then find) existed. Don't think this will happen... well here's an interesting scenario - if you convert a UI class from .NET 1.1 to .NET 2.0 it doesn't automatically move the generated sections of your source file into a separate source file to reflect the new paradigm. So now you will have some classes where you will have one source file and others where you will have two source files - how will you know which are which since Visual Studio applies the partial keyword only in the generated and hidden source file?
Of course the question posed by the Server Side blog is would using generated virtual base class and virtual methods be better then just supporting the splitting of a class across multiple source files. The answer here is an easy to see - No. Why not? Well lets start with the impact of the changes on the runtime environment and user. Using a base class with virtual (overridable) methods means that you have impacted the runtime behavior of the application. I'm not going to go into details but each overridable method and class in your hierarchy carries with it a minor performance cost. Thus using a virtual class carries a runtime cost.
Aside from the disadvantages of the runtime cost of using an abstract class with virtual (overridable) methods what about at source time. Well here again the answers favor using partial classes. Using an abstract base class means that there will still be a second source file associated with the class. Thus the Visual Studio behavior of separating/hiding the generated code would still work, unless you wanted to have a second set of generated code for your class. Now you would be limited to either introducing another abstract base class into your hierarchy or leveraging one of the two physical files (either the generated abstract base class or your own custom class) to hold your other generated code.
Finally using partial classes in the source as opposed to having an abstract hierarchy allows developers the option of separating out complex logic which might need to co-exist within a single class into multiple smaller source files that can be manipulated independently. This advantage isn't a reason for partial classes, but rather an interesting benefit of having them.
|