The current way of writing ownCloud apps is quite cumbersome and unclean, and often resorts to writing what I call "naked PHP code" in app.php which is code that isn't wrapped into functions or classes.
The way I see it, it would be better if apps would be able to declare and register more things in info.xml, like an entry point class. The entry point class would implement a specifically defined interface which helps enforce a given format for apps.
Also, if the app implements an older version of the interface, it should be easier to catch such errors when loading the app (catchable exceptions).
Now have a look at the service-based proposal here: https://central.owncloud.org/t/service-based-app-imlpementation-to-solve-inter-app-dependencies/1615
With services, we could say that most things that an app defines nowadays could be implemented as service consumers. Basically, core would be a provider for the following services:
- admin page entries
- personal page entries
- filesystem services
Note that backend code would rather be registered as an own service provider by the app itself.
This means that a new app would specify in info.xml whether it implements the frontend service, if it has a frontend (not all apps have one).
An app that needs filesystem access can declare itself as consumer of the filesystem service, and receive it injected on the PHP level.
Note: need to see how this would work on the JS level too.