472,783 Members | 991 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 472,783 software developers and data experts.

Smart client - general data access best practice question

Kind of an open question on best-practice for smart-client design. I'd
really appreciate anyones views (preferably with reasoning, but I'll take
what I get...). Or if anybody has any useful links on the subject? (and yes,
I have already googled it at length, but still no strong decision)

=============

After a long stint of pure-desktop / pure-server applications, I'm currently
working on a number of smart-client projects in C# using .Net 2.0.

Obviously we need to do our data access through the web-service, but we have
various options available to us, including:
* Define rich classes at the server (exposed directly as e.g. the return
value from [WebMethod] functions), then use WSDL.exe to extract a
representation of those objects to use at the client
* Using datasets
* Using a hand-crafted, documented schema (presumably xml) on the
web-service and manually constructing (separate) rich objects at both ends
* Not using objects on the web-service, but simpler "parameter-per-property"
based invokes
* Others

Personally I favor the first object, as it
a: best fits my (pre-conceived? naive?) ideas of OO
b: doesn't bind the client and server too closely together (i.e. I could
probably call the web-service from a VB6 or Java client if I wanted - no
dependency on the more complex dataset object, and no dependency on a .Net
client (as would exist if I did binary serialization))
c: seems reasonably efficient code-wise, as I don't need to write all my own
code to stub out the client objects and web-service methods (WSDL.exe does
that for me)
d: allows me to pass complex data in a single round-trip to the server,
rather than multiple calls which would then need more complex transaction
management
e: thanks to the BindingSource and the flag to WSDL.exe that enables
INotifyPropertyChanged, meets all of my UI data-binding needs
f: avoids messing with datasets, which (maybe incorrectly) I percieve as
slightly messy and less efficient that performing my own database access at
the server

OK, this means that at the client I have objects with reduced functionality
(arrays instead of object-collections), but in the few cases where I
genuinely need something more sophisticated I can always wrap it in a facade
or other wrapper, so no huge issue here.

---

So - before I go to town, am I barking up the wrong tree? Am I making my
life hard for the future, or is this a reasonable approach? I don't have any
immensely complex/specialized requirements, so it should be similar to other
peoples experiences...?

All thoughts appreciated.

Marc
Dec 13 '05 #1
3 2564
Marc,

the approach we take is to have all functionality (eg business rules,
persistence, everything) reside on the server, and deploy purely as Web
Services. This allows for rich [but thin] client access, AJAX browser
access, SmartPhone, PDA, B2B etc.

It has taken a while (many many years actually) to develop a
framework/platform for building systems like this, but it has paid off, as
we can now deploy any business functionality (eg ERP, CRM, Financial) purely
as hosted Web Services.

The client simply has access to server objects - objects in the pure sense
being Fields and Methods. A change to a text box, click of a checkbox etc
results in an a request to the server to make the corresponding change
(<Delta field="FirstName" value="Fred"/> for a Textbox called 'FirstName');
business rules are executed, validation, calculations, calls to the
persistent store etc and the net results are sent back to the client for
distribution (eg <Field id="FullName" value="Smith,Fred"/> if there was a
server rule that made FullName = LastName +","+ FirstName). Methods are
invoked similarly (reflection on the server is used) and repeating data for
display in grids and listviews has a particular schema that the client
understands.

Our server sessions are Stateful, so no cookies or state restoration is
required (a parameter of the calls is SessionID)..

I have a Whitepaper if you're interested.

Good luck,

Radek

"Marc Gravell" <mg******@rm.com> wrote in message
news:eg**************@TK2MSFTNGP11.phx.gbl...
Kind of an open question on best-practice for smart-client design. I'd
really appreciate anyones views (preferably with reasoning, but I'll take
what I get...). Or if anybody has any useful links on the subject? (and
yes, I have already googled it at length, but still no strong decision)

=============

After a long stint of pure-desktop / pure-server applications, I'm
currently working on a number of smart-client projects in C# using .Net
2.0.

Obviously we need to do our data access through the web-service, but we
have various options available to us, including:
* Define rich classes at the server (exposed directly as e.g. the return
value from [WebMethod] functions), then use WSDL.exe to extract a
representation of those objects to use at the client
* Using datasets
* Using a hand-crafted, documented schema (presumably xml) on the
web-service and manually constructing (separate) rich objects at both ends
* Not using objects on the web-service, but simpler
"parameter-per-property" based invokes
* Others

