question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Proposal: Introduce Shell as the default way of using/learning .NET MAUI (templates, documentation, etc.)

See original GitHub issue

Description

The Shell concept was introduced in Xamarin.Forms 4.0 and has been brought over to .NET MAUI and in my opinion helps standardize application structure, navigation, theming, and at the same time abstracts away complicated structure of Flyout and Tabs. Today, developers coming to Xamarin.Forms and .NET MAUI for the first time will have to make a decision if they should use Shell or not, which has rippling effects down the road. The default templates for Xamarin.Forms have mostly been updated to default to Shell, however Blank app remains a non-Shell based application, and the documentation separates out Shell into a different section, which means that you have to know to go look for it to go learn the concepts. I believe that developers will be more successful learning and using .NET MAUI if Shell is the default way of building applications, learning applications, and is the default template when running dotnet new maui.

Benefits:

  • Standard way of learning app structure, navigation, theming, and more
  • URI navigation & constructor injection simplify development
  • Integrated search handling
  • Documentation can be simplified by focusing on Shell concepts first
  • This is our chance to do it right and not make things confusing with multiple choices, make Shell the way.

I am not asking Shell to be required in .NET MAUI, so non-Shell based XF apps can easily migrated over and traditional navigation can still work just fine. But, I believe that Shell was created to make cross-platform development easier and from my personal usage it does.

Here is my PR for proposal changes to templates -> https://github.com/dotnet/maui/pull/4524

Public API Changes

None, we would update the templates to include a Shell with theming and add a single page.

Intended Use-Case

Make app development with .NET MAUI easier than ever, while still be backwards compatible.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:44
  • Comments:16 (9 by maintainers)

github_iconTop GitHub Comments

20reactions
jonlipskycommented, Feb 6, 2022

I agree with @dotMorten. When I create a blank app, I want a truly blank app.

18reactions
SmartmanAppscommented, Feb 6, 2022

As a teacher, please keep default to the minimal app that will work. Sure, provide shell as a radio-button choice, but not default in a way like the current “blank” app has XAML in it which then needs to then be stripped out, and there’s no XAML-free choice provided. People who are learning need to be taught 1 step at a time - start with the basics, then add further things on top. I have taught high school students Xamarin/C#, and so as to keep it simple for them, the first thing I actually had to do was teach them how to strip out the XAML, so that we could just focus on Xamarin/C# until they got a handle on it. Once they understand that THEN you can teach them XAML as well. The golden rule is one step at a time (or as few steps at a time as possible). To illustrate the issue with learners, when asked to install Visual Studio, one of them installed Blend for Visual Studio. Another time I said they could rename App1 to whatever they wanted to call their app, so one of them changed it to just App - obviously that created a whole bunch of problems until I worked out what she’d done. K.I.S.S.

If we’re adding templates then can we please have…

  • a C# blank app (no XAML)
  • a C# Flyout with no extra features thrown in for demo purposes - JUST the skeleton Flyout page, just C#.

The first I always have to strip out all the XAML first. The second I don’t even use - so much needs to be stripped out it’s easier to just start from a blank app and add what you need (and even that does take a while. I’ve ended up building a base-class for it to save me some time).

Read more comments on GitHub >

github_iconTop Results From Across the Web

Introduce Shell as the default way of using/learning .NET MAUI ...
Proposal : Introduce Shell as the default way of using/learning .NET MAUI (templates, documentation, etc.) · dotnet/maui@1f49e7c.
Read more >
James Montemagno
As .NET MAUI advances, I believe that introducing Shell as the default way of learning/building apps with .NET MAUI has many benefits.
Read more >
NET MAUI Shell overview
NET MAUI Shell app, the visual hierarchy of the app is described in a class that subclasses the Shell class. This class can...
Read more >
NET MAUI Shell flyout
NET MAUI ) Shell is based on flyouts and tabs. A flyout is the optional root menu for a Shell app, and is...
Read more >
Let's Learn .NET - .NET MAUI (cross-platform apps in C#)
In this month's . NET beginner series, get a full introduction to build native, cross-platform desktop and mobile apps with . NET !...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found