0

I am creating an Web App and a Mobile App using Sencha while doing so I am following sencha's recommended MVC pattern to develop these apps

Sencha recommends to create Worksapce and then create extjs and touch applications one by one inside the workspace to achieve code sharing between the apps.

from their documentation i understand that a piece of code thats shared between the two apps must go under the workspace directory

but i fail to understand how do you access this code from the respective Apps

presently i am creating the global functions inside a app and is available in that app only

Ext.define('MyApp.common.Util', {
statics: {
foo:function(){
      ...
    }
});

and to access the function i use

requires:['MyApp.common.Util'] 
...

MyApp.common.Util.foo();

As u can see i can access function thats defined only under an app (MyApp..). can anyone provide me an example how to define a functions outside the app (within a workspace) and access them from various apps ?

Thanks

Mrinmoy
  • 1,611
  • 3
  • 18
  • 20

1 Answers1

0

Check out the example app here: https://github.com/WebAppSolutionInc/sencha-cafe-townsend They put the ExtJS and Sencha Touch app together with DeftJS https://github.com/deftjs/DeftJS

HriBB
  • 43
  • 1
  • 4