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)
Yes my blogging frequency is down... fact is I've been getting set up on Twitter... I'll be getting a few posts out over the next week as I process some blog related updates. Up until about a month or so ago I tended to follow Billy Hollis's school in that Twitter seemed pointless. However, in reviewing what's been going on I see it CAN be pointless (and for many people is), but managed as a live connection network you can get questions answered, updates on items of interest etc. For example Kathleen McGrath (http://twitter.com/kathleenmcgrath) is posting a link to a video a day related to VS2010, this was my inspiration for finally signing up.
You can follow me on Twitter as: http://www.twitter.com/nerdnotes I'm working to keep up a regular (3+ times per week) feed of updates for VB developers tagged as #VBDevTips... given that twitter seems to have the memory of a goldfish however (ie. short term only) I may also consolidate these 140< word tips in aggregate blog posts on an irregular basis.
Finally for those interested in the vast array of VB related twitterers there is an index page at:
http://www.cto20.com/home/entryid/112/tweeps-list-microsoft-visual-basic-mvp-rsquo-s-and-influencers.aspx
Did I mention I was planning on speaking tonight at the San Diego .NET Developer’s group? I was asked to do a short presentation on Generics as part of tonight’s meeting, as part of something we’ve introduced called .NET Fundamentals. The idea is that User Groups are meant to help people come up to speed, but of late it seems more and more like we’re only focusing on the latest what’s new, whiz-bang stuff. So to help with some of the folks who really are just getting started with .NET come up to speed on portions of .NET.
So for those of you who were present for tonight’s short presentation and whom are interested in a copy of my slides, I’ve added a PDF containing those slides. I enclosed all of the sample ‘code’ as part of the slides and they contain both VB and C# examples (although a few snippets are in just one language or the other for the purposes of space.) dotNET_Fundamentals_Generics.pdf (1.26 MB)
So a couple weeks ago I posted a note prior to the start of TechEd (Time for Tech Ed North America) talking about how if I could have gone this year the one session I would have been certain to not miss was DTL336 Future Directions for Visual Basic with Anders Hejlsberg and Jonathan Aneja. Well good news this video has been made publicly available. The video is the full hour of the session and starts with Anders discussing the future of programming languages.
Before I give you the link, let me provide one important tip: Don’t watch it online… you can but you’ll not just below the default viewing window on the right hand side is a download button. You’ll be tempted to click that – here again – pause and instead right click the download button. Save the target (DTL336.wmv) to your local machine. Attempting to watch a full hour of video over the network just isn’t going to be a good experience, and trying to do so in that tiny little window in the browser is just a measure of torture. The video is available from Tech Ed online at:
http://www.msteched.com/online/view.aspx?tid=1d3d650b-a6b3-4c98-9240-571866969b89
Anders discussion of the future just as it relates to concurrent programming issues is enough to make the download worth it. I think this was a great session, and speaks well to a very active future for Visual Basic. I think someone in Redmond finally woke up wrt VB in terms of finally starting to provide the resources people need and which in the past were focused on C# so that more and more people will be able to move into VB on .NET and away from older technologies.
So I won’t be at Tech Ed this year. I just started my job with Rubio’s (www.rubios.com) - home of the world famous fish taco. I accepted a position in the corporate organization and only started last week which makes heading off to a week long convention a little unrealistic. I will be up in LA at Tech Ed today (the day before it actually gets started, Microsoft is hosting a few sessions for MVPs today.) Fortunately although I won’t be there Microsoft is making a great deal of technical information from Tech Ed available. The current site for Tech Ed is: http://www.msteched.com/online/channels.aspx and as you’ll see by the page I’ve chosen it has online channels with materials related to Tech Ed. I’ll be checking back during the week to catch some of what I’m sure will be Tech Ed highlights and some great technical information. However, for those attending there are a couple of sessions I truly wish I could attend, of those there is one in particular that if anyone does attend I’d appreciate hearing more about: DTL336 Future Directions for Visual Basic - Wed 5/13 | 8:30 AM-9:45 AM | Room 152. The presenters will be Anders Hejlsberg and VB veteran Jonathan Aneja. The nature of the tech ed site makes linking to the session description difficult, so I’ve copied the description from the session catalog: In this talk, we discuss the future direction of the Visual Basic language both in the near and long term. Exciting features from the next release are demonstrated and discussed, including extensions to LINQ support, syntax simplifications, and improvements to the IDE. Larger trends that are likely to deeply influence the direction of the language are also covered, including dynamic binding, meta-programming, and scripting. Finally, we discuss how all these tie together into the roadmap for Visual Basic going forward. If anyone gets to this session please feel free to send me a link if you post a recap, I’ll also be searching but I’ll have to wait for the content to get indexed. Now that the languages team has been merged and Anders is involved in the direction for all of Microsoft’s managed languages – including Visual Basic I’m very interested in his initial public thoughts for the direction for Visual Basic.
In addition to doing Silverlight the other set of updates I’m focusing in on relate to the Sales OBA project up on CodePlex: http://obasales.codeplex.com/ I just made some minor updates to the source code for the custom Excel Spreadsheet on the site – mainly cleaning up the code and adding some comments. My goal is to start replicating some of the current C# projects with VB versions… of course the Excel spreadsheet is already in VB, so once I get the VB versions of the other projects I’ll loop back around and be updating the Excel spreadsheet with C# and the other C# projects for Visual Studio 2010… I’m leveraging a tool that I like for this process and I’m going to talk about it tomorrow. This isn’t going to be a quick process but it does mean you’ll continue to see some new sample materials related to the Professional OBA book (http://www.amazon.com/Professional-Office-Business-Application-Development/dp/0470377313/ref=sr_1_1?ie=UTF8&s=books&qid=1238107346&sr=8-1) My target is once I’ve completed my Silverlight project – discussed in my preceding post, I’ll move to the generation of Word Documents using the XML structure created for the OBA Sales project… rest assured I’ll post something when I make a new upload.
So 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.
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
It's Friday so in a slightly more light hearted spirit I thought I'd link to a less serious post. I for one have written about and certainly talked about the persona Mort. Mort for those not up to speed is a Microsoft 'persona'. Microsoft created these persona's to help them focus on the type of person that used a given product. Paul Vick has a fun little post describing (with pictures) three of the main developer persona's and suggesting that it's time for Mort to retire. http://www.panopticoncentral.net/archive/2007/11/14/22589.aspx
My personal opinion is that Mort took a bath and learned C# a long time ago, he's got a big velvet Elvis hanging in his trailer. (I'm saying this in the context of Paul's post) Thus from the standpoint of VB retiring Mort only makes sense, and I find the Ben persona much more appropriate 
This winter I'll be taking my first crack at a new class at the UCSD Extension. It's surprising that I'm heading into my third year teaching the Visual Basic .NET Programming II class and now I'll get to do my own lead in. I'm looking forward to this opportunity especially since I'll be updating the materials to account for Visual Studio 2008. As always I'll make certain the course supports those who only have access to the VB Express Edition in terms of lab work.
So if you are looking to learn about the most powerful and most popular .NET language, stop in for a class.
For more information on the when and where and if you are interested in registering for the course go to the UCSD website at: http://www.extension.ucsd.edu/studyarea/index.cfm?vAction=singleCourse&vCourse=CSE-40615&vStudyAreaId=14
Often as a new release of Visual Studio approaches there are posts regarding, where are the two primary languages in .NET going? In short as has been noted on one or two places around the net the VB MVPs posed the question of, what is the strategic long term expectation for VB and how is VB doing in the market? Which language should I learn, which will help me get a job? etc.
(The short answer regarding which language to learn is - if you are going to do just a little programming VB is easier to learn and maintain. If you intend to be a Professional Software Engineer and limiting your career to being a full time Cubicle Code Monkey you need to know both. Just knowing C# or VB isn’t enough, as a developer I’ve learned somewhere between one and two dozen programming languages, to be honest I lost track of them all and stopped counting long ago – although interestingly enough I still have my high school ‘Basic’ programming book...sentimental value only - the point being casual developers will be more comfortable in VB and professional developers learn languages and VB and C# are both necessary with .NET today.)
At any rate focusing on the core topic, depending upon where you ‘stand’ your view of VB or C# might be that it’s doing great or not so great. After all if you are working in a shop where your senior management likes C# it might seem like very few people are working with VB.
On the other hand this perception might be a self-fulfilling prophecy for your company. After all if every project uses a hammer then there must be a lot of nails (how’s that for twisting a proverb “if all you have is a hammer everything looks like a nail”) If your company “supports” both VB and C# languages but encourages that new projects use one language well then you begin to wonder. As I noted in the past I’d consider that pretty short-sighted for a consulting company. After all if your goal is to sell software as a service (which consulting companies do) you don’t want to lose a major portion of your market to language bias… so before I go further I want to clarify where I got some of the data I’m about to toss out.
I think it’s common knowledge that I’m an MVP (I can hear some of you: ‘could he mention it one more time…’) anyway I bring this up to note that it shouldn’t be a shock to realize that as an MVP I have a Non-Disclosure Agreement (NDA) with Microsoft. This comes up because as a group we MVP’s have some communication channels (formal and informal) with Microsoft. One of the formal ones revolves around my specialty area Visual Basic.
In this area the VB-MVPs have essentially an opportunity to truly speak freely to Microsoft on NDA topics. It’s where we can say we think that feature A is useless or that we think the VB team has dropped the ball by not having a given feature, or where we think they need to take the ball and really run with it. It also allows us to ask questions and get answers that might embarrass one or more people at Microsoft. In general it is a valuable tool. Every so often we get permission to post some information from that discussion to help frame discussions outside that group – things that aren’t too germane to actual company business, and that’s the case for the numbers I’m about to post.
There are way more people online downloading C# right? Wrong – At this point you aren’t going to be surprised when I say the VB Express is the top download of the Express editions. It probably also doesn’t surprise you if I say that it’s downloaded far more frequently then C++ Express. But does it surprise you when I note that C++ is the number 2 download behind Visual Basic. It surprised me, after all I expected Visual Web Developer to be in the top 2 (after all both VB and C# web developers would use that one tool).
That’s right Visual Basic alone is more popular by a margin of 20% over C++ <credit VB Team>. What I will say is that the other three express editions are all much closer in terms of downloads, and registrations. The point is that Visual Basic is noticeably more popular. Of course this is the Express Edition, that’s for students and hobbyists, they aren’t professional developers.
So how big is Visual Basic when someone reviews the market?
Well according to Forrester research Visual Basic is the #1 .NET language. <credit VB team> Note that’s not some legacy number based on COM developers, that’s just in terms of .NET developers. That’s right the majority of professional developers out there are using Visual Basic, and that even makes sense.
Think about it this way, prior to .NET the two primary development languages were C++ and VB. C++ was far more powerful, but it took longer and cost more to develop applications. Sure for someone developing tools or with a huge install base the disadvantages could be overcome for the power. VB on the other hand was much easier to learn and use, the code was easier to maintain and its performance while not equal to, was certainly comparable to C++.
Along comes C#, from the standpoint of C++ developers C# offers a familiar syntax and reduces the disadvantages of C++ - applications were easier to develop and accordingly cost less. C++ developers and Java developers have without a doubt flocked to C#. In fact if you are a Java developer and haven’t moved to C# boy are you missing out on the future. However, these were smaller developer communities to start with then Visual Basic which also released a .NET version.
Visual Basic also moved to .NET and its disadvantage – not having the same runtime environment and power as the other major language went away. Note the fact that VB is easier to learn, read and maintain is still true but now you also get all the power of C# and since .NET creates code on par with C++ it means you as a VB developer are creating first class applications.
Sure some people have jumped from VB to C# that is to be expected, and many companies which in the past would have C++ for some projects and VB for others are moving to use only 1 .NET language. However, as I’ve noted in the past most VB developers will find the transition to VB.NET fairly easy and natural. When I teach I find that the students with previous VB experience do very well, and in fact that once they get the key elements of Object Oriented Development are ready to become productive. More importantly the VB teams recent move from a migration wizard to the Interop toolkit (similar to WPF Interop) and the Power Packs make the transition from VB6 much easier.
What is interesting is how the VB team blog (http://blogs.msdn.com/vbteam/) ranks in the top 1% of all MSDN blogs and the fact that the VB Developer center on MSDN is one of the top trafficked sections of MSDN (http://msdn2.microsoft.com/vb). <credit VB Team> In other words VB is doing just fine and as I’m sure we would all agree so is C#. In the near term there is no reason to suspect anything about this equation will change – C++ and Java developers will tend to prefer C# and those who have mastered both VB and C# will prefer VB J
So what about the future?
Well for starters the Visual Basic team recently published the Beta version of the Visual Basic language specification. A great step for defining how the language works, and one I look forward to seeing become the basis for standardization. We also know Paul Vick is discussing VB X (aka VB 10) over at Panopticon Central (http://www.panopticoncentral.net/) and is very open to input on things to deprecate in the languages specification and new language features to add. I highly suggest going over to get in a good suggestion or two. As for Visual Basic – I’m confident that it’ll be around and diving into all corners of the Microsoft development tools.
One of the most highly anticipated features of Visual Studio 2008 is XML Literals. It doesn't sound like much until you start thinking about some of the ways that you can leverage this capability. One creative way is to replace code, Beth Massi of the VB Team recently made a post highlighting a little of the power that you can have with XML Literals in Visual Basic 2008.
http://blogs.msdn.com/bethmassi/archive/2007/10/23/avoid-underscores-in-your-multiline-strings.aspx
What's interesting is her post leverages another new feature call type inference which allows her to create the new object with specifically needing to specify details of the type. She continues the example but just the first section allowing you to format strings without any special characters is pretty awesome. Of course the syntax <%= %> might give me nightmares of ASP but overall the capability is very cool, and combined with some of the power of XLINQ that VB provides (see Scott Hanselman's post: http://www.hanselman.com/blog/XLINQToXMLSupportInVB9.aspx) VB is definitely looking to simplify working with XML... you know that data structure which is at the core of things like XAML and Silverlight.
Update: Beth's keeping the XML literal ideas going with her latest post: http://blogs.msdn.com/bethmassi/archive/2007/10/26/xml-literals-tips-tricks.aspx
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
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 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)
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.
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.
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.
This August I'll once again be teaching at the University of California San Diego (UCSD). I've now got a couple semesters with the Visual Basic .NET Programming II class under my belt and so I'm more comfortable suggesting that folks come on down for the class. The entire class is .NET 2.0 and focuses on the language and it's use in smart client applications. If you are interested check out the registration pages from UCSD at: http://extension.ucsd.edu/studyarea/index.cfm?vCourse=CSE-40616
|