Personally I favor the first object, as it
a: best fits my (pre-conceived? naive?) ideas of OO
b: doesn't bind the client and server too closely together (i.e. I could
probably call the web-service from a VB6 or Java client if I wanted - no
dependency on the more complex dataset object, and no dependency on a .Net
client (as would exist if I did binary serialization))
c: seems reasonably efficient code-wise, as I don't need to write all my
own code to stub out the client objects and web-service methods (WSDL.exe
does that for me)
d: allows me to pass complex data in a single round-trip to the server,
rather than multiple calls which would then need more complex transaction
management
e: thanks to the BindingSource and the flag to WSDL.exe that enables
INotifyPropertyChanged, meets all of my UI data-binding needs
f: avoids messing with datasets, which (maybe incorrectly) I percieve as
slightly messy and less efficient that performing my own database access
at the server

OK, this means that at the client I have objects with reduced
functionality (arrays instead of object-collections), but in the few cases
where I genuinely need something more sophisticated I can always wrap it
in a facade or other wrapper, so no huge issue here.

---

So - before I go to town, am I barking up the wrong tree? Am I making my
life hard for the future, or is this a reasonable approach? I don't have
any immensely complex/specialized requirements, so it should be similar to
other peoples experiences...?

All thoughts appreciated.

Marc

Dec 14 '05 #2
I would be interested in that paper - while I admire the central nature of
this approach, doesn't this *significantly* increase the bandwidth and
latency of the application? An interesting discussion.

Marc

"Radek Cerny" <ra*********@c1s.com.au> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Marc,

the approach we take is to have all functionality (eg business rules,
persistence, everything) reside on the server, and deploy purely as Web
Services. This allows for rich [but thin] client access, AJAX browser
access, SmartPhone, PDA, B2B etc.

It has taken a while (many many years actually) to develop a
framework/platform for building systems like this, but it has paid off, as
we can now deploy any business functionality (eg ERP, CRM, Financial)
purely as hosted Web Services.

The client simply has access to server objects - objects in the pure sense
being Fields and Methods. A change to a text box, click of a checkbox etc
results in an a request to the server to make the corresponding change
(<Delta field="FirstName" value="Fred"/> for a Textbox called
'FirstName'); business rules are executed, validation, calculations, calls
to the persistent store etc and the net results are sent back to the
client for distribution (eg <Field id="FullName" value="Smith,Fred"/> if
there was a server rule that made FullName = LastName +","+ FirstName).
Methods are invoked similarly (reflection on the server is used) and
repeating data for display in grids and listviews has a particular schema
that the client understands.

Our server sessions are Stateful, so no cookies or state restoration is
required (a parameter of the calls is SessionID)..

I have a Whitepaper if you're interested.

Good luck,

Radek

"Marc Gravell" <mg******@rm.com> wrote in message
news:eg**************@TK2MSFTNGP11.phx.gbl...
Kind of an open question on best-practice for smart-client design. I'd
really appreciate anyones views (preferably with reasoning, but I'll take
what I get...). Or if anybody has any useful links on the subject? (and
yes, I have already googled it at length, but still no strong decision)

=============

After a long stint of pure-desktop / pure-server applications, I'm
currently working on a number of smart-client projects in C# using .Net
2.0.

Obviously we need to do our data access through the web-service, but we
have various options available to us, including:
* Define rich classes at the server (exposed directly as e.g. the return
value from [WebMethod] functions), then use WSDL.exe to extract a
representation of those objects to use at the client
* Using datasets
* Using a hand-crafted, documented schema (presumably xml) on the
web-service and manually constructing (separate) rich objects at both
ends
* Not using objects on the web-service, but simpler
"parameter-per-property" based invokes
* Others

Personally I favor the first object, as it
a: best fits my (pre-conceived? naive?) ideas of OO
b: doesn't bind the client and server too closely together (i.e. I could
probably call the web-service from a VB6 or Java client if I wanted - no
dependency on the more complex dataset object, and no dependency on a
.Net client (as would exist if I did binary serialization))
c: seems reasonably efficient code-wise, as I don't need to write all my
own code to stub out the client objects and web-service methods (WSDL.exe
does that for me)
d: allows me to pass complex data in a single round-trip to the server,
rather than multiple calls which would then need more complex transaction
management
e: thanks to the BindingSource and the flag to WSDL.exe that enables
INotifyPropertyChanged, meets all of my UI data-binding needs
f: avoids messing with datasets, which (maybe incorrectly) I percieve as
slightly messy and less efficient that performing my own database access
at the server

