File tree 12 files changed +24
-24
lines changed
12 files changed +24
-24
lines changed Original file line number Diff line number Diff line change 1
- Create your own framework... on top of the Symfony2 Components (part 1)
2
- =======================================================================
1
+ Introduction
2
+ ============
3
3
4
4
Symfony2 is a reusable set of standalone, decoupled, and cohesive PHP
5
5
components that solve common web development problems.
Original file line number Diff line number Diff line change 1
- Create your own framework... on top of the Symfony2 Components (part 2)
2
- =======================================================================
1
+ The HttpFoundation Component
2
+ ============================
3
3
4
4
Before we dive into the code refactoring, I first want to step back and take a
5
5
look at why you would like to use a framework instead of keeping your
Original file line number Diff line number Diff line change 1
- Create your own framework... on top of the Symfony2 Components (part 3)
2
- =======================================================================
1
+ The Front Controller
2
+ ====================
3
3
4
4
Up until now, our application is simplistic as there is only one page. To
5
5
spice things up a little bit, let's go crazy and add another page that says
Original file line number Diff line number Diff line change 1
- Create your own framework... on top of the Symfony2 Components (part 4)
2
- =======================================================================
1
+ The Routing Component
2
+ =====================
3
3
4
4
Before we start with today's topic, let's refactor our current framework just
5
5
a little to make templates even more readable::
Original file line number Diff line number Diff line change 1
- Create your own framework... on top of the Symfony2 Components (part 5)
2
- =======================================================================
1
+ Templating
2
+ ==========
3
3
4
4
The astute reader has noticed that our framework hardcodes the way specific
5
5
"code" (the templates) is run. For simple pages like the ones we have created
Original file line number Diff line number Diff line change 1
- Create your own framework... on top of the Symfony2 Components (part 6)
2
- =======================================================================
1
+ The HttpKernel Component: the Controller Resolver
2
+ =================================================
3
3
4
4
You might think that our framework is already pretty solid and you are
5
5
probably right. But let's see how we can improve it nonetheless.
Original file line number Diff line number Diff line change 1
- Create your own framework... on top of the Symfony2 Components (part 7)
2
- =======================================================================
1
+ The Separation of Concerns
2
+ ==========================
3
3
4
4
One down-side of our framework right now is that we need to copy and paste the
5
5
code in ``front.php `` each time we create a new website. 40 lines of code is
Original file line number Diff line number Diff line change 1
- Create your own framework... on top of the Symfony2 Components (part 8)
2
- =======================================================================
1
+ Unit Testing
2
+ ============
3
3
4
4
Some watchful readers pointed out some subtle but nonetheless important bugs
5
5
in the framework we have built yesterday. When creating a framework, you must
Original file line number Diff line number Diff line change 1
- Create your own framework... on top of the Symfony2 Components (part 9)
2
- =======================================================================
1
+ The EventDispatcher Component
2
+ =============================
3
3
4
4
Our framework is still missing a major characteristic of any good framework:
5
5
*extensibility *. Being extensible means that the developer should be able to
Original file line number Diff line number Diff line change 1
- Create your own framework... on top of the Symfony2 Components (part 10)
2
- ========================================================================
1
+ The HttpKernel Component: HttpKernelInterface
2
+ =============================================
3
3
4
4
In the conclusion of the second part of this series, I've talked about one
5
5
great benefit of using the Symfony2 components: the *interoperability * between
Original file line number Diff line number Diff line change 1
- Create your own framework... on top of the Symfony2 Components (part 11)
2
- ========================================================================
1
+ The HttpKernel Component: The HttpKernel Class
2
+ ==============================================
3
3
4
4
If you were to use our framework right now, you would probably have to add
5
5
support for custom error messages. Right now, we have 404 and 500 error
Original file line number Diff line number Diff line change 1
- Create your own framework... on top of the Symfony2 Components (part 12)
2
- ========================================================================
1
+ The DependencyInjection Component
2
+ =================================
3
3
4
4
In the last installment of this series, we have emptied the
5
5
``Simplex\\Framework `` class by extending the ``HttpKernel `` class from
You can’t perform that action at this time.
0 commit comments