The real test of a presentation is when you come back 6 months later to repeat the steps. Now you no longer remember much because you don’t often use a particular skill. In this case it’s creating a bootable VHD image, which was part of my presentations for Beta, Beta Everywhere: http://nerdnotes.net/blog/PermaLink,guid,1d2dd740-8f6c-4417-80fe-604eb5665bb7.aspx. The first thing I forgot to note but quickly realized is that Windows Server 2008 can’t be a bootable image. Fortunately Windows Server 2008 R2 can be… so no worries, just need to burn the correct DVD. The second item was more challenging and it involved DISM. The easy way to get the information to use to create your image is to use the index value of the image file from the DVD. To get this you leverage DISM. All good, until it came to an example of the command line you actually need. I don’t think I captured it. So here it is for future reference: C:\Windows\system32>dism /Get-WimInfo /WimFile:e:\sources\install.wim The output from that line will list the index and name of each image on the DVD. And now in 6 or 12 or 24 months when I need it again, I’ll have it at my fingertips.
Yesterday when the Microsoft made the RTM version of Office 2010 available I downloaded and installed it. I know – shocking news. The question however is did I have any issues? The short answer is yes, but none that were the fault of Office. The first issue was that I decided to move to the 64-bit version of Office instead of the x86 version. Unfortunately what I found was that the 64-bit installer won’t upgrade or automatically uninstall the 32-bit version of Office. It gives you a warning that you can’t install until you manually uninstall your 32-bit Office applications – no side by side installation. No worries, I removed my 32-bit copies of the Beta as well as my hotmail connector (I use a Windows Live address my primary professional email address.) Following the uninstall the install went fine. No issues with getting the new 64-bit version installed. I then opened Word and Excel – no problems. Then I opened or should I say ‘tried to’ open, Outlook. I got a notice that I needed a connector to correctly open my mailbox. That’s it, with that message Outlook said ‘goodnight’. So off I went with Bing to get the Hotmail Connector for Outlook, which historically was 32-bit. Bad news again, the 32-bit Outlook hotmail connector won’t install with 64-bit Outlook. It gives a message that it’s only compatible with Office 2003 or 2007. I sent a note off to some friends on the MVP list and described my issue and fortunately one of them was able to point me to the 64-bit version of the Hotmail connector for Outlook. Its a Beta, but it installed and my mail is once again available. The location of the 64-bit connector is: http://www.microsoft.com/downloads/details.aspx?familyid=16BAB660-54D8-4129-91C3-D86FF0D996E9&displaylang=en Hope this helps anyone else with a similar issue.
Well the full namespace for this method is System.ComponentModel.DesignerProperties.GetIsInDesignMode(Me)
In the spirit of my last post discussing how Visual Studio 2010 (VS2010) lets the developers get access to a visual designer for Silverlight, lets look at why if you are doing Silverlight 3 with Visual Studio 2010 you need to get familiar with GetIsInDesignMode.
If you are like me, when my application opens I have it start loading data. I don’t typically open an empty application and then ask a user to take an action to load some data, I typically default to some level of data that the user will act on. Typically this is done by adding code to the Loaded event for your form or control.
This is still a valid implementation, however VS 2010 brings with it full designer support for Silverlight 3 (Silverlight 4 as well when it releases). As part of this when a Silverlight page/form is loaded into the designer, the designer fires the Loaded event to get any key data that is part of the running application. This is great because it is not uncommon to have certain key settings within this first event, key settings that are related to your design.
However, that also means code which by default loads data will also be called. That isn’t what most of us intend. In fact if your services are hosted within the same solution odds are good that your service isn’t running while you are in design mode. To avoid paying the price of having unnecessary code run when you put your XAML application (Silverlight 3 which you’ve probably built without a designer in particular) is to leverage GetIsInDesignMode().
Simply place your code within an if block like:
If Not System.ComponentModel.DesignerProperties.GetIsInDesignMode(Me) Then
‘My custom Code
End If
Of course I’ve put all my code in Visual Basic syntax, so let me slow down a second and make sure I don’t leave C# developers out:
if (!System.ComponentModel.DesignerProperties.GetIsInDesignMode(this))
{
// My custom code;
}
Regardless of your implementation language, taking a moment to optimize your designer experience and keep from loading or trying to load default data while in the designer is a good idea.
Visual Studio 2010 launches today. Tomorrow, is the launch (if not the release) of Silverlight 4. Neither of these launches involves the launch of XAML, yet in my opinion the release/launch of Visual Studio 2010 brings XAML into the mainstream. It does this by providing a visual designer within Visual Studio which truly supports the design of business applications.
While Blend exists for those looking to develop a creative and/or complex user interface, and while certain customer facing applications might see value in such an interface. For the majority of software even that which is public facing, isn’t looking for a creative user interface. Most software applications simply look to provide a simple yet distinctive user interface.
The difference is important because a creative user interface focuses on having unique behavior and display characteristics, while the later focuses on having predictable behavior with a distinctive identity. Up until now to get either of these you were looking at either having someone use Blend or someone who could build the user interface with little or (in the case of Silverlight) no designer support.
Visual Studio 2010 doesn’t replicate the raw creative power of Blend, but again in my opinion it doesn’t need to. Look most of us that are software engineers/developers have some level of design capability but are quick to step aside from someone who spends full time doing design work. The majority of software engineers are not looking to design a set of color schemes, logo and branding components. Blend is designed however to support the creation and application of these items.
What most software engineers do find themselves doing for the majority of applications is laying out controls, assigning background coloring, applying branding, logos and color schemes. Up until Visual Studio 2010 it was difficult to carry out even these simple design tasks for WPF; and Silverlight 3.0 simply didn’t support visual layout.
Visual Studio 2010 makes it possible for engineers to carry out the core layout of application user interface elements such that many of the people and organizations who either considered the use of these technologies to require over priced consultants or who attempted and shelved such projects to take on these projects. Moving forward WPF and Silverlight will become the common user interface implementations because just as Windows 7 brought touch capabilities into the mainstream, Visual Studio 2010 brings XAML user interface design into the mainstream.
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)
Windows 7 is to quote one Microsoft person “A lot closer than most people imagine”… in fact they just announced that general availability (ie. boxes on the shelves) will occur on 10/22/09. Of course this was old news 5 minutes after it was posted and refers to general availability – not the Release To Manufacturing (RTM) date that really represents when the software will be done and start being available for download if you have an MSDN subscription. However the focus of this post since I installed a few copies (or more) and since I’m using it on a few machines, are my three (yes only three, and in no particular order) top features and have some notes on using one of them. (OK actually they are ordered inverse to how much I’m going to write about them…) The first is the boot to VHD feature. As I noted you need to ensure you’ve enabled hardware virtualization on your PC, but this feature rocks. The second which I’m only just starting to work with is the backwards compatibility XP host support. The idea is that there are several older apps which for a variety of reasons will not run on Vista/Windows 7 natively. For example old Access applications which leverage the MS Grid OCX stop working when you move beyond XP. To resolve this, while preserving the core security of the new environment, the Windows team created a compatibility mode which essentially uses a Windows XP VPC in the background, but allows these applications to ‘seem’ to run on the newer system. The idea sounds like a good way to bring these two opposing needs (I need this old application, and I need all the newest security and capabilities on my computer) together. My third feature is pinning. Windows 7 makes it easy to add new items to the Start Menu and to the Windows Task Bar. The feature makes it easy to keep the most frequently used lists from betraying you. However there is a way to really leverage this feature better than the default. You’ll note in the image below I’ve placed both Visual Studio 2008 and Windows Explorer on my start menu. By default Windows Explorer comes on the task bar in the RC and I’ve gone to the trouble of moving it. The reason has to do with how the different locations behave. When I click on an item pinned to my Start Menu, I get a new instance of that item, even if an instance is already running by default. To be honest whether copying from one folder to another folder on my local machine, to a USB device or across the network there are a lot of times that I want 2 instances of Windows Explorer. Similarly I often open two instances of Visual Studio, I’ll be working on one solution and want to review how I did something or examine some sample solution, or access one of my junk test code projects where I quickly test some code… the result is I’ve pinned these items to the start menu. On the other hand items pinned to the Task Bar do not by default open a second instance of that application. Thus you’ll note I’ve placed Outlook, Virtual PC, the Snipping Tool, Windows Sticky Notes, and although not shown in the image below SQL Management Studio. In each of these cases I only need a single instance. Yes I can ask for a second instance by right clicking on the icon and then selecting the application from the context menu – but creating a second instance isn’t the default and is thus more involved, and in the case of most of my choices isn’t really the desired behavior. My suggestion to you as you might guess is consider where you want to pin items. Keep in mind that when something is on the Start Menu not only can I open multiple instances, I can pin target documents/folders from the most recently used selection into the context menu next to that item. You also may not I skipped Internet Explorer in my list above. I’m still deciding – for now I’m trying it on the taskbar on separate instances plus tabs. Finally however, I have a request with regard to the task bar…. I know it won’t be a change to Windows 7 but let’s talk about icons vs. icons and description on the task bar. When I pin a program to the task bar, you add the icon which is good. However, For things which aren’t pinned to my task bar I like the description. As noted above things I pin to the taskbar only typically have one instance – as a result I don’t really ever need to see the label associated with that icon. On the other hand items like Visual Studio on the task bar show the name of the current project in the label, which is useful. Yes I realize I can just hover over that item and you’ll give me pictures of what each instance contains – but if you are familiar with Visual Studio you know that isn’t the most useful way of recognizing which is which – on the other hand I can look down at the task bar and know which instance I want even before I can move the mouse to it when it’s labeled. This isn’t to say I’m not willing to stack similar task bar items when I run out of space – just that if we could keep the items pinned to the taskbar as icons I would have more space for those items where the label is actually useful to me.
As a virtual PC user, and in some cases now at work a VM Ware user, one of the options I’ve always wanted to leverage was acceleration for my virtual machines based on hardware virtualization. It was something I always wanted while at Internowlogy but of course since I was using 3+ year old hardware, let’s face it the hardware didn’t support it, and odds are if you are using older hardware neither does yours. However, I’ve gotten new laptops since leaving Internowlogy 64-bit high end machines with lots of RAM. Let me say up front since this post is obviously about how to enable this feature – my performance for my virtual Windows 7 hosting Visual Studio 2010 B1 has dramatically improved since enabling this feature (not to mention the performance of the virtual TFS server I set up here at Rubio’s.) Originally I wondered if the problem was with the Vista OS so when I installed Windows 7 RC on one of my machines I was looking to leverage hardware virtualization – however, no change. This became an issue because I wanted to take advantage of Windows 7’s ability to boot directly to VHD and thus set up a system with Windows Server 2007 R2 x64 RC – which isn’t supported by VPC. Finally I found a little note that Dell doesn’t enable this CPU feature by default. That’s right if you bought a new Dell you probably have a hardware virtualization capability for Virtual Machines that’s disabled. To enable it you need to use F2 during startup to edit your BIOS settings. Depending on which type of Dell you have you’ll either have 1 or 3 settings (based on my experience) related to hardware virtualization. For those with slightly older PC’s will probably find just a single setting for hardware virtualization which is defaulted to [disabled]. Change this to [Enabled] and that’s it you are done. Then there are those on the real cutting edge – like my Latitude e6500. This brand spanking new system has 3 settings related to virtualization (actually closer to 4… but once I explain the potential issue you’ll see why I’ve ignored the 4th). When you get to the BIOS for that machine there is a section on Virtualization Support. Within this there are 3 settings: the first titled Virtualization should be enabled. The second titled ‘VT for Direct I/O’ can also be safely. However the third titled ‘Trusted Execution’ which deals with protecting information exchanged with the CPU – it’s an Intel ‘feature’. For now enabling this setting reverses the previous two settings. So if you are like me and your initial thought is ‘turn it all on’ then you will find that you still don’t have virtualization support, even if you carefully read the instructions under the trusted execution settings and find the TPM setting and enable it. Don’t bother – it doesn’t help. So to review: to take full advantage of your Dell’s virtualization capabilities use F2 during startup and go to the bios settings, enable virtualization support but do NOT use Trusted Execution.
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.
A while back I blogged that if you were buying a new PC you should purchase a 64-bit machine. "The rise and fall of 32 bit computing" I stand by that but as part of that post I quickly mentioned that I also felt that if you were purchasing a new machine you should also get it pre-installed with Vista and not Windows XP. In fact my personal view is that those computer manufacturers who are allowing people to continue to purchase machines with Windows XP instead of Vista are in the long run hurting their customers.
Let me explain, Microsoft is working on the next version of Windows which will be known as Windows 7. In fact the Beta for this version of Windows is already available and I've installed it on a machine at my home. It works great and is definitely a few steps ahead of what's in Vista in many ways. In terms of features Windows 7 will be an evolution not a revolution.
What I mean by that is that unlike Vista which was a major departure from the Windows XP architecture, Windows 7 will maintain the core Vista architecture. This is important because it really draws out the fact that Vista isn't something that's 'going away'. Windows 7 is the next generation of Vista - not XP - and this is important. Part of the core of what changed between Windows XP and Windows Vista was the device driver model.
Unfortunately when Vista released, it wasn't advertised, that because of the low level changes in the driver architecture and since there were only a limited number of drivers - that upgrading from XP to Vista had a huge risk in terms of driver compatibility. The result was that in addition to the standard acceptance issues that any new UI experiences Vista had hardware issues - Big issues. Fact is the combination of these issues resulted in the need for Microsoft to allow computer manufacturers to continue to ship XP.
That was probably overkill - but when you make a mistake as big as the one Microsoft made in not advertising the limitations of Vista upgrades you pay a penalty. Microsoft paid theirs now the goal is to avoid getting caught up in that issue. With its service packs the fact is that Vista is both stable and in my honest opinion a really good operating system. I still won't ever go back to one of my old XP machines and attempt to upgrade from XP to Vista - but I also know I'm not going back to any of those machines and upgrading them to Windows 7 either. Those machines were designed for XP and they work well with it and that's how they'll retire.
On the other hand when I bought my new laptop I got it preinstalled with Vista. This means I got all of the Vista compatible drivers pre-installed by Dell. Dell supports those drivers and I know everything is compatible. For what it's worth, yes I got a 64 bit laptop (6 GB of RAM), and it's the Studio XPS 16 and it rocks.
The key is when Windows 7 arrives I'll go ahead and upgrade from Vista to Windows 7 and I don't expect to have any major issues. Windows 7 adds new features and enhancements to my operating system but it isn't going to require a different set of drivers or any other major configuration changes. Having installed the Beta of Windows 7 on my test machine from the Vista install timeframe I found the experience to be greatly improved. The original Vista on that machine choked - plain and simple I lost sound drivers, all kinds of stuff just wasn't quite right. Not only that but the network card didn't work... so when I got the Beta 7 bits I installed it. I still didn't have a network card, but I had some free time so I went out and found the driver for the network card and installed it. Windows 7 installed it no problem and suddenly I was off. Windows 7 recognized the sound card and connected online to download the necessary driver, not just that driver but many other drivers.
So back to the question - should you get XP or Vista on that new PC? Get Vista, because when Windows 7 comes out it's building on a Vista baseline. You'll be able to take that Vista machine and upgrade it with minimal risk to Windows 7. On the other hand if you have XP, well that isn't currently a supported upgrade. What I've seen on the web is that you'll need to get rid of your windows XP environment and then install Windows 7 from scratch. That alone should make you think twice about what you are going to have installed on your new computer - get Vista, regardless of what you heard about the initial release - it's a solid operating system at this point and is the basis of Windows 7 and future operating systems from Microsoft.
UPDATE: OK before Ileave any misconceptions, in the last paragraph I said "supported upgrade". That phrase has a specific meaning to Microsoft and that's NOT what I meant. I meant that instead of installing Windows 7 on top of an existing Windows XP installation you would be starting the installation from ground zero - the upgrade is 'supported' just not what most of us would think of as an 'upgrade' as compared to a 'new install'.
I'm in Seattle, WA this week at the Microsoft MVP Global Summit. Tonight was the kick-off and it was a great opportunity to catch up with many of the other MVPs I've met over the years. My thanks again to Serge of VB City who provided an excellent event tonight at Rock Bottom. Serge and I are looking to meet again later this week to discuss one of his products "Code It Right" so that I can put together a review of this Visual Studio Add-In.
I know I mentioned a month back that I felt it was time for those looking to get a new computer to be certain to get Vista and not XP. I'll quickly add that when I wrote that post I had already ordered my new laptop with the 64-bit version of Vista, and it works great. There's more to the story, however as part of the MVP Summit we'll be hearing some information related to the next version of Windows, Windows 7. As a result I'm going to hold off on my discussion of Vista for a few days - I won't be reiterating what I'll hear at the Summit since much of that information is covered by Non-Disclosure Agreement (NDA), but I want to be certain to include any announcements - that might be public - are included.
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.
Beth Massi posted a quick update on some of what was happening at VS Live this year. Unfortunately she linked to my historical blog site at InterKnowlogy, but she had some great insight into VS Live.
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.
If you've been keeping track of Nerd Notes and or are familiar with me you may be aware that I previously worked with Interknowlogy. We have chosen to part ways, as a result any email sent to bsheldon@interknowlogy.com or bills@interknowlogy.com email addresses I've used for years will instead be read by someone else at interknowlogy. I'm currently in the process of getting myself set up both here on the newly hosted NerdNotes as well as on Live.
If you are looking to reach me please contact me at WSheldon at Live . com.
Back in the late nineties we experienced a transition from 16-bit to 32-bit computing. The transition was neither smooth nor particularly drawn out. Currently we are in another transition – this one from 32-bit to 64-bit computing, and this time the transition will for the near term be much smoother and much slower. The reality is this transition started a couple years ago, but the reason I’m now writing a post about it is that in my opinion, if you are considering a new PC, the point of transition has been crossed – purchase a 64-bit version of the desktop or laptop you are considering.
To clarify, except in a very small number of cases that I will address, you should be purchasing a 64-bit PC if you are purchasing a new PC. Yes, Dell and others will continue to carry 32-bit machines for the foreseeable future, but whether you are a generic PC owner, or more importantly a developer it’s time to order a 64-bit machine. The reality is that as the world continues to move forward the new development money is on 64-bit applications and slowly even devices. In fact it is the plethora of hand-held devices which will slow the eventual end of 32 bit computing for a little longer but even handhelds will begin that transition at some point in the near future.
Right now pretty much with the exception of the mobile device world, the development world is focused on 64-bit computing (not 100% but increasing every day). With 64-bits I can have much more than 2 GB of active memory. Since the maximum value that can be stored in a 32-bit integer is 2GB and since you have to have a number to address each bit in memory this is the cause of the memory limitation. While the operating system can help to fake out this limit through a few tricks,(for another 1 or 2 GB) the reality is that your application environment has a 2 GB memory cap on a 32-bit OS. Plus given the power of that 64 bit machine you can run any vital 32-bit applications in a virtual environment and probably still be getting an upgrade in performance.
The question: What are the cases where I shouldn’t purchase a 64-bit machine? Well if you need and let me stress need as in, must have to do my job, a new laptop and you are working to write software for a 32-bit device (such as a mobile device or the Microsoft Surface) then you can justify getting a new 32-bit machine for that purpose. Similarly, if you have certain devices like an external scanner or high end printer and their drivers are 32-bit then you’ll probably want to keep a 32-bit machine available to run those devices. A good overview of the information related to 64-bit limitations is available here: http://windowshelp.microsoft.com/Windows/en-US/Help/41531554-d5ef-4f2c-8fb9-149bdc5c8a701033.mspx#EEAAC
However, in general while this transition will be smoother than the previous 16-bit to 32-bit transition in the long run it will be just as terminal for the 32-bit machines and software. What timeframe am I talking – well Microsoft is talking about supporting COM based computing past 2020 although I suspect most of that support will be migrated to environments running on a 64-bit machine in a 32-bit virtual environment. I'm not proclaiming the death of 32-bit systems, rather looking at where things are headed in the next couple years. After all I’m not making a recommendation based on when 32-bit won’t be available or useful, but for what you SHOULD be doing if buying a new system now.
My core recommendation is to purchase 64-bit on any new PC, I don’t care if it’s for your Mom or a high-end developer / computer gamer – it’s time to order a 64-bit machine. As for me, well just before Christmas I ordered my in-laws a new PC, like most casual users they have a 5-10 year turn around on a PC and sure enough there in the very reasonable price range for desktops were an array of 64-bit machines and that’s what they got. So in case you are wondering yes I am following this same suggestion for myself, because in 2-3 years 32 bit PCs will be a thing of the past and people will talk about supporting them for legacy applications that they haven’t yet managed to port to the 64 bit environment. After all little by little we are even approaching the point where the current internet address system (IP) will transition to a 64-bit version. You may need to keep the old computer around so you can print if you printer driver isn't supported but don't let a printer drag you into a PC which will be obsolete the day you buy it, you'll replace that at some point to and guess what - all the new ones support... 64-bit drivers.
By the way if you are getting a new PC, definitely get Vista – the XP downgrade is just that but I’ll put my justification for that recommendation in another post.
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 '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.
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
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
So the latest industry buzz-term (since it's not a word per say) is MVC. MVC is a description of a software pattern. The key to software patterns is being able to speak them and understand them. I'm sure you've read many articles that mention MVC and you sit there wondering: What is MVC?
So some 'jerk' (you know the type who provides your latitude and longitude when you ask where you are) says to you, "MVC stands for Model-View-Controller and it's the latest in architecture."
OK, What is a Model View Controller and what do I need to change in my architecture?
This is actually a pretty simple question and as I've said before, outside of major paradigm shifts - the more things 'change' in the technology world, the more they stay the same. Many years ago - probably before some of you reading this were born we had the concept of a 3-tier architecture. The idea, which followed on the heels of modular programming was that you should separate out your User Interface from your Business Logic from your Data Access. (UBD... or reordered DUB) Over time this was called n-Tier because you might have more then one 'tier'. The idea however was that you had components responsible for these elements.
Well in an MVC model the Model represents your data access, the View represents your User Interface and the Controller represents your Business Logic. So you have DUB -> MVC - but wait say the formallists, it isn't the same. So what's the difference?
Well under the n-tier model there were those who subscribed to the idea that all communication had to travel from the User interface to the Business Layer to the Data Tier, and in the reverse. In other words the User Interface wasn't allowed to directly communicate to the Data Tier. We tended to refer to people who tried to enforce this as 'jerks' (see above). Generally those of us developing applications spent hours justifying the fact that in the real world it made sense to have the User Interface directly access the Data tier to retrieve key data and in some cases even for certain key automated updates. That's essentially the gist of the difference.
So there you have it because people couldn't adapt to this one concept we have a new name - MVC to describe an old concept. So when someone suggests you re-architect your current n-Tier application to be MVC based and they want to charge you money to do so - well you know how much it should cost - nothing because even if you kept your UI from updating database directly, you still have an MVC architecture in place.... now you can just stop being so * retentive about which components in that architecture communicate.
Its funny we literally created a new name for an old concept, why? Well the 'jerks' will accept a concept with a new name that doesn't exactly match their understanding of an older concept. It's literally easier to reaname and remarket a concept then to for some people to update their knowledge.
The preceding is of course a brief comparison - to wit there are several other characteristics of the architecture models I've omitted (such as n-Tier) in order to quickly illustrate the key similarities between these models. I'm sure someone (see jerk above) will point out one or more such items in the comments...
UPDATE: I should also point out that yes the MVC pattern has probably existed for as long as the 3-tier architecture has. The point here is that it is the latest trend for architects and for many the new description seems like it is describing something... well.. new. In the past MVC was a common model for application logic but now that more "software architects" are actually learning about software best practices it has made the move to describing enterprise architecture. The concepts aren't new, just the name being used to describe what we've been trying to do.
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.
Matt Gertz of the Visual Basic team has posted an excellent discussion describing the release process for Microsoft's product development teams. Often as a presenter I'm asked 'how does Microsoft do it?'. Matt's post does an excellent job of talking about the project management details of managing quality for a product release.
http://blogs.msdn.com/vbteam/archive/2007/08/27/endgame-matt-gertz.aspx
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.
One of the challenges of writing both books and articles is that by the time the item is published, the technology world has moved on. It’s similar for other items such as training materials and testing materials although I have less to do with such materials.
My most recent article for SQL Server magazine, a product comparison, was written this Spring and is part of the July issue of SQL Server magazine. The article is also available online at: http://www.sqlmag.com/Articles/Index.cfm?ArticleID=96080&DisplayTab=Article (Subscription Required (currently))
The focus of the article is to look at two products for working with XML: XMLSpy 2007 and Stylus Studio 2007 XML. I found both tools to be very capable and obviously the point of the article is to explain why. So when you are thinking about looking at tools one option is to check out my review so you can match your needs to the tool which will best fit those needs.
Of note since for the purposes of the magazine having people check out the vendors which support the magazine is important here are links to the actual vendors:
· http://www.altova.com/products/xmlspy/xml_editor.html
· http://www.stylusstudio.com/
One item to note is of course that after the article was complete and on it’s way to the printer, Altova let me know that they were releasing updates to their current tool set. The new R3 (Release 3) upgrade to the 2007 version of their product includes several new features including support for the Microsoft Office 2007 Open XML standard. Since my most recent projects have been VSTO related this is a feature I’m looking forward to really checking out. There are several other new features in this update including better database functionality (including support for IBM's DB2 9 pureXML data server) and CSS support. You can check out the announcement of the features from the Altova web site at: http://www.altova.com/v2007r3_053007.html
I mentioned in Can you play baseball/softball? Are you a pro? that I was recommending the new book from Joel Spolsky at the time I was ordering it as opposed to after having read it. As I noted I said I would revisit this book again once I had a chance to read it.
Yesterday I needed to take the train from Oceanside an approx. 110 minute trip (just under 2 hours) and since the MetroLink trains that traverse Orange Country don’t have electrical outlets – I took a couple books. (My currently laptop has approx. a 45 minute battery life).
The one I read on the way up was “Smart and Gets Things Done”. It is a relatively short book, in that although it is hard cover it’s has pages about the size of a paperback and only goes for about 150 pages. This was good in that hopefully some managers (who haven’t been able to focus long enough to get through a book like Joel on Software ) can actually be convinced to sit down and go through this book. (I'm not targeting my current employer with that statment, but would like to focus across the entire IT landscape.) The key is even more so then Joel on Software - this isn't a book on software - it's a book about your "most important resources" your people - what it takes to find them and to a limited extent to keep them.
As this comment implies; I stand by my original recommendation, and I’d like to now expand on that recommendation.
I wish I could say that the company I work for follows all of the recommendations outlined in this book. The book covers tips for people who will be interviewing, tips on screening resumes, why services like Monster or Career Builder have limitations in terms of what candidates you will see. Overall, while in theory Joel has the ability to state – “I founded a successful company called ‘Fog Creek Software’, my success acts in part as justification for what I write.”, that isn't his main approach. Joel uses information both from within and from outside his organization to better illustrate his primary concepts.
The first chapter focuses on the intrinsic value associated with hiring only the ‘best’ programmers. As I noted in my original post, anyone can claim to be a developer – but there are some people who are truly professionals. Joel points out that software engineering can be associated with a natural ability or affinity. As I noted when I said there are some professional baseball players who have an innate ability which can be nurtured on the way to becoming a professional, the same is true for the people who are the best at designing and creating software. Joel goes beyond just using his personal observations and actually takes some data collected by a university professor to demonstrate how those people who really excel in software development may solve the same problem much more quickly then someone who for lack of a better word, struggles to pull together the logical pieces.
Chapter two focuses on finding those resources. As Joel notes – the best software engineers are rarely on the market for any length of time, and once they get to a new location they tend to stay for a long period of time. This is because over a period of time such individuals are easy to recognize. Joel points out that internships are a great way of identifying and ‘locking in’ such performers and describes his system for doing so. Additionally this is where he focuses on why so many of the resume’s a potential employer sees aren’t actually from the developers that employer should really be looking to hire.
Chapter three focuses on things that employers need to do to really attract and retain the best developers. This contains important tips that cover everything from how damaging politics can be to why in the right scenario money is rarely the driving factor motivating your engineers and what it probably means if money is the driving factor for your developers.
Chapter four focuses on things like sorting resumes. Returning to my baseball analogy from my previous post, the majority of organizations don’t have what I would describe as a farm organization. This is the collection of minor league teams that feed their best talent into the pro's and which are common in Major League Baseball. Instead of having talent pulled from the organization companies are going to do the majority of hiring off what is essentially the free agent market. So while Joel leverages a farm system via his intern program - other companies are scanning job services looking for people. This means scanning resumes and since maybe one half of one percent of the resumes you get from such sites and headhunters actually highlight worthwhile hires how do you spot even the top five percent of such candidates when looking through resumes.
Chapter five relates to phone screening and chapter six relates to the actual interview process. In short if you are interviewing potential developers you need to read these chapters. His process tends to model my ideal, unfortunately I know in my current company there are few who manage to come close to mirroring his suggested processes. I’ve seen hires who should have been screened out much earlier in the process by following his suggestions.
Chapter seven talks about how to work with teams and fixing ‘suboptimal’ teams as Joel phrases it. I actually consider this chapter to be an extension of Chapter three in that developers won’t be happy for long if the team they are on is dysfunctional. More importantly he points out many of the mistakes that companies typically make when attempting to make such teams successful.
Finally Joel reviews his 12 rules for rating a software team. This is offered as an appendix and reviews many of the things that you as a developer or as a manager should be asking if you are trying to quickly gauge whether or not your team is positioned to be successful. There are some very detailed and well documented ways to measure an organizations performance in terms of software development. However, I can state from experience that such methods often cause more problems than they identify, Joel’s informal system on the other hand can quickly get you on the right track without ever getting into those details or even getting huge push back from your employees.
So there it is my review of Joel’s new book and hopefully enough info so that even those who think they are too smart to need to read a software book that isn’t about writing code, will recognize it has some value and items they don’t know. While I did recognize one or two chapters from having followed Joel’s posts – I found the updated read a great refresher and took away good information from each chapter. I’ll be keeping this book available and whenever I’m preparing to conduct a series of interviews I’m sure I’ll review a couple of key chapters.
Last Friday Microsoft announced a new product family under the heading Popfly. Popfly leverages the recently announced Silverlight technology. Silverlight allows you to create interactive media style applications for the web. Popfly is focused on taking items such as Silverlight applications or other existing web contact and pulling these individual resources together to form larger applications.
The basic idea is to create "Mashups", what's a Mashup, well in short in terms of Web applications, a mashup is a web page which combines content from multiple sources. The terms been around long enough for publishers like WROX to actually create books on the practice (such as this one on using Flickr: Mashups for Flickr). Currently however, to create these technologies you are essentially working from scratch.
Popfly is a set of extensions for Visual Studio as well as a Live Spaces area to allow you to really start creating Mashups in a more drag and drop fashion. The basics of the tool are available at http://www.popfly.com and for additional resources I suggest going to this blog entry from Adam Nathan and checking out the demonstration video he links to: http://blogs.msdn.com/adam_nathan/archive/2007/05/18/yes-i-m-on-the-microsoft-popfly-team.aspx
It's going to allow many more people to create sites with a great deal more interactivity. It's still in Alpha and you have to apply to participate on the Popfly site but it definitely looks cool.
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.
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)
Just a quick note, if you commonly access a Sharepoint site which isn't in your own domain. If you haven't already, then once you upgrade to IE 7 you will want to add that site to your trusted sites list in IE. Failure to do so will result in that almost ever present information bar at the top of the page letting you know that the site is trying to run one of several different Active-X controls. The challenge - if you don't allow these controls to run, then for example you can't use the Sharepoint drop down to Edit a Word document in Word - instead you'll get a warning about not being on a compatible browser. You'll have similar issues with Team Foundation Server (TFS) based Sharepoint site access.
To change this setting:
- go to the 'Tools' menu (now located in the lower right corner of your IE menu bar).
- Select 'Internet Options' which will open the dialog which you probably remember from IE 6.
- Go to the 'Security' tab. On this make sure you select the 'Trusted Sites' icon in the image list.
- Use the 'Sites' button which will be active to open the 'Trusted Sites' dialog.
- Type the url to the top level of your site of interest, for example: http://Sharepoint.Microsoft.com
- You may need to uncheck the "Require server verification (https:) for all sites in this zone' checkbox if your Sharepoint site does not use HTTPS.
- Use the 'Add' button to add the SharePoint site to your list of trusted sites and close the associated dialogs.
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.
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).
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).
So you are trying to install the Beta Windows Sharepoint Services 2007 in a Virtual PC. The install seemed to run fine, and you’ve started the configuration process and you have just gotten the error: Exception: System.InvalidOperationException: This access control list is not in canonical form and therefore cannot be modified
There isn’t much documentation on this but from what I can tell unless you follow the unofficial solution below it is a show stopper. The cause, well if you tried to save time by having a VPC image preset with Windows Server 2003 and just copied that image and then ran something like NewSID on that image you got this error. Something in the SID reset logic isn’t clean enough and the Sharepoint installation picks up on the SID issue and doesn’t actually create the correct security settings and corrupts your registry in a minor way. Since I hate the thought of needing to forever wait through the Windows Server installation process, I wanted a solution to the problem.
I found a few hints that talked about things like making sure you have the latest version of NewSID and or running the Sysprep.exe utility that ships as an optional tool on the Windows Server DVD. The fact is I attempted several different combinations of these tools in an attempt to resolve the configuration errors and they don’t clean up the issue, which brought me to digging through the actual details of the error.
The good news is that the configuration wizard for WSS can be run repeatedly so I could debug each of the issues that cause this error in Step 4 of the configuration process.
- The first issue is fairly simple. It occurs in your systems Users and Groups. WSS creates three new security groups: WSS_ADMIN_WPG, WSS_RESTRICTED_WPG, and WSS_WPG. Only the third of these is corrupt.
The WSS_WPG group in my experience with this error is missing it’s members the LOCAL SERVICE and NETWORK SERVICE accounts need to be part of this security group.
The next two issues both involve registry keys and require you to use the Run command to open “Regedit” and hack on your registry.
- The first key at issue is located in the HKEY_CLASSES_ROOT hive. (Note this isn’t the order the errors appear but my choice for editing.)
From within this hive go to the AppID key. Within the AppID key find the key {6002D29F-1366-4523-88C1-56D59BFEF8CB}.
Right click on the key (starting with 6002) and select “Permissions…” from the context menu. At this point you should get a warning dialog indicating that this key’s permissions are corrupt. Say OK to the error message and go into the permissions dialog.
That dialog will look similar to this one:

