开发者

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

As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polli开发者_运维百科ng, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 11 years ago.

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 ?


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.


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


Well, personally I have tried Symphony, Zend Framework and Kohana. From those three, Zend Framework made the best first and also the best second impression on me. I have been using it for over a year now (almost two years I think) and I have coded several custom content management systems for my clients (each specific to my client's website needs).

Further, I'm currently working on my bachelor's project which is also about building a content management system of a type and I'm using Zend Framework for it.

Symphony was also great but I had two issues with it.

  • In Windows, executing the Symphony commands (for example for creating a new project with the default directory structure) took way too long (it always took like 10 seconds before the command would start executing). This, I believe, was a known issue but it remained unaddressed for a long time.
  • The documentation (at least at the time I tried Symphony) was inconsistent and there were unfunctional code examples and other errors and that could get pretty annoying.

Zend Framework has a very good documentation so that's what really persuaded me to stay with it, plus there is a very helpful community here at StackOverflow that helped me solve many problems.

I also like the fact it is not developing at such a rapid speed as Kohana or Symphony. I'm kind of a guy that like to get used to a certain way of doing things and I don't like changing my habits every three months.


Have alook at CodeIgniter: Allows you to implement clean MVC architecture, without requiring a book of instructions. The community is great too, so you will not be alone.


In addition to the choices suggested above (CakePHP, ZendFramework), I'd also suggest you take a look at Symfony

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