2008年9月23日星期二

[fw-mvc] Zend_Form Quick start and architecture suggestions

Hello,


I've been working for some time in a basic architecture and I'd like to start implementing Zend Form. Now I'm wondering where to put it in my current architecture?
Is it a model extension and I should keep it inside my model layer?
Is it an independent component and I should keep it in its own layer?
If so, how do I handle it? My controllers should handle my form objects?
Should I implement a form factory in my base controller, just as I'm doing with my models?
Here is my basic architecture (I also would like to have suggestions about it):

project_development/
    application/
        library/
            Zend/ ...
        modules/
            default/ -> should I add a forms folder here to place my forms?
                controllers/
                    IndexController.php
                    ErrorController.php
                models/ -> Or I could place it here, inside my models?
                    business/ (where I keep all the complex logic of the application)
                    tables/ (my database representation)
                views/
                    filters/
                    helpers/
        settings/
            routes.ini
            database.ini
            modules.ini
            templates.ini
        bootstrap.php
    public/
        templates/
            default/
                css/
                    global.css
                images/
                    logo.gif
                javascript/
                    jslibrary.js
                scripts/ (layout and view scripts I'm keeping here to make easier to the interface developer)
                    index/
                        index.phtml
                    error/
                        error.phtml
                    layout.phtml
        .htaccess
        index.php
    storage/
        backup/
        cache/
        database/
            data/
                where the real database is going to be stored
            patches/
                all the patches to fix or change the database
            00_roles.sql
            01_tables.sql
            02_views.sql
            03_procedures.sql
        logs/


Regards,

Ramses

没有评论: