Coexistence between .net (razor) + Quasar (vue.js) #15681
Replies: 1 comment
-
IMHO UMD isn't a good option here, I'm saying that because your final goal is to kill the old MVC page as soon all pages be migrated. So, what I suggest u would add a ASP.NET Web API to your Solution, so when u're going to migrate a feature or page, u would do: 1 - move any logic what would be in the MVC to a dedicated layer, that layer would not have any direct dependency with the MVC, if u need to access something from them, use reverse injection. 2 - make sure everything is working in the MVC after u removed all the business logic from here and replaced with that with a call to the business layer. 3 - do the same in the api, just call the service layer (of course, u would return a Json instead of a View, but the data would be the same). 4 - now the data is ready to be fetched from the API, u can write your page in the quasar project (u would create that with the Quasar CLI and that would live independent of your asp.net project). 5 - in the MVC controller, just write a transfer (302) to the new app (Quasar App) 6 - while u don't migrate don't migrate all the pages, the 404 of the Quasar App would redirect to the old app (MVC), so u can use your router to redirect back while that pages aren't migrated. After all pages be migrated to the new system, u can write a redirect rule in the webserver who redirect all calls to the old app to new one. As well, write a proper 404 page in the new app. The user would not notice when him is transfered from one app to another, ao u'll end up with 2 publish apps (old one and the new one). Just remember, u can serve any SPA from the wwwroot of your API, u just need to copy the dist/spa folder to there. |
Beta Was this translation helpful? Give feedback.
-
I would like to share my doubt.
I have a .NET Framework project (MVC - Razor) . I need to migrate MVC pages to VUE + Quasar. Because it's a big project, I'd like to migrate in stages.
Do you know of any way this could work? It is possible?
Beta Was this translation helpful? Give feedback.
All reactions