I recently came across yet another way to build web apps using WordPress. Yes yes, we all know that WordPress is (almost official) supporting RESTful APIs via http://wp-api.org/.
But what if the data you actually need does not fully match WordPress’s data models ? ( such as User related data ). Yet at the same time, you still need to use WordPress for other general CMS purpose, such as creating blog posts, landing pages, contact us page etc, pages where it can be done a lot more easily via WordPress, but not within your custom apps ?
Sure you could code up custom views/logic for the above use cases, but seriously speaking, it might be much easier and faster to build up these pages using WordPress, and focus your effort on actually building your app.
So here’s the solution: you can use php based frameworks such as Slim in your WordPress installation.
Both generally works: for the theme-based version, you can actually make use of Twig and other Slim related goodies within your theme. For the plugin version, you can use Slim as a structured way to expose RESTful APIs, both from internal data source or external data source.