We are moving our forum in GitHub Discussions. For questions about Phalcon v3/v4 you can visit here and for Phalcon v5 here.

Micro Collection vs Dispatcher Router Controller

I'm creating a user register, login, logout, auth API using phalcon. After read micro service, i think it's pretty much a slim version of dispatcher router. But what should i use and when? Dispatcher have its advantages for several events but micro services are straight forward and can do it too. If i use dispatcher router, i don't see why i should use micro services and vice versa. And also if anyone have micro collection's example, please post it here too, the documents didn't really do the job of demonstration for the result.

edited Sep '16

What you mean ? Micro collection is document pretty well, nothing to add https://docs.phalcon.io/pl/latest/reference/micro.html#using-controllers-as-handlers.

Router is used even in Micro, just not dispatcher which is only for full application. With dispatcher you get more abilites to take control of flow of your application. You can forward actions etc.

The question is not about Micro vs Dispatcher, it should be more like Micro vs Appliaction. Application for example gives you multi module configuration and etc things. It's just more complex, small project = Micro, big = Appliaction.

For your use case, just go for a Micro with MicroCollection.