Skip to content

Commit

Permalink
rework the quick tour's big picture
Browse files Browse the repository at this point in the history
  • Loading branch information
xabbuh committed Jun 28, 2015
1 parent 2e89aed commit d4ea145
Showing 1 changed file with 11 additions and 15 deletions.
26 changes: 11 additions & 15 deletions quick_tour/the_big_picture.rst
Original file line number Diff line number Diff line change
Expand Up @@ -106,20 +106,16 @@ Congratulations! Your first Symfony project is up and running!
them are explained in the
:ref:`Setting up Permissions <book-installation-permissions>` section
of the official book.

If the welcome page does not seem to be rendering CSS or image assets,
install them first:

.. code-block:: bash
$ php app/console assets:install
When you are finished working on your Symfony application, you can stop
the server with the ``server:stop`` command:

.. code-block:: bash
$ php app/console server:stop
the server by pressing Ctrl and C.

.. tip::

Expand All @@ -135,15 +131,15 @@ of database calls, HTML tags and other PHP code in the same script. To achieve
this goal with Symfony, you'll first need to learn a few fundamental concepts.

When developing a Symfony application, your responsibility as a developer
is to write the code that maps the user's *request* (e.g. ``http://localhost:8000/``)
to the *resource* associated with it (the ``Welcome to Symfony!`` HTML page).
is to write the code that maps the user's *request* (e.g. ``http://localhost:8000/app/example``)
to the *resource* associated with it (the ``Homepage`` HTML page).

The code to execute is defined in **actions** and **controllers**. The mapping
between user's requests and that code is defined via the **routing** configuration.
And the contents displayed in the browser are usually rendered using **templates**.

When you browsed ``http://localhost:8000/`` earlier, Symfony executed the
controller defined in the ``src/AppBundle/Controller/DefaultController.php``
When you browsed ``http://localhost:8000/app/example`` earlier, Symfony executed
the controller defined in the ``src/AppBundle/Controller/DefaultController.php``
file and rendered the ``app/Resources/views/default/index.html.twig`` template.
In the following sections you'll learn in detail the inner workings of Symfony
controllers, routes and templates.
Expand Down Expand Up @@ -186,7 +182,7 @@ information and then they render a template to show the results to the user.

In this example, the ``index`` action is practically empty because it doesn't
need to call any other method. The action just renders a template with the
*Welcome to Symfony!* content.
*Homepage.* content.

Routing
~~~~~~~
Expand Down Expand Up @@ -221,8 +217,8 @@ start with ``/**``, whereas regular PHP comments start with ``/*``.
The first value of ``@Route()`` defines the URL that will trigger the execution
of the action. As you don't have to add the host of your application to
the URL (e.g. ```http://example.com``), these URLs are always relative and
they are usually called *paths*. In this case, the ``/`` path refers to
the application homepage. The second value of ``@Route()`` (e.g.
they are usually called *paths*. In this case, the ``/app/example`` path
refers to the application homepage. The second value of ``@Route()`` (e.g.
``name="homepage"``) is optional and sets the name of this route. For now
this name is not needed, but later it'll be useful for linking pages.

Expand Down

0 comments on commit d4ea145

Please sign in to comment.