1. #1
    Sencha User Kikketer's Avatar
    Join Date
    Apr 2012
    Location
    Wausau, WI
    Posts
    135
    Vote Rating
    7
    Kikketer is on a distinguished road

      1  

    Default External Editor Support

    External Editor Support


    "However, if you already have a favorite IDE, not a problem."
    There is a problem, once you move to the external IDE you are stuck there.

    I can understand how it's difficult for a 2 way (code to GUI). But what if I'm simply writing the portions that Architect forces me to hand code externally?

    I have a hand written project that I attempted to recreate using Architect and I've run into several issues.

    Here's an example of a portion of code I would have to hand write in a controller:
    Code:
    onListItemTap : function (dataview, index, target, record, e, options) { 
       this.getAppList().push({
          xtype : "overallchart"
        });
    }
    First off, any externally created file (like a chart) does not appear in the proper section. My "OverallChart.js" is currently residing in the Views folder. It does not appear in Architect, and I can not find some sort of "refresh".

    The code above also shows two red Xs stating that the "xtype" line is missing an ending }...

    Also, if I go into WebStorm and edit this code, there is absolutely no way to refresh it inside Architect. Because Architect currently lacks any sort of coding assistance (even locally declared variables must be hand written) I really lean to WebStorm to actually write the code. The minute I save the files in Architect they are all reverted to whatever Architect is incorrectly holding them as. Even restarting Architect does not pull in the latest changes to the files.

    In conclusion... no you can not effectively use an external program with "not a problem".
    Last edited by Kikketer; 19 Apr 2012 at 8:24 AM. Reason: Added a little to the code example

  2. #2
    Sencha - Architect Dev Team Phil.Strong's Avatar
    Join Date
    Mar 2007
    Location
    Olney, MD
    Posts
    1,898
    Vote Rating
    62
    Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice Phil.Strong is just really nice

      0  

    Default


    Here's an example of a portion of code I would have to hand write in a controller:
    why would you need to do this in an external editor

    This is a controller action.

    select controller
    in config pane find actions
    click (+)
    ...
    Phil Strong
    @philstrong
    #SenchaArchitect
    Sencha Architect Development Team

  3. #3
    Sencha User Kikketer's Avatar
    Join Date
    Apr 2012
    Location
    Wausau, WI
    Posts
    135
    Vote Rating
    7
    Kikketer is on a distinguished road

      0  

    Default


    Yes, I click the +, I added the "onListItemTap" but that's not what I was trying to point out. The code within that is where I was attempting to use an external program. I assume there will be other spots like this that will need a bit more logic than a simple push (which doesn't seem to be working for me btw).

    The real issue that's pestering me now is the integration (or lack there of) with Charts. I'm fine if I had to write any extra views and such that would be specifically chart items, but the fact that they do not appear in Architect at all kind of throws things off. Since it overwrites the "app.js" every time I save:

    Code:
    views : ['Main', "AppList", "Intake", "OverallChart"],
    Here is the example code from the hand written one. I can't edit the code for app.js, or simply add that view into the tree of elements.

  4. #4
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,247
    Vote Rating
    121
    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


    Going to Application and typing "OverallChart" into the views and pressing enter should work...
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  5. #5
    Sencha User Kikketer's Avatar
    Join Date
    Apr 2012
    Location
    Wausau, WI
    Posts
    135
    Vote Rating
    7
    Kikketer is on a distinguished road

      0  

    Default


    Quote Originally Posted by aconran View Post
    Going to Application and typing "OverallChart" into the views and pressing enter should work...
    At the top of the code window while having "Application" selected, it says "read only". I can mash the keyboard all day but nothing is entered into the code.

    Is there a way to have it refresh?

    Just now I changed the code in app.js to have "OverallChart" via an external editor, but it did not reflect back into Architect. Even after quitting and restarting it.

    Maybe it would be fixed by having an ability to create a custom item in the toolbox, just so I can add it to the tree on the right and then be able to add it to the project. Of course this is useless if I can't refresh the code and have it up to date.

    Both my external editor and Architect are pointing at the same folder (the .xds exists in the folder that I'm editing the files).

  6. #6
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,247
    Vote Rating
    121
    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


    Select the Application node.
    In the bottom right hand corner of architect in the config grid find the "views" section. To the right of the views there will be the views you've already added via Architect.
    Click the (add another) section. Type in "OverallChart", press enter
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  7. #7
    Sencha User Kikketer's Avatar
    Join Date
    Apr 2012
    Location
    Wausau, WI
    Posts
    135
    Vote Rating
    7
    Kikketer is on a distinguished road

      0  

    Default


    That worked, thank you.
    Now for the real issue, refreshing the code.

    Even simple things like running my code through a formatter (to aid merging). How can I have that reflected in Architect?

  8. #8
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,247
    Vote Rating
    121
    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 do this to the overrides files that we support editing outside of Architect. Close architect, run your overrides files through your formatter and then re-open architect. The files will be reflected of the new format you've given them.

    The overrides files are treated as text only so however you modify them, we just read them in/out.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  9. #9
    Sencha Premium Member
    Join Date
    May 2010
    Posts
    16
    Vote Rating
    0
    jcamozzi is on a distinguished road

      0  

    Default


    I think one problem I have is the "Sencha Architect" info page is misleading (http://www.sencha.com/products/architect):

    If you'd rather use your own IDE, all the Architect files are simple .js, so from Architect works flawless with your favorite editor.
    This seems to imply I can use architect in conjunction with my favorite editor without any issue. But with the way the files are constructed, the only way to make changes that propagate to architect is to edit files in the "metadata" folder - which I should mention does not save its files as ".js", so editors don't automatically look at the files as javascript. Then add to that the ridiculousness of having to "just quit and reopen" the app and it starts becoming quite unfriendly to do development using the architect with an external editor.

    The tool then becomes more something for prototyping rather than something closely integrated with the development process (not to mention the existing limitation of having no way to put controllers, models, and views into folders). I also do not think the code editor in Sencha Architect is sufficient for heavy development. It's dubbed an "IDE" but is still missing core functionality developers expect out of their IDEs.

    Two simple improvements that would help this problem:
    1. Provide a "reload" or "refresh" function. Basically a button we can click to tell it to refresh from the filesystem.
    2. Either append ".js" to the files in metadata (at least the ones that are js), or make the refresh functionality pull new changes in from the app folder.
    Don't get me wrong, I like a lot of what the tool has to offer. We are currently planning to switch our architecture over to use ExtJs in the near future. As I evaluate Sencha Architect I find that it is limitations like the above that will make it difficult for me to integrate the tool into our daily development process, and makes it less likely that it would be used by my development team.

    Are there plans to improve the usage of Sencha Architect with external IDEs?

    Thanks.
    Jeff Camozzi

  10. #10
    Sencha Premium Member
    Join Date
    Jan 2010
    Location
    Vancouver, Canada
    Posts
    133
    Vote Rating
    10
    bogc will become famous soon enough

      1  

    Default Where is the support for external IDEs at?

    Where is the support for external IDEs at?


    It's Oct 2012 and I have the same issue the two gentlemen reported here. I am using IntellijIdea to edit javascript files and I rely a lot on its power (code completion, refactoring etc). I want to edit my JavaScript code using IntellijIdea and not Sencha Architect (SA). I like how SA generates UI and the event stubs for me, but again, I want to edit the function bodies using IntellijIdea.

    Ext Designer worked well for me because there were some classes that were generated only the first time and I could tap into those files to add my own custom code there.

    So, can I do the same with Sencha Architect? Can you point me to some patterns? I took a look at the js files in the project directory and they all the have the warning:

    * Do NOT hand edit this file.


    Thank you