|
Hi all,
I am new to mod_perl/TT2 but not to perl, I come
from a J2EE/Struts background so please forgive my simple question (I have
RTFM).
Following the examples in the manual and the E-Toys
demo I can see how to develop the M and V part of things but it is
the simple directory layouts and redirection that troubles me.
If I have an e-commerce site which has Category,
SubCategory and product pages, I would develop this in CGI using calls to
cgi-bin/category.pl?catNo=x .../subCategory.pl?catNo=x&subCatNo=y
etc.
My question is -
How do I layout the directories and tell the
handler for TT2 to call the appropriate controller for each level
?.
My guess on the layout is that I would have
something like the following :
#httpd.conf
<Location
/tt2>
SetHandler perl-script PerlHandler Apache::Template Options ExecCGI </Location> # Directory structure
-/tt2
/models
- categoryModel.pl
- subCategoryModel.pl
/controls
-
categoryControl.pl
- subCategoryControl.pl
/views
- category.html
- subCategory.html
- but I cannot see how to process the m & c
with a call to http://mysite/category?catNo=x (assuming
that is the correct call - please advise).
tia
Jon Ross
|
- Re: [Templates] Newbie TT2 MVC question ( layout/handle... Jon Ross
- Re: [Templates] Newbie TT2 MVC question ( layout/h... joseph speigle
- Re: [Templates] Newbie TT2 MVC question ( layout/h... rafiq
- Re: [Templates] Newbie TT2 MVC question ( layout/h... rafiq
- Re: [Templates] Newbie TT2 MVC question ( layout/h... rafiq
- Re: [Templates] Newbie TT2 MVC question ( layout/h... Jon Ross
- Re: [Templates] Newbie TT2 MVC question ( layo... darren chamberlain
