Gelmiş geçmiş en büyük porno sitemiz olan 2pe de her zaman en kaliteli pornoları sunmayı hedefledik. Diğer video sitemiz olan vuam da ise hd porno ağırlıklı çalışmalara başladık.

  1. #1
    Sencha User KJedi's Avatar
    Join Date
    Feb 2008
    Location
    Ukraine, Mykolayiv
    Posts
    145
    Vote Rating
    1
    KJedi is on a distinguished road

      0  

    Default Build for frontend and backend with shared components

    Build for frontend and backend with shared components


    Hi guys!

    We're building an app that has public part and main one for internal use. They share quite complex form and some utility components and data models.
    I create a workspace, within that workspace I create two applications: frontend and backend. Then I create a common folder with sources and add this folder into the /.sencha/workspace/sencha.cfg:
    Code:
    workspace.classpath=${workspace.dir}/common/src
    My directory structure looks like this:
    Code:
    /
      .sencha
        ...
        sencha.cfg
      ext
      build
      frontend
        app
        ...
        app.js
      backend
        app
        ...
        app.js
      common
        src
    In frontend and backend I have diffferent namespaces (CJF, CJ and in the common components I have separate namespace: CJ. So I add a class CJ.component.Logger and put it into common/src/component/Logger.js
    And then I modify app.js of the frontent app so it looks as follows:
    PHP Code:
    Ext.Loader.setConfig({
        
    enabledtrue,
        
    disableCachingfalse,
        
    paths: {
            
    'CJ''../common/src'
        
    }
    });

    Ext.application({
        
    name'CJF',

        
    extend'CJF.Application',
        
        
    autoCreateViewporttrue
    }); 
    It works just fine. And if I make a production build, it finds and includes my logger so I can use it.

    The only problem is that above approach works if document root is /, not /frontend, otherwise path for CJ - ../common/src will be above the document root and thus inaccessible for the Ext.Loader during the development phase.

    Any ideas? What is the correct approach of handling significant logic in the shared components? What about shared models, stores, do they work fine?
    http://iqria.com/ http://frontendgeeks.com/
    JS ninjas. Delivering ExtJS apps since 2008.
    Providing development and consulting.

  2. #2
    Sencha User KJedi's Avatar
    Join Date
    Feb 2008
    Location
    Ukraine, Mykolayiv
    Posts
    145
    Vote Rating
    1
    KJedi is on a distinguished road

      0  

    Default


    Sorry, forgot to mention. In order to establish dependency, I've edited app/Application.js:
    PHP Code:
    Ext.define('CJF.Application', {
        
    name'CJF',

        
    extend'Ext.app.Application',

        
    uses: [
            
    'CJ.component.Logger'
    ....
        ],
    ....
    }); 
    http://iqria.com/ http://frontendgeeks.com/
    JS ninjas. Delivering ExtJS apps since 2008.
    Providing development and consulting.

  3. #3
    Sencha User KJedi's Avatar
    Join Date
    Feb 2008
    Location
    Ukraine, Mykolayiv
    Posts
    145
    Vote Rating
    1
    KJedi is on a distinguished road

      0  

    Default


    Sharing models is not straightforward, but possible: http://www.sencha.com/forum/showthre...s-for-two-apps
    I think same applies to stores.
    So the only open question is about setting up paths in loader or utilizing classpath by Ext.Loader. Is it possible?
    http://iqria.com/ http://frontendgeeks.com/
    JS ninjas. Delivering ExtJS apps since 2008.
    Providing development and consulting.