Ayende @ Rahien

Unnatural acts on source code

Traditional architecture makes me flinch

I just finished drawing the following:

image

It makes me feel dirty inside, to do so. Mostly because I really don’t like or believe in building applications in this manner anymore. I would really like to be able to do this:

image

Unfortunately, I am talking about another subject in the context where I am showing the first architectural diagram, and I need to present only a single new concept at a time.

Comments

Frank Quednau
02/06/2010 10:18 AM by
Frank Quednau

In what way does it make you feel dirty? The 2 diagrams show 2 different things....the first one shows a possible technical implementation while the latter looks at it from a concerns/services/domain perspective.

Ayende Rahien
02/06/2010 10:29 AM by
Ayende Rahien

Frank,

Because in 99% of the cases, people look at the first diagram and see it as both logical and physical diagrams

Demis Bellot
02/06/2010 11:19 AM by
Demis Bellot

Looks like a standard SOA setup to me. Whack an interoperable XML+HTTP interface in-front of each service and you're good to go.

I've been developing in this way for years (and ServiceStack is really tuned for this) of easily building multiple autonomous services. This architecture involves a little mind shift, i.e. instead of developing a service for your smart client, you develop re-usable services for your business which your smart client happen to use.

Kevin Steng
02/06/2010 01:58 PM by
Kevin Steng

I believe that people are using this approach with the old vision of 3 tiers.

Many people want to have an application server to put all logic inside (rules, domain models, services, etc.). If you notice, "business logic" is just a wrapper to the Data Access. So, any operation that will be executed, they will pay the overhead of distributed communication.

I implement my software like second image, and I put some functionality in the application server if really needs.

Udi Dahan
02/06/2010 02:27 PM by
Udi Dahan

Don't you see the client as a composite of those things as well?

Edin
02/06/2010 02:32 PM by
Edin

These two diagrams are not mutually exclusive, since they represent two different things...

ivos
02/06/2010 03:25 PM by
ivos

Maybe you can show the second diagram and say something like "ok, let's take 'catalog' as example and work on the implementation. It will be an application server with WCF and NHibernate" and you put the first diagram there.

Ayende Rahien
02/06/2010 03:43 PM by
Ayende Rahien

Udi,

Yes & No.

I can argue for the client being a composite of those or just a client of them.

Vagif Abilov
02/06/2010 04:05 PM by
Vagif Abilov

I agree with some other comments that these two diagrams represent two different things. Although there are cases when application is implemented as 1, and it should have been 2. Or vice versa.

But perhaps you can give some more specific examples?

One other thing. Don't you see a bigger danger for spaghetti code in (2)? People can bend a definition of a smart client and end up in a real mess. While (1) leaves more room for maintainable design.

Ollie Riches
02/06/2010 07:39 PM by
Ollie Riches

Surely one is management and the other is for the enlightened ;)

Ajai Shankar
02/06/2010 10:03 PM by
Ajai Shankar

Ayende

Can you please elaborate a bit more? Especially "I really don’t like or believe in building applications in this manner anymore"

I've had the misfortune of being a spectator to the destruction of an MVC application built using NH, Castle & Rhino Commons.

It already had distinct logical services that operated on the same domain objects which were later converted to WCF, DTO, and buses that took you nowhere.

Is your context just that of smart/rich clients?

If so is the second scenario exposing say distinct (WCF) services that handle specific areas of functionality?

By the way, even the latest rich client panacea from Microsoft (RIA services) seems to be hung up on enabling CRUD & change tracking!

Ajai

Greg Law
02/07/2010 06:34 AM by
Greg Law

Are you breaking up the second diagram between the "smart client" and the services that the client needs? I'm assuming that you're going to back to a discussion a while back in which you advocated presenting a service layer to any clients that need access to the data store.

If you can find the time, I'd like to read more of your thoughts on this as well because I get the impression I'm missing something.

Paul
02/07/2010 09:08 PM by
Paul

So you want your smart client to be a smarter client. But what about business logic as it relates to multiple clients accessing the same model ? That logic really needs to reside on an app server.

Deyan
02/08/2010 08:29 AM by
Deyan

As Paul mentioned, I would also be cautious to put too much orchestration logic in the (too) smart client ...

Greg
02/20/2010 09:03 PM by
Greg

Isnt this about the same as DDD bounded contexts?

Ayende Rahien
02/20/2010 09:07 PM by
Ayende Rahien

Greg,

Partially, I don't like to think in DDD terms, though

Marian Kostal
02/24/2010 08:54 AM by
Marian Kostal

It's like layers/tiers and modules. This can be seen e. g. in WCSF.

Comments have been closed on this topic.