Data Access Strategy - Newbie - Going to be a long

Hi All, Newbie to WebCore and a lot of other things for this project.

Fair warning - this is the start of a longish journey for a small client facing web portal for clients to access core data about themselves.
We are constrained by a large existing line of business system and failed attempt at a C# web portal that got to Beta was was going to be too difficult for me to extend and maintain.

My (without constraints) thoughts were as the person logs in, you go away and build a small object tree for the common things you know they want, most of which are going to be on the landing page.
Client Details, List of Assets and their values (1..20) , List of Recent Events (0..10) , List of recent message subjects (0..10).  
I thought it would be best to build a set of objects to represent these and pass them back as a kind of JSON object to the web page and then it can display them as it wants. kind of streaming objects.
Is this feasible, sensible?

In my desktop app, this would have been a number of frames, datamodules, queries. The line of business system is large and data aware.  This is a tiny sliver of the data and system and the actual enhancements are likely to be diverging from the line of business system.

This is all accessing a FB1.5 DB (can't change that) Delphi Rio.  In the C#version the data was pushed from the DB into a SQL Server DB and served from there, but at the moment I need to get proof of concept up and running.  I want to have very tight control over the actual access to the data and will possibly put SP's or views on the DB to restrict access.

If you are still here, sorry for the long post.   The question is - do you think this is the right direction or I should be surfacing XData data sets.  Any pointers would be welcome.

There will be lots of follow up questions from me I am sure.  I will carry on looking at the XData / RadServer / WEBCore demos, but feel the need to see some of my data on a webpage sooner and in the way I intend to get access to it.

Yes. What you should define is of course the structure of the JSON and the calls. For example, you might have a single call that returns a big JSON with all that information at once, or maybe it's better to break an have several server-side methods that get different JSON parts, like GetRecentEvents, GetAssets, etc.


I didn't understand what do you mean by "surfacing XData data sets"?
You mean you are deciding between service operations versus the automatic entity publishing (the endpoints XData automatically publish like Customers, Orders, etc., directly from a database table)?

If that's the question, I think the best option is to use both as you wish. They are not mutually exclusive. 
Use the automatic entity publishing when you have simple tables that are just raw data - a "Countries" table is a good example - no need to manually create service operations for that).

And then for more complex queries or things that you need more control or more restriction, then use service operations. "GetRecentEvents" is a good example, as it looks you already have a predefined search criteria for that. If the JSON is supposed to be different from the table structure, it's also recommended to use service operation.

[quote=Wagner R. Landgraf]


Yes. What you should define is of course the structure of the JSON and the calls. For example, you might have a single call that returns a big JSON with all that information at once, or maybe it's better to break an have several server-side methods that get different JSON parts, like GetRecentEvents, GetAssets, etc.
[/QUOTE]
Thank you.

[quote=Wagner R. Landgraf]


I didn't understand what do you mean by "surfacing XData data sets"?
You mean you are deciding between service operations versus the automatic entity publishing (the endpoints XData automatically publish like Customers, Orders, etc., directly from a database table)?
[/QUOTE]
Precisely and I realised it wasn't mutually exclusive, but based on where I was starting from, whether  I would have been better not looking at the XData entity publishing when my data wasn't going to easily fall into that as it can't easily be consumed due to FB1.5 and missing FK's etc.

I will plough on and no doubt ask a lot more questions.  Thank you Wagner.  I have recorded a video of the C# website that I might ask you, Holger and Bruno to look at.