I recently started delving in to zend expressive. I know zend makes use of zend db typically. In my project I am developing microservices and was wondering what the opinion is about using doctrine with regards to microservices in zend expressive. Any thoughts or opinions would be appreciated.
-
1You're asking the community about the implementation detail of your microservice. The truth is, we don't know that. It depends what is your objective. It's you, who have to answer that question. So, 1) do you need an ORM library; 2) why did you select Doctrine in the first place?; 3) what are the requirements? – Daniel Stefaniuk May 11 '16 at 20:45
2 Answers
There's no general rule forbidding Doctrine in an Expressive project. I'm finishing up such a project this week (a full line-of-business app, not a microservice), and it's gone very well. If doctrine fits for you model, there's no reason to eschew it just because you're writing a small app.

- 61,857
- 6
- 82
- 92
You can use Doctrine with any PHP framework including Zend Expressive. The question you should ask yourself is do you really need Doctrine? If you have to create an application with complex domain logic, then Doctrine is exactly what you looking for. Also, you can use Table and Row Gateways to map your database tables or rows and to interact with your database in a object oriented way. Personally, I would not recommend using Doctrine for small applications with no, or very simple business logic.

- 2,040
- 2
- 19
- 38