Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What PHP framework to choose for a Senior Project [closed]

I am working on my senior project, and the topic that we agreed on was a CMS that similarly to Drupal would make things easier by providing robust administration capabilities Some of them include: Content type and data field creation (CCK) Views Creation complex user management (tasks and roles) the ability to add third party modules later on - hooks templating capabilitites

Now the thing is, I would have to show sufficient knowledge and understanding of software architectures, and the development process. I will not start from scratch, for sure, but I can't demonstrate Drupal in my documentation either

I would like to use a framework that one could build skills on, one that is not overly complex, and one, that will still make me write code - the senior project is about my work, not about the work of the php community

I started with Kohana, yet, I didnt like it very much. Its poor documentation, and the frequent changes in the code base made me stop.

I am thinking of something very small and sweet, something that doesn't show up in every step and say : "hey you know what, I can do that better than you" Something like CakePHP, maybe.

I know that more or less, all the code I need is available out there. However, the point here is just a little bit more academical.

Any suggestions ?

like image 500
xantrus Avatar asked Dec 01 '22 06:12

xantrus


2 Answers

You should make Kohana your choice. I don't understand your reasons for avoiding it though.

There are two Kohana versions at the minute, versions 2 and 3.

Versions

The current release for the 2.* line is: 2.3.4 and 2.4 is to be released when the documentation is done and dusted. 2.4 is an API changing release.

The current release for the 3.* line is 3.0.3 and is API frozen until the next major release (many months away).

Documentation

People complain about the Kohana documentation, which I believe is unjustified. It might of been true some time ago, but things have changed quite a lot. Kohana 3 has fantastic documentation which can be found here and has an extensive 3rd party wiki at kerkness.ca.

The documentation for the 2.* line might not be as good but it's certainly enough to get you started at least. When 2.4 is release it'll be as good as Kohana 3s

Notes on CodeIgniter

Just before you run into using CodeIgniter you should be aware of some of the idiotic design mistakes they've made.

  • They originally decided to disable the use of $_GET by running $_GET = array() in one of their core files. They then decided to turn this into a configuration option $allow_get. I don't understand it at all.
  • Staying with PHP4, they've re-implemented a fair few methods not found in PHP4. I wish they'd just move on, heck; even their users have started writing plugins and libraries in PHP5.
  • Sessions support is absolute crap. People still have problems with it daily. Want to have different session drivers? (native, database or cookie) No, you only ever get one choice.

Some of the points from Alex Mcp aren't really valid either.

Small File Size (download is 2.1MB, but actual files for use ~1.5MB).

Kohana is a couple of MB too, but this should never be a reason to choose a framework.

Libraries and helpers called on demand -> minimizes memory usage

This is where CodeIgniter sucks. In PHP5 you'd create a static method and call it like so Class::method();.

I used to hate the CodeIgniter way of $this->load->helper('form'), etc ...

Ask yourself, who's getting in the way now?

Great docs. Not a big fan personally of the drop-from-top effect, but they're written in readable English with good examples

See above.

Extensible - good number of libraries written by the community

Kohana has hundreds of extensions too, http://dev.kohanaphp.com/projects/ & http://github.com/search?q=kohana&type=Everything&repo=&langOverride=&start_value=1

CodeIgniter allows you to extend classes by using a special "My_" prefix to your classes. Kohana does this using a cascading file system, so a file named "form.php" in your application is automatically going to override the "form.php" in the systems directory.

If you really want something that is not going to get in your way and help you rather than hinder you then Kohana is the way to go.

Just my 2cents on the matter.

like image 112
The Pixel Developer Avatar answered Dec 04 '22 10:12

The Pixel Developer


I totally enjoy CodeIgniter. It doesn't have the magic functions of CakePHP/Rails, but it automatically comes with a good MVC setup and a good basic library for forms, ActiveRecord implementation, dealing with POST data sanitization, and other nice things that I just don't prefer to deal with every project.

Their intro video on making a blog is all it took me to get hooked. Good syntax, good practices... Can't recommend it enough for your size/style project.

EDIT

As noted by commenters, I'll line up the pluses as bullet points:

  • Small File Size (download is 2.1MB, but actual files for use ~1.5MB)

  • Libraries and helpers called on demand -> minimizes memory usage

  • Great docs. Not a big fan personally of the drop-from-top effect, but they're written in readable English with good examples

  • Extensible - good number of libraries written by the community

  • Encourages MVC architecture

  • Good built-in security features

like image 36
Alex Mcp Avatar answered Dec 04 '22 11:12

Alex Mcp