CleanArchitecture icon indicating copy to clipboard operation
CleanArchitecture copied to clipboard

Request for Angular Alternative

Open KTarun003 opened this issue 3 years ago • 9 comments

I would like to have an option to choose between major SPA's like React, Vue etc.

KTarun003 avatar Sep 28 '22 09:09 KTarun003

I agree that decoupling FE and BE is good idea... Currently app is serverd as static from API project which has also advantages with CORS etc...

Decoupling can be done by moving Angular from API to custom FE folder and create custom registration for serving static files... ( UseAngularFre(...), UseReactFe(..)... )

What you will lost, is ability to start frontend with backend... Or if you require to keep behaviour, than you need to handle some paths how to strat FE with Backend...

damikun avatar Oct 06 '22 08:10 damikun

If we are serving static files , can we build our FE to a folder and serve that folder?. If we can , can we do it while development too?

KTarun003 avatar Oct 14 '22 15:10 KTarun003

If we are serving static files , can we build our FE to a folder and serve that folder?. If we can , can we do it while development too?

Ofcourse you can.. dotnet has some templeates for react: 'dotnet new react' or something similar.. snd you can integrate clean architecture to that templeate..

damikun avatar Oct 19 '22 00:10 damikun

Thanks for the suggestion. I am considering adding options for Web API only, Angular (existing), and React (new). I need to try it out first, I might not have the capacity to maintain so many options.

jasontaylordev avatar Oct 21 '22 22:10 jasontaylordev

@jasontaylordev I'm converting it to an Web API (only) right now. I would appreciate that feature. I'm working with React Native clients. It is proving to be somewhat of a challenge to get a Web API (only) published into Azure using this template.

ghost avatar Nov 06 '22 18:11 ghost

In my case, I chose a different FE (Svelte) and replaced Microsoft.AspNetCore.SpaProxy with AspNetCore.SpaYarp. Lets me decide whether to serve the FE as a part of API or as a separate launch with minimal changes/config.

Van-Dame avatar Nov 13 '22 22:11 Van-Dame

In my case, I chose a different FE (Svelte) and replaced Microsoft.AspNetCore.SpaProxy with AspNetCore.SpaYarp. Lets me decide whether to serve the FE as a part of API or as a separate launch with minimal changes/config.

Hello @Van-Dame, That sounds like a nice solution! Would you care to publish an example of that? We also consider migrating to Svelte 😄. Traditional frameworks like Angular and React seem to be slowly losing ground. Thanks in advance for considering!

JohanHeyvaert avatar Nov 17 '22 10:11 JohanHeyvaert

VS 2022 allows creation of the below: image

... and respective tutorials to get those running with a standalone API project with info how to let those two apps communicate via proxy:

https://learn.microsoft.com/en-us/visualstudio/javascript/tutorial-asp-net-core-with-angular?view=vs-2022

image

pflajszer avatar Dec 15 '22 07:12 pflajszer

I've added support for React in #872

jasontaylordev avatar Jun 25 '23 11:06 jasontaylordev

Support for API only covered by #786

jasontaylordev avatar Jun 29 '23 06:06 jasontaylordev