Layers

G

Guest

I have a web site which offers services that will be used both by end users
and other web apps.

Is it generally a good idea to put a Service Interface layer of web services
on top of my Business Logic layer and let the Presentation layer (as well as
other apps of course) use these web services for every little thing it wants
to do?


Thanks!
 
G

Guest

Hi Bevo,

IMHO, No.

Web services and related distributed technologies should ideally be used
when you have two *separate* applications, which should talk to each other.
Also, they are used when you don't want these applications to be dependent on
each other - changes in one app should not affect the other, because we have
a mutual contract.

IMO, what you should do is to introduce a Facade layer above the Biz Logic
layer, which would expose business methods. The facade should abstract
details on what all biz objects are created and what all methods were invoked
to execute the biz process.

All the above layers would act as clients of this Facade; the client's
should ideally know the existence of only the facade and no biz logic classes.

After you do this, whether to have web service, smart client app, or a web
app as a client of this facade should be a decision you should make according
to your application architecture.

For example, if your app would be used in an intranet, you would probably
use a smart client app and all the layers would be present in the client
machine itself. However, if you require the biz processes to execute in a
separate machine, you could have a Windows service which would expose the
Facade as a remotable object to which the smart client applications would
connect. As evident, such a layering approach gives a lot of flexibility.

HTH,
 
A

Andy

Hi Rakesh,

Just was curious, what is the purpose of the Facade layer? I know its
to shield the app from changes to the business layer.. but at some
point the business layer will have changed enough that the facade will
have to be changed too, would it not?

I also thought that if you had a good BL design, it should be stable
enough that there won't be many breaking changes anyway; after all, if
you're breaking your object design often enough, it would seem to
indicate that there's not a clear grasp of the business rules; would
you agree?

Andy
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top