{"id":5183,"date":"2007-11-19T12:27:00","date_gmt":"2007-11-19T12:27:00","guid":{"rendered":"https:\/\/blogs.msdn.microsoft.com\/vbteam\/2007\/11\/19\/visual-basic-2008-ships-amanda-silver\/"},"modified":"2024-07-05T14:38:16","modified_gmt":"2024-07-05T21:38:16","slug":"visual-basic-2008-ships-amanda-silver","status":"publish","type":"post","link":"https:\/\/devblogs.microsoft.com\/vbteam\/visual-basic-2008-ships-amanda-silver\/","title":{"rendered":"Visual Basic 2008 Ships!!! (Amanda Silver)"},"content":{"rendered":"<p>Hooray! Today we&#8217;ve finally <i>shipped <\/i>Visual Studio 2008, previously known as &#8220;Orcas&#8221;, previously known as some symbol which doesn&#8217;t have an ascii representation. We&#8217;ve <a href=\"http:\/\/www.idealliance.org\/proceedings\/xml05\/ship\/247\/VisualBasic9.PDF\">come a long way<\/a>, but it&#8217;s been a great ride. In his <a href=\"http:\/\/blogs.msdn.com\/somasegar\/archive\/2007\/11\/19\/visual-studio-2008-and-net-framework-3-5-shipped.aspx\">blog<\/a>, Soma mentions many of the flagship features at a high-level that will undoubtedly make the every developer and head of IT salivate, but this blog is about Visual Basic. \ud83d\ude42<\/p>\n<p>This is a <b><i>tremendous<\/i><\/b> release for Visual Basic users everywhere as it&#8217;s the first to introduce query expressions and XML as a first class data-type. Not only does this make Visual Basic the most productive choice for programming data-centric applications, it also makes us VB developers the <i>envy<\/i> of many an <a href=\"http:\/\/www.pluralsight.com\/blogs\/dbox\/\">alpha-geek<\/a>. If you&#8217;d like to just try it out &#8212; be sure to check out <a href=\"http:\/\/www.microsoft.com\/express\/\">Visual Basic Express<\/a> which comes with all the features I talk about below.<\/p>\n<p>With query the entire .NET frameworks become a queryable data source. You can now query against anything available in the .NET Frameworks &#8211; the registry, file system, live processes, etc. For example, the code below queries against the running processes and returns those with a thread count greater than 10, orders them by the thread count:<\/p>\n<pre class=\"code\">        <span>Dim<\/span> query = <span>From<\/span> proc <span>In<\/span> Process.GetProcesses _\n            <span>Let<\/span> ThreadCount = proc.Threads.Count _\n            <span>Where<\/span> ThreadCount &gt; 10 _\n            <span>Order<\/span> <span>By<\/span> ThreadCount _\n            <span>Select<\/span> proc.ProcessName, proc.Id, ThreadCount<\/pre>\n<p><a href=\"http:\/\/11011.net\/software\/vspaste\"><\/a><\/p>\n<p align=\"left\">Using the LINQ to SQL Object-Relational Mapping framework, you can query against a SQL database as though it was just another collection of objects exposed by the frameworks. The following query finds all the products that have been discontinued, groups them into categories, and finds the total number of units in stock for each category:<\/p>\n<pre class=\"code\">        <span>Dim<\/span> db <span>As<\/span> <span>New<\/span> NorthwindDataContext(<span>My<\/span>.Settings.NORTHWNDConnectionString)\n        <span>Dim<\/span> query = <span>From<\/span> prod <span>In<\/span> db.Products _\n                    <span>Where<\/span> prod.Discontinued = <span>True<\/span> _\n                    <span>Group<\/span> <span>By<\/span> prod.CategoryID _\n                    <span>Into<\/span> Count(), NumInStock = Sum(prod.UnitsInStock) _\n                    <span>Join<\/span> cat <span>In<\/span> db.Categories <span>On<\/span> cat.CategoryID <span>Equals<\/span> CategoryID _\n                    <span>Select<\/span> cat.CategoryName, Count, NumInStock<\/pre>\n<p>Unlike writing huge SQL query strings, I get immediate feedback on the query I write. <\/p>\n<p><b><i>Intellisense<\/i><\/b>:<\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/7\/2019\/02\/clip_image002_2.jpg\"><img decoding=\"async\" style=\"border-top-width: 0px;border-left-width: 0px;border-bottom-width: 0px;border-right-width: 0px\" height=\"245\" alt=\"clip_image002\" src=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2007\/11\/clip_image002_thumb-1.jpg\" width=\"616\" border=\"0\" \/><\/a><\/p>\n<p><b><i>Syntax checking:<\/i><\/b><\/p>\n<p><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/7\/2019\/02\/clip_image004_2.jpg\"><img decoding=\"async\" style=\"border-top-width: 0px;border-left-width: 0px;border-bottom-width: 0px;border-right-width: 0px\" height=\"78\" alt=\"clip_image004\" src=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2007\/11\/clip_image004_thumb-1.jpg\" width=\"628\" border=\"0\" \/><\/a><\/p>\n<p><b><i>Schema checking:<\/i><\/b><\/p>\n<p><b><i><a href=\"https:\/\/devblogs.microsoft.com\/wp-content\/uploads\/sites\/7\/2019\/02\/clip_image006_2.jpg\"><img decoding=\"async\" style=\"border-top-width: 0px;border-left-width: 0px;border-bottom-width: 0px;border-right-width: 0px\" height=\"136\" alt=\"clip_image006\" src=\"https:\/\/devblogs.microsoft.com\/vbteam\/wp-content\/uploads\/sites\/7\/2007\/11\/clip_image006_thumb-1.jpg\" width=\"611\" border=\"0\" \/><\/a><\/i><\/b><\/p>\n<p>I can use the same query language (VB!) to query against relational databases, XML, and collections of objects &#8211; I don&#8217;t need to learn any domain specific language, VB gives me access to all! It&#8217;s really easy for me to join across domains (I&#8217;ll take that up in a later blog post.) <\/p>\n<p>With XML as a first class data-type, <a href=\"http:\/\/blogs.msdn.com\/vbteam\/archive\/2007\/06\/06\/visual-basic-xml-transform-teched-demo-prep.aspx\">Visual Basic becomes a full XML transform language<\/a>. But it&#8217;s also really easy for me to project to XML from my SQL database:<\/p>\n<pre class=\"code\">        <span>Dim<\/span> query = <span>From<\/span> prod <span>In<\/span> db.Products _\n            <span>Where<\/span> prod.Discontinued = <span>True<\/span> _\n            <span>Group<\/span> <span>By<\/span> prod.CategoryID _\n            <span>Into<\/span> prodGroup = <span>Group<\/span>, NumInStock = Sum(prod.UnitsInStock) _\n            <span>Join<\/span> cat <span>In<\/span> db.Categories <span>On<\/span> cat.CategoryID <span>Equals<\/span> CategoryID _\n            <span>Select<\/span> <span>&lt;<\/span><span>Products<\/span><span>&gt;\n<\/span>                       <span>&lt;<\/span><span>Category<\/span> <span>CategoryID<\/span><span>=<\/span><span><span>&lt;%=<\/span><\/span> CategoryID <span><span>%&gt;<\/span><\/span> <span>CategoryName<\/span><span>=<\/span><span><span>&lt;%=<\/span><\/span> cat.CategoryName <span><span>%&gt;<\/span><span><\/span>&gt;\n<\/span>                           <span><span>&lt;%=<\/span><\/span> <span>From<\/span> prod <span>In<\/span> prodGroup _\n                               <span>Select<\/span> <span>&lt;<\/span><span>Product<\/span> <span>Price<\/span><span>=<\/span><span><span>&lt;%=<\/span><\/span> prod.UnitPrice <span><span>%&gt;<\/span><span><\/span>&gt;<\/span><span><span>&lt;%=<\/span><\/span> prod.ProductName <span><span>%&gt;<\/span><span><\/span>&lt;\/<\/span><span>Product<\/span><span>&gt;<\/span> <span><span>%&gt;\n<\/span><\/span>                       <span>&lt;\/<\/span><span>Category<\/span><span>&gt;\n<\/span>                   <span>&lt;\/<\/span><span>Products<\/span><span>&gt;<\/span><\/pre>\n<p><a href=\"http:\/\/11011.net\/software\/vspaste\"><\/a><\/p>\n<p>Last but not least, for those of you who aren&#8217;t so excited about the LINQ (Language INtegrated Query) project, Visual Basic 2008 comes with a tremendous <a href=\"https:\/\/channel9.msdn.com\/ShowPost.aspx?PostID=334318\">improvement in the Intellisense<\/a> experience overall. One of our MVPs said that he literally types two characters and hits tab, two characters, tab &#8211; it&#8217;s as though the code writes itself!<\/p>\n<p>Obviously, we&#8217;re <i>very<\/i> excited about this release and hope it meets you with open arms eager to embrace the productivity! If you&#8217;re ready to go to the next level and dig in, be sure to check out our <a href=\"http:\/\/msdn2.microsoft.com\/en-us\/bb931185.aspx\">learning pages<\/a> and <a href=\"http:\/\/msdn2.microsoft.com\/en-us\/vbasic\/bb466226.aspx\">How-Do-I videos<\/a> which walk you through these features and so much more. <\/p>\n<p>Tomorrow I&#8217;ll blog about the least often mentioned goodies hidden in Visual Basic 2008 so that you can become the guru master of VB9. &#8216;Til then&#8230; <\/p>\n","protected":false},"excerpt":{"rendered":"<p>Hooray! Today we&#8217;ve finally shipped Visual Studio 2008, previously known as &#8220;Orcas&#8221;, previously known as some symbol which doesn&#8217;t have an ascii representation. We&#8217;ve come a long way, but it&#8217;s been a great ride. In his blog, Soma mentions many of the flagship features at a high-level that will undoubtedly make the every developer and [&hellip;]<\/p>\n","protected":false},"author":260,"featured_media":8818,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[192,195],"tags":[28,67,74,77,93,94,117,164,166,172],"class_list":["post-5183","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-featured","category-visual-basic","tag-amanda-silver","tag-extension_methods","tag-ide","tag-iqueryable","tag-linq-cookbook","tag-linqvb9","tag-orcas","tag-vb_express","tag-vb2008","tag-visual-basic-history"],"acf":[],"blog_post_summary":"<p>Hooray! Today we&#8217;ve finally shipped Visual Studio 2008, previously known as &#8220;Orcas&#8221;, previously known as some symbol which doesn&#8217;t have an ascii representation. We&#8217;ve come a long way, but it&#8217;s been a great ride. In his blog, Soma mentions many of the flagship features at a high-level that will undoubtedly make the every developer and [&hellip;]<\/p>\n","_links":{"self":[{"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/posts\/5183","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/users\/260"}],"replies":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/comments?post=5183"}],"version-history":[{"count":0,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/posts\/5183\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/media\/8818"}],"wp:attachment":[{"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/media?parent=5183"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/categories?post=5183"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/devblogs.microsoft.com\/vbteam\/wp-json\/wp\/v2\/tags?post=5183"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}