Quantcast

Thoughts on general website setup

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

Thoughts on general website setup

J DeBord
I am trying to compare traditional website structure to Zend FW MVC structure and I would like your thoughts / suggestions on something.

If a traditional website has an index.php, about.php,  contact.php etc and they are all sitting in the site's document root. How would you guys move this to MVC?

1) Have indexController include indexAction, aboutAction, contactAction, etc and only use a new xxxxController to take the place of a directory in the document root

Or

2) Make a class for each of the traditional pages: aboutController, contactController, etc.

I would like to be able to picture the ZF MVC structure of a traditional site.

Thanks a lot!


Jason DEBORD
Limoges, France
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

Re: Thoughts on general website setup

J DeBord
Thanks for the reply.

You're right, it is overkill, but I'm basically doing this as to get some experience with MVC.

I'm not a fan of Smarty, but I understand why you suggested it.

My goal is to write a simple application that mimics a traditional website. And build on it from there.

So what would you do? One index controller with numerous actions? Or numerous controllers each with an index action?

I'd also like to do something with Zend_Translate.

Any advice is greatly appreciated. Thanks again!

Jason DEBORD
Limoges, France


On Thu, Feb 12, 2009 at 1:25 PM, Steven Wright <[hidden email]> wrote:
It really depends on what you are doing. For a traditional site, the framework is probably a lot more than you need, that is unless you are just trying to learn about MVC frameworks. Even so you may be better off trying to write a simple application vs. a traditional website.
 
In your particular case I would try using a templating system such as Smarty. This would put one index page as the traffic director and then all the content would reside in templates above the web root. This would mean that the only things in web root are the index.php file and any javascript, css and image files.


From: Jason DeBord [mailto:[hidden email]]
Sent: Thursday, February 12, 2009 5:39 AM
To: [hidden email]
Subject: [fw-general] Thoughts on general website setup

I am trying to compare traditional website structure to Zend FW MVC structure and I would like your thoughts / suggestions on something.

If a traditional website has an index.php, about.php,  contact.php etc and they are all sitting in the site's document root. How would you guys move this to MVC?

1) Have indexController include indexAction, aboutAction, contactAction, etc and only use a new xxxxController to take the place of a directory in the document root

Or

2) Make a class for each of the traditional pages: aboutController, contactController, etc.

I would like to be able to picture the ZF MVC structure of a traditional site.

Thanks a lot!


Jason DEBORD
Limoges, France

Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate
star

RE: Thoughts on general website setup

rcastley
Hi,
 
If it was me I would create an action per page.  If then you decided to implement CRUD per page this would be easily achieved by adding the relevant action to the controller.
 
Like I said, this is how I would do it :-)
 
 
- Robert


From: Jason DeBord [mailto:[hidden email]]
Sent: 12 February 2009 12:47
To: Steven Wright; [hidden email]
Subject: Re: [fw-general] Thoughts on general website setup

Thanks for the reply.

You're right, it is overkill, but I'm basically doing this as to get some experience with MVC.

I'm not a fan of Smarty, but I understand why you suggested it.

My goal is to write a simple application that mimics a traditional website. And build on it from there.

So what would you do? One index controller with numerous actions? Or numerous controllers each with an index action?

I'd also like to do something with Zend_Translate.

Any advice is greatly appreciated. Thanks again!

Jason DEBORD
Limoges, France


On Thu, Feb 12, 2009 at 1:25 PM, Steven Wright <[hidden email]> wrote:
It really depends on what you are doing. For a traditional site, the framework is probably a lot more than you need, that is unless you are just trying to learn about MVC frameworks. Even so you may be better off trying to write a simple application vs. a traditional website.
 
In your particular case I would try using a templating system such as Smarty. This would put one index page as the traffic director and then all the content would reside in templates above the web root. This would mean that the only things in web root are the index.php file and any javascript, css and image files.


From: Jason DeBord [mailto:[hidden email]]
Sent: Thursday, February 12, 2009 5:39 AM
To: [hidden email]
Subject: [fw-general] Thoughts on general website setup

I am trying to compare traditional website structure to Zend FW MVC structure and I would like your thoughts / suggestions on something.

If a traditional website has an index.php, about.php,  contact.php etc and they are all sitting in the site's document root. How would you guys move this to MVC?

1) Have indexController include indexAction, aboutAction, contactAction, etc and only use a new xxxxController to take the place of a directory in the document root

Or

2) Make a class for each of the traditional pages: aboutController, contactController, etc.

I would like to be able to picture the ZF MVC structure of a traditional site.

Thanks a lot!


Jason DEBORD
Limoges, France


________________________________________________________________________
This email has been scanned for all known viruses by the MessageLabs Email Security Service and the Macro 4 plc internal virus protection system.
________________________________________________________________________

________________________________________________________________________
This email has been scanned for all known viruses by the MessageLabs Email Security Service and the Macro 4 plc internal virus protection system.
________________________________________________________________________
Loading...