01 Introduction (XAMARIN) - chempkovsky/CS2WPF-and-CS2XAMARIN GitHub Wiki

CS2WPF(2XAMARIN) is a free and open source Rapid Application Development tool.

  • It's a tool for modeling and generating XAMARIN applications that are created with Prism library.
  • With CS2WPF(2XAMARIN), a developer can create an Enterprise XAMARIN application.

What does an enterprise application mean?

  • Enterprise XAMARIN applications
    • should load quickly on the client side
    • should be built from off-the-shelf components.
    • must have a rich client interface
    • must include a security module

  • First (business aspect), an enterprise application is a huge number of data structures. Each data structure requires the implementation of its own user interface and business logic in the code behind, i.e. each data structure requires its own set of components.
    • You will never create enterprise applications without being able to quickly create a typical set of components for each data structure of your app.
  • Second (technical aspect), a huge number of components require a fast loading mechanism on the client side
    • You will never create enterprise applications without fast loading mechanism

  • "On demand" loading of Prism modules solves the technical aspect of building enterprise applications
  • With CS2WPF(2XAMARIN), the generated code solves the business aspects of building enterprise applications described below:
    • For any data structure the developer can model and generate editing forms with master-detail relationships at the user-controls level with a following rules:
      • any user-control of the detailed-entity is disabled until the user control of the master-entity is defined :
        • For instance, user-control for Manuscript will be disabled until the user-control for Author is defined
      • any user-control of the detailed-entity displays data with applied filter defined by the user-control of the master-entity.
        • For instance, user-control for Manuscript displays manuscripts of the selected Author
    • developer can model and generate the pairs of tabular data forms with master-detail relationships where:
      • Selecting row in the master table fires event to apply filter in the detail-table
      • Function to Add(Update/Delete) to the details table is also available. User controls associated with the master-entity are disabled and filled with the correct data even for the “Add item” form.
    • developer can model and generate Prism routing navigation chains of any length:
      • Navigation is carried out from the row of the master table. It fires event to apply filter in the detail-table.
      • Function to Add(Update/Delete) to any table in the navigation chain is available. And again, the user controls associated with the master-entity are disabled and filled with the correct data even for the “Add item” form

It's implemented as Microsoft Visual Studio Extension (.vsix) and consists of five wizards:

  1. DBContext Wizard
  2. ModelViews Wizard
  3. WebApiServices Wizard
  4. Wpf(XAMARIN) Forms Wizard
  5. FeatureScripts Wizard

The development process cycle consists of the following steps:

  • The developer starts with first entity which is C# Entity Framework class.
  • Using DBContext Wizard generates new or modify existing Entity Framework DB-Context.
  • Using ModelViews Wizard defines and generates Views which is subset of properties of current Entity and its masters
  • Using WebApiServices Wizard defines and generates Web Api Services
  • Using WpfXAMARIN Forms Wizard defines and generates rich client interface as Custom XAMARIN User controls
  • Using FeatureScripts Wizard arranges generated components on the pages
  • The developer adds next entity to the project and repeats all the steps above.

Talking about "Custom XAMARIN User controls":

  • "Custom XAMARIN User controls" are reusable Custom Controls derived from ContentPage or ContentView with implemented mvvm pattern.

Talking about "generator scripts":

  • Generators are built on the basis of "T4 Text Template"-Microsoft technology.
  • As a result, the developer can modify or rewrite any T4 script at any time.
  • The latter makes CS2WPF(2XAMARIN) an extremely flexible application development tool that speeds up the development process by several times.

Remarks:

The DBContext, ModelViews and WebApiServices wizards are used to generate the back end part of the application. These three wizards are C # class generators.

The Wpf Forms and FeatureScripts wizards are used to create the front end part of the application. These two wizards generate Custom XAMARIN User controls.

With CS2WPF(2XAMARIN), a developer can model and generate editing forms with master-detail relationships at the user-controls level with a following rules :

  • any user-control of the detailed-entity is disabled until the user control of the master-entity is defined :
    • For instance, user-control for Manuscript will be disabled until the user-control for Author is defined
  • any user-control of the detailed-entity displays data with applied filter defined by the user-control of the master-entity.
    • For instance, user-control for Manuscript displays manuscripts of the selected Author

With CS2WPF(2XAMARIN), a developer can model and generate the pairs of tabular data forms with master-detail relationships where:

  • Selecting row in the master table fires event to apply filter in the detail-table
  • Function to Add(Update/Delete) to the details table is also avalable. User controls associated with the master-entity are disabled and filled with the correct data even for the “Add item” form.

With CS2WPF(2XAMARIN), a developer can model and generate Prism routing navigation chains of any length:

  • Navigation is carried out from the row of the master table. It fires event to apply filter in the detail-table.
  • Function to Add(Update/Delete) to any table in the navigation chain is available. And again, the user controls associated with the master-entity are disabled and filled with the correct data even for the “Add item” form

With CS2WPF(2XAMARIN), a developer can model and generate User Interface based on the dialog-boxes and(or) User Interface based on Routing:

  • Using User Interface based on the dialog-boxes Add(Update/Delete) form is displayed as a Dialog.
  • Using User Interface based on the Routing Add(Update/Delete) form is displayed as a separate page to route

With FeatureSripts Wizard, a developer can model and generate pages with one or more child tabular forms.

  • On such pages, any child form can support routing

With CS2WPF(2XAMARIN), a developer can generate dashboard with ready to use user authentication

All components generated with CS2WPF(2XAMARIN) supports bitmask-based authorization.

  • A developer can generate bitmask-based authorization that uses Microsoft Asp .NET storage
  • or
  • a set of components that can be used independently (this approach requires additional coding)