468,268 Members | 1,586 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,268 developers. It's quick & easy.

3-tier application with webservices, objectoriented?

Hi there!
Im trying to build a 3 tier application that uses a smartclient in the
"view" layer.
The communication between the smartclient and the server should be
webservices because of potentiel firewall issues.
Iīve looke at to smartclient demos to figure out how the experts do the
stuff, design and overall architecture, Microsofts IssueVision and
TaskVision.

These applications uses DataSetīs to communicate between the layers and
binds these Datasetīs directly to the UI. The approach seems to get you "up
and running" very fast. However, from my point of view, thisapproach is not
very "objectoriented". No Businessobjects encapsulating business rules and
so on.
Iīm not trying to start a religious discussion about objectorientation vs.
proc. programming, I just donīt get it!
In my application we have tons of business rules and transformation of data,
where should we put this logic if we go for an design like the demos
mentioned above?

I could define and instantiate my custom Business objects on the client that
were instantiated from a DataSet (the dataset is returned from som
webservice). However, in this kind of approach i loose all the benefits from
the DataSet in e.g.

- ease of Binding to win controls
- synchronisatzion with the server, update, delete etc.

Do you have any good advices or links to articles demos?
Thanks!

Best regards niclas




Nov 23 '05 #1
4 2961

I don't have any good links, just my own opinions ;)

You're absolutely right. The DataSet is not object oriented, gets you up
and running fast and helps tremendously with DataBinding. For many
simple, data driven applications, that's an acceptable set of
trade-offs.

However, if you're looking at more complex apps then you're right about
asking for more. You have some data binding support in windows forms for
classes with properties, but unfortunately VS.NET and wsdl.exe don't
create such classes until the VS 2005 release. You can look at wscf [0]
to generate classes with properties instead of fields. In VS 2005 the
whole object-oriented aspect of data binging improves, but that probably
doesn't help you today.

With regards to where you're business logic should go, the answer is
always the same: In the services layer. Smart clients enable richer user
interaction, but that should be it. You are adding quite a bit of
maintenance liability if you deploy business logic to the client. That
logic should still remain on the middle tier, which is exposed through
the service layer.

Now, you as the designer have to decide how complex your business logic
is and what the benefits of OO are to your application and then if those
benefits are worth losing the benefits of weak typing and DataSets.
Generally, I am very much for strongly typed service interfaces, which
DataSets do not provide. You may want to look at typed datasets as some
form of compromise.

HTH,
Christoph Schittko
MVP XML
http://weblogs.asp.net/cschittko
[0]
http://www.thinktecture.com/Resource...irst/default.h
tml

-----Original Message-----
From: nixon [mailto:ni**@nnit.com]
Posted At: Wednesday, December 29, 2004 1:13 PM
Posted To: microsoft.public.dotnet.framework.webservices
Conversation: 3-tier application with webservices, objectoriented?
Subject: 3-tier application with webservices, objectoriented?

Hi there!
Im trying to build a 3 tier application that uses a smartclient in the
"view" layer.
The communication between the smartclient and the server should be
webservices because of potentiel firewall issues.
Iīve looke at to smartclient demos to figure out how the experts do the stuff, design and overall architecture, Microsofts IssueVision 3and
TaskVision.

These applications uses DataSetīs to communicate between the layers and binds these Datasetīs directly to the UI. The approach seems to get you "up
and running" very fast. However, from my point of view, thisapproach is not
very "objectoriented". No Businessobjects encapsulating business rules and so on.
Iīm not trying to start a religious discussion about objectorientation vs. proc. programming, I just donīt get it!
In my application we have tons of business rules and transformation of
data,
where should we put this logic if we go for an design like the demos
mentioned above?

I could define and instantiate my custom Business objects on the client that
were instantiated from a DataSet (the dataset is returned from som
webservice). However, in this kind of approach i loose all the benefits from
the DataSet in e.g.

- ease of Binding to win controls
- synchronisatzion with the server, update, delete etc.

Do you have any good advices or links to articles demos?
Thanks!

Best regards niclas



Nov 23 '05 #2
Hi Christoph and thankīs for your fast reply!
As you say yourself, future realease of the framework doesnīt help me here
and now, we need to find a solution right away :-)
I totally agree of putting the Business logic in the Servicel ayer, even
though I am not quite sure how to put it into practice at the moment.
I canīt see how I could avoid not duplicating business logic / code even in
a service layer approach, many of my businessrules / logic must reside in
the client layer as in the Service layer, my maintainability goes away.

Maybe I could define my Business classes with a DAO pattern, depending on
which layer a Business class is operating in (Client or Service layer) it
would have different DAO objects / implementations to persist them. The DAO
for the client business object persists the object via my Service layers
exposed webservices, uses maybe a DataSet as a value object.. The Service
layer representation of the business object uses another DAO, a object that
uses classes of the System.Data namespace to finally persist the business
object.

Or..... should i just go for the plain "simple" strongly typed Dataset
approach????

Best regards Niclas
"nixon" <ni**@nnit.com> wrote in message
news:#5**************@TK2MSFTNGP12.phx.gbl...
Hi there!
Im trying to build a 3 tier application that uses a smartclient in the
"view" layer.
The communication between the smartclient and the server should be
webservices because of potentiel firewall issues.
Iīve looke at to smartclient demos to figure out how the experts do the
stuff, design and overall architecture, Microsofts IssueVision and
TaskVision.

These applications uses DataSetīs to communicate between the layers and
binds these Datasetīs directly to the UI. The approach seems to get you "up and running" very fast. However, from my point of view, thisapproach is not very "objectoriented". No Businessobjects encapsulating business rules and
so on.
Iīm not trying to start a religious discussion about objectorientation vs.
proc. programming, I just donīt get it!
In my application we have tons of business rules and transformation of data, where should we put this logic if we go for an design like the demos
mentioned above?

