zendframework / zend-expressive

PSR-15 middleware in minutes!
BSD 3-Clause "New" or "Revised" License
711 stars 197 forks source link

Explanation of installation choices #512

Open AndersMadsen opened 7 years ago

AndersMadsen commented 7 years ago

Summary: explain the pros/cons, speed and other differences between the choices we have.

When I first looked at zend expressive I was impressed but confused, It looked nice, but I didn't know what happened with mvc nor the difference between these two choices, and I also looked at all the choices I had when it came to view, routing etc. And did not know what to pick or what the difference was. A Routing choices page where the differences are listed, as well as a template choices page in the getting started section.

geerteltink commented 7 years ago

When I first looked at zend expressive I was impressed but confused, It looked nice, but I didn't know what happened with mvc nor the difference between these two choices,

https://docs.zendframework.com/zend-expressive/why-expressive/#should-you-choose-zend-expressive-over-zend-mvc

and I also looked at all the choices I had when it came to view, routing etc. And did not know what to pick or what the difference was.

I'm not sure how you want to do this. Those are different packages with different solution for the same problem. I don't think it's our task to list all the differences, that also means you need to maintain that comparison. If there are new features added we would need to update the docs.
I guess for the internals you need to do a little investigation yourself. I suggest you read the docs of those packages anyway so you know how to use each package before you start. e.g. you might like the plates coding style over twig, and they both have an extension system to add missing features.

A Routing choices page where the differences are listed,

For routing the main difference is the configuration and the way the regex is used. They do work different internally but besides the different config you won't notice it. I know FastRoute is a favorite for many users and it's the default choice because it's fast, especially when its caching system is used.

as well as a template choices page in the getting started section.

Plates and zend-view use the php language directly where twig use its own parser which translates to php code (it's extra overhead, but with its caching system it's still fast). Twig automatically escapes output for you, plates is really fast and zend-view has a lot of extra features.

I guess we could add a short introduction, something like I wrote above. But I think anything more is in the package docs.

frankx commented 7 years ago

Sorry for not knowing excactly how this works here. Should I put my question I put on #283 rather here?

geerteltink commented 7 years ago

@frankx Try our forum and slack for questions.

AndersMadsen commented 7 years ago

@xtreamwayz Thank you for your response

Maybe the differences in the templates could be written as parts, and reused in both the overview of templates and in each template. Same goes for routers. The main features is only needed I think, performance is definitely a huge factor in chosing (thank you for the routing explanation.

weierophinney commented 4 years ago

This repository has been closed and moved to mezzio/mezzio; a new issue has been opened at https://github.com/mezzio/mezzio/issues/12.