API Platform's Philosophy
In 25 years of PHP, the web changed dramatically and is now evolving faster than ever:
- Thanks to awesome frontend technologies such as React or Vue.js, full-JavaScript Progressive Web Apps are becoming the standard.
- Internet users spend more time on their mobile devices than on desktops: having a mobile-first website is mandatory and native mobile apps are a must-have.
- The semantic web and especially Linked Data is a reality: with the Schema.org initiative and new open web standards such as JSON-LD, search engines (among a bunch of other services and software) consume structured and machine-readable data at web scale. Not exposing such data decrease interoperability and search engine ranking/efficiency (think rich snippets).
- HTTP/2 and HTTP/3 dramatically improve the performance of web applications thanks to multiplexing, Server Push and their other new capabilities.
PHP.net, Symfony, Facebook and many others have worked hard to improve and professionalize the PHP ecosystem. The PHP world has closed the gap with most backend solutions and is often more innovative and faster than them.
However in critical areas I've described previously, many things can be improved. Almost all existing solutions are still designed and documented to create websites the old way: a server generates then sends plain-old HTML documents to browsers.
API Platform is a set of tools for building modern web projects. It is a framework for API-first projects built on top of Symfony components. Like other modern frameworks such as Laravel and Symfony, it's both a full-stack all-in-one framework and a set of independent PHP components and bundles that can be used separately.
API Platform makes modern development easy and fun again:
- Start by creating a web API exposing structured data that can be understood by any compliant client such as your apps but also search engines (JSON-LD with Schema.org vocabulary). This API is the central and unique entry point to access and modify data. It also encapsulates the whole business logic.
- Then create as many clients as you want using frontend technologies you love: a JavaScript webapp built in React or in Vue querying the API but also a native iOS or Android app, or even a desktop application. Clients only display data and forms.
See also the general design of the framework.