Sunday, February 04, 2007
« Next CSLA .NET training class: Feb 26-28... | Main | Help requested with weird ASP.NET custom... »

It seems that people are always looking for The Next Big Thing™, which isn’t surprising. What I do find surprising is that they always assume that TNBT must somehow destroy the Previous Big Thing™, which in the field of software development was really object-orientation (at least for most people).

 

Over the past few years Web Services and then their reincarnation as SOA or just SO were going to eliminate the use of OO. As more and more people have actually implemented and consumed services I think it has become abundantly clear that SOA is merely a repackaging of EAI from the 90’s and EDI from before that. Useful, but hardly of the sweeping impact of OO, at least not in the near term.

 

Though to be fair, OO took more than 20 years before it became remotely “mainstream”, and even today only around 30% of developers (based on my informal, but broad, polling over the past couple years) apply OOD in their daily work. So you could question whether OO is “mainstream” even today, when the vast majority of developers use procedural programming techniques.

 

Even though the majority of .NET and Java developers don’t actually use OO themselves, both the .NET and Java platforms are OO throughout. So there’s no doubt that OO has had an incredible impact on our industry, and that it has shaped the major platforms and development styles used by almost everyone.

 

So perhaps in 15-20 years SO really will have the sweeping impact that OO has had on software development. And I’m not sure that would be a bad thing, but it isn’t a near-term concern.

 

However, I was recently confronted by a (so-called) newcomer: workflow. Yes, now workflow (WF) is going to kill OO, or so I’ve been told. In fact, Through indirect channels, my challenger suggested that the CSLA .NET framework is obsolete going forward because it is based on these “old-school” OO concepts.

 

Obviously I beg to differ :)

 

It is true that some of the concepts I employ in CSLA .NET are quite old, but I am not ready to through OO into the “old-school” bucket just yet... The idea is somewhat ironic however, because WF is being put up as The Next Big Thing™. Depressingly, there's virtually no technology today that isn't a rehash of something from 20 years ago. That's more true of SOA and WF than OO. Remember that SOA is just repacking of message-based architecture, only with XML, and workflow is an extension of procedural design and the use of flowcharts. At least OO can claim to be younger than either of those two root technologies.

 

