Exploring all things .NET and beyond...

Visual Studio LIVE! Orlando Day 2

Today is when we get into the meat and potatoes of the conference as the keynotes and session tracks begin. Today Andrew Burst was doing an introduction and stated as I had presumed that this is the biggest Orlando conference in years. There are (4) tracks, Visual Studio LIVE!, SQL Server LIVE!, SharePoint LIVE!, and Cloud & Virtualization LIVE!. There are so many good sessions across the separate tracks, but I'm focused on the Visual Studio LIVE! content.

Visual Studio LIVE! Keynote: Application Lifecycle Management: It's a Team Sport
Brian Keller, Principal Technical Evangelist, Microsoft



If memory serves me correct, I've heard Brian speak before and enjoy his presentations. This keynote focused on some of the new features of VS.NET 2012 and specifically the functionality and enhancements to Team Foundation Server.

TFS is a beautiful and now maturing product that makes one forget the days of SourceSafe quickly. In fact the (2) don't even belong in the same room. Unfortunately to date, the SS trail left such a bad taste in the communities mouth that I find people don't give TFS the look it deserves. Although based on the feedback from the room of the features included, it seems to have a heavy following. 

TFS has a focus on developer productivity, continuous integration, and agile methodologies. Things like the 'My Work' queue in Team Explorer provide a nice workflow for open items. Having the ability to submit a shelvset and request a 'Code Review' is a nice feature. The ability to audit reviews to show they happened could be beneficial as well. The 'diff' tool has some updates (apparently has not been modified since 95' according to Brian) and displays differences in files directly in VS.NET.

The workflow offered in TFS is so robust that odds are there can be some overlapping with existing external workflow engines you may be using. I know in my experience having 'open tasks' within TFS could be a repeat of a change request logged in an external system. The distinction comes in that I think you bring the work list items in TFS down a level and more specific on what to do (i.e. modify class 'x' to do 'y') as opposed to a higher level change request (i.e. Add functionality 'z').

The best part about TFS is it's seamless integration directly into VS.NET. Being the flagship product from Microsoft for supporting source control, project management, and overall SDLC support, it's second to none in terms of VS.NET support. The real hurdle with TFS is it is a massive piece of technology. It's so difficult to keep up on all the development and related technologies required to keep current, and yet adopt a new platform like TFS. While it warrants the look, it is probably best to have a small team or consultant firm assist if ever moving over to TFS.

Local workspaces were added so that when working offline files are no longer just made read-only. The local workspace allows the developer to continue working offline and push updates to the server once back online via 'Included' or 'Excluded' changes.

The following were the (3) coolest features presented. 1st was 'Coded UI Tests'. This best I can describe reminds me of how automation macros worked in Office. Essentially you can set up a coded UI test that will take control of the mouse and keyboard to simulate a user interacting with the UI of the site using a designed test. AWESOME! Actually I've seen this before but never used it, as there are 3rd party companies that make tools for sale like this. Regardless this definitely has potential.

Next was a new feature called 'Code Clone'. How many times do we wish to go back in the code and refactor repetitive methods? This utility within VS.NET 2012 will search the solution to fins similar blocks of code to suggest refactoring. Score!

Lastly, Intellitrace. This has been around since VS.NET 2010 and something I would really like to get into. It provides the ability to output files consumable within VS.NET to 're-create' a low level trace breakdown of exceptions that occurred  Along with this comes the ability to double click an exception and have it go straight to the part of the application that caused it and have full history of the call sequence. Wow, how often do we get a "Please investigate problem 'x', and it occurs only every so often.' Then comes the process of trying to recreate the use case and cause the error which is often difficult. Intellitrace takes the guess work out of this process and streamlines time for developers to debug issues.

LIVE! 360 Keynote: Visual Studio and the New Web Enabled Apps for Office and SharePoint 2013
Jay Schmelzer, Director of Program Management, Visual Studio Team, Microsoft



Jay is responsible for the design time tools in Visual Studio, and as he was introduced these tools were touted as, 'everything that's important in VS.NET'. The focus of this keynote is on Office and SharePoint Applications built in VS.NET. 

Well for a web guy (for the most part) such as myself, doing any kind of Office automation on the server is a big 'no, no' and even is documented *here*. The only place appropriate in in a thick client Windows or WPF application which is not my forte over the last several years. I had my days of heavy office automation early in my career doing a lot with VB6 and VBA interacting with Excel or Word. In .NET I worked with the COM interop .dlls with Excel... make sure to dispose of those unmanaged objects, nuff said. The mindset over the last 6-8 years in my world was to veer toward making applications web based and independent of platform specific applications, i.e. Office. Maybe a wrong line of thinking; they have office for Macs too, right? (hint sarcasm)

However with the push of Windows 8 and the Windows App Store, there is more than certain a push to bring developers back close to the OS (could write an entire separate post on this). With this closeness to the Windows OS, re-enter (or at least for me) Office applications. I mean I'm not the only one on this track because I've seen very few keynotes or sessions on Office apps in the last 5 years at this conference.

Watching the demos though, I am pleased to see the flexibility in choice of technology use for creating these Office and SharePoint applications. Jay created a MVC 4 application (MvcApplication1.Sharepoint) for SharePoint, deployed to SharePoint with ease, and was then running and hosted in the context of SharePoint. How many times can I say SharePoint...

Here's one thing I hope I'm never told to investigate: "Allen, can you please take a look at the JavaScript object model for SharePoint." Sorry, no thank you I will pass.

Jay continued on with the plethora of new functionality regarding High-Trust apps and LightSwitch. They tout LightSwitch as "the easiest way to create modern business applications for the enterprise" My fear with LightSwitch is the days of old having rogue business developers creating enterprise applications and then dumping them on 'real' developers once they move on in life. Sound familiar: "yeah we have these apps John built using LampSwitch or something, and he left and there isn't anyone to support them. Can you help us?" 

The thing I give total credit to Microsoft is not boxing us into a narrow set of technologies to solve problems. While these products are not directly applicable to me today, I still thing they hold merit for the overall community in situations where they do make sense.


What's New in Visual Studio 2012
Rob Daigneau, Practice Lead, Slalom Consulting



This was a great session by an experienced leader of our industry. Rob used to be a director of architecture at Amazon.com, also wrote the book "Service Design Patterns". Book approaches doing services from a WSDL or REST style. (check slides for coupon code). This guy has a wealth of design and architecture experience, so I'm sure I'll be seeking him out in the future.

I always love when presenters ask a "who's using what" show of hands on technology. In this room there are probably 200-300 people.
  • Windows 8 apps: 10 hands
  • Web applications: 99% of the room
    • WebForms: 35%
    • MVC 65% (Quote from Rob: "Yeah, we're better. Haha, just kidding")
  • WCF: About 30% of the room (I'm convinced service developers are a smaller subset due to the skills and is not a reflection of using a competing technology like the other votes)
  • WinForms: 60-75% of the room
  • Office Apps: 3 hands (see my keynote comments)
  • Azure Apps: 2 hands.
  • Windows Workflow: 2 hands.
Starting right off he highlighted the fact that with VS.NET 2012 you can upgrade a project without changing the project files (Yeah!). Also individual projects can target different .NET versions (Yeah again!). It can also target different platforms: Server, XBOX, Windows Phone, etc.

The following are the versions of VS.NET 2012: Test, Pro, Premium, and Ultimate. He states to get anything reasonable done you need to get at least the entry level 'Pro' version. The 'Test' version is targeted for QA professionals, that use 'Labs' that leverage VMs in the cloud to do testing. Odds are many here will use 'Ultimate'. 

Next he did the drill down on the different project templates in VS.NET 2012. All the players are still there with a focus on creating templates that are intuitive to help know which type of project to make. He also noted Silverlight is not dead, and still a citizen of the framework  A lot o SL code out there and it must still be supported.

He was speaking about the 'Metro' naming mess as others have. New name: 'Windows Store Apps'. A misnomer because they certainly do not have to be sold in the store. I think Microsoft could have come up with a better name.

The search capability in Solution Explorer is really nice. Ability to use pascal casing searches like 'CC' to narrow down to say 'CharityCampaign'. I am spoiled because a lot of these type features exist in tools like ReSharper which I use. However, if you don't have this tool, they have definitely made improvements to the search functionality.

Remember in any version of VS.NET the slowness of loading assemblies in the 'Add Reference' dialog? They finally fixed/improved this feature. The second the dialog is presented the entire set of assemblies is available for selection. New searching ability here as well, which before was done just via scrolling.

With ASP.NET MVC 4 they have optimized razor, added mobile templates, added Web API, and single-page applications (Knockout.js & Web API). Web API is for the development of truly RESTful services. As opposed to yesterday, Rob is clear on his choice between WCF based REST services and Web API, which is Web API.

Minification and Bundling are great features to organize and optimize the JavaScript files within an application. As JavaScript becomes more and more a 1st class citizen of writing applications (and not just a sprinkling of JS in web apps), these features are in here at a perfect time.

Navigation and development in HTML is much improved. Must of the features are small tidbits, but they add up. Changing the opening tag will change the closing tag for you (as opposed to searching for it), snippets (Tab twice), and improved intellisense based on document type (i.e. HTML5). The embedded page inspector helps replace the need for things like Firebug as well which is nice. The inspector is not totally new functionality in that it really is just the IE developer toolbar, but the main difference is not having to start and stop the project to have access to this functionality. It can now be done at design time.

I keep hearing with each version of VS.NET that JavaScript intellisense is 'improved'. I wasn't that impressed from 08' to 10', but it appears they actually have made decent improvements in 2012. Rob was highlighting some of the intellisense capabilities and I could see right away that it is better. I like the intellisense on functions which stems from user added XML documentation, quite similar to managed code. Debugging and adding quick watches was making me feel much more like I'm debugging C# which is a huge compliment.

Rob moved to the 'async' and 'await' functionality in C# 5.0. I've had a draft of a blog post on this for about (2) months now, and need to finish and publish. "Asynchronous programming can't get any easier than this." I couldn't agree more and I have other blog posts that speak to this. No more merging of threads, words like 'Mutex', etc. are the days of old.

I had a keen eye on WCF improvements because I use the technology heavily and on a daily basis. Web Sockets offer the same functionality at NetTcp binding but is based on open standards and is communicated via HTTP. There is a new binding named 'netHttpBinding' which will do web sockets. Super cool and I know I will be looking to use this in the future.

He also highlighted a new feature on an advanced feature option when adding a WCF reference that allows for task-based asynchronous programming. Ok this is awesome, but contradicts with some of the content from my post yesterday about WCF architecture. I'm not sure how this feature would be incorporated manually when creating the WCF communication layers manually and not having the proxy classes automagically built. Guess I could always cheat and see what the proxies look like and see how it behaves to port over to an implementation that uses manually created proxies.



Oh wow, Dependency Graphs (Architecture -> Generate Dependency Graph) are something I could really leverage, especially when inheriting a larger project. It creates a visual diagram of all assemblies, there relationships, and dependencies. This is super useful when trying to understand how the moving parts all interact. Sometimes swimming around in the unknown of a new solution and trying to at a high-level see how parts interact is not an easy task. These architectural views will help alleviate this challenge.

To sum it up, I'm sold on VS.NET 2012 (WITH ITS GREAT NEW MENUS :-P).


Smackdown: Windows Store Apps vs Websites
Ben Dewey, Senior Consultant, Tallan, Inc. Author of Windows 8 Apps



Ben touts this class is a good fit so developers can know the difference and make good choices when questioned or tasked with selecting a traditional website or a new Windows Store application.

Windows 8 now exposes a new API named WinRT. WinRT is C++ code built upon the runtime to allow the development of windows store apps. .NET was built atop of COM and the Win32 API. WinRT is an OO API with a projection layer that allows development in various languages such as JavaScript, XAML, or C++ to make Windows Store applications. Devices where the real driver of WinRT. Cameras (CameraCaputreUI), GPS, Accelerometer, blue tooth, Near Field Communication, etc. Microsoft promises to build upon WinRT for new devices.

One note he made and I've spoke of over the last year or so is that it is still difficult to develop using HTML5 because in the enterprise there are too many still on non-supporting browsers like IE7 and IE8.

One reoccurring premise I see consistently is that you are going to have a much more rich user experience when creating a Windows Store app (obviously) because of the closeness to the OS using WinRT as opposed to rendering HTML to the client (even with HTML5 ability) from a remote server.

Windows Store applications must have a 'clean' experience offline. Thus means you will want to download all the images, etc. so users can run offline with a seamless experience.

When using JavaScript and Windows 8, there is access to that WinRT C++ code directly. There is also enhanced support for touch, new controls, and asynchronous support. JavaScript is a 1st class citizen when it comes to writing WinRT apps. Therefore is you like JS, you will be happy to create your Windows Store apps using it as a primary language. I've used JS as required in my web apps over the years and more so recently, but I still am not comfortable using it like I am in C# or VB.NET. I know one thing is for sure, JS is not going away so I need to keep refining these skills especially in the areas of JS asynchronous programming. What I would love to see is a session highlighting the different languages that can be used to create Windows Store apps. I understand opening the door to all the languages is to attract the masses, but why in the world would I by default pick JS to write an app and not C#/VB.NET? I'm sure someone could justify it well, I just haven't been enlightened on it yet.

Ben presented a few Windows Applications built with JS, using a camera, using the GPS, and using a simulated accelerometer. I have to admit, for this type of functionality these apps are ideal to make as the WinRT API exposes functionality directly to bring these devices to life. With just a few lines of code + a Bing 3rd party tool, he had it wired up in JS to show our exact Geo location using the GPS in his laptop. I was impressed how fast it switched from New York on the map to hear in Orlando. He noted when using rapid fire events that are subscribed to is to only listen when required to preserve battery.

File I/O in WinRT has an enhanced file upload control for Windows Store apps. One cool feature is the ability to select a file on the client and manipulate on the client without uploading to the server. After all if the server is not required, then why involve it. The upload control also has the ability to upload multiple files, which was not native with the traditional HTML or even ASP.NET upload control. I can say from personal experience the ability to extract a thumbnail of an image so easily is awesome.

Some of the new features of Windows 8 are the 'App Bar' and charms. If using IE on Windows 8 you will see the app bar across the bottom of the screen in the form of global buttons on the right (i.e. navigation), and current selection buttons on the left. Charms are available from a bar that runs down the right hand side of the screen, and may include charms like 'Search' or 'Share'.

'Hybrid' apps allow creating a native JS Windows Store app and also a web app by simply using an iFrame. This gives you the best of both worlds by allowing access to the rich native WinRT functionality while still having a website accessable via any URL. Ben mentioned some frown upon this approach but it is doable.

Obviously another plus for Windows Store apps are discoverability and monitization, Having some random web app can be difficult to sell functionality or draw traffic. Windows Store apps now have a centralized home in the Windows Store and provides the ability to sell apps and make money.

By the end of the session one thing is apparent. From the perspective strictly for providing a rich user experience and deep functionality, the winner hands-down are Windows Store Applications. This is of course throwing out the large elephant in the room which is the requirement of Windows 8. So web apps vs. Windows Store apps is a little Apples and Oranges. I also must say a lot of these sessions highlighting Windows Store apps remind me of the Silverlight sessions 3-4 years ago. All the examples were simple little video players or Twitter apps. The real comparison to shape up in the future is selling the masses on the new format and interactivity learning curve in Windows 8.


What's New in the .NET BCL
Jason Bock, Principal Lead Consultant, Magenic



Jason is an elite member of our industry, supporting his status as a MVP with his quality sessions at Visual Studio LIVE! I have had the pleasure of attending Jason's sessions before and the guy has more low level framework knowledge than almost anyone I've interacted with previously. And he likes the band Rush too, so that's cool!

The .NET framework is now 10 years old and we have come a long way. It's amazing how much  its evolved since Framework 1.0 and how much functionality has been added over the years.  The .NET framework 4.5 is whats called an 'in place upgrade' and actually places all of the new files into the v4.0.30319 directories. This is important to understand because the 4.0 assemblies will be overwritten. However, Microsoft says this will not be a problem as it's an in place upgrade, but it's still good to understand the behavior.

The BCL is made up of the following as diagrammed below (image courtesy of Visual Studio LIVE! and Jason Bock):




Jason was highlighting a tool he used that would output the differences between the different frameworks and output it to XML. The purpose of this is just for reference since there really isn't not a good repository showing the comparisons between the frameworks. He mentioned there was a tiny bit of functionality marked Obsolete in the Framework, but it was so esoteric and unused odds are it will not affect the masses.

A topic on asynchronous programming came up because by his estimation there are 230 new methods that are asynchronous in .NET 4.5. In fact all of the File I/O operations from the last session I attended for Windows Store Apps are asynchronous  Over the years if you look at CPU speed it would almost double every few years. Well in the last few years the speed has decreased, but more cores are added. Each core has a thread so many machines today (like mine) have 4 cores and 8 threads (Hyperthreading enabled). What we as programmers need to be doing is utilizing these cores to allow asynchronous programming. And today in .NET 4.5, there is almost no excuse not to because the complexities of asynchronous programming are more and more being extracted away. Queue TPL and async and await keywords. He recommends as do I agree to use the 'Task' class and not 'Threads'. In fact what's interesting is he states how disgustingly complex the code to support these simple keywords is under the covers. He said to look at the IL and see how nasty the implementation code is. We are not supposed to see that code anyways, but leverage the hard work others have done for us. 

There is a new ability for you RegEx fans to add a timeout to the expression evaluation. This is good so that if something is quite complex, you can cause it to timeout explicitly. The timeout value is placed in the overload of the constructor.

Next he moved into memory management in Framework 4.5. He (as am I) always dumbfounded by those that do not like deterministic disposal and rely solely on the Garbage Collection thinking it is perfect and there can be no memory leaks. To prove that the GC is not perfect, allocate really, really large arrays and let them sit around. It will introduce memory leaks. He also demonstrated how wiring up events(+=) and not unhooking them (-=) (which is important) can cause some memory leak issues that are quite significant. In applications, it is possible that handlers that are attached to event sources will not be destroyed in coordination with the listener object that attached the handler to the source. This situation can lead to memory leaks. A new class named 'WeakEventHandler' has been introduced to help prevent the memory leak condition acting like a manager on that handler and ensures to unhook the handler automatically.

He also covered compression. There is finally a way to read a .zip in .NET 4,5. There was compression previously like 'DeflateStream' or GZip, but nothing for .zip native to the framework. No longer do you have to get NuGet packages or 3rd party components. 

Lastly he spoke to web sockets which is probably one of the favorite technologies I'm looking forward to using in the future. He finished out with some of the other bulleted items added like UDP in WCF, Generic support in MEF, and System.Json.

Wrap Up Day 2



Well it's been a busy day and it has flown by! It seems like I just woke up and now the day is complete. All presenters are 1st class as usual as well as the attendees I interact with. If you think about it, conferences like this amass the best of the best in the industry and so it's easy to get along with those around. It's like 1 big team of sorts.  My brain is filled with lots to digest and I look forward to what tomorrow will bring!

1 Comment:

viewmedia said...

I like the article on the topic due to this reason it is seen that other readers are showing their interest by commenting on it.
orlando web design

Post a Comment