bcgould04
bcgould04

Reputation: 61

should i learn zf2 to use zend expressive

For those that have begun playing around with zend expressive, does it require knowledge of zend framework 2? meaning do I have to learn/know zf2 in order to use Expressive? or did they make enough changes where learning zf2 would be pointless/confusing?

along those same lines, other than the zend-expressive.readthedocs.org page, can anyone recommend some good tutorials/walk-throughs to get started ?

Upvotes: 5

Views: 716

Answers (4)

Dennis
Dennis

Reputation: 8111

If you already know Zend Framework, namely things like,

  • PhpRenderer
  • ServiceManager
  • ViewModel

it will help you, because you can choose those ZF components to go into your Expressive configuration and get a good head start, instead of taking baby steps learning what those are.

But, if you do not already know those, there is no reason to learn Zend Framework and I could argue that learning Zend Framework, in order to use Expressive, could be detrimental.

That is, because, Expressive, builds on new ideas of a microframework, rather than a pre-determined pipeline of Zend Framework, and those are quite different. If you are new to Expressive, I'd look into each concept separately and pick the components you wish to use. The concepts are

  • Routing
  • Dependency Injection Container
  • Templating

You can also pick your own Error handling module. Also Expressive gives you standard compliancy, such as PSR-7 and PSR-15 when it becomes available.

It can be good to know Zend Framework (or similar framework) because working with those frameworks gives you an understanding of how those components are built, and how they connect. However, Expressive Skeleton gives you a pretty good idea and a good headstart on very good groundwork concepts and modern web development (routing, templates, error handling, DI container). Newer concepts in Expressive are Middlewares and piping them together. Those were not present in Zend Framework at first, but now they made it in there as well.

Upvotes: 0

Dennis
Dennis

Reputation: 8111

If you already know Zend Framework, namely things like,

  • PhpRenderer
  • ServiceManager
  • ViewModel

it will help you, because you can choose those ZF components to go into your Expressive configuration and get a good head start, instead of taking baby steps learning what those are.

But, if you do not already know those, there is no reason to learn Zend Framework and I could argue that learning Zend Framework, in order to use Expressive, will be detrimental.

That is, because, Expressive, builds on new ideas of a microframework, and using pipelines of Middlewares, rather than a pre-determined pre-set pipeline of Zend Framework's zend-mvc module, and Middlewares and zend-mvc are quite different. If you are new to Expressive, I'd look into each concept separately and pick the components you wish to use. The concepts are

  • Routing
  • Dependency Injection Container
  • Templating

You can also pick your own Error handling module. Also Expressive gives you standard compliancy, such as PSR-7 and PSR-15 when it becomes available.

Upvotes: 0

user2408230
user2408230

Reputation:

You don't need any zend framework experience to start with zend expressive. But it gives you a head start when using zend components in your project.

Some more links to get you started:

Upvotes: 2

marcosh
marcosh

Reputation: 9008

I would say that the knowledge of Zend Framework 2 is not required to work with Zend Expressive. Certainly, the two share some components (Zend.Mvc for the routing and Zend.ServiceManager for DI, if you choose them in Expressive) and the logic of some things is similar, so a knowledge of ZF2 would not go wasted. But if you don't know it, you don't need to learn it before starting to use Expressive.

Regarding some useful resources on Expressive, here are some:

http://www.sitepoint.com/build-nasa-photo-gallery-zend-expressive/ http://www.masterzendframework.com/zend-expressive-introduction/ https://github.com/RalfEggert/zend-expressive-tutorial https://www.briefs.fm/zend-framework-bites

Upvotes: 3

Related Questions