Personally, I very much doubt the use of objects as rich behavioral entities will go away any time soon. Sure, for non-interactive tasks procedural technologies like WF might be better than OO (though that's debatable). And certainly for connecting disparate systems you need to use loosely coupled architectures, of which SOA is one (but not the only one).

 

But the question remains: how do you create rich, interactive GUI applications in a productive and yet maintainable manner?

 

Putting your logic in a workflow reduces interactivity. Putting your logic behind a set of services reduces both interactivity and performance. Putting your logic in the UI is "VB3 programming". So what's left? For interactive apps you need a business layer that can run as close to the user as possible and using business objects is a particularly good way to do exactly that.

 

Neither WF nor WCF/SOA are, to me, competitors to CSLA. Rather, I see them as entirely complimentary.

 

Perhaps ADO.NET EF and/or LINQ are competitors - that depends on what they look like as they stabilize over the next several months. Everything I’ve seen thus far leads me to believe these technologies are complimentary as well. (And Scott Guthrie agrees – check out his recent interview on DNR) Neither of them addresses the issues around support for data binding, or centralization of business logic in a formal business layer.

 

But when it comes to SOA I still think it is a “fad”. It is either MTS done over with XML - which is what 95% of the people out there are doing with "services", or it is EDI/EAI with XML - which is a good thing and a move forward, but which is too complex and has too much overhead for use in a typical application. I think that most likely in 5-10 years we'll have a new acronym for it – just adding to the EDI/EAI/SOA list.

 

Just like "outsourcing" became ASP which became SaaS. The idea doesn't die, it just gets renamed so more money can be made by selling the same stuff over again - often to people who really don't need/want it.

 

The point is, our industry is cyclical. And we're heading toward into a period where "procedural programming" is once again reaching a peak of usage. This time under the names SOA and workflow. But if you step back from the hype and look at it, what's proposed is that we create a bunch of standalone code blocks that exchange formatted data. A set of procedures that exchange parameters. Dress it up how you like, that's what is being proposed by both the SOA and WF crowds.

 

And there's nothing wrong with that. Procedural design is well understood.

 

And it could actually work this time around if we don't cheat. I still maintain that the reason procedural programming "failed" was because we cheated and used common blocks and global variables. Why? Because it was too inefficient and required too much code to formally package up all the data and send it as parameters.

 

If we can stomach the efficiency and coding costs this time around - packing the data into XML messages - then I see no reason why we can't make procedural programming work in many cases. And by naming it something trendy, like SOA and/or workflow, we can avoid the negative backlash that would almost certainly occur if people realized they were abandoning OO to return to procedural programming.

 

Having spent the first third of my career doing procedural programming, I wouldn't necessarily mind going back. In some ways it really was easier than using objects - though there are some very ugly traps that people will have to rediscover again on this go-round. Most notably the trap that a procedure can't be reused without introducing fragility into the system, not due to syntactic coupling or API changes, but due to semantic coupling (about which I've blogged).

 

This is true for procedures and any other "reusable" code block like a workflow activity or a service. They all suffer the same limitation - and it is one that neither WSDL nor compilers can help solve...

 

Anyway, kind of went on a rant here - but I find it amusing that, in some circles at least, OO is viewed as the "legacy" technology in the face of services or workflow, which are even more legacy than OO ;)


Sunday, February 04, 2007 3:53:53 AM (Central Standard Time, UTC-06:00)
I couldn't agree more. The trendiness in this business is painful to watch sometimes... In the end I think the best tool that makes for a solid developer platform is a good business layer, precisely because you can plug it in just about anywhere in any of these solutions. And doing that without OO is pretty much unthinkable.

From the business layer perspective I think LINQ and the EF is one of the technologies that does look pretty exciting. Entity Frameworks have been around for a long time, but the addition of LINQ to the language will make the object mapping much more feasible especially in the context of returning list based data which has always been the sticking point with Entity frameworks. Having a natural way to retrieve data tied to the schema is key. Hopefully Microsoft can pull off the EF this time around. From the early looks of things it looks like they are on the right track...

Sunday, February 04, 2007 9:25:35 AM (Central Standard Time, UTC-06:00)
I agree with your assessment of LINQ, Rick. When you think about building a data access layer that reshapes data to fit into behavioral objects, LINQ starts looking really cool!
Sunday, February 04, 2007 11:08:15 AM (Central Standard Time, UTC-06:00)
There's no question that WF won't replace OO. This sounds a lot like the load of garbage <a href="http://www.appdev.info/?q=node/79">I ranted about</a> last night.

On the other hand, WF certainly isn't without merit. I think the most appropriate reaction is to see it as another tool in our tool box. To put it another way, it's true that WF isn't the answer to all our problems, but I do believe it's a positive step for some of them (personally, I'd like to see this technology embrace the business users a little more effectively than it does today, but I believe this will come in time).

If you ask me, the biggest benefit to the WF approach taken by Microsoft is that they're starting to componentize WF. Effective application development for me is a combination of OO design, and construction using components. Components work because they freeze an interface and let me temporarily forget about the inner complexities of the component.

Good object design accomplishes the same thing, of course, but there aren't nearly as many developers who can achieve "good" every time they approach an object design as there are developers who can learn to use a component like WF. That's the value -- components like WF become a known quantity, enabling a lot more people to achieve "good".

Sunday, February 04, 2007 3:14:49 PM (Central Standard Time, UTC-06:00)
Rocky-

I love reading your Blogs because you have such a down-to-earth perspective on how things fit together. Your comments are always very grounded in common sense...

Props aside, while I was reading this entry, a thought occurred to me. While OO is a tremendously effective way to create functionality in software, it's downfall is that it's complex.

In order to achieve "good" OO designs, I think you need to be able to view the software from two angles. 1) You need to able to view code as "planes" of functionality. The lowest level planes become the home for code that is highly reusable (lower-level base classes or toolkits), and the highest level planes become the home for code that is isolated to a specific business problem. 2) At the same time, you need to be able to view that same code from the top down and see a composite set of features - some original, some inherrited, some overridden.

