How to acces(=load) data from the server-side file system?

How to acces(=load) data from the server-side file system?

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


stefan posted on Monday, June 17, 2013

Hi,

I would like to visualize files that are located on the server in a csla-client application.

This should work even with a local DataPortal!

Image you want the client to display a list representing a server-side document repository.

What would be the correct pattern, that would be Independent of the actual DataPortal config?

Maybe a second "Document-DataPortal"? Are there any samples I could have a look at?

 

Many thanks!

 

JonnyBee replied on Monday, June 17, 2013

Hi, 

I would create a command or readonly list  to get the "server" side document folder structure - whether it is from a file system or a database.

Basically - use a list with 3 a minimum of 3 values: parent id, id, name and you can create any number of levels in a folder structure.

stefan replied on Monday, June 17, 2013

Thanks Jonny!

The "real" question was how to access the "real" server side - not the logical server side!

Designing a business object to retrieve the data is not the problem.

My logical server side is still on the client, and I must get data from the other side, if possible by using CSLA! Maybe some kind of a CSLA-powered WCF service?

JonnyBee replied on Monday, June 17, 2013

You can combine a local/remote dataportal by using the RunLocal attribute on those "root" methods that should always run locally.
Then the DataPortal config may point to either a local or remote portal.

The other option is to create a totally separate WCF service to expose the folder structure and make your app a client.  

Copyright (c) Marimer LLC