Quantcast

Survivethedeepend book

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Survivethedeepend book

Andreas Kraftl
Hello,

I start with a small project and use the Survivethedeepend because of
nice domain layer and Unittests.

Now I have the problem to understand, how I can use the datamappers.

I don't know the strategy, how to get e.g. an entry in a controller:
$entry = new ZFExt_Model_EntryMapper;
or
$entry = new ZFExt_Model_Entry();
or
is the idea to build another layer with form and validating support?

I have the ideas, but I am not sure what the author want.

The other questions are, how to get entries and where to do the forms?

I think to get entries is easy with building a seperate class:
class ZFExt_Model_Entries
{
    $_data = array();

    public function __construct(array $data)
    {
        // Check if item is instance of ZFExt_Model_Entry
        // add every item to $_data
    }
    // ...
}

And last, why wrote he the model as library in the library folder and
not the model folder?

I know, the author is reading on this mailinglist, and I think, it is a
good place to archieve the answers for other confused readers ;-).

Thanks
Andreas
PS: Hmm, hope there are not to much questions in one post
--
Kraftl EDV - Dienstleistungen
Linux, Linuxschulungen, Webprogrammierung
Autofabrikstraße 16/6
1230 Wien

Loading...