Saturday, September 09, 2006

auto-webservice without “4-CRUD or 1-Execute” limitation and without strong typed collections

vikas has a good (I would say the best) design:
http://www.blogger.com/comment.g?blogID=11393788&postID=115750673939699075

---- It has real webservice interfaces, but the web services are also used as if they were remoting (hence "auto"), without extra constrains on those interfaces; and without special strong typed collections.


-----------------------------------------Below are short blog comment-dialogs
---Object Manager?
---Yes, I checked your diagram again. CSLA's "Data portal" corresponds to the whole objectManger-WebService-GateWay mechanism.

I wonder why you do not simply adopt CSLA’s datdaportal? I am really curious.

Is it the “4-CRUD or 1-Execute” limitation (and all those "criteria, exists" workarounds)? To me, the “4-CRUD or 1-Execute” limitation is very serious, because it tends to twist the domain model.

I like your design: you use code generation to remove the problem of the “4-CRUD or 1-Execute” limitation. “Emit” is also good; just timing, maintenance, flexibility tradeoffs -- also, we need to do the code generation anyway (I am too addict to aop; code generation is more flexible and down-to-earch).

The simplest way is to remove "dataportal" and ignore the limitations/workarounds; because most of time, we use either web or two-tier winform, no "app servers"/web services. We can always add that mechanism when we really need it. However, as you said, if you have it, why not use it, to make all things consistent.


---We would be left with 0 strong typed collections after that.
---wow!!!

-----------
No “4-CRUD or 1-Execute” limitation, no strong typed collections – congratulations, your design is one of the very few best!!!

6 Comments:

Anonymous Anonymous said...

Interesting blog.

Why don’t some people like Dataportal, even though I love it?

1. It is Complex

2. Not everyone believes in Mobile object philosophy

3. Not everyone buys that Business Logic and Data Logic should in one place and mobile object acting as Business object as well as Data object.. Too revolutionary for most of people that I have come across. When I discussed this concept first time with fellow architects, I got the looks that I was talking about some science fiction or I have gone crazy.

4. ‘Not built here’ Mindset

5. Not Web Service Friendly. DTO works better for Web Service. Data Portal Solution in Rocky’s word follow the letter not the spirit


Don’t get misguided by all this, it is still an excellent educational framework and one can use dozens of techniques from this framework in any situation. Thank God that it is not a silver bullet. Otherwise lot of us would be working at gas station.

Feel free to correct me.

Chris. :)

9/10/2006 08:36:00 PM  
Blogger survic said...

I agree that it is an "excellent educational framework".

You did not mention the "4-crud and 1-execute (and criteria/exist)" limitations or workarounds. I guess you feel it is OK, or, even believe they are "features" of "OO" ("objects are determined by behaviors" ...).

And, so many strong typed collections. I know both are tough issues. However, I do not believe they are features.

9/10/2006 10:12:00 PM  
Anonymous Anonymous said...

I think that I understand your point. Are you talking about framework condensing your communication between business layer and data layer into only five methods signatures?
That may work or may work very well for short to medium projects but can be very suffocating for large enterprise project. For enterprise project, I would not like framework to put this condition.
This brings me to another point about CLSA. What do you think about CLSA use of inheritance? Fact is you business object/collection has to inherit from Businessbase/BusinessListBase.
So your business object cannot inherit from any other class. I know the workarounds.
To be fair, CSLA does provide interfaces. But then you will have two frameworks. One is CLSA framework and one you implement using interfaces.

How do you maintain equilibrium between framework’s richness and programmer’s maneuverability and innovation? Rocky rightly demonstrated an educational rich framework which may work for short to medium projects. But I don’t know about enterprise projects. What do you think?

What do you think of new rule manager using delegate? Rule Manager has been an excellent feature of CSLA (Don’t know about the new one)

Chris

9/13/2006 05:00:00 PM  
Blogger survic said...

Inheritance:

I agree with you, ("But then you will have two frameworks. One is CLSA framework and one you implement using interfaces."). So, it is not a simple interface/inheritance dichotomy issue. It is a tougher issue: see my blog:
http://survic.blogspot.com/2006/09/can-we-use-aop-to-mix-in-databining.html#links


I believe that CSLA, with code generation, can be used in enterprise -- if you are determined so that you can re-train yourself (the team) to adapt to a object model that has “4 or 1” dataportal methods only (note that that strongly typed collections are not inherent with CSLA).

Objectively, it is not big deal. It has a nice name: command-based distributed computing. It was very popular on Java before J2EE and early J2EE.

As to me, I just remove the dataportal, and ignore the whole “4 or 1” and criteria/exists.

Once you do that, it is wonderful: freedom -- when you need remoting, then, just add a generated layer to it, as Vikas did. http://vikasnetdev.blogspot.com/2006/09/why-do-i-perfer-custom-collection-over.html


I would like to further simplify it, so that I can claim, honestly, that the base is indeed “a simple utility-like base”. I guess "undo" should be removed. Also, I would rather remove the differences between parent/child, readonly stuff (all switchable and all read-write).

Rule manager is good. The “classic switch based” is actually fine. The new one is better, a little.

As you can see, I value it highly -- I criticize it simply because it is part of my “core" -- when there is a problem, it really annoys me.

9/14/2006 03:52:00 PM  
Blogger Vikas said...

Undo feature is not going anywhere
1. Rocky's first love as one could sense from his writings is Windows Form. It is an essential feature foe Windows Form based application.

2. As CSLA is intended to be educational framework, It demonstrates how custom attributes, reflection and AOP can used to build a strong and powerful framework.

So Survic, you have to learn to love this feature, not only live with it :)

9/18/2006 05:24:00 PM  
Blogger survic said...

I also know Rocky will not remove undo. I just need to find a way to cut it off cleanly -- just like cutting off the dataportal – Rocky will never remove it, and use an “emit” approach.

I believe undo is an over design. For database applications, windows build-in undo is more than enough.

Also, CSLA does not use AOP, although it is a gold mine for AOP to take advantage of.

You can say that the way I teat CSLA (tearing it apart and using its parts), may support the idea that it is educational. However, I believe CSLA is more than that, because I “copy” it a lot. It is one of the best of a few real architectures with a few untypical (or typically not optimal) design decisions; fortunately, pieces based on those decisions can be avoided by tearing it apart.

9/21/2006 07:57:00 PM  

Post a Comment

Subscribe to Post Comments [Atom]

<< Home