zendframework / zend-expressive

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

Is it possible to use Zend Expressive with Zend Apigility #342

Closed pdrosos closed 7 years ago

pdrosos commented 8 years ago

Hi all,

I am wondering if Zend Expressive can be used along with Zend Apigility for REST API projects? Does it make sense? If not, which of them is better for what kind of API projects?

I know that middleware architecture is faster than MVC, very suitable for REST APIs and the idea is Apigility 2 to be built on top of Expressive, but this was not started yet. So I would like to know if currently best from both technologies can be used and how should I integrate and use them together.

I should choose a technology for a new REST API project and it will be Apigility, Expressive or both of them, if it makes sense.

Thanks in advance for helping to anyone, who could give me an idea and make it clear!

ezimuel commented 8 years ago

@pdrosos as you said Apigility 2.0 will be based on zend-expressive, at least this the plan. Right now, you can use zend-expressive to build a REST API. I'm working on a prototype of this, without all the features of Apigility. If your goal is to write a REST API will all the features of Apigility, at the moment I suggest to use it without middleware (zend-expressive).

pdrosos commented 8 years ago

@ezimuel Thank you for your reply! Could you please share the prototype, when it's ready? I am sure it will help other people too to choose the right technology for their use case.

marcguyer commented 8 years ago

Say, for example, you wanted to route certain requests to a legacy ZF1 app, others to a new Apigility app, and still others to some other hypothetical app, wouldn't zend-expressive get that job done? Something like https://github.com/zendframework/zend-expressive/issues/283#issuecomment-225438142 is what I'm thinking of implementing. Any other suggestions for this concept?

weierophinney commented 7 years ago

@marcguyer You may want to take a look at https://github.com/janatzend/zend-expressive-legacy-bridge (developed by one of the Professional Services team at Zend/RogueWave); it provides a way for a ZF1 or Symfony1 application to act when no Expressive middleware can handle the request.

@pdrosos We're still evaluating our next steps for Apigility — if the next major version will be based on Expressive, or if we will create a parallel project to Apigility with similar goals, but built on top of Expressive. At this time, we have nothing to share, and it will likely be some months before we can start any planning or work in earnest.