I managed to run the 'simple' example from the 'extjs/examples/app/simple' directory. This provides a simple working example for the MVC architecture with App, Controllers, Views etc.

Now I tried to replace the ajax-type proxy with a direct-proxy and cannot get that to work. Something is always undefined

I made the following changes:

<link rel="stylesheet" type="text/css" href="/static/extjs/resources/css/ext-all.css">
 <script type="text/javascript" src="/static/extjs/ext-all-debug.js"></script> 
<script type="text/javascript" src="app/app.js"></script>
<script type="text/javascript" src="/api/src"></script>
The last line loads the server side API into 'Ext.app.REMOTING_API'. It is implemented with Perl and Catalyst. This works fine and I used it successfully during my tries.

Ext.Loader.setConfig({ enabled: true });
Ext.require(['Ext.direct.*' ]);

    autoCreateViewport: false,
    launch: function() {
        Ext.direct.Manager.addProvider( Ext.app.REMOTING_API );
        Ext.create('Blubberlog.view.Viewport', {} );
This adds the provider before the Views are created and they create the model and the store for the grid. Otherwise the api is undefined and instantiation of model/store fails.

    proxy: {
        type: 'direct',
        directFn: DBICUser.list,
        reader: {
            type: 'json',
            root: 'list'
This uses the server-side api and here I do see the 'DBICUser is not defined' when I set autoCreateViewport to true or add a controller in app.js

    onReady: function() {
        this.store = Ext.create('Ext.data.Store',
                             model: 'Blubberlog.model.User',
                             autoload: true
Here I have to create my own store, as my definition from 'store/user.js' is never found.

But my biggest problem is the following. As soon as I initialize the Controller, Model or Store properties or have autoCreateViewport=true within Ext.application, the DBICUser from proxy's directFn is undefined as the provider has not been added before instantiation of the views and store etc. Well, I could create all controllers manually as I did with the Viewport, but that is not what the MVC model and Ext.application is meant for.

I have to create an application before I can add the provider, but I need the provider to create the application with its components. How is this hen-and-egg-problem to be solved?

Thank You for Your advice.