0

I have been coding PHP for a few decades now, but have never used a framework. Instead I have a home-brew collection of common functionality.

I am considering a PHP framework and wonder what is available. I welcome answers from personal experience.

I am interested in AJAX only, but won't reject anything that handles other stuff, just as long as I get good, stable AJAX (the only non-Ajax functionality that I can imagine using is user registration/change password/lost password, but I can get that elsewhere).

  • I currently use PDO to connect to MySql and would like that to be supported.
  • I would appreciate good exception handling & debugging possibilities.
  • and security features
  • I suppose that raw speed plays a part.
  • as does documentation, examples, tutorials, forums

Anything other features? I am not really sure what to expect from a framework.

1

I use laravel for a few years now and I'm very happy with that framework. Documentation can be found on https://laravel.com

If you need only backend functionality for maybe an API there is also a smaller and lighter version available called lumen. Infos at https://lumen.laravel.com

There are also many other ones like http://www.slimframework.com or https://silex.symfony.com

In the end you have to compare a few for yourself to test which one fits your needs.

What to expect from laravel framework:

To get started with API development you would create a route like

Route::get('version', function () {
    return ['version' => 'v0.0.1'];
});

and call it from javascript like

fetch('/version')
.then((response) => {
  return response.json();
})
.then((myJson) => {
  console.log('API version: ' + myJson.version);
});
| improve this answer | |

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.