Results 1 to 2 of 2

Thread: Creating components using architect, best practices

  1. #1
    Sencha Premium Member
    Join Date
    Feb 2012
    Posts
    7

    Default Creating components using architect, best practices

    Hi I would like to know what is the best practice to create components.

    Exemple:

    I have 4 Architect indipendent projects (4 xsd).

    They all need to make use of a common module. For exemple this common module could be a window with 20 textfields.

    Of course I don't want to create in each architect project this same window with 20 fields each.

    So I decide to create a fifth architect project that will be recalled from the other 4 projects.

    The problem is that each time I publish I have to refactor the app.js the html and so on... Quite annoying.

    • Is the above procedure correct? would you do differently in order to share an xsd project(with all its views store models and controllers)?

    • What is the best practice for this?

    • Is there an automatic aggregator of architect projects?

    The idea is to use for all components "Sencha Architect" and not to create hand plugins.

    Please guys let me know your opinion and possibly an official opinion from Sencha people as well.

    Thank you

  2. #2
    Touch Premium Member BostonMerlin's Avatar
    Join Date
    Aug 2010
    Location
    Boston
    Posts
    559

    Default

    At the moment, there are two solutions I can think of. Create plugins or use the Architect import/export component feature. I don't think plugins are the answer to your problem as they add functionality to existing components (not what you asked for). Import/Export is ok for one-off sharing between projects.

    There is no ability to share a component out to multiple projects, modify the source, all projects get the change automatically ... similar to a shared assembly resource (i.e. .dll). Enterprise development requires this type of reusability. I'm on my fourth enterprise level SA project and it's becoming increasingly painful as I'm looking to reuse components built into those other projects.

    Thinking outside the box ... you might try
    - returning component configs from your server... code would not live in architect.
    - play around with source control and a 'shared code' project.

    John
    I love being a dad (5 & 7), flying airplanes (KBED) and writing code (spaghetti).
    BostonMerlin aka John Bond aka JB
    See U @ SenchaCon '13

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
  •