473,573 Members | 2,950 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 objectorientati on 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
- synchronisatzio n 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 3182

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**@nni t.com]
Posted At: Wednesday, December 29, 2004 1:13 PM
Posted To: microsoft.publi c.dotnet.framew ork.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 objectorientati on 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
- synchronisatzio n 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.co m> wrote in message
news:#5******** ******@TK2MSFTN GP12.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 objectorientati on 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
- synchronisatzio n 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.co m> wrote in message
news:ue******** ******@tk2msftn gp13.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.co m> wrote in message
news:#5******** ******@TK2MSFTN GP12.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 objectorientati on 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
- synchronisatzio n 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 interoperabilit y 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 interoperabilit y 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.co m> wrote in message
news:%2******** ********@TK2MSF TNGP12.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 objectorientati on 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
- synchronisatzio n 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
2069
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 article: Microsoft Knowledge Base Article - 819267 INFO: HTTP GET and HTTP POST Are Disabled by Default ...
2
4568
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 Here's the scenario: 1. .NET Windows Client on a remote machine makes a web service call to update tables on a Web Server running SQL Server...
5
1768
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 develop for ASP.NET/Webservices without IIS installed on your local box without having to resort to more difficult debugging or using notepad for...
2
1747
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# that are currently being used by the website. Is there a quick/ rad tool that can take a c# class and generate a webservice proxy/asmx file? Any...
8
3999
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 specific business needs When such a lock is made for a transaction (this code is in the web service) and the handhelds are terminated abnormally (cold...
1
1155
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 Visual Basic and SQL Server. We plan to move forward to the .NET environment. We plan to develop applications with ASP.NEt as well as VB.NET. ...
5
1836
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 site 50 miles away from the main one. The second site will simply be a stores. They will need some software in order to do a few things here, but...
6
1630
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 secure? I always thought of webservices as just a good way to allow users to have an API for them to interact with the database, but are webservices...
1
1695
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 webservices. The questions are, do we have to modify the source code? Or can we work with the existing .exe and dll files to make them webservices? We...
0
7699
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
8027
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8202
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
6421
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
0
5292
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3733
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3733
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2216
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
1041
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.