Skip to content

Commit f3c151c

Browse files
committed
reworded slightly some sentence to convert the text from a series of articles to a book
1 parent ca9d5d8 commit f3c151c

File tree

8 files changed

+36
-36
lines changed

8 files changed

+36
-36
lines changed

book/part01.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ components that solve common web development problems.
66

77
Instead of using these low-level components, you can use the ready-to-be-used
88
Symfony2 full-stack web framework, which is based on these components... or
9-
you can create your very own framework. This series is about the latter.
9+
you can create your very own framework. This book is about the latter.
1010

1111
.. note::
1212

@@ -48,16 +48,16 @@ Symfony2 Components.
4848

4949
.. tip::
5050

51-
If you don't have time to read the whole series, or if you want to get
51+
If you don't have time to read the whole book, or if you want to get
5252
started fast, you can also have a look at `Silex`_, a micro-framework
5353
based on the Symfony2 Components. The code is rather slim and it leverages
5454
many aspects of the Symfony2 Components.
5555

5656
Many modern web frameworks call themselves MVC frameworks. We won't talk about
5757
MVC here as the Symfony2 Components are able to create any type of frameworks,
5858
not just the ones that follow the MVC architecture. Anyway, if you have a look
59-
at the MVC semantics, this series is about how to create the Controller part
60-
of a framework. For the Model and the View, it really depends on your personal
59+
at the MVC semantics, this book is about how to create the Controller part of
60+
a framework. For the Model and the View, it really depends on your personal
6161
taste and I will let you use any existing third-party libraries (Doctrine,
6262
Propel, or plain-old PDO for the Model; PHP or Twig for the View).
6363

@@ -147,8 +147,8 @@ start with the simplest web application we can think of in PHP::
147147

148148
printf('Hello %s', $input);
149149

150-
That's all for the first part of this series. Next time, we will introduce the
151-
HttpFoundation Component and see what it brings us.
150+
In the next chapter, we are going to introduce the HttpFoundation Component
151+
and see what it brings us.
152152

153153
.. _`Symfony2`: http://symfony.com/
154154
.. _`documentation`: http://symfony.com/doc

book/part02.rst

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@ framework from scratch.
1515
developers; the Internet has already plenty of good resources on that
1616
topic.
1717

18-
Even if the "application" we wrote yesterday was simple enough, it suffers
19-
from a few problems::
18+
Even if the "application" we wrote in the previous chapter was simple enough,
19+
it suffers from a few problems::
2020

2121
<?php
2222

@@ -93,8 +93,7 @@ unit test for the above code::
9393
At this point, if you are not convinced that security and testing are indeed
9494
two very good reasons to stop writing code the old way and adopt a framework
9595
instead (whatever adopting a framework means in this context), you can stop
96-
reading this series now and go back to whatever code you were working on
97-
before.
96+
reading this book now and go back to whatever code you were working on before.
9897

9998
.. note::
10099

@@ -310,7 +309,7 @@ probably work for you. Don't reinvent the wheel.
310309
I've almost forgot to talk about one added benefit: using the HttpFoundation
311310
component is the start of better interoperability between all frameworks and
312311
applications using it (as of today `Symfony2`_, `Drupal 8`_, `phpBB 4`_,
313-
`Silex`_, `Midgard CMS`_, `Zikula`_ ...).
312+
`ezPublish 5`, `Silex`_, `Midgard CMS`_, `Zikula`_ ...).
314313

315314
.. _`Twig`: http://twig.sensiolabs.com/
316315
.. _`Symfony2 versus Flat PHP`: http://symfony.com/doc/current/book/from_flat_php_to_symfony2.html

book/part04.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
The Routing Component
22
=====================
33

4-
Before we start with today's topic, let's refactor our current framework just
5-
a little to make templates even more readable::
4+
Before we start diving into the Routing component, let's refactor our current
5+
framework just a little to make templates even more readable::
66

77
<?php
88

book/part08.rst

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
Unit Testing
22
============
33

4-
Some watchful readers pointed out some subtle but nonetheless important bugs
5-
in the framework we have built yesterday. When creating a framework, you must
6-
be sure that it behaves as advertised. If not, all the applications based on
7-
it will exhibit the same bugs. The good news is that whenever you fix a bug,
8-
you are fixing a bunch of applications too.
4+
You might have noticed some subtle but nonetheless important bugs in the
5+
framework we built in the previous chapter. When creating a framework, you
6+
must be sure that it behaves as advertised. If not, all the applications based
7+
on it will exhibit the same bugs. The good news is that whenever you fix a
8+
bug, you are fixing a bunch of applications too.
99

