El 14/08/13 11:13, Ed Leafe escribió:
On Aug 14, 2013, at 9:59 AM, Ricardo Aráoz <ricar...@gmail.com> wrote:

In my mind the form methods are there to be convenient for quick development, 
and the
bizobj methods are closer to the metal and will have more options.
But isn't that going against the three tier concept?
I thought the idea was that the control (let's say a button) interacted with 
the form, then the form interacted with the biz and finally the biz with the db.
Or am I getting it wrong.... again ;c)
You are correct, but you're missing some pieces.

The button should only handle the click - that's it. When it gets clicked, it 
tells the form, and the form carries out whatever action is appropriate. In 
your case, the button code would look like:

def onHit(self, evt):
        self.Form.doSomething()

The form method would look like:

def doSomething(self):
        self.PrimaryBizobj.new(param1="foo", param2="bar",...)

In other words, form.new() is the simplest way of creating a new record. If you 
need something more complicated, add a method to do so.


Ok, thanks. I'll check my code and see if I'm doing it right.

BTW, finished my first payed dabo program. Nice.
If there is interest (and if there is a way) after it's polished I'd like to post the whole directory structure of the program. Firstly as a way to ask for reviewing and suggestions, and also as help for newbies, for those of us who learn better through real examples. Don't know if this is possible.




_______________________________________________
Post Messages to: Dabo-users@leafe.com
Subscription Maintenance: http://mail.leafe.com/mailman/listinfo/dabo-users
Searchable Archives: http://leafe.com/archives/search/dabo-users
This message: http://leafe.com/archives/byMID/520b9b80.9020...@gmail.com

Reply via email to