When the light goes on
Nov. 29th, 2008 12:07 amSo I am building this web app. For the first time, I'm trying to do it by the book. I have a spring context, DAOs and ORM through hibernate. Everything seems copacetic. Then I realize that the logic for stopping a workflow item has to be in two places. So I do the seemingly sensible thing and I pull it out into a method.
A few days pass, and the thought dawns on me that this is what they mean by 'business logic'. An operation that can be called independently of the website to perform a function against the data. The light goes on in my head. The ActionBean should be looking up an instance of this business object in the spring context and setting member variables and calling a method on the business object.
All my functionality like that should be moved into business objects.
D'Oh, Yay! I finally 'get it'. Nobody ever explained how this stuff is supposed to work to me.
This is a subtlety that most MVC guides fail to point out. There is really another level of abstraction there, MVCB, Model, View, Controller and Business Logic. If we were in a SOA this would be the stuff that would be at the other end of the service.
Let me tell you how awesome this is going to make Dot Artistry when I get it going.
A few days pass, and the thought dawns on me that this is what they mean by 'business logic'. An operation that can be called independently of the website to perform a function against the data. The light goes on in my head. The ActionBean should be looking up an instance of this business object in the spring context and setting member variables and calling a method on the business object.
All my functionality like that should be moved into business objects.
D'Oh, Yay! I finally 'get it'. Nobody ever explained how this stuff is supposed to work to me.
This is a subtlety that most MVC guides fail to point out. There is really another level of abstraction there, MVCB, Model, View, Controller and Business Logic. If we were in a SOA this would be the stuff that would be at the other end of the service.
Let me tell you how awesome this is going to make Dot Artistry when I get it going.