|
1 | 1 | # Should You Choose Zend\Expressive Over Zend\Mvc? |
2 | 2 |
|
3 | | -After creating several projects with Zend\Expressive, we recommend that you choose Expressive for any new project — _if the choice is yours to make_. |
| 3 | +After creating several projects with Zend\Expressive, we recommend that you |
| 4 | +choose Expressive for any new project — _if the choice is yours to make_. |
4 | 5 |
|
5 | 6 | ## We Recommend Zend\Expressive |
6 | 7 |
|
7 | | -[Zend\MVC](https://github.com/zendframework/zend-mvc) has many preconceptions about how things work, yet they're very broad and unspecific. |
8 | | -What’s more, it also has several pre-wired structures in place. |
| 8 | +[Zend\MVC](https://github.com/zendframework/zend-mvc) has many preconceptions |
| 9 | +about how things work, yet they're very broad and unspecific. What’s more, it |
| 10 | +also has several pre-wired structures in place. |
9 | 11 |
|
10 | | -As a result, you are required to know a lot of what those things are — *if* you want to use it optimally. |
11 | | -And to acquire that depth of knowledge, you’re going to need to spend a lot of time, digging deep into Zend\Mvc’s internals, before you begin to get the most out of it. |
| 12 | +As a result, you are required to know a lot of what those things are — *if* you |
| 13 | +want to use it optimally. And to acquire that depth of knowledge, you’re going |
| 14 | +to need to spend a lot of time, digging deep into Zend\Mvc’s internals, before |
| 15 | +you begin to get the most out of it. |
12 | 16 |
|
13 | 17 | To quote Zend Framework project lead, [Matthew Weier O’Phinney](https://twitter.com/mwop): |
14 | 18 |
|
15 | | -> The problem is that Zend\Mvc is anything but beginner-friendly at this point. You're required to deep dive into the event manager, service manager, and module system — right from the outset; And to do this you need more than a passing understanding of object-oriented programming and a range of design patterns. |
| 19 | +> The problem is that Zend\Mvc is anything but beginner-friendly at this point. |
| 20 | +> You're required to deep dive into the event manager, service manager, and |
| 21 | +> module system — right from the outset; And to do this you need more than a |
| 22 | +> passing understanding of object-oriented programming and a range of design |
| 23 | +> patterns. |
16 | 24 |
|
17 | | -Zend\Expressive (specifically applications based on [the Expressive Skeleton Installer](https://zendframework.github.io/zend-expressive/)) on the other hand, comes with barely any of these assumptions and requirements. |
| 25 | +Zend\Expressive (specifically applications based on [the Expressive Skeleton |
| 26 | +Installer](https://zendframework.github.io/zend-expressive/)) on the other hand, |
| 27 | +comes with barely any of these assumptions and requirements. |
18 | 28 |
|
19 | | -It provides a very minimalist structure. Essentially all you have to become familiar with are five core components. These are: |
| 29 | +It provides a very minimalist structure. Essentially all you have to become |
| 30 | +familiar with are five core components. These are: |
20 | 31 |
|
21 | 32 | - A DI container |
22 | 33 | - A Router |
23 | 34 | - An Error handler for development |
24 | 35 | - A Template engine (if you’re not creating an API) |
25 | 36 | - PSR-7 Middleware |
26 | 37 |
|
27 | | -Given that, you can quickly get up to speed with the framework and begin creating the application that you need. |
28 | | -We believe that this approach — in contrast to the Zend\Mvc approach — is more flexible and accommodating. |
| 38 | +Given that, you can quickly get up to speed with the framework and begin |
| 39 | +creating the application that you need. We believe that this approach — in |
| 40 | +contrast to the Zend\Mvc approach — is more flexible and accommodating. |
29 | 41 |
|
30 | 42 | What’s more, you can mix and match the types of applications that you create. |
31 | | -Do you just need an API? Great; you can do that quite quickly. |
32 | | -Do you want an HTML-based front-end? That’s available too. |
33 | 43 |
|
34 | | -When building applications with Zend\Expressive, you can make use of any other Zend library, or non-Zend library. |
35 | | -You can pick and choose what you need, as and when you need it. |
36 | | -You’re not bound by many, if any, constraints and design decisions. |
| 44 | +- Do you just need an API? Great; you can do that quite quickly. |
| 45 | +- Do you want an HTML-based front-end? That’s available too. |
| 46 | + |
| 47 | +When building applications with Zend\Expressive, you can make use of any other |
| 48 | +Zend library, or non-Zend library. You can pick and choose what you need, as |
| 49 | +and when you need it. You’re not bound by many, if any, constraints and design |
| 50 | +decisions. |
37 | 51 |
|
38 | 52 | ## In Conclusion |
39 | 53 |
|
40 | | -For what it’s worth, we’re **not** saying that Zend\Mvc is a poor choice! |
41 | | -What we are saying is: |
| 54 | +For what it’s worth, we’re **not** saying that Zend\Mvc is a poor choice! What |
| 55 | +we are saying is: |
42 | 56 |
|
43 | | -1. The learning curve, from getting started to building the first application, is _significantly_ lower with Zend\Expressive |
44 | | -2. The ways in which you can create applications, whether through multiple pieces of middleware or by combining multiple Expressive apps, into one larger one, is a much more efficient and fluid way to work |
| 57 | +1. The learning curve, from getting started to building the first application, |
| 58 | + is _significantly_ lower with Zend\Expressive |
| 59 | +2. The ways in which you can create applications, whether through multiple |
| 60 | + pieces of middleware or by combining multiple Expressive apps, into one |
| 61 | + larger one, is a much more efficient and fluid way to work |
45 | 62 |
|
46 | 63 | Ultimately, the choice is always up to you, your team, and your project’s needs. |
47 | | -We just want to ensure that you’ve got all the information you need, to make an informed decision. |
| 64 | +We just want to ensure that you’ve got all the information you need, to make an |
| 65 | +informed decision. |
0 commit comments