1010
Today's mission is to write unit tests for the framework we have created by
1111
using `PHPUnit`_. Create a PHPUnit configuration file in
@@ -120,8 +120,8 @@ Executing this test is as simple as running ``phpunit`` from the
120120
.. note::
121121

122122
I do not explain how the code works in details as this is not the goal of
123-
this series, but if you don't understand what the hell is going on, I
124-
highly recommend you to read PHPUnit documentation on `test doubles`_.
123+
this book, but if you don't understand what the hell is going on, I highly
124+
recommend you to read PHPUnit documentation on `test doubles`_.
125125

126126
After the test ran, you should see a green bar. If not, you have a bug
127127
either in the test or in the framework code!

book/part09.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -322,7 +322,7 @@ And here is the new version of ``ContentLengthListener``::
322322
events as needed.
323323

324324
To make your framework truly flexible, don't hesitate to add more events; and
325-
to make it more awesome out of the box, add more listeners. Again, this series
325+
to make it more awesome out of the box, add more listeners. Again, this book
326326
is not about creating a generic framework, but one that is tailored to your
327327
needs. Stop whenever you see fit, and further evolve the code from there.
328328

book/part10.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
The HttpKernel Component: HttpKernelInterface
22
=============================================
33

4-
In the conclusion of the second part of this series, I've talked about one
4+
In the conclusion of the second chapter of this book, I've talked about one
55
great benefit of using the Symfony2 components: the *interoperability* between
66
all frameworks and applications using them. Let's do a big step towards this
77
goal by making our framework implement ``HttpKernelInterface``::

book/part11.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@ The HttpKernel Component: The HttpKernel Class
22
==============================================
33

44
If you were to use our framework right now, you would probably have to add
5-
support for custom error messages. Right now, we have 404 and 500 error
6-
support but the responses are hardcoded in the framework itself. Making them
7-
customizable is easy enough though: dispatch a new event and listen to it.
8-
Doing it right means that the listener has to call a regular controller. But
9-
what if the error controller throws an exception? You will end up in an
10-
infinite loop. There should be an easier way, right?
5+
support for custom error messages. We do have 404 and 500 error support but
6+
the responses are hardcoded in the framework itself. Making them customizable
7+
is easy enough though: dispatch a new event and listen to it. Doing it right
8+
means that the listener has to call a regular controller. But what if the
9+
error controller throws an exception? You will end up in an infinite loop.
10+
There should be an easier way, right?
1111

1212
Enter the ``HttpKernel`` class. Instead of solving the same problem over and
1313
over again and instead of reinventing the wheel each time, the ``HttpKernel``

book/part12.rst

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
The DependencyInjection Component
22
=================================
33

4-
In the last installment of this series, we have emptied the
5-
``Simplex\Framework`` class by extending the ``HttpKernel`` class from
6-
the eponymous component. Seeing this empty class, you might be tempted to move
7-
some code from the front controller to it::
4+
In the previous chapter, we emptied the ``Simplex\Framework`` class by
5+
extending the ``HttpKernel`` class from the eponymous component. Seeing this
6+
empty class, you might be tempted to move some code from the front controller
7+
to it::
88

99
<?php
1010

@@ -248,10 +248,11 @@ Don't yell at me if you don't want to have a dependency injection container in
248248
your framework. If you don't like it, don't use it. It's your framework, not
249249
mine.
250250

251-
This is (already) the last part of my series on creating a framework on top of
252-
the Symfony2 components. I'm aware that many topics have not been covered in
253-
great details, but hopefully it gives you enough information to get started on
254-
your own and to better understand how the Symfony2 framework works internally.
251+
This is (already) the last chapter of this book on creating a framework on top
252+
of the Symfony2 components. I'm aware that many topics have not been covered
253+
in great details, but hopefully it gives you enough information to get started
254+
on your own and to better understand how the Symfony2 framework works
255+
internally.
255256

256257
If you want to learn more, I highly recommend you to read the source code of
257258
the `Silex`_ micro-framework, and especially its `Application`_ class.

0 commit comments

Comments
 (0)