Jump to content

Recommended Posts

Ext Js is a powerful and feature rich javascript library. It is a bit bulky but makes up for it in the current feature set. You can do some really cool things very fast with this library. It has lower level javascript functions(standard js lib stuff) and it also has ui components. These ui components are styled nicely and are easy to customize.

 

Here is an example usage(from http://extjs.com/learn/Tutorial:Introduction_to_Ext_2.0)

 

Ext.onReady(function() {
var myData = [
	['Apple',29.89,0.24,0.81,'9/1 12:00am'],
	['Ext',83.81,0.28,0.34,'9/12 12:00am'],
	['Google',71.72,0.02,0.03,'10/1 12:00am'],
	['Microsoft',52.55,0.01,0.02,'7/4 12:00am'],
	['Yahoo!',29.01,0.42,1.47,'5/22 12:00am']
];

var myReader = new Ext.data.ArrayReader({}, [
	{name: 'company'},
	{name: 'price', type: 'float'},
	{name: 'change', type: 'float'},
	{name: 'pctChange', type: 'float'},
	{name: 'lastChange', type: 'date', dateFormat: 'n/j h:ia'}
]);

var grid = new Ext.grid.GridPanel({
	store: new Ext.data.Store({
		data: myData,
		reader: myReader
	}),
	columns: [
		{header: 'Company', width: 120, sortable: true, dataIndex: 'company'},
		{header: 'Price', width: 90, sortable: true, dataIndex: 'price'},
		{header: 'Change', width: 90, sortable: true, dataIndex: 'change'},
		{header: '% Change', width: 90, sortable: true, dataIndex: 'pctChange'},
		{header: 'Last Updated', width: 120, sortable: true, 
			renderer: Ext.util.Format.dateRenderer('m/d/Y'), 
                        dataIndex: 'lastChange'}
	],
	viewConfig: {
		forceFit: true
	},
	renderTo: 'content',
	title: 'My First Grid',
	width: 500,
	frame: true
});

grid.getSelectionModel().selectFirstRow();
});

 

And this would be the resulting grid

 

IntroToExt2_grid.gif

 

I am using this library on a current project of mine and so far I am loving it.

Link to comment
https://forums.phpfreaks.com/topic/81341-ext-js-javascript-library/
Share on other sites

Yea I took a look at that library and was like WOW when looking at the examples but was like AHH when looking at the code.  While the features are really good a polished is is also bulky, bit of a learning curve, and in order to use it for stuff like the portal demo, it takes over the entire UI which I would not want.  I decided not to go with it and stick with jQuery since jQuery did release the jQuery UI which is nice(still has many bug that a close to being fixed).  I also don't mind if i need to write my own js if need be.  ExtJS is very nice, just not my cup of tea.

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.