DataPortal: "There can be only one"...

DataPortal: "There can be only one"...

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


cmichaelgraham posted on Thursday, December 22, 2011

1st off: CSLA is amazing.  I bought the 4.0 eBooks and have been delighted with the sheer elegance of CSLA and of the writing.

I'm considering using CSLA for an existing large, plugin-based architecture (runs in both Silverlight & WPF).  Companies, consultants, and other 3rd parties extend the platform by creating extension assemblies which contain plugin classes.

I've almost worked through the "using csla 4 - overview" document and written no code yet...

Here's my concern...  since CSLA DataPortal is static, much like the Highlander, "there can be only one".

If I use CSLA for the application's configuration business objects, the writers of extension assemblies cannot use CSLA for their own purposes connecting to various system-of-record data sources with associated business objects.

CSLA is so cool, I'd probably live with that, but has anyone created a instance-based DataPortal implementation that would accommodate this use case?

RockfordLhotka replied on Friday, December 23, 2011

I am glad you are enjoying the books and framework.

The Data Portal Configuration ebook probably contains the information you are looking for. The data portal uses static methods, but they are the gateway to a client-side proxy object that does the real work. It is very possible to have a proxy that intelligently decides which real proxy to use to talk to the server. That allows you to have different objects interact with different data portal endpoints (including different servers).

cmichaelgraham replied on Friday, December 23, 2011

Gotcha - so I still use the static DataPortal and I create a client-side proxy that can figure out (based on the request) to which server-specific proxy the call should be delegated...  Yes  Thanks !!  :)

Copyright (c) Marimer LLC