Beth's Chinese blog
John mentioned that they just released a social bookmarking preview so that we can pop social feeds (feeds generated by content bookmarked by you) to enable all members of the community to publish useful resources directly to MSDN and TechNet. Check it out, the visual basic feed is on the VB Dev Center Community page displaying links by popularity.
You can also take a look at my bookmarks, not an exhaustive list of course, I just stated bookmarking 2 days ago ;-). There's plenty more stuff for me to add!
I'm heading to TechEd next week where we'll be showing off a lot of the new MSDN features. I'll also be on a panel discussing XML literals and speaking on VB6-->.NET migration. Of course, most of my time will be at the Visual Basic booth (yep that's me, VB booth babe) so stop by and I'll show you some amazing things!
Look for a full trip report next week. :-)
Enjoy!
Since I live only about 200 miles from Reno I figured I would volunteer to deliver a session at this VS Launch Event last Thursday. I love driving and figured I could easily handle a 3 hour drive over the Sierras on 80 this time of year. I stayed with a friend who lives about 10 minutes away from the Peppermill where the event was taking place. Bruno Terkaly, Bay Area Developer Evangelist, ran the show and delivered the keynote.
I figured there would be a lot less people here than in the San Francisco Launch session I delivered but it turned out there were about 200 people that showed up. The difference between the two events was that SF had many concurrent sessions running and Reno split the Dev and IT Pro tracks into separate parts of the day, Devs in the afternoon. So everyone had all 200 people in their talks and there was just one big room for everything.
The goal of my talk was to speak to the new features of VS 2008 particularly the WPF client designer/developer paradigm (including a simple demo of Expression Blend), occasionally connected scenarios (OCS), and WCF hosted Workflows. I also added a demo of the client application services and threw in a LINQ to XML with Excel in the end because I had some extra time.
Everything worked without a hitch except for one minor step I forgot but recovered right away the minute I ran it. Although there were more web developers in the audience (through a quick poll of hands) many people came up to me at the end of the talk asking me about good books on WPF as well as data binding. There were also lots of great questions and interest about the OCS support and VB’s XML literals.
Reno was surprisingly a great turnout and had a big group of developers in the area. After my talk ended I grabbed a bite to eat with Bruno and the other speakers at a buffet (of course! What’s Nevada without an all-you-can-eat buffet?!). But I couldn’t stay too long, not because of the residual smoke that was clinging to my hair and clothes, but because I had to drive back home that night and wanted to make it back before midnight. It was a great adventure though!
I got back late last night from the Visual Studio Launch event in Reno, NV (more on that later) but I wanted to mention that yesterday MSDN and TechNet rolled out a new look.
With the new site redesign, the MSDN and TechNet Web sites will make it easier to discover and participate in online communities and showcase the insights of community experts as well as active technical professionals throughout the world. This refresh encompasses 18 Tech & Dev Centers as well as both the MSDN & TechNet Home Pages, and releases simultaneously in 7 languages worldwide.
Check out my favorite sites:
Visual Basic Developer Center (more How-Do-I videos soon!)
Office Development with Visual Studio
As content manager for these destinations I'm always looking for community content to feature on these sites. Do you have expertise in Office Development with Visual Studio 2008 and/or Visual Basic 2008? Are you an MVP? We can feature your MVP profile on the site as well! Contact me!
Thursday: Okay I know it's Friday but I was the last session of the day yesterday and I didn't have time to post afterwards (I'll tell you why in a minute).
My duet session with Rob Windsor was on VB6 to .NET Migration. We're going to take this one to TechEd this year as well. We've also done a webcast on this too that you can watch here. There weren't too many people in this one but it's always hard when you are the last session of the last day of a conference. Even though I was slightly burned out I think the talk went really well (at least the evals said so).
Rob and I started off the session by presenting a decision framework of different upgrade strategies. We talked about how you can decide if migration is the best option for your situation. Then Rob went over interop with COM and .NET by showing how you can call a COM component from .NET and how you can call a .NET component from VB6 using Runtime callable wrappers (RCW) and COM callable wrappers (CCW).
Next I presented the Interop Forms Toolkit. (I've written about this toolkit before in this blog as well as have done videos on these.) The toolkit allows you to take a phased migration approach to moving (or just extending) your VB6 application by making it really easy to build .NET user controls and forms and run then directly from your VB6 applications. When you install the toolkit it gives you new project templates for building user control or form libraries that have all the pluming set up to register them properly and let you use them in your VB6 apps. I showed how to create an Interop user control, expose a public property and use it from a VB6 app. Then I showed how debugging works and how you can get My settings working properly as well.
Rob finished up the show by taking the code I built and showing how to expose .NET events to VB6 as well as how you can manage global variables and state between VB6 an .NET using the features of the toolkit. I think people really liked the demos because we really showed how easy it is.
Now for the reason why I didn't have time to post yesterday. Jean-Rene, the conference organizer gave Alan and I tickets to The Cure who were playing at the Air Canada Centre. Although I was never a huge Cure fan (my sister more than me) I thought it would be semi-nostalgic to see them. But we didn't care about the opening act and I was pretty wiped so we went and had a great Italian dinner and then walked down to the arena. We walked in easily, bought a couple beers, and headed in right as they started. I have to admit they were pretty good after all these years and they played a lot of old songs that I recognized so it turned out to be a great time.
Thanks Jean-Rene and Toronto for a great conference! Now time to pack, grab some lunch and head to the airport.
Before I post about DevTeach Day 3 I thought I'd report back how the LINQ session I did yesterday evening. I mentioned yesterday that I volunteered to fill in for Roy Osherove because he ended up in the hospital. Good news is that he emailed this morning and he was released with some medicine, so he should start feeling better soon.
I called the session LINQ to Everything. For winging a LINQ session I think it went extremely well. As a matter of fact I'll probably polish it up a bit more and use it again in the future. I decided there should be a simple agenda and then encourage a lot of interaction and questions from the crowd to shape the talk and mold the examples. It worked well. I started with explaining at a high level the LINQ framework architecture and what major LINQ providers were available in Visual Studio 2008, but also mentioned LINQ to Entities that is available in SP1.
Next up LOTS of samples. I had a question about LINQ to Objects and showed how to query all the processes on my machine. Then I moved quickly to a data discussion (what do you expect from a business programmer ;-)) showing LINQ to SQL and LINQ to Datasets pointing out the differences to each approach and the considerations you have to think about when going n-tier.
Finally I ended with a discussion on LINQ to XML (my personal favorite). I typed some XML into the editor, pointed out the XElelment and XDocument classes and the benefits they have over the XML DOM, enabled IntelliSense, queried the document and transformed the results. We were running out of time but I promised some Office Open XML tips. So I asked the crowd if we should write an Excel data app or a Word letter generator and they wanted to see how we could quickly text merge Word documents. I have an example I showed before here.
I think it went really well and the evals coming through today are validating that. LINQ makes it easy to get great marks on a session because the technology is so fun to work with :-). Here are the links I gave everyone.
LINQ to SQL examples:http://blogs.msdn.com/bethmassi/archive/tags/Article/LINQ/Data/default.aspx
LINQ to XML examples:http://blogs.msdn.com/bethmassi/archive/tags/Article/LINQ/XML/default.aspx
More LINQ exampleshttp://code.msdn.microsoft.com/linqntierhttp://code.msdn.microsoft.com/vbvideoslinqhttp://code.msdn.microsoft.com/whatsnewvb
I'm now sitting in a cool WPF data binding session so I better pay attention. I plan on doing a series of How Do I videos on WPF data-based development so I want to compare notes with the experts. I'll report back after my VB6 to .NET Migration talk I'm doing later with Rob Windsor.
Wednesday: I woke up this morning (yes it was still morning, I made it to bed before 3am, I think), feeling chipper and excited that I'd be able to spend the day attending sessions. I wasn't scheduled for any talks today, just tomorrow, so I figured this would be the perfect opportunity to learn something.
The first session I attended was an intro to F# that Ted Neward was giving. The talk was interesting, but I must admit I was a bit lost in the syntax at times. However, when Ted opened up ILDASM and showed the IL code that was being generated it started to click better for me. I dream in VB and OOP and F# is a purely functional language so it was a stretch.
As a former business systems architect, I was more interested in hearing where using F# in your application made the most sense. Ted's (unproven) hypothesis is that F# would make a good middle-tier and work well with REST-based applications. Hmmmm... interesting.
So now for the unexpected turn. In the beginning of the talk one of the other speakers, Etienne Tremblay, mentioned that Roy Osherove ended up in the hospital because he completely lost his voice and was feeling sick. (FEEL BETTER, ROY!) I jumped up and headed over to the conference organizer, Jean-Rene, and mentioned I could fill in if needed. He said he would let me know so I headed back into the F# session.
After the session I headed to lunch and JR came up to me and asked me to fill in for a LINQ talk. Roy's talk was called "LINQ to Anything - Building your own custom LINQ provider". I decided to do something a tad more mainstream and made up an abstract and titled it "LINQ to Everything" :-)
LINQ to Everything
In this session we will go over the major LINQ providers that shipped with Visual Studio 2008/.NET 3.5 and how to effectively use them in common business scenarios. We’ll go over LINQ to relational data using LINQ to DataSets and LINQ to SQL pointing out the benefits to each approach. We’ll also go over LINQ to XML and demonstrate some practical uses of creating, querying, transforming XML as well as how to take advantage of this technology with Office.
Sounds good to me! Now I'm working on a few demos while I'm sitting in a session on Silverlight 2.0 with Alan Griver because this room has a nice bunch of electrical outlets :-)
I'll report back and let you know how my LINQ talk goes. I just love filling in at the last minute. It keeps me on my toes.
Monday: I wake up at 3:15am CA time and get to SFO to make a 6am flight to Toronto. (Note: Air Canada flights do NOT leave from the international terminal, they leave from domestic terminal 3, go figure.) But the flight was pretty nice, TVs on the back of the seats and all that. Of course I spent most of the flight writing code.
I land in Toronto and get through customs about 3pm and arrive at the hotel around 4pm, quickly unpack my wrinkled dress shirts and get down to the lobby to meet Rob Windsor and crew. We take the subway to the Toronto user's group where I'm speaking with Scott Hanselman who's meeting us there. I've never spoken with Scott so we decide to break it up in half, I go over LINQ to SQL and LINQ to XML and Scott picks up with ADO.NET Data Services (Astoria).
It was a great talk. I created an app from scratch that pulled down RSS feeds (Scott's, Ted Neward and mine), inferred the schemas, enabled XML IntelliSense, and then stuffed the posts and related categories into a database using LINQ to SQL and XML in one query. Slick. Then I wrote some aggregate queries and showed off some of VB's expanded query syntax. Then I hooked up some validation rules and showed how to properly save and delete parent/child data. I also spent 2 minutes and dumped all the data into an Excel spreadsheet format using XML literals.
Then Scott showed the ins-and-outs of exposing your database through services and touched on a few of the gotchas. Great discussions!
Next stop was Party with Palermo, two chicken wings for dinner, then bed. (Oh, yea... we released VS08 SP1 Beta too).
Tuesday: I have the first session of the day. "What's New in VB 9" was the talk and I've done it many times before. So I tried something different this time. I tossed out my slides and decided to build another version of the same app I did the night before. But as I wrote the code I explained the language features at the same time. Usually I go over the language features one by one, and then show simple LINQ queries. I decided to do something different this time because, frankly, I think I was getting bored with my own talk. I almost always go out on a limb and build apps from scratch and I think people appreciate that, but sometimes it doesn't work if people don't have the fundamentals. I figured people had at least seen LINQ before so hopefully it worked for everyone.
I added the app to the WhatsNewVB CodeGallery project for you all to play with.
I've had many questions lately on how you can query for a specific node in an XML document (or fragment) and change it's value using LINQ. (This must mean that people are really starting to use this stuff so I'm pretty excited.) This is really easy to do because you can modify the values of the selected XElements from your queries and that will change the source XML.
Here's an example:
Imports <xmlns="urn:mycompany:examples:plants"> Module Module1 Sub Main() Dim plants = <?xml version="1.0" encoding="ISO-8859-1"?> <CATALOG xmlns="urn:mycompany:examples:plants"> <PLANT> <COMMON>Bloodroot</COMMON> <BOTANICAL>Sanguinaria canadensis</BOTANICAL> <ZONE>4</ZONE> <LIGHT>Mostly Shady</LIGHT> <PRICE>$2.44</PRICE> <AVAILABILITY>031599</AVAILABILITY> </PLANT> <PLANT> <COMMON>Columbine</COMMON> <BOTANICAL>Aquilegia canadensis</BOTANICAL> <ZONE>3</ZONE> <LIGHT>Mostly Shady</LIGHT> <PRICE>$9.37</PRICE> <AVAILABILITY>030699</AVAILABILITY> </PLANT> <PLANT> <COMMON>Marsh Marigold</COMMON> <BOTANICAL>Caltha palustris</BOTANICAL> <ZONE>4</ZONE> <LIGHT>Mostly Sunny</LIGHT> <PRICE>$6.81</PRICE> <AVAILABILITY>051799</AVAILABILITY> </PLANT> </CATALOG> Dim q = From plant In plants...<PLANT> _ Where plant.<COMMON>.Value = "Columbine" _ Select plant For Each item In q q.<PRICE>.Value = "$49.99" q.<LIGHT>.Value = "Full Sun" Next plants.Save("plants.xml") End Sub End Module
Couple things to note above, remember to import any namespaces being used in the XML otherwise your query will yield no results. And remember you can get XML IntelliSense if you import a schema (this is really easy, watch this). Of course, you can load the XML from a file (or URI) instead of using a literal and and get the same results.
Dim plants = XDocument.Load("plants.xml") Dim q = From plant In plants...<PLANT> _ Where plant.<COMMON>.Value = "Columbine" _ Select plant For Each item In q q.<PRICE>.Value = "$49.99" q.<LIGHT>.Value = "Full Sun" Next plants.Save("plants.xml")
In this example we're overwriting the source document, plants.xml, with our new values. Both examples produce this resulting XML:
<?xml version="1.0" encoding="iso-8859-1"?> <CATALOG xmlns="urn:mycompany:examples:plants"> <PLANT> <COMMON>Bloodroot</COMMON> <BOTANICAL>Sanguinaria canadensis</BOTANICAL> <ZONE>4</ZONE> <LIGHT>Mostly Shady</LIGHT> <PRICE>$2.44</PRICE> <AVAILABILITY>031599</AVAILABILITY> </PLANT> <PLANT> <COMMON>Columbine</COMMON> <BOTANICAL>Aquilegia canadensis</BOTANICAL> <ZONE>3</ZONE> <LIGHT>Full Sun</LIGHT> <PRICE>$49.99</PRICE> <AVAILABILITY>030699</AVAILABILITY> </PLANT> <PLANT> <COMMON>Marsh Marigold</COMMON> <BOTANICAL>Caltha palustris</BOTANICAL> <ZONE>4</ZONE> <LIGHT>Mostly Sunny</LIGHT> <PRICE>$6.81</PRICE> <AVAILABILITY>051799</AVAILABILITY> </PLANT> </CATALOG>
The Learn tab of the Visual Basic Developer Center is being updated with a bunch of new content and VS 2008 topics. If you look at the center of the page you'll see the list of topics and when you click one, you should now see some fresh stuff. Currently there's over 200 items presented on the topic pages and we're adding more every week. Right now each of the topics are displayed in a fixed order by content type (i.e. Webcast, Video, Article, Blog, etc.) but we plan on adding a tag cloud for easier navigation and more community features going forward so check back often. You can also subscribe to each of the content sections independently by clicking the RSS icon next to each heading.
Or... if you don't like this view you can write your own query! That's right, these feeds are all dynamic and public. For instance, if you want to see all the Visual Basic items on LINQ:
http://services.community.microsoft.com/feeds/feed/query/tag/linq/eq/tag/visual%20basic/eq/and/locale/en-us/eq/and
Or maybe you want all the videos on data access in VB:
http://services.community.microsoft.com/feeds/feed/query/tag/video/eq/tag/data%20access/eq/and/tag/visual%20basic/eq/and/locale/en-us/eq/and
Look for more features coming out soon.