5

I haven't done any PHP coding for a few years and I have not, as yet, used a framework.

Now I have a new project in mind and think that a well tested framework would save me a lot of the time that I have previously invested in reinventing a bug-ridden version of the wheel.

The PHP part of the project will do the following:

  • receive HTTP POST requests, look into a database (probably MySql, maybe Sqlite) and return a URl which it retrieves.

  • allow users to log in (checking credentials with the database), ans establish a session (which I might decide to have time out after a period of inactivity).

  • users can then view a dashboard of their data & activity which I will build from the database.
  • I will need an admin app for my own use, to allow me to add/modify/delete users & their data.

That all sounds rather run of the mill, which means that there ought to be a good framework for me to use.

  • Something free for commercial use (in case I am ever dumb enough to try to charge for it), without catches which would mean that I would have to open source my code (I might yet decide to do so, but I want to keep my options open).
  • Stable & well tested, with a good user support community.
  • Handles common functionality such as user login, session management (including timeout logoff), etc
  • Provides good security with minimal effort on my part
  • Possibly a form builder, if any framework offers such a thing, where I can drag & drop and "draw" my form, then generate PHP code for it.
  • Perhaps some nice report generation, with graphs, pie charts, histograms, etc
  • In fact anything that helps me make a slick GUI as I am lousy at that.
  • Any other slick features which might make it attractive, although consideration should also be laid on learning curve and how it helps aid development, speeding it up / making it less error prone & easier to test and debug.

Which framework do you recommend?


Despite awarding the bounty, much googling leads me to believe that Lavarel is now in the ascendency over Code Igniter. I have decided to move the presentation and most of the logic client-side, using AngularJs, leaving only a thin database access layer on the server to be accessed by Ajax.

  • 1
    By no means am I a php developer, but a quick google search found CakePHP. Also by no means am I a html developer, but your GUI solution problem might be solved by using Bootstrap – aman207 Jan 27 '15 at 15:53
  • 1
    Check out Phalcon, I'm too lazy to write a detailed answer (plus I'm on mobile) but it should have most of the features you need excluding the charting and GUI page builder (that's not the framework's role and I doubt you'll find one that provides those features) but the real advantage of it is speed, it's super fast compared to other frameworks as it's delivered as a C extension rather than PHP code. – user111 Feb 2 '15 at 8:00
1
+50

First I apologize that I wont be able to provide a A detailed canonical answer is required to address all the concerns. but will try to make my answer very detailed as I can And Hope This will be useful! So I suggest CodeIgniter It is a powerful PHP framework with a very small footprint, built for developers who need a simple and elegant toolkit to create full-featured web applications.Codeigniter.

CodeIgniter is right for you if

  • You want a framework with a small footprint.
  • You need exceptional performance.
  • You need broad compatibility with standard hosting accounts that run a variety of PHP versions and configurations.
  • You want a framework that requires nearly zero configuration.
  • You want a framework that does not require you to use the command line.
  • You want a framework that does not require you to adhere to restrictive coding rules.
  • You do not want to be forced to learn a templating language (although a template parser is optionally available if you desire one).
  • You eschew complexity, favoring simple solutions.
  • You need clear, thorough documentation.

From a technical and architectural standpoint, CodeIgniter was created with the following objectives:

  • Dynamic Instantiation. In CodeIgniter, components are loaded and routines executed only when requested, rather than globally. No assumptions are made by the system regarding what may be needed beyond the minimal core resources, so the system is very light-weight by default. The events, as triggered by the HTTP request, and the controllers and views you design will determine what is invoked.

  • Loose Coupling. Coupling is the degree to which components of a system rely on each other. The less components depend on each other the more reusable and flexible the system becomes. Our goal was a very loosely coupled system.

  • Component Singularity. Singularity is the degree to which components have a narrowly focused purpose. In CodeIgniter, each class and its functions are highly autonomous in order to allow maximum usefulness.

CodeIgniter is a dynamically instantiated, loosely coupled system with high component singularity. It strives for simplicity, flexibility, and high performance in a small footprint package.

CodeIgniter Features

  • Model-View-Controller Based System
  • Extremely Light Weight
  • Full Featured database classes with support for several platforms.
  • Active Record Database Support
  • Form and Data Validation
  • Security and XSS Filtering
  • Session Management
  • Email Sending Class. Supports Attachments, HTML/Text email, multiple protocols (sendmail, SMTP, and Mail) and more.
  • Image Manipulation Library (cropping, resizing, rotating, etc.). Supports GD, ImageMagick, and NetPBM
  • File Uploading Class
  • FTP Class
  • Localization
  • Pagination
  • Data Encryption
  • Benchmarking
  • Full Page Caching
  • Error Logging
  • Application Profiling
  • Calendaring Class
  • User Agent Class
  • Zip Encoding Class
  • Template Engine Class
  • Trackback Class
  • XML-RPC Library
  • Unit Testing Class
  • Search-engine Friendly URLs
  • Flexible URI Routing
  • Support for Hooks and Class Extensions
  • Large library of "helper" functions

As this is open source project this has a good support Community

  • Googling seems to show that Laravel is the top favourite for most (and that CodeIgnighter is losing popularity). Any comments? – Mawg Jan 28 '15 at 8:54
  • 1
    @Mawg For me It seems that both are at the same level,but again its your choice what I could only do is suggest what's best for your work but remember that each of them has its own set of advantages:)I suggested this because mainly CodeIgniter promises higher stability.also definitely there is a large community who are using it also its owned by British Columbia Institute of Technology :) – Pathum Anjana Jan 28 '15 at 9:05
  • 1
    +1 I think I might have to try to use both to build a simple app & see which one suits me best. I will also look for comparisons of the two. – Mawg Jan 28 '15 at 9:32
1

I think Yii would be fine for you. The report/reporting library.

For user interface building, I believe it's the part of the front-end library/framework, not server side one. You can always combine any of BootstrapFormBuilder, Formoid, Bootply, or LayoutIt with any server-side framework.

To learn about Yii, you can visit this link.

Here's a list of other php frameworks.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.