Results 1 to 3 of 3

Thread: Make ST App a Feature of an Existing App?

  1. #1
    Sencha User Trozdol's Avatar
    Join Date
    Jan 2009
    Location
    Nashville
    Posts
    64
    Answers
    2

    Default Make ST App a Feature of an Existing App?

    Hello all, I'm hoping someone can provide some input on a clean way to handle this situation...

    Short Version:

    I want to convert a set of controllers to some kind of generic class name and include them in multiple apps.


    Longer Version:

    I've made a cordova plugin tester for error handling situations where the user has not given permission to a feature.

    I like to develop features that I want to be able to reuse I work on them in their own app as it helps me make sure a feature is developed with little or no dependence on existing code. So if it needs to be moved or pulled out it's a clean process. This one is named 'Services'. Here's the process it goes through.

    Services.controller.services.Services - is point of entry
    Services.controller.services.Core - just hangs out to be extended.

    Extend core controller for each cordova plugin providing some basic config options and a test method.

    PHP Code:
    Services.controller.services.Geolocation
    Services
    .controller.services.Contacts
    Services
    .controller.services.Camera 
    etc.

    This is the process if that helps in the type of suggestion if any...
    1. check if the plugin exists
    2. for each service add to panel with icon representing status
    3. test each plugin and update panel status icon
    4. is plugin required for the app to run (specified in config)?
    5. if yes halt and present user with error and possible solutions
    6. if no proceed but update panel icons
    Then get permission
    1. for each available plugin run a test specific to that plugin
    2. update panel icons to show all is good or
    3. if error stop and show user error how to resolve in iOS settings
    Ideally I can just make one reference in app.js and drop into different projects and I want to avoid having to find all and replace on classnames. As a bonus is there a way to only require one path or classname to enable this in another app that would be amazing.

    Another reason for this is I want to programmatically get all plugin controllers and know when all are finished without having to hard code any numbers in it or relying a hacky "As long as I fire an event from this controller I know it's the last one" kind of solution..


    Hopefully this all makes sense. Thanks for reading!
    Shayne Trosdahl
    @Trozdol
    CodePen

  2. #2
    Sencha User alex.volfson's Avatar
    Join Date
    Jan 2016
    Posts
    462
    Answers
    60

    Default

    I think packages would be a good way to do this http://docs.sencha.com/cmd/5.x/cmd_p..._packages.html

  3. #3
    Sencha User Trozdol's Avatar
    Join Date
    Jan 2009
    Location
    Nashville
    Posts
    64
    Answers
    2

    Default

    I totally forgot about packages. I'll give that a shot! Thanks for the link!
    Shayne Trosdahl
    @Trozdol
    CodePen

Similar Threads

  1. Replies: 4
    Last Post: 11 Jul 2011, 7:15 AM
  2. applyTo on existing markup does not make modal
    By jasontwill in forum Ext 2.x: Help & Discussion
    Replies: 2
    Last Post: 14 May 2008, 10:58 AM
  3. [SOLVED] Make all existing Textareas in a form growable
    By shanebush in forum Ext 1.x: Help & Discussion
    Replies: 2
    Last Post: 31 May 2007, 9:18 AM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •