Telerik blogs
xamarin_evolve_header

With the Xamarin acquisition, Microsoft has democratized cross-platform mobile development for .NET developers. At the Build conference, it was announced that Xamarin Platform is now part of the Visual Studio family. It is available completely free with most versions of Visual Studio, including the Community Edition.

So what’s next for Xamarin? That was to be unveiled at the much anticipated Xamarin Evolve conference in Orlando. Furtunately, I was able to attend. Here are the highlights - from a developer's perspective.

1. Better Openness

image

Microsoft's love for Open Source began a while back, and now Xamarin is following suit. Following up on promises made at Build, the Xamarin SDKs for iOS, Android and Mac are now open sourced via the .NET Foundation under an MIT License. This includes the Mono runtime ports for iOS and Android, as well as the much anticipated Xamarin.Forms.

image

Want to get involved? Head to open.xamarin.com to learn more about all the open source components and how you can contribute back. They are building a truly open source collaborative community around Xamarin.

2. Better Tools

Looking to build Xamarin apps on your Mac? Xamarin Studio is still your only bet and has grown up to be a feature-rich IDE that brings together all the power of Xamarin tooling. The next iteration is here - Xamarin Studio 6, and it is packed with goodies for cross-platform mobile development.

If you want to play with the latest bits, Xamarin Studio 6 is available as a Release Candidate through the Beta channels. Just make sure to switch the channel and you can be rocking Xamarin Studio 6 in no time. If you like even more bleeding edge stuff, tune in to the Alpha channel for latest builds.

image

image

What's new? To start, there is a new Dark Theme. It is not just a switch of foreground/background colors - they have revisited every aspect of the developer experience in the IDE. The result is a sharper developer experience, down to the smallest icons and improved syntax highlighting.

image

3. Better Deployments

Xamarin Platform is now a part of every Visual Studio edition, and this opens the door to Xamarin cross-platform tooling for all .NET developers. The sweet spot isXamarin integration inside the comfort of Visual Studio - developers get to stay inside their favorite IDE. While a Mac is still needed for builds and app package production, the development/debugging story gets better.

iOS Simulator Remoting offers a mirroring of apps running in the iOS simulator on Mac for your Windows machine, as if the simulation is happening locally. The big advantage here is the multi-touch interactions built into the simulator, which can be invoked from touch-supported Windows machines. The usual debugging, device rotation, screenshots and location simulation are all there, as well as the convenience of not having to switch to the Mac for deployments.

image

While simulators are a great start, nothing replaces physical device testing. And now, with the new iOS USB Remoting, you can deploy/debug from Visual Studio to a connected iOS device directly, without ever leaving Windows. Both these features are available in the Alpha channels for Xamarin in Visual Studio - simply turn on the setting for remote debugging in your VS|Xamarin Options.

image

4. Better Coding

Roslyn, Microsoft's open source .NET compiler platform, makes its presence felt inside Xamarin Studio. While the incorporation of Roslyn is internal, the impact is profound - offering the latest language support for C# 6 features, F# enhancements and expanded code completion. You can see the new null check operator in action - no squigglies!

image

Along with Roslyn support comes a whole bunch of smart code refactoring options called Code Actions. Head to Preferences and you can see all the available refactorings that you can turn on/off.

image

For example, you could easily generate code for a null check on function parameters, as below - you also see usage of the new nameof() C# syntax).

image

image

5. Better Native

While the abstracted UI of Xamarin.Forms allows you to have a convenient, shared UI across all platforms, sometimes you may feel the need the step a little closer to the metal. Now you can without writing custom renderers - enter embedding of platform-specific native UI. You can embed native iOS or Android UI controls, directly from inside Xamarin Forms with two lines of code. Here's how:

var uiLabel = new UILabel {
        MinimumFontSize = 14f,
        Lines = 0,
        LineBreakMode = UILineBreakMode.WordWrap,
        Text = originalText,
};
stackLayout.Children.Add (uiLabel);
contentView.Content = uiLabel.ToView();

Native apps also benefit from deep linking, which are pointers to a specific resource inside the apps. Now you can bring the same functionality to Xamarin.Forms apps - simply URL deep link to a specific page in your app for a more fluid user experience from mail, the browser and other sources. Here's how:

// In App.xaml.cs
overide void    OnAppLinkRequestReceived (Uri uri)
{
    // Navigate to specific resrouce.
}

6. Better Previews

