views:

155

answers:

7

I have a moderately simple assignment, to create a PHP/PDO site with login functionality and article retrieve/save/edit/search. No tags, nothing else.

Is this overkill to use some framework for this? It it a good decision to use custom code + perhaps template system like Smarty for a simple site that will not grow too much?

Is there a software niche/best practices for small sites? In a nutshell, I need logins/forms, but aren't frameworks like Zend or Cake too much for this?

A: 

For something that simple you can use a tiny framework like MicroMVC which comes with a equally small PDO based ActiveRecord-like database class.

Xeoncross
+2  A: 

I think using a framework is ideal for simple projects. They're quicker to set up and get going with. A framework may not be ideal if you need to fine tune how the site will run for reasons such as scalability or special requirements, or because you just don't like frameworks.

apphacker
+3  A: 

I'd suggest just using whatever parts of the Zend Framework you feel you need. Zend is very 'pick and choose' friendly.

That said, I recently used the ZF Application (MVC collection) for a two page site, just because it made things so easy. You don't need to have multiple controllers/models/view helpers to justify using a MVC framework.

Tim Lytle
+3  A: 

Please don't user smarty. It's really unnecessary. PHP is it's own template language.

These posts on sitepoint tell the story well: #1, #2, #3

Galen
What are you talking about? Smarty is not just a template engine, you can also use Smarty for cache as an example. Smarty is usable!
Björn
Yeah, Smarty caches what you could've otherwise written directly. How smart.
Jörg
+2  A: 

I've been using Kohana and I like it.

http://www.kohanaphp.com/

This guide got me started Kohana 101

codeinthehole
+4  A: 

I think that you can never go wrong by adding a framework to any size project. Anytime you can reuse something (and not reinvent the wheel) or leverage an existing code base to speed application development time, then do it.

Besides, you never know when your small to mid-size project suddenly grows to a large project. At least then you will have the pieces in place to grow your application and not have to start from scratch.

igotmumps
+5  A: 

I'm a big fan of CodeIgniter, it would make setting up a simple website like this pretty painless. There is a fairly extensive stackoverflow answer about authentication libraries for CodeIgniter which would make login a breeze.

I would not suggest using a third party template library such as smarty. CodeIgniter has helper functions which can be used within 'views' which will allow you to do a lot of things quickly and painlessly, such as form creation.

evolve
Per codeinthehole's comment, Kohana is also worth a look. It began as a fork of CodeIgniter. It has a lot in common with CodeIgniter, but has more functionality.
Brad Gignac