Open Closed

Change from MVC to Angular UI Type + CRUD Code Generation #3083


1
jeflux created
  • ABP Framework version: v5.1.3
  • UI type: MVC
  • DB provider: EF Core
  • Tiered (MVC) or Identity Server Separated (Angular): yes

We have been building a large solution for a while now, and we've used the ABP Suite generated CRUD UI using MVC. This is a microservices architecture solution.

Currently, when building out new functionality in one of the microservices, we use ABP Suite to generate new entities and the related CRUD UI elements. We then cut/paste those UI elements to a central UI application. This has been working great.

After review, we determined that Angular is a more suitable UI Framework for what we plan to do. I created a new ABP Solution, then took the generated Angular app and wired up to our existing Identity Server. What I can't determine is if it's possible to generate CRUD UI from ABP Suite for this Angular front-end. We certainly don't want to manually build all the CRUD functions!

  • Is there an option to change UI Framework for a solution within ABP Suite (from MVC to Angular)?
  • In a microservices architecture, is there a way to make all UI CRUD generation go to a single Angular app?

4 Answer(s)
  • 0
    albert created
    Support Team

    there's no automatic way to switch a project's UI Framework to another.

    ABP Suite settings are stored in the following file

    %UserProfile%\.abp\suite\appsettings.json
    

    You can find the UI Framework settings in the following fields:

    • UiFrameworkName , update it from Mvc to Angular
    • UiFramework update it from 2 to 3

    I didn't test if this works because it's hacky way :)

  • 0
    improwise created

    This is an interesting question. I guess the actual question here is it is possible to generate a new CRUD GUI based on existing CRUD business layer, which is something we have also pondered but never tried. Will start a new project soon though to evaluate pros and cons of different GUI solutions, and in that, we would like to build out several different GUIs in Angular, Blazor etc. but still use the same ABP solution for backend stuff.

  • 0
    albert created
    Support Team

    as long as the entity is the same you can create just UI by checking only "create user interface"

  • 0
    jeflux created

    there's no automatic way to switch a project's UI Framework to another.

    ABP Suite settings are stored in the following file

    %UserProfile%\.abp\suite\appsettings.json 
    

    You can find the UI Framework settings in the following fields:

    • UiFrameworkName , update it from Mvc to Angular
    • UiFramework update it from 2 to 3

    I didn't test if this works because it's hacky way :)

    Ah. This I wanted to try, but wasn't sure where to make the changes. When I make those changes and regenerate UI, ABP Suite is still only generating the MVC code.

    When I load an existing solution into ABP Suite, how does it know the UI Framework? Do I need to change it there also? For example, I made the changes you suggested. When it didn't work, I tried to remove solution from ABP Suite, and when I re-added it, the values in appsettings.json had the MVC configuration (the manual changes I made were not persisted)