1. #1
    Sencha User arnaud80's Avatar
    Join Date
    Mar 2012
    Location
    Paris - France
    Posts
    15
    Vote Rating
    0
    arnaud80 is on a distinguished road

      0  

    Default Importing file of old projects

    Importing file of old projects


    Hi,

    is it possible to import files (app.js, views.js, controler.js, ...) of old projects in Sencha Architect ?

    Thank you,
    Arnaud.

  2. #2
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,358
    Vote Rating
    127
    aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold aconran is a splendid one to behold

      0  

    Default


    You can certainly include additional files with raw source code via the resources node. However there is no way to import it and have them introspected into Architect's format so that you can make design time changes.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  3. #3
    Sencha User arnaud80's Avatar
    Join Date
    Mar 2012
    Location
    Paris - France
    Posts
    15
    Vote Rating
    0
    arnaud80 is on a distinguished road

      0  

    Default


    Thank you for your answer

  4. #4
    Sencha User
    Join Date
    Oct 2011
    Location
    Germany
    Posts
    50
    Vote Rating
    10
    apsq will become famous soon enough

      0  

    Default


    As far as I can tell: no. Architect, like Designer, does not care about JS files at all. It treats them just as text, not as Component definitions or what have you.

    As with Designer, the magic lies in the project file (the XDS file). Unlike Designer, there are also additional metadata files that are referenced by the XDS file (unlike Designer's monolithic approach). These are all JSON, but unless you enjoy editing large JSON files by hand (functions and other user-entered code are stored as strings with escaped newlines because JSON does not have a multi-line string syntax), you're stuck with Architect for that.

    I would recommend re-creating your MVC structure, using as much of its functionality as possible (e.g. creating functions and event handlers via drag and drop rather than manually) and then using overrides to add functionality that lies outside of what you can do with drag and drop. If you were already adhering to the best current practices for Sencha's JS libraries, this should be a matter of a few hours of copy and paste (plus clicking and dragging things a lot).

    I'm afraid there's no way to edit functions, event handlers, etc outside of Sencha Architect without using overrides (i.e. "true" interoperability), but for this kind of thing, the lack of code intelligence in Architect's edit mode isn't that much of a problem. Though it's still a bit disappointing considering IntelliJ's IDEA family of IDEs just recently added code intelligence for ExtJS (and presumably Sencha Touch).

    Overrides seem to be more of a hack intended to help if you hit Architect's limits. The ability to define your own components in your JavaScript IDE and then import them into Architect and get the same usability as with the built-in components would have been very nice (I'd imagine it'd do for ExtDesigner/Architect what level editors and modding capabilities have done for games). Sadly the component import/export still seems to be based around JSON configurations of built-in components rather than actual extensions, so it remains a bit of a walled garden.

    EDIT: To clarify: It is possible to add JS files to a project, but they will not be very useful. This functionality is (apparently) primarily intended to allow for adding non-ExtJS/Touch code and other resources the app may rely on. So, no: It's not possible to import a model, view, store or controller and have it appear in Architect as if you had created it "natively" within Architect (that is, with configurable properties, behaviours and so on).

Thread Participants: 2