"Marco Pais" <marco.pais[at]gmail.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
Hello.
This post is long, but I think that's a pertinent question for many
people.
I built a client/server application using .NET and SQL server, a 2 tier
application. This first version was built in a rush, so its architecture
is not well designed for the company growth.
>
Some weeks ago, I decided to separate the data from the presentation tier
and include the so named Business Logic Layer. This is a pretty name. and
I can understand pretty well its value. My goal is to facilitate the
change of processes, with transparency to the client. This is one of the
interpretations of SOA.
<http://www.google.com/search?hl=en&pwst=1&sa=X&oi=spell&resnum=0&ct=resu lt&cd=1&q=books+on+soa+architecture&spell=1>
You need to find a good book to start with and understand the concepts of
SOA.
You need to think about this very carefully, as I just came off of a SOA WCF
solution that was a total nightmare that was not transparent to the client
and didn't allow for new clients being implemented and using the SOA
solution easily with growth. The solution was not thought out well, a total
nightmare to maintain or implement new enhancements -- a total nightmare,
and it showed what not to do.
>
What did I use for this layer? Web Services. This WS access database
through the call of Stored Procedures. My headaches started here. Is this
a good solution?
Well, you can have problems in getting that data to/from the UI/Bus/WS/Data
access tiers, and again you need to think about how you're going to do this.
You might want to look at something like nHibernate or other such tools to
faciliate data acess and/or with native calls to SQL server too. And you can
still use Strored Procedures with both solutions.
>
I read and I'm still reading several points of view. the are a lot of
opinions J
Java was here first, which has many books on SOA that can be applied to .Net
too as a starting point on how to do things, along with .Net books as well.
You need to find some good books that will give you a good concept.
>
Concerning the technology used, I am also very confused. This company has
several connected processes. So I built a single class in a WS with
several methods (business services), so those processes can connect
through the use of those services/methods.
What's stopping you from having more than one WEb service? The Web service
should only be the means of sending data between the BUS and DAL tiers to
begin with by the use of serialised objects between the tiers.
>
For instance I have a CAR. There's a method to get car data from database,
and another one to update car data. Two methods. You will say: use a CAR
OBJECT with appropriate methods. That's were I have some doubts. I can
only have one class in a web service, right? At least, that's what WS
config says:
You use serialized XML objects, which can be in a binary format --
serialize/deserialize objects. The objects contain their on properties and
methods that will be acted upon.
>
<%@ WebService Language="C#" CodeBehind="~/App_Code/Service.cs"
Class="Service" %>
What are the best practices? Where can I find better resources for this
kind of development?
Look above and use Google. You'll find the books.
I also would suggest looking into MVP. You should think interfaces, and the
UI should be unaware of the bussiness layer - a loosly coupled solution,
which allows for easy testing, implementation and growth of the solution.
You can use a test harness and you test against the interfaces.
MODEL-VIEW-PRESENTER
http://www.polymorphicpodcast.com/
click 'Shows'
click 'Design Patterns Bootcamp: Model View * Patterns*
view parts 1-5
You can use Google to get more information about this or find books.
You may want to get the book, download the CSLA framework code, and download
the project code that uses the CSLA framework to get concepts. It's got all
that you're looking for to learn on the howto(s) in many areas. As a matter
of fact, I came off a WS SOA project that used CSLA which is free to
implement in a company. You just can't develop a solution using CSLA as sale
the solution using CSLA.
http://www.lhotka.net/