composer and ecosystem

Framework Types

PHP projects can use micro-frameworks, full-stack frameworks, or selected component ecosystems. The right level depends on how much infrastructure the application needs and how much integration work the team wants to own.

Micro-Frameworks

A micro-framework gives an application a small HTTP foundation: routing, requests, responses, and middleware. This can suit a focused service. It does not mean the finished system is automatically simple. The team still needs to choose and maintain logging, configuration, persistence, migrations, validation, and testing tools.

Full-Stack Frameworks

A full-stack framework provides integrated defaults for common application needs. Its conventions reduce the amount of assembly work and make repository structure more predictable. The tradeoff is that the application adopts more framework concepts and should follow the framework upgrade path.

Component Ecosystems

A project can also install selected components: perhaps a console command runner, dependency-injection container, or HTTP client. This gives more control, but the application owns the wiring, configuration, upgrades, and interaction between packages.

Make The Tradeoff Explicit

Before choosing a style, list the capabilities the application needs now and is likely to need soon:

  • HTTP routing and middleware
  • authentication and authorization
  • database access and schema migrations
  • validation, logging, background work, and scheduled tasks
  • test support, deployment, monitoring, and upgrades

A smaller starting dependency graph is not the only maintenance cost. Integration code also has a cost. In an existing repository, its established conventions are normally more important than an abstract preference for minimal or full-stack tools.

Practice

Practice: Choose A Framework Type

Choose a framework type for one stated application and explain the maintenance tradeoff.

Requirements

  • Describe application needs.
  • Compare integrated defaults with assembly work.
  • Include testing and operations.
  • Explain the maintenance tradeoff.
Show solution

List the application's routing, authentication, persistence, validation, background-work, logging, testing, and operational needs. A full-stack framework can provide integrated defaults; a micro-framework or selected components leave more assembly work with the team.

Choose based on the whole lifecycle and existing repository conventions. Fewer initial packages do not automatically mean lower maintenance.