But in the end, aren't we trying to use OO technologies to create a "procedural environment" or perspective for the developer? I've always seen two kinds of developers... Ones that implement business rules, and one that implement frameworks and toolkits that will provide the business developers with a simple, procedural way to write code. Procedural code has clean, clear symantics which make it easy to read and maintain. This was the true beauty of VB and it's object-based, procedural approach. OO code is wrought with design complexity that is made cloudy by the fact that when you look at the surface of a class, you can't tell which "plane" the code for a method belongs to. Good OO designs require a skill that most procedural developers struggle with. Now, that doesn't mean you can have a world with just OO developers either... It is to your advantage to leverage the skills of both kinds of developers.

As many of your comments have said, "these things are complimentary"... I see services, workflows and even OO as a means to provide "procedural" style development surfaces. Under the hood, the code to deliver the service or feature is a mix of cleanly exposed business syntax at the top, and OO technology for handling the need for clean code reuse at the bottom.

Chris
Chris Cichocki
Sunday, February 04, 2007 3:57:42 PM (Central Standard Time, UTC-06:00)
Rocky,
Even though I don't personally use your CSLA framework, I agree with many of the concepts encoded therein. The complexity of the business problems we have to solve these days requires a flexible programming paradign, and OO is it. From the get-go, OO development has sought to simulate real life, with and "Order" being referred to as an "Order" object in code. From my point of view, OO programming was an extension of procedural programming, not a replacement for it. My company's software is based on objects, but each routine in the class is a handful of procedural code. OO was not a replacement for procedural code; it was the famed "yet another layer of abstraction" on top of procedural code. OO frameworks like log4net and others create an environment where a developer can be very productive by plugging a few lines of code in the appropriate place. A developer can leverage the power of OOD without implementing it.

I don't understand the mindset that new things must always supplant the old.

I do agree about the "Fad" of SOA. I see it as a new way to create distributed systems. I don't see a fundamental difference. I like was is being done with WCF and the ideas of SOA, but I see it as another component I can leverage, not the death to all the other techniques I employ on a day-to-day basis.

Regarding workflow, SO WHAT? Workflow is as old as business programming. The old-fashioned state diagram has to be hashed out, and then the system must support the state changes, notifications, events, etc, etc. I, too, react negatively to the reaction to WF as if it is some revolutionary concept. I see it as Microsoft extending the BCL with some new capabilities; this time in the area of workflow. I'm sure it will help the many developers who don't understand how to develop for workflow scenarios (if nothing besides bringing attention to this form of programming), but it isn't a new idea, nonetheless.

Good article, Rocky. I share your opinions.
Sunday, February 04, 2007 4:11:57 PM (Central Standard Time, UTC-06:00)
D and Chris, I agree. When I say that I think WF and OO (including CSLA .NET) are complimentary, I really mean it!

I make fun of workflow, because I've been around enough to have drawn some actual flowcharts. In some ways, WF is just a technology to animate those flowcharts in a way we couldn't do when they were popular last time around. But that doesn't mean WF doesn't have merit!

I make fun of politicians and religious zealots as well, but that doesn't mean goverment and faith are without value either.

As has been noted, good software is divided into layers (or planes <g>). There are different ways to do this: UI/business/data, user/analyst/developer/framework, etc.

Some of those layers are best served (imo) by OO designs. Others by more procedural models - potentially implemented using WF and/or services (perhaps using WCF for communication).

