News

Xamarin.Forms Mobile Apps Coming to Windows Template Studio

Windows Template Studio, Microsoft's low-code tool for quickly creating Universal Windows Platform (UWP) apps, is aiming to support more project types, including Xamarin.Forms-based iOS and Android and (possibly) Windows Presentation Foundation (WPF) apps.

With that work underway, the team just announced Windows Template Studio 2.2, which might contain fewer new features than normal as it works on upcoming multi-project support.

Among other things, this will pave the way for the capability to leverage Xamarin.Forms to generate projects in one solution that target Android and iOS platforms along with UWP.

Windows Template Studio is an open source, online, wizard-driven Visual Studio 2017 extension with typical low-code features like built-in project types (basic, navigation pane, and pivot and tabs) and a choice of app frameworks.

While Windows Template Studio 2.2 sports some new features and updates, along with bug fixes, the team is already eyeing v3.0, a breaking change because of its support for multiple projects.

"For the next few releases, we are doing smaller updates to add in new pages and fixes," Microsoft's Clint Rutkas said. "The reason being is we are working toward multi-project solution support for 3.0 and adjusting our templates to support that. This is a large sum of work but want to be sure we are still improving where we can now."

According to the project's roadmap, multi-project support in v3.0 should happen around October.

The GitHub issue detailing multi-project support says the plan is to abandon the all-code-in-one-project approach in favor of a UWP app project and a .NET Standard library that's used by the app project.

.NET Standard provides a formal spec for .NET APIs that should be available to developers working with all .NET implementations.

Reasons for splitting the code into two projects and breaking things include:

  • It will allow for easier reuse of the platform agnostic code.
  • It will make the testing of platform agnostic code easier as tests will not require an app context in which to run. This is beneficial for unit test scenarios, especially in a CI/CD environment.
  • It will enable desirable additional functionality to be added to WTS in the future. (Including, but not limited to, Xamarin support.)

Furthermore, it will allow functionality for requested features including:

  • The generation of a unit test project to aid in testing (#299)
  • Data access related features (via DB & Web) in the generated code (see issues linked from #396)
  • The generation of projects in the same solution that targets Android and iOS (via Xamarin.Forms) in addition to the UWP app. (#321)
  • Possible future support for more platforms.

Regarding the Xamarin.Forms capability, that was requested in May of last year. Project contributor Matt Lacey initially replied: "Windows Template Studio has been created to address a request of developers building UWP apps and so it focuses just on that audience. We recognize that there is interest in extending this to other platforms and so wish to capture and record that interest." He then folded the request into a Xamarin.Forms-specific issue. There's also interest in supporting WPF apps.

Early thinking on the Xamarin support is detailed in a wiki page authored by Rutkas, who said: "We are currently proposing adding in Xamarin into WTS. This is a complex topic and we're trying to validate our approach." He points to the team's approach for the project and a workback schedule.

In the meantime, Windows Template Studio 2.2 includes:

  • 3D Launcher feature
  • Wizard enhancements
  • Improved documentation
  • Improved testing
  • Bug fixes

You can read more about these and more in Rutkas' post and the changelog.

The Windows Template Studio extension in the Visual Studio Marketplace has been installed more than 489,000 times, earning a 3.4 rating (scaling to 5) from 58 developers who provided reviews. A review last month said: "Brilliant, been waiting years for a tool like this one. Can't wait for Xamarin support. Well done, keep up the good work."

About the Author

David Ramel is an editor and writer at Converge 360.

comments powered by Disqus

Featured

Subscribe on YouTube