[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: MVC Branch
From: |
Davi Leal |
Subject: |
Re: MVC Branch |
Date: |
Mon, 9 Apr 2007 17:18:31 +0200 (CEST) |
Klaus Weiss wrote:
> I have now almost all fundamental stuff for a new
> branch implemented.
> Within each function there are several builtin methods
> for various purposes (e.g. Database, Template, User
> Management etc.).
> set/get allows also optional parameters for an
> additional WHERE condition or a other Model name.
> (This is currently the only way to set/get a specific row,
> I want to implement better solutions).
What about using the primary and foreing keys of the data base model?.
Note I do not know too much about all this.
> Model; with the model class you actually describe a
> specific table (e.g. User). Again here is a bunch
> of lines:
>
> <?php
> class User extends Model
> {
> public $name = 'User';
>
> public $validate = array('id' => VALID_NUMBER);
> }
> ?>
> With $validate you can build an array which describes
> your table more exact. There are several constants
> (e.g. VALID_NUMBER, VALID_EMAIL, VALID_NOT_EMPTY) for
> this job. Now if you want to save data our Model
> checks first if there was something specified with
> $validate. If a column fails this tests our Model
> will trigger an error function - which we can
> controll with our View class.
This rocks!!!. If all is OK we could move to this new architecture to may
it easier the development of some of the pending tasks.
> Our View class itself is nothing special. It just
> integrates Smarty as the engine behind it and will
> have nearly only wrapper functions.
>
> I also integrated mod_rewrite for cleaner URL's.
No comment!
> Any suggestions? There is of course still a lot
> of work! You can compare this script with cakephp.org,
> however a lots of things are different (purged)
> as I wanted to develop a much simpler and smaller
> script.
I will study it to night. I will look for you new branch. What will be the
name?, MVC?.
The sooner we merge this new branch with the cvs trunk, the better.
Davi
- MVC Branch, Klaus Weiss, 2007/04/09
- Re: MVC Branch,
Davi Leal <=
- Re: MVC Branch, Klaus Weiss, 2007/04/09
- Re: MVC Branch, Davi Leal, 2007/04/09
- Re: MVC Branch, Klaus Weiss, 2007/04/09
- Re: New proposed webapp Architecture, Davi Leal, 2007/04/09
- Re: New proposed webapp Architecture, Klaus Weiss, 2007/04/09
- Re: New proposed webapp Architecture, Davi Leal, 2007/04/09