Notice the “Advanced” button. Select it to get to the dialog you actually need:

On this dialog you’ll note that my example shows a set of non-inherited permissions, it’s this list that has some problems. You basically need to Add LOCAL SERVICE, NETWORK SERVICE and WSS_ADMIN_WPG as having full control on this key and sub keys. Additionally the SYSTEM and Administrators permissions should be for this key and all sub keys and any references to any User or Power User specific permissions that are not inherited should be deleted.
- Once you have updated the first key it’s time to move to HKEY_LOCAL_MACHINE to get to the second set of keys. These keys are under Software\Microsoft\Shared Tools\Web Server Extensions\12.0.
The WSS Key under the above path needs it’s permissions corrected, and when you right click it and select “Permissions…” you will again be warned that it’s permission hierarchy is corrupt. Say ‘OK’ again and head in as above. In this case on the second screen take a moment and select “Replace permission entries on all child objects with entries shown here that apply to child objects”.
Next delete any pre-existing permissions which are not inherited and then add a new permission for WSS_WPG. In this case when adding the permission you do not use full control instead use the settings shown in the screen shot below. Once this has been added “Apply” these changes and return to Regedit.

Next go to the key “ComponentsToRegister” located below the WSS key you were just in. Again right click and go to the advanced screen. This time you need to add WSS_ADMIN_WPG to the list of those granted permission and then set it’s special permissions with the screen shown below.

