ExtJS vs. Touch Config System

In this example I will demonstrate the difference between how ExtJS 4 and Sencha Touch 2 config systems treat non-primitives (i.e. arrays or objects). This aspect of the frameworks is very important to distinguish as it will save you from some very painful debugging sessions.

Long story short, Touch will actually clone any objects from the config for every instance of your class, whereas ExtJS will slap them on the prototype (probably not what you want).

Now for a practical example.
Continue reading ExtJS vs. Touch Config System

VN:F [1.9.22_1171]
Rating: 10.0/10 (7 votes cast)

ExtJS 4.2 & Architect 2.2 – Plugins

I’ve been liking Sencha’s Architect IDE more and more as it’s been maturing over time. In my last post I wrote about making custom plugins in ExtJS 4, but how do you go about using them through Architect?

First step would be to ensure the we have the plugin code; I accomplished this by adding a JS Resource:

Resource

Next step should be easy enough; I figured adding a custom “plugins” property with a value of “[“ux.fadeinplugin”]” on a given Panel would do the trick:

Add Plugin

…however, while this does work when tested in browser, this causes Architect’s canvas to go blank, essentially rendering it useless. Upon further research, there are known bugs surrounding this, but no fix yet.

Read on for a workaround in Architect…

Continue reading ExtJS 4.2 & Architect 2.2 – Plugins

VN:F [1.9.22_1171]
Rating: 8.0/10 (5 votes cast)

ExtJS4 Combo & ASP.NET MVC3

First see basic ExtJS4 & ASP.NET MVC3 setup tutorial

In this example I will demonstrate just how easy it is to implement a type-ahead dropdown that will ping the server over AJAX every time a user types something in, and show a list of results with rich markup. It’s amazing just how easy it is to do this with ASP.NET MVC3 and ExtJS4 data stores.

The end result looks something like this:


Continue reading ExtJS4 Combo & ASP.NET MVC3

VN:F [1.9.22_1171]
Rating: 7.5/10 (8 votes cast)

ASP.NET MVC3 & ExtJS4 Errors

In my previous post I presented an example of a basic ASP.NET MVC3 controller connecting to an ExtJS4 data store and passing some data in XML format via store’s load method.

So far I’ve run into just one issue with this setup – clean error handling. By default, ASP.NET MVC will spit out any exceptions in clear text (with <html> tags and everything), which is not very useful when building a quality web application. Here’s what I want on my errors:


Continue reading ASP.NET MVC3 & ExtJS4 Errors

VN:F [1.9.22_1171]
Rating: 9.4/10 (7 votes cast)

ExtJS 4 Form getValues() Tip

Another bit of undocumented goodness from yours truly. As you probably know, ExtJS4 form panel contains a very useful method: formpanel.getForm().getValues(), which lets you populate an object with form’s data. Unfortunately, string format is used for all fields, even datefields. I will show you how to easily get valid data types through an undocumented feature:

Continue reading ExtJS 4 Form getValues() Tip

VN:F [1.9.22_1171]
Rating: 7.6/10 (22 votes cast)