Skip to content

Commit 0846e68

Browse files
committed
Simplify the Journey section a bit
1 parent 0d0e81d commit 0846e68

File tree

1 file changed

+12
-17
lines changed

1 file changed

+12
-17
lines changed

http_fundamentals.rst

Lines changed: 12 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -279,17 +279,16 @@ and create the appropriate response based on your application logic*.
279279
The Journey from the Request to the Response
280280
--------------------------------------------
281281

282-
Like HTTP itself, the ``Request`` and ``Response`` objects are pretty simple.
283-
The hard part of building an application is writing what comes in between.
284-
In other words, the real work comes in writing the code that interprets the
285-
request information and creates the response.
282+
Like HTTP itself, using the ``Request`` and ``Response`` objects is pretty
283+
simple. The hard part of building an application is writing what comes in
284+
between. In other words, the real work comes in writing the code that
285+
interprets the request information and creates the response.
286286

287287
Your application probably does many things, like sending emails, handling
288288
form submissions, saving things to a database, rendering HTML pages and protecting
289289
content with security. How can you manage all of this and still keep your
290-
code organized and maintainable?
291-
292-
Symfony was created to solve these problems so that you don't have to.
290+
code organized and maintainable? Symfony was created to help you with these
291+
problems.
293292

294293
.. index::
295294
single: Front controller; Origins
@@ -298,13 +297,7 @@ The Front Controller
298297
~~~~~~~~~~~~~~~~~~~~
299298

300299
Traditionally, applications were built so that each "page" of a site was
301-
its own physical file:
302-
303-
.. code-block:: text
304-
305-
index.php
306-
contact.php
307-
blog.php
300+
its own physical file (e.g. ``index.php``, ``contact.php``, etc.).
308301

309302
There are several problems with this approach, including the inflexibility
310303
of the URLs (what if you wanted to change ``blog.php`` to ``news.php`` without
@@ -325,14 +318,16 @@ handles every request coming into your application. For example:
325318

326319
.. tip::
327320

328-
By using rewrite rules in your :doc:`web server configuration </cookbook/configuration/web_server_configuration>`,
329-
the ``index.php`` won't be needed and you will have beautiful, clean URLs (e.g. ``/show``).
321+
By using rewrite rules in your
322+
:doc:`web server configuration </cookbook/configuration/web_server_configuration>`,
323+
the ``index.php`` won't be needed and you will have beautiful, clean URLs
324+
(e.g. ``/show``).
330325

331326
Now, every request is handled exactly the same way. Instead of individual URLs
332327
executing different PHP files, the front controller is *always* executed,
333328
and the routing of different URLs to different parts of your application
334329
is done internally. This solves both problems with the original approach.
335-
Almost all modern web apps do this - including apps like WordPress.
330+
Almost all modern web apps do this.
336331

337332
Stay Organized
338333
~~~~~~~~~~~~~~

0 commit comments

Comments
 (0)