Visual Studio Live! Keynote: The Transformation of Software Development and Application Lifecycle
Kris Lankford, Senior Product Manager, Microsoft
The keynote today was proceeded by Rocky Lhotka sneaking in a few words about the sponsors and doing a few informal pools. I'm not a perfect judge of audience size, but there has to be 300-500 people, and he asked about the general audiences main role in development and the results were interesting. Some people (including myself) raised their hand more than once obviously not pigeonholed to a single technology:
WinRT: 0% (I didn't see 1 hand)
iOS apps and Android: 5%
VS.NET 2012: 95%
VS.NET 2013: 60%
TFS on premise: 60%
TFS in the cloud: 10%
Windows Phone: 5% max
iOS phones: 20%
Android phones: 75%
People without a smart phone: (2 people)
People with less than 3 devices: (laptop, tablet, smart phone, etc.) 0%
Once Kris began to present he kicked it off with a look through technology over the recent years. 90's Windows and the PC, 00's Internet emergency, and 10's is being considered the 'mobile' generation, To this end the Cloud is essential to bring together all of the devices and the 'modern app' strategy.
The cloud provided additional scalibility and availability of services required for the mobile world and mobile development. In fact VS.NET Online provides cloud based life cycle management with the fastest way to provide product updates.
The evolution to the new mobile world could take multiple forms. As Kris presented 'Do nothing' Start from Scratch', 'Embrace the Cloud' are 3 approaches to modern app development. The combination of Visual Studio, SQL Server, and Windows Azure provide the tools necessary to deliver mobile applications.
I'm excited to learn more about the partnership between Xamarin and Visual Studio. Xamarin (from the creators of mono) to provide cross platform mobile applications via a single code base (iOS, Android, Win Phone, etc.). There are Xamarin simship benefits available to MSDN subscribers with VS.NET 2013.
When speaking about the cloud and a use case from a company named Flavours, some metrics were pulled about the ability to scale in the cloud. This particular company issues tickets and was able to increase the number of tickets issued many times over by the ability to scale resources. The overall point is anyone concerned about cloud based deliver and things like speed or efficiency need not worry. Of course I'm sure there is a price tag associated with scaling in the cloud (add some CPU power and servers Azure!), but the ability to have high performant cloud based solutions is absolutely feasible. The 'pay as you go' model helps keep the economics of this in check.
Being that Kris is from Microsoft, I enjoy hearing information straight from the horses mouth. The desire to deliver tooling (i.e. VS.NET 2013) not just to 'update' an IDE but have the motive of helping us develop applications faster is good to hear. The 'adaptability' of the tool to do 'agile your way' is nice. I must mention that the tool set seems really in line with teams running an agile shop assisting with features for sprints, backlogs, and release management.
To expand on Visual Studio Online (formerly TFS Online), Kris spoke to the lightweight editor available named 'Monaco' that complements the current editor and is targeted for Azure based applications. There was a 'Website from Gallery' template that offered a plethora of different options (i.e. Wordpress, etc.) to quickly create and deploy a website. Between this and Azure I'd gather with less than a dozen clicks one could have a website deployed to the cloud.
Microsoft obviously has some fantastic tooling available to get us moving into modern app development that leverages the cloud. I think based on feedback via the informal pools, most of us are a few years behind the cutting edge development and need a little time to ingest. It doesn't mean this type (cloud) development is not taking place because it most certainly does (downloaded or used any mobile apps or used any cloud based solutions lately? of course), but I'm sure running at the world of the 'common busniess' many are still doing MVC and similar development. I'm excited about the new technology and tooling and will make sure to get some more information on these topics as the week progresses.
Visual Studio Live! Keynote: The Transformation of Software Development and Application Lifecycle
Rocky Lhotka, CTO, Magenic
The 1st session today is with Rocky Lhotka who has to be in the top 3 presenters I've ever been in attendance for at a conference, so I'm very much looking forward to this session. He can engage and interact with an audience probably better than anyone which makes the sessions extremely interactive and interesting.
I love it, Rocky States "I'm always hesitant to say 'Modern' apps. Does that mean 5 years from now we will be doing 'Post Modern Apps' ". For now we'll stick with with the terminology, and figure out the branding 5 years from now :P For today's definition a 'Modern App' is on that is mobile, cross platform, and cloud based. As mentioned in the keynote, we will attempt to answer the question of how far a product like Xamarin will take us to stick to a single code base for cross platform delivery. Xamarin compiles C# to run natively on the platforms outside of Windows (Android, iOS, etc.)
There was also a conversation about the end of 'Moore's Law'. Think about this example: a top of the line laptop 3 years ago specd' out contains an i7, 8GB RAM, etc. Top of the line laptop today specd' out would be much the same: i7, same memory, SSD, etc. Hardware is just not doubling at the speed it used to.
Consumers vs. Enterprises. Consumers are the cutting edge, enterprises are not. Consumers want swipe ability, bright color, interaction, etc. Enterprises move at a slower pace - folks will move to Win8 after SP2 or SP3, finally get off of XP, continue to use 'crusty' WinForm apps, etc.. Since most of us are developing for the latter and fewer for these 'type A' cutting edge companies, there will be a bit of the rubber band affect with the new technology and roll out. Microsoft is finally realizing that enterprise licensing is their lions share of sales, so it's not a good idea to alienate developers in that camp.
The main list of client platforms right now are iOS, Android, and Windows. Each have their strength and weaknesses. However Windows has a leg up because it's the only platform that goes from mobile to the desktop via Windows 8, and Windows still has +90% of the market share in the busniess world across the world. It is naive to think that Windows can't compete in this market; a company that size with it's massive amount of resources are absolutely a key player. As Rocky stated, it might even be 'their game to loose.' In an informal poll, nobody knew which would be dominant in 5 years. His best guess was he still had hopes for Windows being the dominant force if they fix the WinRT model. They could still screw it up, as he thinks they were intent on doing previously, but it seems staged the best for the future.
The server futures most likely resides in the cloud. Currently, most of our data is with Amazon, Google, or Windows (Azure) servers. Since Scott Guthrie got involved/began leading Azure a few years ago, popularity has increased greatly.
A great example was made about the ease of using Azure via the question "How long at work does it take to set up a new test server?" Odds are a very long time and it typically costs a lot of money. With Azure this can be done in under 10 minutes. Yes impressive, and the sessions I've seen from Scott Guthrie have sold me well on the platform and it's ease of use. The reality is the enterprise still doesn't trust placing data and especially sensitive data in the cloud.
The main cloud computing models are the following: Software as a Service (gmail, Salesforce.com, Outlook), Platform as a Service (entire platform as services), and Infrastructure as a service (Rackspace, Azure, etc.).
I really enjoyed the overview of the architecture and layering used for the 'MyVote' App that will be reused throughout the Modern Apps Live sessions. A combination of Rocky's CSLA.NET for reusable Business Logic, along with Xamarin to go cross platform. Take a look at the number of platforms using the same guts underneath. I live for this kind of stuff as an architect myself. The 'Data Portal' block below will be Azure for the sessions, but just as well could be IIS (image courtesy of Visual Studio LIVE! and Rocky Lhotka).
One question I did get in at the end was the hesitancy of companies to move their data or have it pass through the cloud. Most companies are afraid to have their data leave their 4 walls. I brought up sensitive data like HIPPA or the like. Rocky validated some of these concerns and did state that you cannot place HIPPA data in Azure because the databases are not HIPPA compliant which makes placing data in them illegal. However, as to the cloud being 'less secure,' Microsoft and Amazon can hire the best security experts in the world. Do you think you have better experts managing your infrastructure? The answer is more than likely 'No.
What's New in the .NET 4.5 BCL
Jason Bock, Practice Lead, Magenic
I always enjoy Jason's talks as he has an amazing amount of deep and low level .NET knowledge to share. Wouldn't surprise me if he was ever offered a job on the GC team or something for Microsoft because he really knows his stuff well.
The BCL (Base Class Library) can be seen in reference to the other .NET components in the diagram below (image courtesy of Visual Studio LIVE! and Jason Bock):
One of the challenges is to determine what's different in the BCL and .NET Framework each time it is released. Jason had built a small tool that will get the binaries for the framework and then make a comparison. his had worked for years until .NET 4.5 which was considered an in-place update (same as 4.5.1). There is no new directory in Windows and the 4.0 directory is reused and overwritten. 4.5 and 4.5.1 are a superset of the APIs in 4.0, so you can obviously still target older frameworks as before. The solution to making a comparison for the purpose of the tool is to copy everything from the previous framework into a separate location to stage for comparison. The net result is to truly determine the differences in frameworks. The code for this tool can be found at: http://www.jasonbock.net/JB/Code/
There were a few dark corners of the framework that were obsoleted in 4.5, but Jason had never even heard of the obsoleted. Point is there is a 99.99% chance you will not be affected by the changes. Some of the cool additions to the 4.0 framework (for those still catching up) are Lazy<T>, String.IsNullOrWhiteSpace(), System.Runtime.Caching, Tuples, and Concurrent Collections.
Next up was a conversation on concurrent programming. Terms like deadlocks and race conditions when doing multithreaded programming are fading away to the past and being taken over by newer methods that encapsulate this challenges into an abstraction that is easier to program against. Because processor speed is not increasing, but the number of CPU cores is, it would behoove us to leverage the additional cores when possible. In fact the suggestion was made to not create threads manually anymore; one should be using Tasks via Task or Task<T>.
An example of using a StreamWriter to output 10 guids to a file was used to display the progression from synchronous to asynchronous solutions. When the demo using Tasks was presented, Jason highlighted if you don't wait for the Tasks via 'Wait()' or 'WaitAll()' will cause unexpected or undesired behavior. Essentially if you don't wait on the Task, code will continue to execute after the 'async' method is called and the Task returned may not be able to be used properly.
Async and Await cam along in .NET 4.5 (I have a blog post in 'draft' form for months now I need to finish on this topic) to further ease the async development. I still get a tad confused on async and await because decorating the method with async and using await does not make it truly async (I get this part). It's the part of using the await which is blocking. If we have to await our tasks it makes essentially synchronous code. One way to extend the async nature is to return a Task from the async method, continue working, and then await for the Task at the last possible safe spot.
There were some cool new Caller Information Attributes built in as a part of reflection in 4.5.1 in the following: [CallerFilePath], [CallerLineNumber], and [CallerMemberName]. Add these attributes and either supply values or use what they produce to get some tracing information at compile time. He emphasized compile time because of the use of Reflection.
The next example used 10000 loops and allocated 10000 bytes to show memory allocation. The memory was gobbled up as expected and used 102mb. Using the 'WeakEventManager' and 'WeakEventHandler' will create a weak reference which allows us to recapture resources much easier. The net result after re-running the example was a use of 4mb. Yes that's impressive. I didn't even peak at the slides and Jason got into the GC and some of it's particulars as I prefaced this sessions entry; really smart low level .NET guy so I recommend to follow him on Twitter and check out his newest book Metaprogramming in .NET (just recently translated into Japanese as I understand as well - so the world is craving Jason's knowledge!)
To list off some of the really other cool features added in 4.5 here is a short list: zip compressions, web sockets, bundling and minifying for ASP.NET, UDP in WCF, System,Identity, System.Json, and the Ribbon Bar in WPF (only 5 years behind). In 4.5.1 'edit and continue' functionality for 64-bit apps is also available.
Modern App Design
Billy Hollis, Practice Lead, Next Version Systems
In my office at work I have 3-4 books I bought to bend my mind on designing application from a UI / Visual aspect. The progress through these books has been lackluster I admit, but like every thing else I'm waiting for that 'day' when I can get everything in my backlog completed :P. I have a craving for thinking outside of the box on design and doing things in a more modern fashion, so I find myself here today.
There are some predators in the 'Microsoft Ecosystem', namely iOS and Android. There is a roughly 80% usage of a iOS devices with executives in companies. Even though from the informal pools taken at the beginning of the day, you need to be ready and flexible for cross platform development or become irrelevant.
Billy showed this nasty WinForm picture with what looked like 100 controls on it. I'm thinking, how did he get that app I wrote?? :P
Modern apps break parts down and actually use touch in a way that isn't just using touch to emulate mouse clicks. We need to think about design differently. Understanding the fundamentals of the design process must be understood. Billy even states he doesn't believe Microsoft even gets this process.
FANTASTIC example given about the way we 'developers' think. Question: "How many developers have been called into a meeting to listen to requirements on a new system?" Almost everyone. "How many stop listening after 5 minutes stop listening and begin coding the solution in thier brain?" More than half the folks admitted to this. We as developers need to learn to listen better to become better designers and move past our code addiction.
'The wall of data grids design' was a phrase termed about the hurdle to slap a ton of DataGrids all over the screen. This design was made for mouse and keyboard applications, but not at all for touch screen and smaller screen smart devices. Have you ever tried to pull up a large data grid on a 4" screen? I know I have and it's awful. However getting users and management to move away from DataGrids and that mentality is not easy to change.
One example of design he brought up that peaked my ears was about using birth dates in the medical world. For years the apps he has designed they no longer put the birth date on the scree for the doctors. They don't want to know a date, but rather a person is 41 years old or even 4 days old. He also demonstrated a WPF application using badges in the form of smiley faces to give instant recognition of a customers sentiment. This method is much more effective than digging through grids for textual data. In the web world HTML5 offers a rich ability to design applications conducive to a modern design.
Interesting because one of the attendees stated that the 'modern' version of an app Billy showed was using a DataGrid. There are no DataGrids in Windows 8 actually. It was a stackable list panel control and it was a much improved design. So the design doesn't mean you can't list out repeated information; it just is designed in a more natural way.
The problem with DataGrids is they require the brain to scan and decipher information. This is not as quick and efficient as other design methodologies that use visual queues. It's interesting because this discussion had a hint or artistic creativity. Minimalism is popular right now and the brain is tailored well to visually interpret simple designs. Think of the new Windows home in Windows 8 and the tiles - very simple.
Irony is, users like white space and clean software. The more complex a screen or app design, it raises the stress level. An analogy was made to a picture of the beach; why does it reduce stress? Simplicity. 'Horror vacui' is the fear of empty space. Overdoing it is a bad idea in software design. I brought up that he wouldn't like the 'eTrade' app on a commercial I saw on TV. It didn't have 1mm of free space. I asked if for an app like that presenting massive amounts of data was acceptable. His answer: 'No', there is always a better alternative.
Billy advocates for an experimental and collaborative design process. It should be as rudimentary as pencil and paper (story boarding) even over a wire framing tool. It needs to be iterative and allow changes quickly which a simple pencil and paper will yield. During the design process we need to listen and observe users in their real work space. Don't try to design a modern application without observing the user.
Those who transition to modern apps must let go of the past and accept massive amounts of design changes. Making small changes to existing processes is not a solution to the modern design techniques. To this end making a single prototype is also a bad idea. There should be multiple competing designs that the user can select from. One advantage to high level designs is the reduction of the 'move 3 pixels left' problem by being able to vet out a better design up front through the design competition and selection process.
"Be bold when you do Modern Apps."
Check out Billy's site for a nice checklist for the design process. Billy is also available to be brought into a company to train teams on design.
Unit and Integration Testing of Modern Apps
Jason Bock, Practice Lead, Magenic
For those of us that ride motorcycles and are not pretentious about a particular brand (yes you know who you are), the consensus is any riding at all on any type of bike is better than not riding.
I think this philosophy initially can be applied to unit testing. Just getting into it is better than not doing it at all. This was part of a message during a Unit Testing 'Tech Talk' I helped deliver to my team back home in conjunction with some of my peers.
"Why write unit tests when you write perfect code?!" <- A great quote by Brent Edwards.
The reality is, it's not possible and we don't write perfect code. The way to help at least validate the code and strive for quality is through unit tests. As Jason states, we all want to be Einsteins but in reality we are more like Homer below (image courtesy of Visual Studio LIVE! and Jason Bock):
If you work for a company that 'gets it' you probably already doing unit tests. If not you might be fighting a battle of 'why should I do unit tests when our code and applications have been so successful for years??' Odds are even that 'great' code has flaws and could be a house of cards waiting to fall apart. Unit Tests give us the ability to truly validate existing and new code independently for accuracy.
A question was asked: "How late in the application lifecycle to you want to fail?" The proper answer is not in at the client or even QA but as soon as possible. Like Jason states: "fail fast." Unit Tests help to this end and provide instant feedback when changes or new pieces in our application are not jiving right.
All developers should do some level of testing prior to committing code; this is obvious. What was not obvious was that Jason said he knew folks that would commit untested C# code that doesn't even compile!? Yeah I agree, these are not the folks we want to be working with on our team. Now while simply building the code should be a minimum, we really need a repeatable set of tests to be run as well. By the way, QA is not that 'testing framework' we are seeking. Unit Tests are the solution we need. "Build Succeeded != Ship The Product"
Quick note on design that Jason brought up that ties into the last session. He spoke to folks that use green text for success messages and red text for issues/errors/exceptions. What about color blind people? Maybe rare, but actually a great point. Use check marks and x's somewhat like the unit test runner in VS.NET for a more wide reaching visual queue of the success and failure conditions. I'm guilt of the green/red thing by the way and probably in the last month on a web app. Point taken.
Several of the popular unit testing and mocking frameworks were discussed including the (2) I've used which are MSTest and Moq. Since VS.NET 2012 the integration of outside unit testing frameworks beyond MSTest is much easier to integrate opening a lot of doors to what you are familiar with already. It was an interesting point that RhinoMocks was falling by the wayside, but someone picked up the ball on that project and should help bring it back to life.
Another almost humorous point was that Microsoft's created 'Fakes' does not work in Windows 8 and Windows 8.1. OK so a Microsoft created mocking framework does not work with their own OS. This results in having to hand roll a lot which is not easy.
The next topic was on the metrics about 'how many unit tests' are enough? There is no magic number. You could have 1000 poor and not meaningful tests or 10 extremely effective tests. The point is to test code by creating tests that are covering the pertinent points of the application.
It was reiterated while showing code examples that mocking is important to allow unit tests to run quickly. Mocking is a way at runtime to replace an interface with an object of known value and behavior used in testing. You will set the value and behavior in the setup of the unit test and use it in the assertions.
Great question was asked: "Which code should be tested?" Jason's response was, "if you write code it should be tested." However he stated he was not a zealot on this either; there are some realities to code and testing, so strive for to test everything when possible.
To wrap up the unit test session, the slide below is colorful and humorous but it actually depicts the harmony and happiness (yes I used those 2 words) that result from the process of writing and using unit tests (image courtesy of Visual Studio LIVE! and Jason Bock):
Wrap Up Day 2
On a small side-note here - I felt bad today because I would be typing here while the presenters were speaking, and being in the front row often they could see me working. They may have thought I was checking email, working, or some other non-related task which would have been rude, but rather I was listening attentively to the session and blogging! If any of the presenters read this I heard all of it and nice job to all of you.
Today was my introduction to the 'Modern Apps Live!' track here at the conference, and I can honestly say I am not disappointed. The only thing I wish is I could have been 2 places at once for the 2nd session today and have attended Brent Edwards' session on the Modern App Architecture. When I 1st glanced at the track I thought it was going to be just about designing Windows Apps, but that was my misunderstanding of what a 'modern app' was. I'm glad I gave it a look because I certainly learned a lot and got engaged in some good conversations. It's time for a little R&R before Day 3 fires up in the morning!
Award for Best Swag Item :)