When building a workflow, the workflow itself is intrinsically procedural. It really IS an animated flowchart. And there's nothing wrong with that. But those activities WITHIN the workflow each describe some atomic bit of functionality. How do you implement those activities?

Well, in some cases an activity might be another workflow. But ultimately the "leaf nodes" in a workflow have to be implemented to do actual work. Those activities might be implemented as a direct database call. In other cases it might be written using linear/procedural C# or VB code.

But I'll argue that the same issues CSLA .NET is designed to solve (n-tier independance, organization of code, separation of interface from business from data logic) all apply EQUALLY well when you are implementing an activity. The activity itself is the "presentation" layer, which ideally would delegate its work to a formal business layer. That business layer would, ideally, abstract not only the business logic, but also any data access calls - even if those calls require interaction with an application server.

The end result is that the activity can be an atomic, standalone, reusable component that fits into potentially many workflows. But the internal implement of the activity remains elegant and fits well into an organized n-layer and potentially n-tier architecture.

Interestingly enough, you can use EXACTLY this same reasoning when discussing services. A service is, by definition, an atomic, standalone, reusable procedure, with clearly defined inputs and outputs. It is EXACTLY like a workflow activity in all important respects, and it is my view that OO is a great way to implement those services.

Better still, both activities and services, because they are atomic, self-contained, units of functionality, directly fit the definition of a "use case"! Each activity, and each service, IS a use case.

There's never been, in my experience, a better opportunity to practice "pure" OO design than right now, because we've never been in a position where we're being asked to create blocks of functionality that exactly match up with discrete, reusable, use cases.
Sunday, February 04, 2007 5:44:46 PM (Central Standard Time, UTC-06:00)
The idea that workflow competes with OO is particularly silly. One of the factors that makes me *more* likely to choose a business objects framework instead of datasets is on an app that has a large amount of workflow. When the data is traveling in a distributed workflow, through queues and rules engines, the need for behavior to go along with the data is particularly high.

While I agree that Microsoft has taken the first steps towards some standardization of workflow, they've got a long way to go. I regard workflow without queues as close to useless, and it's still "roll your own" for queues in Windows Workflow.

On SOA, I've been trying an interesting test. When someone at a client advocates an SOA approach, I innocently ask "How would you define SOA?" The ones who are big advocates of buzzword-driven architectures usually shut up from that point and let the rest of us actually get some work done.
Monday, February 05, 2007 12:44:21 AM (Central Standard Time, UTC-06:00)
Dear Rocky,
I have commented long time back on CSLA forum that SOA is similar to procedural programming with XML and I cant agree more as you have articulated my understanding in more crystalized format. I many times compare IT with other industries and I find that most of the industries build on the old stuff quite frequently and none claims to completely replacing old technologies unless the research is radical.
Cars for quite a long time have the same structure and whatever the new technology, we still run on four wheels. I dont know when Steve Jobs will start looking at cars ;) But some technologies mature to be the foundations. OO in my opinion will be like that as it is one of the most intutive ways of looking at things. It will never solve all your problems but will always solve most of your problems. Like cars cant fly so you have aeroplanes. Steel does not solve some problems and so you have plastics. But neither aeroplanes nor plastics have been able to replace the cars or steel.
The world became just more vibrant with the new things invented. Thanks a lot for being rational. This is becoming rare these days.
Monday, February 05, 2007 1:25:14 AM (Central Standard Time, UTC-06:00)
Well I'm certainly not qualified to talk as verbosely and maturely on the subject as everyone else here ( nice to see Billy Hollis surfacing again!!!). But... I can't see why on earth you would want to stop using the OO approach. It's just too logical and useful.

I've got some colleagues that are playing around with SOA at a local firm using Oracles BPEL and they tell me it's a total P.I.T.A LOL !!!

Cheers
ChrisD
Monday, February 05, 2007 3:12:05 AM (Central Standard Time, UTC-06:00)
I replyed in a post about it in my blog, if you want to read it:
http://omriswissa.com/communityserver/blogs/this/archive/2007/02/04/why-compete-when-we-can-work-together.aspx

