CSLA Position with AngularJS

CSLA Position with AngularJS

Old forum URL: forums.lhotka.net/forums/t/12379.aspx


st3fanus posted on Thursday, February 13, 2014

Hi all...

recently, I still read about angularJS, and I interested with that approach ( for me it's like XAML on WEB ).

currently I develop LOB app in SL and WPF. and for greater reach then I intend to try web based ( HTML ) with angularJS.

So, my questions is :

1. in this situation , Do I must develop with SOA architecture ( from Rocky ebook ) where

    edge app is angularjs app which REQUEST to service app with CSLA for implementation.

    this means : at least two ducplicate business logic in JS ( angularjs )  and in the service ( CSLA BO ) which is for Rocky , he said that this is not duplication but it's actually two different app ?

 

If you have any suggestion, examples, article , opinion are welcome

thank a lot for any comments too.

 

 

stefanus

 

ajj3085 replied on Friday, February 14, 2014

Yes, I would say that you'd build a web service, which can be thought of as your UI layer and uses the Csla objects.  Outside of the web service, you just build a web application which uses the service like you would if Csla were not involved. 

You'll have to decide which business rules you're re-implement on the client, or which rules might need specific service calls to help the client.

sergeyb replied on Friday, February 14, 2014

This is the route I am going right now, taking on a big re-write of a SL app.  We are adding a Web Api layer with models that we generate based on CSLA objects once, then modify to fix the web model a bit better.  We are implementing some standard rules, like required, min / max, regEx, etc... as Angular directives.  Then we decorate Api models with attributes that we scrub when generating angular views (MVC partial views in our case) and inject appropriate directives.  I think we can implement all standard cross-object rules this way.  When it comes to specific rules, we are making the decision based on effort required.  If effort is super large, we are skipping those directives short term.  Long term, we will got back and fill those in as well.

JCardina replied on Monday, August 18, 2014

Hello Sergeyb if you don't mind I'd be very interested in how you implemented authentication.  It seems that the Web Api doesn't seem to play well with how CSLA sets the business principal.

jteneglio replied on Tuesday, August 19, 2014

I'm having a similar issue with Authentication and CSLA using WebAPI 2, at the moment I'm hard coding the authentication on every calls but i would like to see it work properly :-0 

yanet.morales replied on Tuesday, May 12, 2015

Hi Jean,

I have the same problem with the Authentication, could you please tell me how to fix it if you resolved this situation.

Thanks

Copyright (c) Marimer LLC