CSLA support for client side technologies such Angular using Blazor #1812
-
Hello, We are having a legacy application written in SilverLight with CSLA for business rules. There around more than 1000 of pages in the application and we are in process of migrating them outside SilverLight.
Would like to know your opinion if Option 2 above is possible, i.e. the UI will be rendered using Angular through Blazor but can also reuse CSLA for business logic. Thanks in advance. Regards, |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 1 reply
-
Generally speaking, you don't use Blazor and Angular. You use Blazor or Angular, because they both fill the same niche - they are both ways to build an SPA that runs in the browser. Angular apps are written using TypeScript, HTML, and CSS. They are not written in .NET, and so they can't include any CSLA code (because CSLA requires .NET). Blazor apps are written using C#, HTML, and CSS. They are written in .NET, and so they can include CSLA code just fine (as per my CSLA and Blazor book). In summary, your option 2 is not really possible. You can run CSLA .NET on your web server, to help create the REST services that are called from the Angular SPA, but you can't use CSLA in your Angular app. |
Beta Was this translation helpful? Give feedback.
Generally speaking, you don't use Blazor and Angular. You use Blazor or Angular, because they both fill the same niche - they are both ways to build an SPA that runs in the browser.
Angular apps are written using TypeScript, HTML, and CSS. They are not written in .NET, and so they can't include any CSLA code (because CSLA requires .NET).
Blazor apps are written using C#, HTML, and CSS. They are written in .NET, and so they can include CSLA code just fine (as per my CSLA and Blazor book).
In summary, your option 2 is not really possible. You can run CSLA .NET on your web server, to help create the REST services that are called from the Angular SPA, but you can't use CSLA in your Angular app.