Limitations of business objects when serialized over Web Services and JSON-RPC

Limitations of business objects when serialized over Web Services and JSON-RPC

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


thor posted on Thursday, November 27, 2008

Hello,

I have a few questions specific to exporting the CSLA business objects to an ajax client via SOAP or JSON-RPC. Thus CSLA offers a great variety of useful functions like a pattern for N-level-undo or the authorization rules, I want to use as much of them in the ajax environment as possible. I know that I am not able to use the data binding stuff which CSLA offers in a WinForms environment in my ajax client.

I want to serialize my business objects as data transfer objects lice described in http://www.lhotka.net/weblog/SerializingBusinessObjectsToSilverlightAJAX.aspx. So far no problem. This approach works fine for me.
What I don't know: Is it possible to use the authorization rules, the validation rules, the undo-mechanism or the dirty-management in an ajax application?

Regards,
Thorsten

JoeFallon1 replied on Saturday, November 29, 2008

If you use AJAX and just have an HTML form then no you won't get that extra functionality. Because all your sending is the raw data in a DTO.

If you use Silverlight, then you can serialize the BO from the server running CSLA .Net in Windows to the client running CSLA .Net for Silverlight.This is the "magic" that Rocky and Magenic have been working all summer. Once the BO is running in Silverlight, you should be able to use it directly or indirectly - however you want. If you make an AJAX call the DTO can be used to update the BO in Silverlight if you want and then you can ask the BO if it is Valid based on the new data.

Joe

 

Copyright (c) Marimer LLC