OK, this means that at the client I have objects with reduced
functionality (arrays instead of object-collections), but in the few
cases where I genuinely need something more sophisticated I can always
wrap it in a facade or other wrapper, so no huge issue here.

---

So - before I go to town, am I barking up the wrong tree? Am I making my
life hard for the future, or is this a reasonable approach? I don't have
any immensely complex/specialized requirements, so it should be similar
to other peoples experiences...?

All thoughts appreciated.

Marc


Dec 14 '05 #3
Bandwidth usage is minimal - firstly the sessions are stateful so its only
Deltas that are exchanged, and that traffic is gzipped using SOAP extensions
anyway. High latency does hurt, but anything better than 200ms is fine, and
under 500ms usable.
We have several live clients, some using PDA (O2 XDA II) devices in realtime
via GPRS as well as Rich Windows clients.

We are looking forward to playing with XAML - I believe the server could
publish form definitions as well as provide all of the functionality.

Whitepaper on its way to your inbox.

Radek
"Marc Gravell" <mg******@rm.com> wrote in message
news:uv*************@TK2MSFTNGP15.phx.gbl...
I would be interested in that paper - while I admire the central nature of
this approach, doesn't this *significantly* increase the bandwidth and
latency of the application? An interesting discussion.

Marc

"Radek Cerny" <ra*********@c1s.com.au> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Marc,

the approach we take is to have all functionality (eg business rules,
persistence, everything) reside on the server, and deploy purely as Web
Services. This allows for rich [but thin] client access, AJAX browser
access, SmartPhone, PDA, B2B etc.

It has taken a while (many many years actually) to develop a
framework/platform for building systems like this, but it has paid off,
as we can now deploy any business functionality (eg ERP, CRM, Financial)
purely as hosted Web Services.

The client simply has access to server objects - objects in the pure
sense being Fields and Methods. A change to a text box, click of a
checkbox etc results in an a request to the server to make the
corresponding change (<Delta field="FirstName" value="Fred"/> for a
Textbox called 'FirstName'); business rules are executed, validation,
calculations, calls to the persistent store etc and the net results are
sent back to the client for distribution (eg <Field id="FullName"
value="Smith,Fred"/> if there was a server rule that made FullName =
LastName +","+ FirstName). Methods are invoked similarly (reflection on
the server is used) and repeating data for display in grids and listviews
has a particular schema that the client understands.

Our server sessions are Stateful, so no cookies or state restoration is
required (a parameter of the calls is SessionID)..

I have a Whitepaper if you're interested.

Good luck,

Radek

"Marc Gravell" <mg******@rm.com> wrote in message
news:eg**************@TK2MSFTNGP11.phx.gbl...
Kind of an open question on best-practice for smart-client design. I'd
really appreciate anyones views (preferably with reasoning, but I'll
take what I get...). Or if anybody has any useful links on the subject?
(and yes, I have already googled it at length, but still no strong
decision)

=============

After a long stint of pure-desktop / pure-server applications, I'm
currently working on a number of smart-client projects in C# using .Net
2.0.

Obviously we need to do our data access through the web-service, but we
have various options available to us, including:
* Define rich classes at the server (exposed directly as e.g. the return
value from [WebMethod] functions), then use WSDL.exe to extract a
representation of those objects to use at the client
* Using datasets
* Using a hand-crafted, documented schema (presumably xml) on the
web-service and manually constructing (separate) rich objects at both
ends
* Not using objects on the web-service, but simpler
"parameter-per-property" based invokes
* Others

