[Israel.pm] Multi Tier Development question?
Shlomi Fish
shlomif at iglu.org.il
Mon Aug 28 11:44:47 PDT 2006
On Monday 28 August 2006 18:24, rami doqa wrote:
> Hello. I want to know how I can implement the multi
> tier programming concept in Perl.
> I am using the traditional procedural programming way
> in Perl and I am going to switch to the object
> oriented programming way. I found my self stuck when I
> want to separate the presentation from the business
> logic from the data storage in my application. For
> example:
> I have the following DB tables: orders, items with the
> 1- M relationship.
> Shall I create a Perl classes the same as the DB
> tables with the same exact attributes: item.pm and
> order.pm . if yes then how can I implement the 1 - M
> relationship between these classes and how can I
> change the actual value of the table fields when I
> make some required operations on the class methods or
> attributes, and Where (separate layer).
> I expect the following architecture:
>
> ..
../view/... contains all of HTML and templates
>
.. /controller/
contains the scripts that act as
> switcher between the model classes and the view
> templates
>
/model/....contains the business rules (abstracted
> classes)
>
/data/
contains all of the classes which do the
> database transactions
Actually this is one thing the MVC frameworks like Catalyst (
http://www.catalystframework.org/ ), Jifty (
http://www.jifty.org/view/HomePage ), CGI-Application, CGI-Prototype, etc.
aim to solve. You probably shouldn't re-invent the wheel.
<<<<<<<<<
<rindolf> perlbot: perl web framework
<perlbot> CGI-Application, CGI-Application-Plus, CGI-Builder, CGI-Prototype,
Jifty, Maypole, Catalyst, Mojo, Gantry, AxKit, WebGUI
>>>>>>>>>
Regards,
Shlomi Fish
---------------------------------------------------------------------
Shlomi Fish shlomif at iglu.org.il
Homepage: http://www.shlomifish.org/
Chuck Norris wrote a complete Perl 6 implementation in a day but then
destroyed all evidence with his bare hands, so no one will know his secrets.
More information about the Perl
mailing list