At this point you can close regedit and restart the Sharepoint configuration wizard. It should run past steps 1-3 very quickly and then successfully get through step 4. Once step 4 is complete the remaining 6 steps should complete without issue.
For me this is a quicker alternative to building a new image for each time I reinstall WSS. Now on to my next task, adding the Office Sharepoint Server (OSS) to the mix. I’ll post if it has any issues of its own.
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
One of my co-authors from Professional VB.NET and a well known Microsoft Regional Directory recently put together a somewhat tongue in cheek history of VB... it's a good read especially for developers interested in the progression to .NET: http://www.dotnetmasters.com/HistoryOfBasic.htm
Over on my blog roll one of the blog sites I like to visit every so often is the Daily WTF. This site essentially takes code samples and say - "OK, what were the people who wrote this thinking?" Let me say up front I've never submitted any code to this site, but since I had a chance today to catch a breath I stopped by and they had an code that involves, what for lack of a better term I would call a design pattern, the rules processor.
Now there are several things that sound great when you talk about a rules processor, and generally the thought process goes something like:
" Wouldn't it be great if instead of writing an application that embedded business logic regarding how to process an order or handle a customer request and then having programmers need to make changes when our process or business rules change;
We could instead have an application that read our business rules out of a database and then ran these rules against the customer database."
As this post on the Daily WTF notes, this is a admirable desire, but unfortunately if you try to build it yourself from scratch - well don't be surprised if you wind up with something similar to what this post is highlighting: http://www.thedailywtf.com/forums/68489/ShowPost.aspx
Let me reiterate - I don't know where that code came from much less did I submit it. However, I disagree with a couple things in that post.
First I think there is value in working to transfer rules out of code if those rules are dynamic. It's that word dynamic that I think people sometimes forget. Will the "number of days" to apply X ever change from being a number? No, so don't make it a rule, put it in code. Will the "maximum number of days" ever change - probably, so make it a 'rule' or at least a setting.
The difference is important because while I can create an engine to look for a generic rule to test for both the fact is the more rules my system needs the more complex the maintenance of those rules becomes and the greater the liklihood that I'll need a specialized employee to maintain those rules, thus defeating the original goal of the rules processor.
Secondly, look at what tools are already available on the market. There are companies that specialize in making and implementing rules engines - consider purchasing one of these existing products. More importantly, when I examine most rules processors what I find is that over time then tend to combine data validation based business rules with workflow based data processing.
Let me explain the what I mean by a difference. A rules engine is applying rules to see if an action or set of data meets the business requirements necessary to accept that data or start an action. A workflow engine takes data which is nominally valid and ensures that it flows to all the appropriate points in your organization or even across organizations, so that the customer's request to result in a desired outcome.
Now in a discussion around requirements these two things can sound very similar. For example "Ensure the order has a maximum number of days duration." sounds very similar to "Ensure the order goes to fulfillment and is processed within X days." However, these two requirements require entirely different approaches, one is focused on getting the correct information, the other is focused on how that data is handled.
Which brings us to Windows Workflow Foundation, similar to BizTalk, this is a technology designed to process your data. If you start trying to take the 'workflow rules' and apply them like definitions to data validation you will find yourself writing some *very* convoluted code. Don't get me wrong both WWF and BizTalk do a certain level of data validation in order to accept an object for processing, but you'll note that validation isn't the same as what they do in their actual workflow process.
So when you are designing your system and the question of 'rules' comes up start thinking about:
- What elements of the system need rules?
- Keep the rules simple, otherwise even if they aren't compiled they'll require a programmer using a custom syntax to maintain.
- Separate rules from workflow.
- Leverage existing products to both speed your development and ensure a standard implementation.
One of the reasons I don't blog that frequently is that I get many of my opinions out via the Developer Update newsletter. I don't think I've posted about it recently, the Developer Update newsletter is published by Penton which is the parent company of WindowsITPro and SQLServer magazine. Sometimes when I mention that I write a twice monthly free e-mail newsletter on developer issues I'm asked about where someone signs up.
To subscribe go to the Windows IT Pro free newsletter page and add your email address, then down near the bottom (under the SQL Server Magazine heading) you'll see the Developer Update newsletter. Here's a link: http://www.windowsitpro.com/email/index.cfm
The next issue is this Friday. However, be forewarned, my column contains opinion and as such you may be offended, so if you read this blog and you are easily offended you might want to avoid reading my opinions - they can cross the map, in fact in the next issue I've been asked to suggest a European trip to everyone... honest.
(How's that for a teaser trailer... doesn't it just make you wonder what I could be writing about... of course you could also google my past articles - there are about 120 out there on Penton and the MSDN sites; a couple still locked down but most are freely available.)
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/
Lets face it most of us tend to search MSDN using Google. It's not uncommon and regardless of what we think about censorship politics etc, and although MSN Search is improving at this point old habits die hard. So for about the past day or so I've found that some (but not all) of my Google searches into MSDN result in a page which is totally missing the formating for MSDN. For example:
msdn2.microsoft.com/en-us/ library(d=robot)/ms173150.aspx
About the second or third time it happened I looked at the url and realized it had that (d=robot) string embedded in it. Recognizing that search engines use 'robot' browsers to surf and index the web I removed that string from the directory hierarchy of my search result and lo and behold there was the formatted page which was human readable.
Don't know if Google isn't accounting for their robot or Microsoft has suddenly redirected robots (my suspicion) in order to better scale traffic. But if you suddenly get an unformated MSDN page - look for the d=robot string in your url and make it go away...
Just a quick note as I prepare for tonight's presentation to the .NET Beginners User group. http://www.sandiegodotnet.com/SDNETUG/DesktopDefault.aspx?tabid=24
Things have been a little hecktic, since I've become an instructor for the University of California San Diego (UCSD) Extension program in addition to my day job. Between all my recent presentations, articles and Version 5.0 I have been neglecting my posts here. Time to get back at it in preparation for next week's MSDN WebCasts. The ASP.NET team is doing a series showing that ASP.NET isn't a IE only technology. I have two presentations one on Tuesday the 14th and the other on the 16th. The program is also offering free copies of Visual Studio Standard Edition if you participate in a few of the web casts. For more information and to sign up go here: http://ad.doubleclick.net/clk;26540614;12550611;s?http://www.learn2asp.net/campaign.aspx
Now it's time to present the .NET Framework A to Z...
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.
OK, I was prepping for next week's VS2005 launch event in Anaheim when an odd thought struck me. I was looking at this slide where Microsoft was defining what a 'Smart Client' application is (as opposed to a Thin Client or Fat Client application) and I realized that the term "Dumb Client" really had dropped from the technical vocabulary.
Now I'm sure that there are some high school age kids that will classify 'dumb client terminal' right up there with punch cards. I did a search for "dumb client terminal" and got a grand total of like 13 hits on google and like 3 hits of MSN Search. The fact is the days when people would buy a terminal with a modem and connect to a server that ran programs on the server and provided a text only interface are long gone and with them this term. By the way the definition of 'dumb client' meant that the client litterally had zero application processing locally. Only the UI bits are sent across the connection and keystrokes are sent down to the server for processing (every keystroke roundtrips on a dumb client and isn't even echoed to the screen until processed by the server.)
Now we talk about the 'thin client' - a browser or Remote Client Window (think Citrix) as the distributed solution, but even with a thin client the client has some level of processing - for example browsers have Java Script which requires a client processor. We don't think about solutions that relied on true 'dumb client' hardware. For example in a dumb client scenario even a solution based on Java Script would need to execute the Java Script on the mainframe server round-tripping the IO to the client.
Citrix is the closest thing to a dumb client, but of course to run it you need a PC or other fat client capable machine, because Citrix itself is a fat client application, you need a client with processing power to run it. Thus even the remaining dumb client emulator is a fat client. Apparently the old 90's argument that there would be a balance between the fat - smart - thin - dumb client applications has been safely decided... dumb clients are gone clients applications will always be at least thin clients moving forward - and with scripting even the thin clients are getting thicker so you can even see the trend line - heck most phones have more processing power then the old dumb client terminals, and even those mainframes that still run dumb client applications do so using a fat client based emulator...
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.
One of those things which you need to do every so often and it takes longer then it should to remember how... and even Google does a poor job on a quick search of returning the simple step you need.
After you type in the FTP://site/dir to your browser (and probably gotten a credentials required message) you need to go to the file menu. On the File menu select "Login As..." and then enter the credentials for the FTP site you are trying to access. It's simple just not something most of us need more then about once or twice a year.
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.)
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.
The release of Visual Studio Team System is going to impact developers more then they imagine. One of the tools which has been becoming more and more popular with me as I use it is the Static Code Analysis tool. I've never been a big fan of source code scanners but as they value of the feedback they provide increases so does my preference toward using them. The Static Code Analysis module in Visual Studio 2005 fits this model.
I don't want to create a long post, I just want to highlight one particular check which ships with the RC1 version of Static Code Analysis. This check is in the Performance category. CA1820 looks at places in your code where you are doing string comparisons, in particular where you are comparing to Null/Nothing or the empty string (""). When it sees these it triggers a warning to let you know about a new feature of the Framework's string class.
With .NET 2.0 the String class has been enhanced with a static method that checks for Null Or Empty, it's called IsNullOrEmpty. The CA1820 check lets you know where in your code you should be referencing this new static method. To use this method just type the following:
VB: If String.IsNullOrEmpty(stringText) Then
C#: if (String.IsNullOrEmpty(stringText))
So in this case the Static Code Analisys is actually identifing places in your code where you can leverage new language features to improve performance. Of course there are already almost two dozen such performance checks and I'm sure more will be created over time.
One of the more annoying trends in technology and business is the buzzword. Often times ideas which are years old are wrapped with a new buzzword and the result is a 'new' technology. Lets take the current a current example, the XMLHTTPRequest object in Java Script. Originally introduced with like IE5 this control allows you to make a callback from within a page, retrieve updated content for a portion of your page and then redisplay that portion of your page in the browser. This is to say the least technology that's been around for quite a while and importantly the market has spoken. This object although originally used for things like the Outlook Web Access client is now supported across several browsers and is used by thousands of web sites.
In today's example of buzzwords gone wild we have the new term "AJAX" or "Asynchronous Javascript And XML" implemented with... the XMLHTTPRequest object. That's it, AJAX means you know how to use this Javascript object to update a portion of your page after the page loads. Yeah that's a new technology - it's revolutionizing the web if you read the blogs. It's also be added to toolkit after toolkit, in fact even Microsoftt is in on the act with the Atlas toolkit as blogged by Scott Gu. This kit like the others goes beyond the 'basics' of using XMLHTTPRequest and allows you to better debug some of your logic since script is notoriously difficult to debug. On the down side it makes it easier to carry out some 'tricks' as also illustrated by Scott Gu on this other link.
The nice thing about the XMLHTTPRequest object is that it does allow for a richer user experience heck, it's almost half as good as a Windows Form... The key is as you hear about AJAX just keep in mind its not a new technology its an understanding by the IT industry that a technology introduced by Microsoft, adopted by it's competitors, still not standardized by the W3C and already in use on hundreds of web sites can provide a richer web experience. You'll want to diig up the latest XMLHTTPRequest pages, and if you are using ASP.NET look for the initial release of the Atlas toolkit.
For the future though I'd just like to appeal to the technology world to ease up on the unnecessary buzzwords. I could post a dozen or more links to AJAX related sites and blogs most of which aren't clear on just what AJAX is. Can't we just say what we mean without trying to apply some marketing term to cloud the issue and hide the what's really going on. After all don't even get me started on the Web 2.0, which apparently is a term created to justify a conference to web technologies other then HTML... http://en.wikipedia.org/wiki/Web_2.0
As you can tell I'm using this morning to really catch up on my blog posts. I've been meaning to update them but things were busy and then I was sent on this assignment called 'vacation'. Turns out I really enjoyed that assignment... I need to post a couple picks of my wonderful neice and nephew, but I'm all ready for a repeat.
But for now I just wanted to send out a quick reference to a new technical book regarding Visual Studio Tools for Office(VSTO). The book is being published in September, but I was fortunate enough to get an early look because InterKnowlogy has been doing alot of VSTO work lately and Tim Huckaby (our CEO) spoke at Tech Ed on this topic. So after Tim took a look at the book so he could say what he thought of it he passed it to me and I put it to use. The book covers not only VSTO but integration with Microsoft Office 2003 from .NET 2.0. It talks about how to call office from your application and just as importantly how too build really powerfull VSTO apps. More importantly it doesn't draw a line in the sand with Word and Excel, this book goes into customizing Outlook and Infopath. This book covers stuff that some of our IK developers have had to learn the hard way.
The book will be released mid september but there is Addison-Wesley and a portion of Chapter 1 is posted here: http://www.awprofessional.com/title/0321334884
The version of Chapter One I previewed is noticably longer and the book comes with plenty of code samples. Although it's written in C# instead of my preffered language of Visual Basic I definitely recommend it for anyone who is looking to leverage the power of Office 2003 in their custom application. Converting samples from C# to VB just helps you really understand the code.
So I started documenting my observations on GUIDs and how they are used in databases in a previous entry and it’s time to get back to this topic. The original entry which discusses what GUIDs are and the model they typically follow can be found here: http://nerdnotes.net/blog/PermaLink,guid,0ab98866-4d22-4874-bd1d-10ab6fa483b6.aspx
This entry is going to focus on why it’s bad to use a GUID as the primary key on a SQL Table. As I noted in my previous entry, one of the characteristics of GUIDs that make them unique is that they are generated randomly. On the other hand a primary key in SQL Server uses a clustered index. A clustered index describes an index where each of the entries in the index is kept in sorted order. Specifically the idea is that since entries are inserted into the index in sorted order, it is possible to very quickly find an entry without needing to scan the entire index.
Key to this discussion is an understanding of the implications of a clustered index. As with any index in a database, it takes extra time to add an entry into an index. The advantage of an index is that they speed up lookup on a table. Sometimes, indexes are unique (such as the one for the primary key) and in some cases they are clustered. Each of these requirements can slow the amount of time needed to add the latest entry to that index. The result is that when we work with a table and we start making decisions on what should and shouldn’t be indexed we are looking to balance the cost of doing an insertion or update vs. the speed of doing a lookup.
Of the indices you place on your table, the one with the most direct impact on the speed of your database's query is the clustered index which is by default on the primary key. It is possible to create a primary key that doesn’t use a clustered index, but this is a rare event and not even considered by most DBAs and developers. What's important however is the unique characteristic of a clustered index. Clustered indices are sorted, that is each entry is physically ordered based on it’s sort order. This is where the difference between an identity/integer based primary key and a GUID based key becomes vital.
The way that GUIDs are generated randomly means that unlike an identity column where the next value always sorts after the preceding value, GUIDs are random. Thus when you need to add this new entry to your clustered index, instead of SQL Server appending the latest entry to the bottom of the index which is a quick and relatively painless operation, it is constantly attempting to insert your new entry into the middle of the index. Doesn’t sound like a big deal, well it is because it triggers block splits and a lot of additional information. Not only that but a 4 or 8 byte integer value takes up a lot less space then does a 64 byte GUID.
Yes, space, not something we normally worry about anymore, and from the standpoint of your database as a whole it’s not an issue. It's an issue because of the fact that you are putting this value in an index. The whole point of an index is that multiple entries can be quickly accessed because each entry in the index is small, but with GUID values aren't small.
So this accounts for two easy to verify technical reasons why GUIDs are a poor choice for use as the primary key on your table. Other reasons include the fact that since SQL Server and .NET v1.1 have slightly different physical representations for GUIDs you are constantly converting between the formats, and the fact that identity values are much more human readable in a test environment as opposed to GUIDs.
But aside from the arguments against GUIDs what are the arguments for GUIDs. Well the first is that since behind the scenes SQL Server applies a row identifier in the form of a GUID you are actually saving space by re-using that row GUID for your primary key. Of course the fallacy here is that just because SQL Server has assigned a value behind the scenes to the row doesn’t mean you are using that value in your index. As a result your indexing is still more expensive.
More importantly is a common security issue in web based applications. HTML/CGI developers and their future counterparts in ASP and ASP.NET need a way to identify the user between HTTP requests. The challenge here is that each HTTP request needs to carry an identifier for the current record in the database, so there is a huge temptation to use the primary key for that record. The problem is that if you are using identity columns and are passing those integer values, it is very easy for a hacker to manipulate that integer value by adding or subtracting 1 and getting someone else’s record. This is VERY bad.
So one way to resolve this was to use GUID values as the primary key. This way a hacker couldn’t just shift a digit and get another record, of course they could start guessing at the correct ID for another user or record, but the odds of guessing correctly are incredibly small. Unfortunately this solution still has a flaw, which is that once a hacker has that identity value even though it’s a GUID security is still compromised. Fortunately there is a simple and much better solution for .NET developers. The Session ID allows you to associate each request with data maintained on the server.
Session values are temporary and as a result resolve the security issues seen with passing identity columns across the web. The only remaining reason (that I know of off the top of my head) for using GUIDs has to do with resolving differences across multiple independent databases. This is another large topic, and so I’m going to put off that discussion until a future post, but suffice it to say for the current discussion that this remaining reason has nothing to do with transaction databases. Unlike a database which is being used to hold records from multiple different unique sources your transaction database doesn’t need to be concerned with integrating entries from another source… but as I said that’s a topic for another post.
Time for a more technical entry here in my blog. As you can probably tell, I have a pretty strong belief that my blog, should not be a flat one-dimensional product. After all it's important that we maintain interests outside of our job, so as I sit here watching a bit of OLN's Cyclism Sunday I figure I'll put in a quick technical entry before I go for my own Sunday ride down the coast.
In this case I want to talk about the use of GUID's. First I'm going to talk about the characteristics of what a GUID is... Historically of course Microsoft introduced the GUID structure around the same time that UUID's were introduced. SO let's start with what's a UUID. Good definitions are available here: http://www.dsps.net/uuid.html and here: http://www.opengroup.org/onlinepubs/9629399/apdxa.htm. As you can see the UUID is defined as a Universally Unique Identifier and it is a 128 bit or 16byte value. A value of this size is represented bya seres of hexadecimal (base 16) pairs. This format is the same one used by Microsoft in the implementation of the GUID. One of my favorite lines which I remember hearing from a Microsoft employee was that Microsoft had named their implementation of UUID as GUID, because they didn't consider a value of this size to be unique across the universe but hopefully something which would be valid at the global level.
in part I'm going to allow Microsoft to give us a complete defintion available from MSDN here: http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cpref/html/frlrfsystemguidclasstopic.asp I happen to really like this definition from Microsoft because it clarifies something which people sometimes mistake: GUIDs are NOT guaranteed to be unique. In fact let me quote the way that Microsoft phrases from this page: "Such an identifier has a very low probability of being duplicated." This is an important statment because it recognizes the reality that GUIDs aren't guaranteed to be unique and shouldn't be treated as such in every instance. The reason that a GUID can be treated as unique is that it uses a number range that is large enough to make random generation of the same values a low probability. However, it is the use of random generation which also causes GUID's to repeat before the entire range of values can be used.
So what are the 'system' characteristics where a GUID makes sense?
Let me break the answer into a series of bulleted characteristics:
- A decentralized model where several disconnected or different systems need to generate identifiers.
- Identifiers will generally be unique. (meaning they might not always be unique, so uniqueness is not a true requirement)
- it should be possible to easily change the identifier assigned to any given system with little or no impact to account for those instances where a duplicate GUID is created.
- the order that the identifiers are created and assigned should have no impact on behavior.
So what are some example systems where these characteristics fit well, well for starters the 'system' for which they were originally created, as identifiers for objects. For developers using Microsoft technology GUIDs became famous during the progression of COM. As an object is created a unique GUID is assigned to that object and when deployed those objects which may have been created by any software vendor should be unique. Every now and then a collision does occur and sometimes those collisions even make it out into the world at large, but when that happens the next version of software can change out the GUIDs associated with that software with little or no system impact. (Yes I've seen it in comercial products and I would prefer to not name the vendor involved, but in short they had an object which collided with a GUID used by a driver on certain PC's) Similarlly the value of the GUID that is assigned to an object does not change the performance of that object either during installation or at runtime.
Of course developers fell in love with this model and became focused on the word 'unique' in the title. As a result, whenever a developer thinks they need a 'unique' value they immediately think of GUIDs. However there are situations where a GUID is not a good solution, and in fact SQL Server presents a common one. So in my next post I'm going to discuss why GUIDs should never be used as the unique identifier for rows in a transaction database.... I'll also discuss how a transaction database is different from a data warehouse and as a result why a GUID might work just fine for that solution.
I found a few issues thus far with cross posting... I'm not sure however which system is truly at fault.
The first issue has to do with the date time stamp of my post. It appears that in the interface Das Blog is sending GMT and that .Text isn't converting this to local time... it's not a big issue but an issue all the same.
The second issue is also minor but interetesting to see... So I the other day I tried to transfer one of my older entries from my personal blog over to blogs.interknowlogy.com by editing the entry from April and then selecting it for cross posting. So far so good, my blog on blogs.interknowlogy.com shows this as a posting from April and sorts it near the bottom. However, the common post area apparently just pulls the entries based on when they appear on the .Text engine. As a result my post from April sorts near the top of the entries, which is interesting since it discusses the remaining snow here in Fawnskin/Big Bear CA... however the snow is mostly gone now and skiing ended several weeks ago.
My next test is with an image, but I'm saving that for tomorrow when I'm home with a high speed connection. Will it go smoothly and see how or if the interface will transfer the image... the interface may simply link to the image on my other site of some other event may occur... look for it tomorrow.
Just a quick note, on yesterday June 1st I was one of the presenters for a web cast from Windows IT Pro magazine related to Software Packaging Workflow Best Practices. The presentation was sponsored and partially presented by Macrovision which is the company behind InstallShield.
The presentation itself focuses on using workflow to manage the software packaging and delivery process. To paraphrase the session synopsis, the session deal with best practices for managing the software package preparation process including the experience of the package requestor, the ability to approve or decline permission for the package to be installed, the ability to have a historical reference and the need to have integration between the various installation tools like SMS and AdminStudio that people are using.
My copresenter from Macrovision Steve Schmidt goes through a demonstration (not just slides) of the Macrovision AMS 2.5 product which is of course why Macrovision was interested in sponsoring this event. That product is designed to provide a standard set of templates to allow you to manage the software packaging process. You can see a rebroadcast of the event at:
https://event.on24.com/eventRegistration/EventLobbyServlet?target=registration.jsp&eventid=12491
One of the great things with working with blogging software is the ability to cross post. Tonight I sat down with my existing blog for about an hour and figured out how to configure that blog to cross post onto my new Blogs.Interknowlogy.com site. Aside from the dearth of documentation it was actually a relatively simple procedure. I use Das Blog on my other site while InterKnowlogy has decided to use .Text (for it's multiple blogger support). Once I found the API hidden under the Services/metablogapi.aspx interface the pieces fell into place rather quickly. In particular the Das Blog feature which allows you to autofill the majority of the information makes life easier as it dug up the services/metablogapi.aspx endpoint for me once I realized what it would autopopulate.
In this way instead of cutting and pasteing content or ignore one site in preference to another I can place content in both places at once. The really nice feature is that Das Blog allows me to choose which posts I send across the wire to InterKnowlogy and doesn't just blindly send everything I choose to blog on here on NerdNotes.Net. Now I just have to repost a couple of my early blogs.interknowlogy posts so I can have them all in a single location.
Quick followup, the cross post feature also supports remote editing and deletion of the posts so I can even correct my rather common mistakes in grammar and spelling.
A quick note on a couple of the little changes re:Virtual Machines
Today's discussion on how an obstructionist impacts everyone on a project
I'll upload the files from todays' presentation to this entry in the blog.
Notes to me to help remember the tricks I learned today posting an elevation profile...
Continuing my rant from yesterday on haw you too can break the SOA model
A bit of a rant related to how some don't seem to grasp the SOA concept...from the car
|