Personally I favor the first object, as it
a: best fits my (pre-conceived? naive?) ideas of OO
b: doesn't bind the client and server too closely together (i.e. I could
probably call the web-service from a VB6 or Java client if I wanted - no
dependency on the more complex dataset object, and no dependency on a
.Net client (as would exist if I did binary serialization))
c: seems reasonably efficient code-wise, as I don't need to write all my
own code to stub out the client objects and web-service methods
(WSDL.exe does that for me)
d: allows me to pass complex data in a single round-trip to the server,
rather than multiple calls which would then need more complex
transaction management
e: thanks to the BindingSource and the flag to WSDL.exe that enables
INotifyPropertyChanged, meets all of my UI data-binding needs
f: avoids messing with datasets, which (maybe incorrectly) I percieve as
slightly messy and less efficient that performing my own database access
at the server

OK, this means that at the client I have objects with reduced
functionality (arrays instead of object-collections), but in the few
cases where I genuinely need something more sophisticated I can always
wrap it in a facade or other wrapper, so no huge issue here.

---

So - before I go to town, am I barking up the wrong tree? Am I making my
life hard for the future, or is this a reasonable approach? I don't have
any immensely complex/specialized requirements, so it should be similar
to other peoples experiences...?

All thoughts appreciated.

Marc



Dec 14 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Zach Martin | last post by:
Working on developing a smart client application and I am trying to get past one nasty stumbling block. Hoping someone with previous smart client deployment experience can steer me in the right...
18
by: cjl | last post by:
Hey all: I know that it is silly in the age of Google to 'lose' something on the internet, but I recently checked out a project that had implemented a database with a subset of SQL in pure...
2
by: Jeff | last post by:
Please note this is NOT a rant or complaint! And yes, I'm over-simplifying, but intentionally. Here goes... With ASP.NET Web applications I like that I can access data from anywhere without...
10
by: Pieter Coucke | last post by:
Hi, What's in general the most performant for a VB.NET Windows Forms (2.0) application: - a fat client (everything one the client, the server hosts only the database) - a smart client (an...
1
by: Rasheed | last post by:
We are building a smart client application (.NET 2.0) which uses Web Services to access the business objects. Services: The Web Services have been secured by brokered authentication using X509...
33
by: Ney André de Mello Zunino | last post by:
Hello. I have written a simple reference-counting smart pointer class template called RefCountPtr<T>. It works in conjunction with another class, ReferenceCountable, which is responsible for the...
0
by: Ekart Laszlo | last post by:
Hi, there We have currently a Java Applet based solution that we would like to rewrite to a .NET solution. The scenario is the following: 1. Starter Client application opens up a web browser...
54
by: Boris | last post by:
I had a 3 hours meeting today with some fellow programmers that are partly not convinced about using smart pointers in C++. Their main concern is a possible performance impact. I've been explaining...
2
by: DotNetGuy | last post by:
I have developed a data access layer in my web site application by using web client software factory and put it in my business module as a service. The question is: Is it a good option to reuse...
0
by: Rina0 | last post by:
Cybersecurity engineering is a specialized field that focuses on the design, development, and implementation of systems, processes, and technologies that protect against cyber threats and...
0
by: erikbower65 | last post by:
Using CodiumAI's pr-agent is simple and powerful. Follow these steps: 1. Install CodiumAI CLI: Ensure Node.js is installed, then run 'npm install -g codiumai' in the terminal. 2. Connect to...
0
by: erikbower65 | last post by:
Here's a concise step-by-step guide for manually installing IntelliJ IDEA: 1. Download: Visit the official JetBrains website and download the IntelliJ IDEA Community or Ultimate edition based on...
14
DJRhino1175
by: DJRhino1175 | last post by:
When I run this code I get an error, its Run-time error# 424 Object required...This is my first attempt at doing something like this. I test the entire code and it worked until I added this - If...
0
by: Rina0 | last post by:
I am looking for a Python code to find the longest common subsequence of two strings. I found this blog post that describes the length of longest common subsequence problem and provides a solution in...
5
by: DJRhino | last post by:
Private Sub CboDrawingID_BeforeUpdate(Cancel As Integer) If = 310029923 Or 310030138 Or 310030152 Or 310030346 Or 310030348 Or _ 310030356 Or 310030359 Or 310030362 Or...
0
by: lllomh | last post by:
Define the method first this.state = { buttonBackgroundColor: 'green', isBlinking: false, // A new status is added to identify whether the button is blinking or not } autoStart=()=>{
0
by: lllomh | last post by:
How does React native implement an English player?
0
by: Mushico | last post by:
How to calculate date of retirement from date of birth

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.