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] Project Reorganization

See original GitHub issue

Project Reorganization

  • Proposed
  • Prototype: Not Started
  • Implementation
    • iOS Support
    • Android Support
    • macOS Support
    • Windows Support
  • Unit Tests
  • Sample

Link to Discussion

Summary

We will change the project structure to mimic the .NET MAUI structure, placing all code that doesn’t use Microsoft.Maui.Controls into a new project, CommunityToolkit.Maui.Core.

This creates a new NuGet Package, CommunityToolkit.Maui.Core that new Toolkits like CommunityToolkit.Comet can leverage.

Motivation

Make our implementation as close as possible from .NET MAUI implementation, which will make it possible to easily support frameworks that are built on top of .NET MAUI and promote our features to the .NET MAUI.

Detailed Design

image

CommunityToolkit.Maui.Core

In general, this project will have all the basement to develop our Toolkit, including some primitive types, interfaces and base classes, base views, and common code. This will be referenced by other Frameworks/Toolkit based on .NET MAUI that wants to have the same features that us.

Here we will have some:

  • BaseViews, could be Views that will be used by other Views, like PaddingButton (that’s used by Snackbar) or the MCTPopup that will be a native control implemented in a way that can work with our handler. This same approach is used here

  • Primitives, which will be base types that can be used by everyone, like our MathOperator. So other frameworks may not have the concept of Behavior or Converter but they can mimic them as helper classes/methods and use our primitives.

  • Common Code, this will be all generic code (platform-specific or not) that can be used by other Frameworks/Toolkits

  • Layout Managers, were introduced on .NET MAUI and they live on Microsoft.Maui.Core so makes sense to have our managers on Core as well.

  • Handlers, on Core will be the most general Handler with the majority of features.

CommunityToolkit.Maui:

This project has a reference to the Core project. Here will live the implementation of our Controls, Views, Behaviors, Animations, etc. In other words, this project will work with the .NET MAUI and will be MVVM friendly. Also, other Toolkits/Frameworks can reference this package if needed.

Here we will have some:

  • View Implementation, with BindableProperties, support to attach effects, behaviors, triggers, and all that jazz.

  • Platform Configuration, that is Platform-specific features, that can relate to some control - like the ArrowDirection that is part of Popup and works just on iOS - or the application itself - like the StatusBarColorEffect from XCT.

  • Handlers Implementation, We will add to our PropertyMapper and/or CommandMapper any Platform Configuration that some Handler/View may have. We also can implement here some features that we think will not be great to have on Core. Here is a reference for this

  • Layout, will be the implementation of ours custom layouts and will use the Layout Managers on Core

Drawbacks

  • Adds an additional NuGet packages
    • Requires adjustments to the CI Pipeline to publish two Nuget Packages
    • Additional dependencies increase compilation
  • Reorganizing the entire project may lead to unintentional breaking changes
    • This work requires touching every file; some files may be forgotten, some files may be miscopied

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:4
  • Comments:25 (12 by maintainers)

github_iconTop GitHub Comments

3reactions
VladislavAntonyukcommented, Dec 9, 2021

I suggest to keep in CommunityToolkit.Maui.Core only interfaces and base classes, so it will be platform agnostic (net6.0). We put ISnackbar, BaseAnimation, IValidator etc here.

Then CommunityToolkit.Maui contains animations, converters, validators, but not Controls (Views). So it can be net6.0 as well. This library doesn’t need UseCommunityMauiToolkit().

Finally CommunityToolkit.Maui.Controls implementation contains only controls and depends on Platforms.

2reactions
jfversluiscommented, Dec 13, 2021

Lets approve this one!

Read more comments on GitHub >

github_iconTop Results From Across the Web

5 Steps to Include in the Company Reorganization Process
1. Start with your business strategy · 2. Identify strengths and weaknesses in the current organizational structure · 3. Consider your options and...
Read more >
How to Write a Proposal to Change a Department's Structure
Business proposals generally consist of an executive summary, an introduction, extended description of basis for change, cost schedule and deliverables.
Read more >
Restructuring Proposal Template
This template should be completed by Accredited Entities in the preparation of a restructuring proposal to a project under implementation.
Read more >
Staff Restructure Proposal Guide & Free Template - INK
A staff restructure proposal is a document that outlines changes to the current staffing structure of an organization. It is an essential tool...
Read more >
Dealing with a Mid-Project Reorganization
When a company undergoes a restructuring, there's the potential that projects could experience some upheaval. Maintaining forward momentum during a project ...
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