Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

ExtJS: try to be "pure" or mix with HTML?

Tags:

extjs

When creating a new application using ExtJS, is it preferable to use as little HTML as possible, i.e. just the minimal boilerplate HTML file that loads CSS and Javascript files, and do most of the stuff in JavaScript, using ExtJS' layouts, controls etc.; or is it preferable to create normal HTML files with a little bit of ExtJS here and there?

like image 752
Erich Kitzmueller Avatar asked Feb 11 '10 10:02

Erich Kitzmueller


2 Answers

The widget framework is geared towards minimal HTML. Building a rich application using Ext JS is much more like building a desktop application than building a web page. It just happens to be written in JavaScript and runs in a browser.

Start with the boilerplate HTML file, then build your application purely in .js files. Communicate to your web service for data using REST and JSON.

like image 145
Jonathan Julian Avatar answered Oct 19 '22 03:10

Jonathan Julian


You can do either, although Ext is really more geared toward building UI's in code. You can use Ext Core much as you would jQuery to have a "little bit here and there" but once you get into serious widget/UI development you'll inevitably spend a lot more time in your .js files. Some of the widgets do support instantiation from markup, but not all of them (and it was never built from the ground up to be markup-based like Dojo and maybe some others).

like image 2
Brian Moeskau Avatar answered Oct 19 '22 05:10

Brian Moeskau