1. #1
    Ext JS Premium Member anselmtmcclain's Avatar
    Join Date
    Mar 2008
    Location
    Northern California
    Posts
    84
    Vote Rating
    3
    anselmtmcclain is on a distinguished road

      0  

    Question cmd packages designed for both ExtJS5 and Touch 2.3

    cmd packages designed for both ExtJS5 and Touch 2.3


    Hi -

    With the increasingly common core API between Touch and ExtJS, we're planning to create some cmd packages to host shared, lower-level utility code that we use across apps we write in both ExtJS5 and Touch frameworks.

    Things like framework-agnostic javascript helper functions (with no dependencies at all on Sencha code), or helper functions that rely on Sencha classes, but only those common to both frameworks (e.g. a date renderer that uses Ext.Date.format() internally with different formatting defaults).

    However, when creating a package in the latest cmd 5, it's unclear if there is any "official" way to declare that the package is both Touch and Ext compatible. Do we need to effectively "choose one" SDK to start with and then ensure that any code we write uses APIs common to both frameworks. Is there any current or planned support to specifically mark a package as "common" in this way?

    Thanks - ATM

  2. #2
    Ext JS Premium Member anselmtmcclain's Avatar
    Join Date
    Mar 2008
    Location
    Northern California
    Posts
    84
    Vote Rating
    3
    anselmtmcclain is on a distinguished road

      0  

    Default


    The same concern also might apply to workspaces - i.e. is there a standard way of initializing a workspace to include both touch and ext SDKs, with the relevant versions of the frameworks copied in and referenced in the standard configs. Right now I'm creating a workspace with one SDK, then copying in the other and adding the path references to the workspace-level sencha.cfg.

  3. #3
    Ext JS Premium Member anselmtmcclain's Avatar
    Join Date
    Mar 2008
    Location
    Northern California
    Posts
    84
    Vote Rating
    3
    anselmtmcclain is on a distinguished road

      0  

    Default


    Working with this further, it appears as though I can leave out the package.framework=[ext|touch] from sencha.cfg, and that makes the package framework-agnostic, in that it doesn't expect or pull in dependencies from either framework. In fact, the framework declaration isn't included by default with 'sencha generate package' so you start out with a generic package.As soon as you want to add a component element - i.e. extend Ext.panel.Panel for ExtJS5 - you need to specify a framework. This makes sense as often the component classes and configs differ between the two SDKs. It's still somewhat unclear to me if there are still some underlying limitations on writing cross-SDK code in a package - i.e. if the two frameworks continued to sync up and started to share more common class names and package structures. But I support that's still down the road...