Skip to content

Service container docs, reference section #101

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
7 commits merged into from
Feb 17, 2011
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 19 additions & 1 deletion glossary.rst
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,22 @@ Glossary
A *Front Controller* is a short PHP that lives in the web directory
of your project. Typically, *all* requests are handled by executing
the same front controller, whose job is to bootstrap the Symfony
application.
application.

Service
A *Service* is a generic term for any PHP object that performs a
specific task. A service is usually used "globally", such as a database
connection object or an object that delivers email messages. In Symfony2,
services are often configured and retrieved from the service container.
An application that has many decoupled services is said to follow
a `service-oriented architecture`_

Service Container
A *Service Container*, also known as a *Dependency Injection Container*,
is a special object that manages the instantiation of services inside
an application. Instead of creating services directly, the developer
*trains* the service container (via configuration) on how to create
the services. The service container takes care of lazily instantiating
and injecting dependent services.

.. _`service-oriented architecture`: http://wikipedia.org/wiki/Service-oriented_architecture
Loading