Prism for Xamarin.Forms: Is that ok, If I dont want using this Prism Framework ?

Jerry Lipan 916 Reputation points
2021-12-14T00:35:06.783+00:00

Hi,

I'm a Xamarin Newbies. Is that ok, If I don't want using this Prism Framework ? This Prism getting me more haywire. So, I decide to follow a normal Xamarin development

Developer technologies | .NET | Xamarin
0 comments No comments
{count} votes

Accepted answer
  1. Emil Alipiev 306 Reputation points
    2021-12-14T01:57:05.943+00:00

    You have 2 options.

    1. No Mvvm. You can use classic approach to write your code behind if you are familiar with Windows Forms for example. This faster and straightforward approach without any Mvvm boilerplate. Also easy to manage XF default navigation.
      Disadvantage is probably the separation of your business logic and UI. So it will be harder to do Unit testing, mocking etc as you may have some references of Xamarin.Forms.
    2. Using Mvvm. If you are familiar with Mvvm, I would you recommend you to use Mvvm binding. By that you can separate your UI logic with business logic. Later migration to Maui will be easier.
      Here you have a few options.
    • MvvmCross and Prism; quite advanced and complicated. they also increase your App size.
    • Freshmvvm; easy and light weight. I can recommend this. But sometimes it may not fullfill your requirements.
    • Mvvm Light; also light and easy to learn. I have used it for Wpf but dont know how is it today for XF.

    Best is not to use any library but use standard mvvm. if you need to use one, use freshmvvm if Prism is too complicated for you


1 additional answer

Sort by: Most helpful
  1. Anonymous
    2021-12-14T01:47:59.107+00:00

    Hello,​

    Welcome to our Microsoft Q&A platform!

    Is that ok, If I don't want using this Prism Framework ?

    Yes, you can use Model-View-ViewModel(MVVM) to develop your Xamarin application.

    The Model-View-ViewModel (MVVM) architectural pattern was invented with XAML in mind. The pattern enforces a separation between three software layers — the XAML user interface, called the View; the underlying data, called the Model; and an intermediary between the View and the Model, called the ViewModel. The View and the ViewModel are often connected through data bindings defined in the XAML file. The BindingContext for the View is usually an instance of the ViewModel.

    Best Regards,

    Leon Lu


    If the answer is the right solution, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.