What Is ExtJS ExtJS 4+ Extensions Examples Tutorials

29Jun/170

Implicit ViewModel 2-Way Data Bindings

I've come across a rather interesting... let's call it "feature" of ExtJS ViewModel and data binding system. Turns out it is possible to establish "implicit" two-way data binds between parent & child view model data (within same component hierarchy) by setting the data of "lower" view model to "undefined", so long as the view models both define that data property with the same name. Picture the following simple hierarchy:

  • Parent Panel

    • Child Panel

Now imagine that both of the panels define their own ViewModels (implicit or not doesn't matter) that both define the same two properties, like so:

  • Parent Panel

    • undefinedText: "default Parent text"
    • definedText: "default Parent text"
  • Child Panel

    • undefinedText: undefined
    • definedText: "default Child text"

This is what the default rendering of these panels would look like:
Screen

Read on for a walk through of various scenarios and a Sencha Fiddle...

VN:F [1.9.22_1171]
Rating: 10.0/10 (1 vote cast)
2Nov/160

Declarative Listeners vs. Control

Back in ExtJS 5 Sencha rolled out a rather cool concept of declarative listeners, where you could write something like this:

{
    xtype: 'button',
    handler: 'onButtonClick'
}

...note that onButtonClick is a string, rather than a function reference. The idea here is that the actual function would be resolved at runtime and will be located somewhere in the ViewController world. It was described well by Don Griffin in his blog post: https://www.sencha.com/blog/using-viewcontrollers-in-ext-js-5/.

However, what was omitted in this blog post and the guides, is the potentially powerful and risky "up the component tree" resolution of the ViewController. Read on to learn more with a Sencha Fiddle example...

VN:F [1.9.22_1171]
Rating: 6.2/10 (6 votes cast)
13Dec/150

Hybrid Apps: Staged Rollouts

I love native apps, but for large enterprise projects they've been making less and less sense as mobile devices have become more powerful and the modern browser capabilities have exploded in the recent years.

One particularly important aspect of mission- critical mobile app is the risk involved with rolling out each new version. Imagine waiting out the 10 day approval period from Apple only to discover that you had a royal screw up and now the production version is unusable. Now you need a day or two to fix the issue, then another 10 days for approval, all while your app is unusable? A single occurrence can be enough to destroy your business.

Consider the advantages that a hybrid app can offer you in this case, illustrated in the following fictitious scenario, based on real life implementations I've been involved with:

  • The hybrid app stack is based on PhoneGap and Sencha ExtJS6
  • Has not needed an app store redeploy in years because the native code has no need to change
  • The app downloads its JavaScript code dynamically
  • Depending on the organizational unit that the user belongs to, or whatever organization they are choosing to operate in during their session, a different version of the JavaScript code is downloaded
  • A seamless transition between different versions of code occurs as the user navigates between different organizational units

This approach allows you to perform staged rollouts of new production code, or to perform AB testing on potential code candidates, within isolated organizational units, without risking mass disaster, with no regards for the app store or the 10 day waiting period. Try doing that with a native app.

Now some of you might be thinking "but it's against some policies to remote download code" and I say "welcome to the big league, boys". When we are talking about multi billion dollar enterprises, it costs peanuts to "persuade" Apple to "overlook" these policies and countless businesses operate based on this model.

VN:F [1.9.22_1171]
Rating: 9.3/10 (4 votes cast)
23Aug/150

ExtJS 6: Responsive HBox vs. VBox

A basic ExtJS6 Classic Toolkit responsive technique for going from vertical to horizontal based on tall/wide screen, is by using responsiveConfig on a Viewport running Border layout, and change desired child's regions from i.e. South to West. However, what if you want to do the same, but using an HBox vs. VBox layout, to get that additional flex functionality? Turns out it's not as straightforward, however still pretty simple. You just need to use Box layout (ancestor of HBox and VBox) with "vertical" boolean config changing inside the responsiveConfig of the viewport. Here is the sample source code from Sencha Fiddle; click the link below to experiment with it in different window sizes:

https://fiddle.sencha.com/fiddle/sls/preview



VN:F [1.9.22_1171]
Rating: 6.3/10 (6 votes cast)
9Jun/150

ExtJS 6: the best IE8-Modern Web Apps

Recently I wrote about my dissatisfaction with ExtJS 6 for being an "ExtJS 5 + Sencha Touch in disguise".

However, I came to realize that the beloved IE8 browser is essentially what's paying my bills. IE9 as well. It is easy to make jokes about how bad the browser is (compared to the latest and greatest):

one does not simply debug ie8

ie8 and open source bad time

You can do these all day long; just hit up image search for "ie8 meme".

However, let's address this one:

its 2015 who still uses ie8

VN:F [1.9.22_1171]
Rating: 9.0/10 (9 votes cast)
Page 1 of 212