Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Type validation in ExtJS

  1. #1
    Sencha Premium User
    Join Date
    May 2011
    Posts
    72
    Vote Rating
    30
      0  

    Default Type validation in ExtJS

    I understand that usage of TypeScript in ExtJS have some major challenges, but now Babel have introduced their type system - Flow.js thats very easier to start with and support converting one file at a time.

    We at our end have been successful to implement type checks of our ExtJS source leaving the ExtJS library as is. The problem however is development workflow.

    for many things such as JS linting, Code Styling, and now type checking we have to go back to ANT scripts and call babel, the output of babel then becomes the input to Sencha CMD.

    There are many things that overlaps between Babel and Ant+Sencha, and Babel is clearly much ahead of Ant+Sencha.

    There was some Seacha Rodeshow where they discussed about ES6 support in future, Is sencha thinking of integrating Sencha Cmd with Babel instead of Ant and thereby offload some of its responsibility to Babel. In my opinion babel is being developed more faster and can bring in some greater good to the ExtJS community. But then Sencha may want to be a monolithic framework and tries hard to create vendor lock in...any thoughts ?

  2. #2
    Sencha - Sr Software Engineer mitchellsimoens's Avatar
    Join Date
    Mar 2007
    Location
    Gainesville, FL
    Posts
    39,326
    Vote Rating
    1297
      -1  

    Default

    Ant isn't exactly the same as Babel. What our future plans are, in actual details, are not being released yet but for the foreseeable future Ant is still going to be used. Ant is more like grunt or gulp than it is to Babel.
    Mitchell Simoens @LikelyMitch
    Sencha Inc, Senior Software Engineer
    ________________
    Learn BBCode and use it!

    Check out my GitHub, lots of nice things for Ext JS 4 and Sencha Touch 2
    https://github.com/mitchellsimoens

    Think my support is good? Get more personalized support via a support subscription. https://www.sencha.com/store/

    Need more help with your app? Hire Sencha Services services@sencha.com

    Want to learn Sencha Touch 2? Check out Sencha Touch in Action that is in print!

    When posting code, please use BBCode's CODE tags.

  3. #3
    Sencha Premium User
    Join Date
    May 2011
    Posts
    72
    Vote Rating
    30
      0  

    Default

    Sure Ant is like Gulp, but my point is to provide a Babel based JS transform pipeline, at present it is done with Sencha Cmd (minification, Rhino based syntax check, CSS pre-processing, bootstraping etc) and driving this transpiling process is Ant Script

    Instead if Babel is used for transpiling many other goodies comes for free. Gulp do have some nice ways to create this build pipeline

    But thanks for the answer ... Ant is going to be the build tool for the foreseeable future.
    You must be having good reasons for that but at the moment we are having a little hard-time to integrate babel with the Sencha/Ant hooks in the build process.

    For now we ended up having our main source in an isolated folder (this includes type declarations inside the source) which is then processed by Gulp/Babel to strip out the type defs, and generate a ExtJS source without types. After this process ends then we manually start Sencha Cmd build process. (just doing it as a POC with very few source files).

    I am sure there must be a better way to drive this whole thing with ant, babel and sencha cmd. an example or a blog on how to achieve this using Ant will really be great article

  4. #4
    Ext JS Premium Member
    Join Date
    May 2008
    Posts
    321
    Vote Rating
    205
      1  

    Default

    It would be nice if they provide typescript's typing definition for ExtJS. They already have typing auto-complete available on IDE's like webstorm / eclipse. Just need to convert that into extjs.d.ts . That would definitely be nice.

  5. #5
    Sencha User
    Join Date
    Nov 2010
    Posts
    9
    Vote Rating
    4
      1  

    Default

    Quote Originally Posted by sg707 View Post
    It would be nice if they provide typescript's typing definition for ExtJS. They already have typing auto-complete available on IDE's like webstorm / eclipse. Just need to convert that into extjs.d.ts . That would definitely be nice.
    Please go to find ExtTS - Premium TypeScript type definitions for Sencha Ext JS
    https://github.com/thanhptr/extts
    Every latest version of ExtJS 4.x, 5.x, 6.x is supported; currently latest version is 6.0.2.437.
    Everything you can find from ExtJS API document is in the type definitions with strongly-typed support (such as: Ext.dom.Element, ButtonConfig,..)

  6. #6
    Ext JS Premium Member
    Join Date
    May 2008
    Posts
    321
    Vote Rating
    205
      0  

    Default

    Wow! I haven't tested but if those are what I think it is then you'll be a hero to many.

  7. #7
    Sencha User
    Join Date
    Nov 2010
    Posts
    9
    Vote Rating
    4
      0  

    Default

    Quote Originally Posted by sg707 View Post
    Wow! I haven't tested but if those are what I think it is then you'll be a hero to many.
    Thanks & Hope this helpfull!

    I'm very appreciate for any help & feedback!

  8. #8
    Ext JS Premium Member
    Join Date
    May 2008
    Posts
    321
    Vote Rating
    205
      0  

    Default

    Quote Originally Posted by thanhptr View Post
    Thanks & Hope this helpfull!

    I'm very appreciate for any help & feedback!
    I see what you did. You actually created a TypeScript class. Can you convert this into Interface? This way I can reference the d.ts file inside my JavaScript.

    If you take a look at jquery.d.ts
    https://github.com/DefinitelyTyped/D...ry/jquery.d.ts

    It's all defined as interface

  9. #9
    Sencha User
    Join Date
    Nov 2010
    Posts
    9
    Vote Rating
    4
      0  

    Default

    The idea of reference d.ts from JS is really new to me, it sounds interesting.

    Cos i like pure TS develoment similar to what i have done with many of apps in purly C# while develipng Ext by using SharpKit.NET.

    Anyways, let wait. Im going to add another version of Interface for that reason.

    Thanks for your valuable feedback!

  10. #10
    Sencha User
    Join Date
    Apr 2013
    Posts
    368
    Vote Rating
    71
      0  

    Default

    @thanhptr
    Awesome work! Always wished someone would create full TS definitions for the latest version of ExtJS. Thank you very much

Page 1 of 2 12 LastLast

Similar Threads

  1. ExtJS 4 Form: Unique Field Value Validation Example (Server Validation)
    By loiane in forum Ext:User Extensions and Plugins
    Replies: 1
    Last Post: 2 Jul 2012, 5:31 AM
  2. Presence Validation type returns true on null values.
    By esatterwhite in forum Sencha Touch 1.x: Bugs
    Replies: 2
    Last Post: 6 Jul 2011, 12:10 PM
  3. add new Validation type
    By paulr in forum Ext 3.x: Help & Discussion
    Replies: 3
    Last Post: 11 Aug 2010, 11:00 PM
  4. New Validation message type: 'side' (screenshot)
    By jack.slocum in forum Ext 2.x: Help & Discussion
    Replies: 15
    Last Post: 8 Apr 2007, 5:58 PM

Posting Permissions

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