1. #1
    Sencha - Architect Dev Team aconran's Avatar
    Join Date
    Mar 2007
    Posts
    9,207
    Vote Rating
    120
    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 Breaking changes regarding Code Editing [Build > 298]

    Breaking changes regarding Code Editing [Build > 298]


    Thank you everyone for providing tons of feedback and bug reports over the last 30 days as we've run our beta program.

    Due to feedback, we will be making some changes that may break existing projects and wanted to inform you of them as soon as possible.

    Many of you have requested that code editing be easier and that you be able to co-exist with other editors such as Eclipse, TextMate, etc.

    History:

    In Designer 1.0, we split the view and store implementation files into two. One was the .ui. or .base. file and was completely *owned* by Designer. Any changes you made to this file outside of designer would constantly be overwritten each time you exported. These files were considered "writealways" or "generated" files. We then advocated that you put any implementation/event bindings/new functions in the implementation file and that you as a user would completely own that file. You could use whatever editor you chose. We would only "writeonce" to that file.

    In Designer 2.0, (build 298 and earlier) we continued the split into two files. Because Designer 2.0 has a code editor, we would allow you to edit specific blocks of code for a function or basic event binding. We continued to put all of the standard UI/base stuff in the ui or base classes and the implementation/event bindings in the implementation files. We were attempting to parse out the implementation files and reflect out the changes you made. We would write to both the ui/base files and the implementation files everytime you saved your project. This worked well when changes were made while designer was NOT running but did not work well when you had both Designer and your text editor of choice open.

    We were following the same practices as to where the types of code should live from Designer 1.0 but really needed to adapt our approach in regard to "writealways" vs "writeonce".


    The new approach will be as follows:
    We've made additional changes since this was originally posted. For further details look here:
    http://www.sencha.com/forum/showthre...l=1#post745334

    All classes (views, stores, models, and controllers) created in designer will follow the approach of generating two classes. The base class will be given the namespace of .gen. to indicate that it is generated code and will always be overwritten. The parent class that you actually use will be named exactly as you specify.

    The files with .gen. will be owned completely by the designer. All code which you put in via the designer for a Basic Function, event binding or controller action will go here. These files are "writealways" and any external changes will be overwritten. The drop down at the top has changed from "UI or Base Class" to "Generated Class".

    The implementation files will be "writeonce". We will generate an implementation class that extends from the generated class that you can do whatever you would like with. If you want to edit this in an external editor go ahead, we won't touch it again. Many of you have also given us the feedback that you like being able to develop your entire applications within the designer and not having to switch to a text editor. To cater to you individuals, we will be giving you a raw code editor to edit the implementation file from within the Designer.

    In general most tasks should be able to be completed through the generated code entirely and you should infrequently have to dip into the advanced mode of editing Implementation files directly.

    By giving users the ability to edit the implementation file directly, we are allowing you to do all sorts of bad things to yourself. Change the subclass name incorrectly, add syntax errors, etc etc. We are looking at how to synchronize between the configuration and the file for the few configurations that are there. (Currently just userAlias and userClassName). Because of the many issues this raises this feature may be turned off by default and only enabled via preferences to avoid accidents from occurring.

    Feedback?
    Last edited by aconran; 29 Feb 2012 at 7:11 PM. Reason: newchanges
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  2. #2
    Sencha User wemerson.januario's Avatar
    Join Date
    Nov 2008
    Location
    Brazil, Goias, Goiânia
    Posts
    436
    Vote Rating
    6
    wemerson.januario is on a distinguished road

      0  

    Default


    Congratulations team! I'm very happy with this point of view!
    Thanks for continuing using the "writeonce" and "writealways" concept.

    Wemerson Januario
    Twitter:
    @wemersonjanuar
    Skype:
    wemerson.januario
    Email: wemerson.januario@gmail.com
    Fone:
    62 9106-6689
    From: Goiânia, Brazil
    Desenvolvedor ExtJS/ ExtJS Developer

  3. #3
    Sencha User wemerson.januario's Avatar
    Join Date
    Nov 2008
    Location
    Brazil, Goias, Goiânia
    Posts
    436
    Vote Rating
    6
    wemerson.januario is on a distinguished road

      0  

    Default


    Tested and aproved the new concept of implementation classes.

    Guys, now the next step for the goal is add more features to the Sencha Designer editor. It would be niceeeeeee
    But, again, amazing work!
    Wemerson Januario
    Twitter:
    @wemersonjanuar
    Skype:
    wemerson.januario
    Email: wemerson.januario@gmail.com
    Fone:
    62 9106-6689
    From: Goiânia, Brazil
    Desenvolvedor ExtJS/ ExtJS Developer

  4. #4
    Touch Premium Member
    Join Date
    Feb 2012
    Posts
    10
    Vote Rating
    0
    delgrundy is on a distinguished road

      0  

    Default


    Sounds like a good compromise.

  5. #5
    Sencha Premium Member
    Join Date
    May 2010
    Location
    Guatemala, Central America
    Posts
    1,266
    Vote Rating
    80
    ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough ssamayoa is a jewel in the rough

      0  

    Default


    Let do it this way.

    When you think this feature will be available?

    Regards.
    UI: Sencha Architect 3.x / ExtJS 4 & 5
    Server side: JEE / EJB 3.x / CDI / JPA 2.x/ JAX-RS / JasperReports
    Application Server: Glassfish / WildFly
    Databases: Oracle / DB2 / MySQL / Firebird

    If you like my answer please vote!

  6. #6
    Touch Premium Member
    Join Date
    Sep 2011
    Location
    Tamworth, NSW, Australia
    Posts
    462
    Vote Rating
    10
    marc.fearby will become famous soon enough

      0  

    Thumbs up


    Could you please clarify a bit further what you mean by "may break existing projects"? Due to a bug in 1.2 I've actually had to start using the 2.0.0 beta1 to continue development on a rather complicated form that kept crashing 1.2, so I'm now committed to the new program irrevocably. I realise that you can't support people that knowingly use a beta like this, but what will this mean? Some files might be renamed to a new format (.gen) but essentially will retain the UI code within them, and perhaps new implementation classes will be genereated (into which I could copy my old implementation code)? If so, then I'll adapt and I'm sure I'll cope. If, however, existing projects can't be opened in the new build and it's a fresh slate from then on, then I guess I'm screwed :-)

    By the way, where do I download the latest builds? I'm still on 268 and the download I used yesterday (for Windows) still gave me 268.

    As for the code editor, I could probably get RSI typing up what I'd like to see, but here are the few features I don't think I could live without:
    • Ability to move current/selected line/s up and down via Ctrl+Up and Ctrl+Down
    • Collapsible regions of code so that class methods I'm not working on can be shrunk thereby making scrolling up/down through the implementation quicker and easier (& having these collapsed regions remembered between sessions)
    • Some kind of class inspector that shows the properties and methods for the current class, allowing you to double-click to jump to them
    • Ability to Ctrl+Click on a method name to jump to that method
    • Refactoring of method names, variables, etc
    • Search/replace that also highlights (at once) all matches so you can scroll through and see at a glance all occurances
    • Code templates/snippets ability so commonly-typed things can be inserted after a combination of letters is typed by the developer
    • Ability to customise the text font, size, and colours
    • I haven't used Designer to type code yet but I can see that I wouldn't cope having a two-click process to switch between UI Class and Implementation. That grey strip at the top could easily have three left-aligned buttons (tabs?) so that this becomes an easy one-click step. That vertical white strip to switch between UI and code is a waste of space, too, and these two functions could each be in that horizontal grey strip (again, as separate buttons).
    • The toolbox could take up less width, too. Perhaps those grey category links could be in a strip at the top as buttons, without text, with Button/Grid/Chart/etc small icons that are easily distinguishable to allow switching categories? I also went looking for buttons in the form category. A category called "Buttons" with just 4 items seems unecessary (to me, at least). Or perhaps the toolbox could use an accordian layout if there weren't too many categories and each accordion header wasn't too chunky?
    I realise that there is a LOT of work involved in developing all these things but without them, I can't see me ditching my present IDE solely in favour of Sencha Designer for my implentation code. At the moment I'm only using it to generate UI and that's it.

    Sorry if I'm being too demanding... some of us can be an ungrateful lot :-) But I do prefer 2.0 over 1.2 already so I can see the improvements so far have been worthwhile.

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


    Quote Originally Posted by marc.fearby View Post
    I realise that you can support people that knowingly use a beta like this, but what will this mean? Some files might be renamed to a new format (.gen) but essentially will retain the UI code within them, and perhaps new implementation classes will be genereated (into which I could copy my old implementation code)? If so, then I'll adapt and I'm sure I'll cope. If, however, existing projects can't be opened in the new build and it's a fresh slate from then on, then I guess I'm screwed
    It's not going to be an impossibility, just might be a bit painful.

    Quote Originally Posted by marc.fearby View Post
    By the way, where do I download the latest builds? I'm still on 268 and the download I used yesterday (for Windows) still gave me 268.
    You should have gotten an auto update to 298.

    Quote Originally Posted by marc.fearby View Post
    I realise that there is a LOT of work involved in developing all these things but without them, I can't see me ditching my present IDE solely in favour of Sencha Designer for my implentation code. At the moment I'm only using it to generate UI and that's it.

    Sorry if I'm being too demanding... Some of us can be an ungrateful lot :-) But I do prefer 2.0 over 1.2 already so I can see the improvements so far have been worthwhile.
    You are not being too demanding at all. The designers strength is in rapid building of your user interface and seeing what your application will look like. We are not trying to replace your IDE if you'd like to continue using it, we are just giving those of you that don't want to swap between applications that ability.
    Aaron Conran
    @aconran
    Sencha Architect Development Team

  8. #8
    Touch Premium Member
    Join Date
    Sep 2011
    Location
    Tamworth, NSW, Australia
    Posts
    462
    Vote Rating
    10
    marc.fearby will become famous soon enough

      0  

    Default


    Quote Originally Posted by aconran View Post
    You should have gotten an auto update to 298.
    I had to configure the proxy with username/password at the startup screen to activate the beta so perhaps that's why the update isn't coming down? Is there a download link somewhere as an alternative?

  9. #9
    Touch Premium Member pkellner's Avatar
    Join Date
    Sep 2008
    Location
    San Jose, California
    Posts
    793
    Vote Rating
    24
    pkellner will become famous soon enough pkellner will become famous soon enough

      0  

    Default


    Thanks for the update. I totally support you making this breaking change to Designer. I think you've got a great compromise by having one file totally owned by the framework and the other one that we (the developer running the designer) has complete control of after it is generated by the framework. Nice job!

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


    We've made some changes to what we're doing in this regard due to internal feedback.

    We've flatten the dual class hierarchy into a single class. This allows us to be even more hands free of the user owned file. The user owned file is now an override as opposed to a subclass.

    This file would be completely owned by the designer:
    Code:
    Ext.define('MyApp.view.MyPanel', {
        extend: 'Ext.panel.Panel',
        alias: 'widget.mypanel',
    
        height: 250,
        width: 400,
        title: 'My Panel',
    
        initComponent: function() {
            var me = this;
    
            me.callParent(arguments);
        },
    
        myMethod: function() {
            return {
                test: 'abc'
            };
        }
    
    });
    And this file would be owned by a user:
    Code:
    Ext.define('MyApp.view.override.MyPanel', {
       override: 'MyApp.view.MyPanel',
       title: 'changed it',
       myMethod: function() {
           var o = this.callOverridden(arguments);
           o.foo = true;
           return o;
       }
    });
    Aaron Conran
    @aconran
    Sencha Architect Development Team