I have started a new WPF application and need advice related
to using XPO, WCF, OData, etc.
From an architectural point of view the application is a WPF
client connecting to WCF services using XPO as the data provider.
There are a few key elements I need to implement in the
application:
-
- The WCF services should expose data not only to
my own WPF client but should also be available to third-party clients. Thus, I
need to implement various access levels to the data available through the WCF
services (using roles/permissions, etc.) to restrict access to particular
database tables. I do not wish to expose all available data in the database.
-
- The data model should give me a way to expose non-persistent
data (e.g. calculated fields on the server side).
-
- The WPF client will use DevExpress grids and
other controls and performance is critical because the amount of data could be large.
Most likely I have to use InstantFeedbackDataSource for the grids (or similar)
to improve performance.
I have tried different scenarios to expose the data:
-
- XPO/OData via WCF data services
-
- XPO via WCF services (using the information
found here).
My first attempt was using XPO with OData (i.e. WCF data
services). This was working just fine for my needs. However, later on I
realized that XPO/OData does not provide me a way to expose non-persistent data
(XPO class properties marked with the NonPersistent attribute) and it is not
clear when/if this will be available in the future. Exposing non-persistent
data is crucial, so I abandoned this approach.
XPO via WCF services (e.g. using the DataStoreService class)
does not provide me a clear way to restrict access to particular database tables.
It seems that I would have to implement my own solution for restricting access
based on application requirements and individual user credentials.
What is the recommended approach to exposing XPO classes
using WCF services while allowing for non-persistent data and restricting
access to specific data on an individual user basis?
I'd really appreciate any assistance.
Best Regards,
Oleg Mironov