473,386 Members | 1,943 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

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

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 3171

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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
by: Joseph Geretz | last post by:
I recently upgraded my server to Windows 2003. The first thing I noticed is that my sample WebService pages no longer worked. The Invoke test button is missing. This is addresed by the following KB...
2
by: Chris Langston | last post by:
I have a Web Server running IIS 5 or 6 on Windows 2K and Windows 2003 Server that is experiencing strange shutdown problems. We are using ASP.NET v1.1 and our application is written in VB.NET ...
5
by: cyberstrike | last post by:
Hi guys, my company was wondering if it's possible to develop ASP.NET/Webservices easily using a IIS installed on a server instead of installing IIS locally on the development boxes. Can you...
2
by: news.microsoft.com | last post by:
I have been looking around at the documentation and have come across a lot about how to create webservices and consume them. I have a fairly large 3 tier application with a ton of classes in c#...
8
by: Komandur Kannan | last post by:
We have a smart device application running on handhelds(Symbol MC9000G). The backend is Oracle and a middle tier web services development done in Vb.net. We use pessimistic Locking due to...
1
by: Jothi | last post by:
Hi, We are a small application development group. We have about 100 Users who primarily use Microsoft Related Products. Our Application Development was purley based on a CLient Server Model using...
5
by: ChrisM | last post by:
Hi, I have written a stand alone WinForms application with an MS Access back-end for the (small)company I work for. They are now talking about moving a part of their operations into a second...
6
by: =?Utf-8?B?Q3JhaWc=?= | last post by:
If I have an application that I send out to users, and the application interacts with the database (behind the scenes, no direct sql creation by the users)....do webservices make the app more...
1
by: ybi10 | last post by:
Hi, We have a product implmented with .NET (C#) as an application, it is released as .exe file plus .dll files. Now we want to make it as webservices, i.e. to make some of it's methods as...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

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.