Thanks all for the prompt answers! Massimo, I think that the flag in
Wizard can solve the prefixes issue.

Regarding the class-based controllers.

pbreit, the components and the load function can help me in the
composition, but can't help in the  inheritance.

Thanks for a good example, Bruno! I agree with you that domain
specific logic must be located in the Model and Flow specific logic
must be located in the Controller.
For such case we need ORM in the Model, but we have DAL. OK, suppose
we  have created an ORM over the DAL. It will give me a possibility to
inherit domain (model) specific logic. But I want to inherit work-flow
logic too.

Here is an example.
Suppose we have a class/table hierarchy:

Person<-Customer<-VipCustomer. Customer can Purchase something, Vip
Customer can Purchase goods with discount and get a branded gift.

1. The case of class-based controllers:

class Person(BaseController):
   def Create()
   def Read()
   def Update()
   def Delete()

class Customer(Person):
   def Purchase()

class VipCustomer(Customer):
   def Create()          #define discount
   def Purchase()     #purchase a product with discount and direct a
user to a gift page
   def SelectGift()    #select a gift after purchase

2. The case of function-based controllers:
Person_Create()
Person_Read()
Person_Update()
Person_Delete()

Person_Create()
Person_Read()
Person_Update()
Person_Delete()
Person_Purchase()

VipCustomer_Create()
VipCustomer_Read()
VipCustomer_Update()
VipCustomer_Delete()
VipCustomer_Purchase()
VipCustomer_SelectGift()

The functional case has 15 methods. In the first case there are 3
classes and 8 methods (more compact and readable). Why do I need to
repeat some methods in the successors?

Reply via email to