Build-execute cycles have often frustrated developers. Especially on a mobile form factor, what you need is instantaneous feedback on how UI or code changes affect the behavior of the app on the screen. Xamarin.Forms Previewer is a live preview rendering of a page side-by-side with the XAML markup directly inside the Xamarin Studio environment. This offers real-time feedback, allowin you to see the immediate impact as you manipulate the UI visual tree through markup or data bindings.

image

7. Better Renders

Developers often deal with a collection of business objects, populated from a cloud data store and ready to be displayed as UI. DataPages supply a mapping layer between your data and rendered UI. Simply select a data source, bind your data to theappropriate UI controls and render automatically. DataPages creates Master-Detail pages automatically and provide easy connectivity with backend data sources. Full CRUD operational functionality is coming soon.

image

8. Better Playgrounds

Want to experiment with new C# features or mobile-specific code? Xamarin WorkBooks offers you an intelligent playground. Consider it a smart scratchpad that is great for exploring, teaching or sharing C# code, especially in the mobile context. Workbook code editing is Roslyn-powered, thus providing rich Intellisense, syntax coloring and modern language features.

Better still, Workbooks are context aware of the type of device that you are targeting with your app. Accordingly, you'll get iOS/Android simulators for mobile apps to follow along with your code.

image

image

Want rich Intellisense? You got it. And your code always executes on the spot. Also, you can execute everything in a Workbook all at once. When done, Workbooks are simply saved in MarkDown format, making them great for sharing or collaborating. This may just be the future of documentation - live docs!

image

And since Workbooks are aware of the app platform, you could write mobile specific code and see things light up on the fly in the simulators. Workbooks offer deep integration with platform-specific APIs for both iOS and Android. So, experiment all you want, then incorporate features in your app codebase.

image

9. Better DevOps

Iterate quickly and deliver more frequently, while maintaining high product quality. This seems to be an ongoing challenge for most development teams, and mobile development is no different. Mobile DevOps is a real need, with focus on continuous integration, test automation and dev-test loops. Xamarin and Microsoft have combined products to offer an end-to-end solution for most mobile development teams - through every step of the app lifecycle.

image

With Xamarin Test Cloud, you get to automate app testing on 2000 real devices in the cloud - nothing replaces real on-device testing and the feedback you get from running your app on such variety of hardware. The new Test Cloud Live service brings the power of real-time debugging on hundreds of device configurations to every developer workstation.

Test Cloud Live allows users to manipulate a real device from within the browser, providing the extra level of detail sometimes needed to debug a complex issue. With the newly announced Xamarin Test Recorder, you get to open your app project, launch your app and create test scripts in real-time simply by interacting with your app on a device or simulator.

Once your confidence grows in the app you are building, it may be time for some beta testing to gather valuable feedback. This is where Microsoft's HockeyApp comes into play - distribute internally, control updates, collect feedback, iterate and repeat. Xamarin Insights is now starting to work with HockeyApp to provide real-time app usage statistics during beta app distribution - all tied together in one place for seamless Mobile DevOps.

10. Better UI

If you're sold on the Xamarin cross-platform promise, you're ready to start building your next dream mobile app. But the built-in tools only get you as far - professional apps call for a professional UI. When building Enterprise mobile apps, you may find yourself wanting some hard-hitting UI controls. Stop re-inventing wheel. Just stop, for the sake of productivity.

Telerik UI for Xamarin delivers a comprehensive suite of UI controls for Xamarin.iOS, Xamarin.Android and Xamarin.Forms. You get polished and performant UI controls out of the box - like Graphs, Charts, DataForms and SideDrawers. These are things you really do not want to create by hand - trust Telerik engineering to do the heavy lifting for you. You can try Telerik UI for Xamarin for free today!

image

Oh, and the next time you are at a .NET conference eand you know the Telerik folks are going, flag them down to grab one of these stickers and help make .NET cool again!

image

Conclusion

I hope you see the cross-platform promise of Xamarin for .NET developers. There are loads of goodies in the latest tooling, new playgrounds, open source repositories and platform solutions for your entire mobile app development lifecycle. Just grab some polished UI and start coding!

Note: Several images courtesy of Xamarin.


SamBasu
About the Author

Sam Basu

Sam Basu is a technologist, author, speaker, Microsoft MVP, gadget-lover and Progress Developer Advocate for Telerik products. With a long developer background, he now spends much of his time advocating modern web/mobile/cloud development platforms on Microsoft/Telerik technology stacks. His spare times call for travel, fast cars, cricket and culinary adventures with the family. You can find him on the internet.

Related Posts

Comments

Comments are disabled in preview mode.