Omri Swissa
Tuesday, February 06, 2007 12:30:37 PM (Central Standard Time, UTC-06:00)
OO is dead, long live OO.

The funny thing is... just recently, OO, whether with CSLA or not, as finally become accessible to the mainstream Morts. The inclusion of LINQ, which as I will talk about at CNUG later this month - finally introduces set theory to the object you already have. For the record, it couldn't be more complementary with CSLA!

Frankly, I think we are on the cusp of entering a golden age in OO programming, not the end of it. CSLA.net + generics + LINQ + NHibernate, or other various combinations... free us from 80% of the plumbing/findByX/IEnumerable/DataAdapter code that mort has been asked to write over the years. With these things finally becoming stable, and the inclusion of set theory primitives that LINQ brings to the table - we can finally get around to the business of writing good business logic and adding value with OO based systems.
Saturday, February 10, 2007 2:22:49 AM (Central Standard Time, UTC-06:00)
A. Big picture: I agree WF cannot and should not replace OO. However, I believe WF is indeed big.

(1) WF is “just” an automation scripting tool, just like VBA.

(2) However, just as we can use VB for application development, we can push WF deeper.

(3) Actually, we have the whole COM, simply for VB (OK, I twisted it a little to make it VB centric, but you know what I mean). Of course, just as we cannot create a COM for every object, there must be a limit how far WF can go.

(4) The scripting is XML based (XAML), however, in theory, it can be written by C# etc. Note that I do not mean the “code-behind”; I mean writing the workflow in C# and the IDE translate it into XML.

(5) The analogy can go further: a new generation of RAD is coming back; now, it is enterprise level, so, let's say it is ERAD. The workflow and its visual designer is the beginning of ERAD. You put this with the whole Office scripting, that is the power of M$! Note that because of WF, it is also the MDA. a WF is a more structured (hence more limited but also more supported) "activity diagrams". Now, the flyweight joins force with the super-heavy weight.

(6) Also, it is a structured (hence more limited but more supported) aop loadtime engine (i.e. emit-style engine).

(7) Also, this is a structured threading engine also. Who needs low level threading anymore!

(8) Also, it is a super-lightweight application server. It replaces EJB session beans! For example, it provides transaction services. Also, it requires you do things in a certain way. It is all similar to EJB. Note that I guess nobody now cares about the entity bean anymore; it is replaced by OR mapping, which will be realized by EF in the future.

B. “Technical details” -- Compatibility and Difference between WF and CSLA

(1) WF activity is basically the workflow object (“command” object). I believe CSLA should help to make all such object as a workflow activity, out of box.

(2) One deeper WF “customization” of CSLA is to remove those CRUD methods into separate classes. Entities are just entities. Those 4 CRUD methods should be split into 4 activities. In short, together with (1), all CSLA database related programming is in “activities”.

As I have pointed out sometime before, the base of CSLA is command design pattern. WF’s activity is also based on command design pattern. In Java history, command pattern was very popular before J2EE, but has been declining ever since. However, because of workflow engine, it seems that in .Net, command pattern will be the dominant design. Note that J2EE also has workflow engines, but historically, it came after J2EE server, and therefore it is only a feature of application server.

(3) Note that for those pure entity classes, they can use rule engine, instead of CSLA’s rule engine. Note that MS’s rule engine now is very simple-minded, it is not really the “reference rule engine”, but it is still more powerful than CSLA’s. Also, it is everywhere, and it is free. It is going to be ad hoc basic-standard.

(4) For performance, the workflow engine must be a singleton.

(5) The thing that is not touched at all in CSLA is the data-binding related features of those pure entities.
Wednesday, February 21, 2007 7:40:16 AM (Central Standard Time, UTC-06:00)
Seamless integration of CSLA components with a workflow engine was long overdue


http://vikasnetdev.blogspot.com/2006/05/my-wishlist-for-csla-30.html
Comments are closed.