Skip to content

Commit e7dfc8b

Browse files
javiereguiluzweaverryan
authored andcommitted
[quick_tour] simplified "the architecture" chapter
1 parent eb3fe4c commit e7dfc8b

File tree

1 file changed

+14
-24
lines changed

1 file changed

+14
-24
lines changed

quick_tour/the_architecture.rst

Lines changed: 14 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,20 @@
11
The Architecture
22
================
33

4-
You are my hero! Who would have thought that you would still be here after the
5-
first three parts? Your efforts will be well rewarded soon. The first three
6-
parts didn't look too deeply at the architecture of the framework. Because it
7-
makes Symfony2 stand apart from the framework crowd, let's dive into the
8-
architecture now.
4+
The first three parts of this tutorial didn't look too deeply at the
5+
architecture of the framework. Because it makes Symfony2 stand apart from the
6+
framework crowd, let's dive into the architecture now.
97

108
Understanding the Directory Structure
119
-------------------------------------
1210

1311
The directory structure of a Symfony2 :term:`application` is rather flexible,
14-
but the directory structure of the *Standard Edition* distribution reflects
15-
the typical and recommended structure of a Symfony2 application:
12+
but the recommended structure is as follows:
1613

17-
* ``app/``: The application configuration;
18-
* ``src/``: The project's PHP code;
19-
* ``vendor/``: The third-party dependencies;
20-
* ``web/``: The web root directory.
14+
* ``app/``: the application configuration;
15+
* ``src/``: the project's PHP code;
16+
* ``vendor/``: the third-party dependencies;
17+
* ``web/``: the web root directory.
2118

2219
The ``web/`` Directory
2320
~~~~~~~~~~~~~~~~~~~~~~
@@ -36,11 +33,9 @@ lives::
3633
$kernel->loadClassCache();
3734
$kernel->handle(Request::createFromGlobals())->send();
3835

39-
The kernel first requires the ``bootstrap.php.cache`` file, which bootstraps
40-
the framework and registers the autoloader (see below).
41-
42-
Like any front controller, ``app.php`` uses a Kernel Class, ``AppKernel``, to
43-
bootstrap the application.
36+
The controller first requires the ``bootstrap.php.cache`` file, which bootstraps
37+
the framework and registers the autoloader (see below). Then, it uses a kernel
38+
class, ``AppKernel`` in this case, to bootstrap the application.
4439

4540
.. _the-app-dir:
4641

@@ -65,11 +60,6 @@ are stored under the ``vendor/`` directory, but this is just a convention.
6560
You can store them wherever you want, globally on your server or locally
6661
in your projects.
6762

68-
.. note::
69-
70-
If you want to learn more about Composer's autoloader, read `Composer-Autoloader`_.
71-
Symfony also has an autoloading component - read ":doc:`/components/class_loader/class_loader`".
72-
7363
Understanding the Bundle System
7464
-------------------------------
7565

@@ -296,8 +286,9 @@ each request? The speed is partly due to its cache system. The application
296286
configuration is only parsed for the very first request and then compiled down
297287
to plain PHP code stored in the ``app/cache/`` directory. In the development
298288
environment, Symfony2 is smart enough to flush the cache when you change a
299-
file. But in the production environment, it is your responsibility to clear
300-
the cache when you update your code or change its configuration.
289+
file. But in the production environment, to speed things up, it is your
290+
responsibility to clear the cache when you update your code or change its
291+
configuration.
301292

302293
When developing a web application, things can go wrong in many ways. The log
303294
files in the ``app/logs/`` directory tell you everything about the requests
@@ -336,4 +327,3 @@ topics now? Look no further - go to the official :doc:`/book/index` and pick
336327
any topic you want.
337328

338329
.. _Composer: http://getcomposer.org
339-
.. _`Composer-Autoloader`: http://getcomposer.org/doc/01-basic-usage.md#autoloading

0 commit comments

Comments
 (0)