Visual Studio 2017 Mobility: Use what you know

It can be quite daunting to try to decide what is the best language for a particular app you have in mind, especially when writing mobile apps. Should you write a shell wrapper that resides on the device and does all the heavy lifting by calling your web application and processes? Or should you write it in the each native language, like Swift and Java, that stores all of the data and does all the processing on the device? That's a heck of a lot of code and rewriting the same thing over and over.  Plus what kind of devices would you be restricted to to be able to run it based on the computing power needed? Or maybe you think you want to write it using response web frameworks. More and more, a hybrid model makes more sense, one that stores some of the data and does some of the computing on the device, but also utilizes web calls to do the heavy lifting.

I was honored recently to be able to speak at the Los Angeles Visual Studio 2017 Launch Party on this very topic.

Write what you know.

If you've ever tried to write that Great American Novel or taken any kind of writing class, you've probably heard this advice more than a dozen time. Write what you know.

This is just as important when it comes to writing code, even when crossing platforms.

Language

If you are a C# developer, you can certainly write for the Windows platform with no problem. You should know though that you can use Xamarin tools to build applications to all types of devices and operating systems, like iOS and Android, using C# for the backend processing and either building the UI using native languages or Xamarin Forms to do it using XAML. And since Microsoft acquired Xamarin last year, its tools and functionality have been available as part of Visual Studio. It is even available as part of the free version of Visual Studio known as Community.

If you are a web developer, you can use your HTML, CSS and JavaScript skills to write apps using Visual Studio 2017 and TACO (Tools for Apache Cordova). Add to that the use of PhoneGap and the Ionic, a JavaScript framework for mobile to the cocktail and you are humming on all cylinders.

VS 2017 Mobile Center

Lastly, take a look at the new Visual Studio Mobile Center, currently in Preview. This is your one-stop shopping portal for all of those things that you used to have to discover, consume and manage separately, bringing them all together under one roof for the mobile developer. Need to be able to manage Application Lifecycle activities, for build, test and distribute? Got it! Need to authenticate without changing your backend? Or use Facebook, Google, Twitter or a Microsoft Account to authenticate? Got it! For testing and running analytics like for crashes (backed by HockeyApp's crash reporting features), events metrics, and session metrics like how long a person is in your app (backed by Xamarin Test Cloud and Insights as well as Azure Mobile Experience), using the Mobile Center Analytics suite is the ticket.

 

Links:

Mobile Center

https://www.visualstudio.com/vs/mobile-center/

Mobile Center Preview Link

https://mobile.azure.com

Tools for Apache Cordova (TACO)

https://www.visualstudio.com/vs/cordova/

Ionic 2 Templates for VS2017

http://bit.ly/2nDlTJQ

NPM Task Runner

http://bit.ly/2neGgMs

Visual Studio 2017 New Debugging Features

Let's face it debugging your code isn't sexy. As coders, we probably spend the majority of our time debugging our code rather than actually coding. Coding means making money. Debugging usually means not making money. So there can be little fanfare for those that add features to debugging tools. However, I would say that these are the unsung heroes. With the release of Visual Studio 2017, there have been quite a few improvements and new features added to our debugging arsenal. I will only highlight a couple, but be sure to check out Kaycee Anderson's posts over on the Visual Studio blog for more information.

The New Exception Helper

VS2017 Exception Helper

There's nothing more frustrating when you are trying to find the exact cause of errors in your code then having to step through layers and layers and layers of nested trees of information to find that one nugget of information that will give you the answer, that one "ah ha" moment of clarity. The new Exception Helper removes all of those layers and surfaces the most important information up to the top and presents it in a dialog box for easy access. Additional, you can set the Exceptions settings, you control what parts of your code will throw exceptions and what parts won't. This way if you have a troublesome section (or one that a particularly messy colleague that you want to skip, you can create an exception setting for it so that you can get on with the code you want to really work on. This is especially useful for those parts of your code that you always know you are going to hit exceptions, such as signon or authorization code.

Diagnostic Tools Window Updates

VS2017 Diagnostic Windows UpdatesA new summary tab has been added to the Diagnostic Tools Window that let's you view the number of Application Insights and UI Analysis events (for UWP apps only) that occurred in your application. Also use the new window updates to take a memory snapshot of your heap as well as enable and disable CPU profiling

Performance Profiler Updates

The Performance Profiler can now attach (and re-attach) to a running process, saving valuable time starting and stopping and restarting your sessions to get the information that you need.

The CPU Usage Tool has several improvements including better external code support giving you better insights into the costs of library and framework functions when called by user code. Also the Functions view will now rank functions by their CPU cost.

Lastly, let's not leave off the new Click to Run feature. This works just like it sounds. Instead of setting endless breakpoints in your code (only to forget about them later), simply click on the green icon next to any line of code VS2017 Run to Click to run the application up to that point. This makes it really easy to step into and out of conditional sections of your code.

I hope this has given you a good taste of the latest improvement to something that we tend to take for granted, a robust debugging toolset within Visual Studio 2017.