I could define and instantiate my custom Business objects on the client that were instantiated from a DataSet (the dataset is returned from som
webservice). However, in this kind of approach i loose all the benefits from the DataSet in e.g.

- ease of Binding to win controls
- synchronisatzion with the server, update, delete etc.

Do you have any good advices or links to articles demos?
Thanks!

Best regards niclas



Nov 23 '05 #3
I know exactly where you're at. Its a bit "out there", but have a read of
http://www.asplications.com.au/GenieWhitePaper.pdf. It deploys business
systems as web services, accessible from Winforms, javascript/dhtml, compact
framework clients etc., anything that consumes Web Services. And not a
DataSet to be found anywhere...

"nixon" <ni**@nnit.com> wrote in message
news:ue**************@tk2msftngp13.phx.gbl...
Hi Christoph and thankīs for your fast reply!
As you say yourself, future realease of the framework doesnīt help me here
and now, we need to find a solution right away :-)
I totally agree of putting the Business logic in the Servicel ayer, even
though I am not quite sure how to put it into practice at the moment.
I canīt see how I could avoid not duplicating business logic / code even in a service layer approach, many of my businessrules / logic must reside in
the client layer as in the Service layer, my maintainability goes away.

Maybe I could define my Business classes with a DAO pattern, depending on
which layer a Business class is operating in (Client or Service layer) it
would have different DAO objects / implementations to persist them. The DAO for the client business object persists the object via my Service layers
exposed webservices, uses maybe a DataSet as a value object.. The Service
layer representation of the business object uses another DAO, a object that uses classes of the System.Data namespace to finally persist the business
object.

Or..... should i just go for the plain "simple" strongly typed Dataset
approach????

Best regards Niclas
"nixon" <ni**@nnit.com> wrote in message
news:#5**************@TK2MSFTNGP12.phx.gbl...
Hi there!
Im trying to build a 3 tier application that uses a smartclient in the
"view" layer.
The communication between the smartclient and the server should be
webservices because of potentiel firewall issues.
Iīve looke at to smartclient demos to figure out how the experts do the
stuff, design and overall architecture, Microsofts IssueVision and
TaskVision.

These applications uses DataSetīs to communicate between the layers and
binds these Datasetīs directly to the UI. The approach seems to get you

"up
and running" very fast. However, from my point of view, thisapproach is

not
very "objectoriented". No Businessobjects encapsulating business rules and so on.
Iīm not trying to start a religious discussion about objectorientation vs. proc. programming, I just donīt get it!
In my application we have tons of business rules and transformation of

data,
where should we put this logic if we go for an design like the demos
mentioned above?

I could define and instantiate my custom Business objects on the client

that
were instantiated from a DataSet (the dataset is returned from som
webservice). However, in this kind of approach i loose all the benefits

from
the DataSet in e.g.

- ease of Binding to win controls
- synchronisatzion with the server, update, delete etc.

Do you have any good advices or links to articles demos?
Thanks!

Best regards niclas




Nov 23 '05 #4
I agree with what Christoph wrote. Here's what I use as guidelines when I
choose between DataSets and an OO approach:

- If there are no interoperability requirements, and the data is needed for
display and reporting purposes, then a DataSet or a typed DataSet is fine.
If you use classes and objects when you don't really need them, then you are
paying a price without actually gaining anything.
- If there are interoperability requirements, then e.g., an array of simple
data objects is better suited than a DataSet.
- If there is non-trivial business logic involved, then a business object
class hierarchy could be the best approach. In some cases using a typed
DataSet might be a good enough an approach.

I know that this sounds pretty much like 'use objects if you benefit from
them, otherwise don't use'. But that's the way software design often goes.
There is no silver bullet that would work in every situation.

Regards,
Sami


"nixon" <ni**@nnit.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
Hi there!
Im trying to build a 3 tier application that uses a smartclient in the
"view" layer.
The communication between the smartclient and the server should be
webservices because of potentiel firewall issues.
Iīve looke at to smartclient demos to figure out how the experts do the
stuff, design and overall architecture, Microsofts IssueVision and
TaskVision.

These applications uses DataSetīs to communicate between the layers and
binds these Datasetīs directly to the UI. The approach seems to get you
"up
and running" very fast. However, from my point of view, thisapproach is
not
very "objectoriented". No Businessobjects encapsulating business rules and
so on.
Iīm not trying to start a religious discussion about objectorientation vs.
proc. programming, I just donīt get it!
In my application we have tons of business rules and transformation of
data,
where should we put this logic if we go for an design like the demos
mentioned above?

I could define and instantiate my custom Business objects on the client
that
were instantiated from a DataSet (the dataset is returned from som
webservice). However, in this kind of approach i loose all the benefits
from
the DataSet in e.g.

- ease of Binding to win controls
- synchronisatzion with the server, update, delete etc.

Do you have any good advices or links to articles demos?
Thanks!

Best regards niclas



Nov 23 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

6 posts views Thread by Joseph Geretz | last post: by
5 posts views Thread by cyberstrike | last post: by
2 posts views Thread by news.microsoft.com | last post: by
8 posts views Thread by Komandur Kannan | last post: by
1 post views Thread by Jothi | last post: by
5 posts views Thread by ChrisM | last post: by
6 posts views Thread by =?Utf-8?B?Q3JhaWc=?= | last post: by
reply views Thread by NPC403 | last post: by
reply views Thread by kermitthefrogpy | last post: by
reply views Thread by zattat | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.