-
29 Feb 2012 10:15 PM #1
Need help whether to use Ext or not?
Need help whether to use Ext or not?
I need a help to decide whether working with ExtJS 4 is good at this point or not. I am new with Ext.
Our application has been developed with regular HTML, CSS, Javascript and Jquery.
I contains components like grid, tree, accordion etc. All has been done. But we are thinking to replace these with Ext. We are very happy with the features provided by Ext. Especially, the look and feel of components and the grid are very good. Since I have been exploring Ext for certain days I have learn't about the folder heirarchy and MVC coding structures. Also the syntax of Ext is completely different than regular javascript and jquery. Now I feel that it is getting very difficult to include these components. I want to know is it good to include Ext library in an existing application without hampering much of the coding. Shall we proceed with Ext or not?
-
1 Mar 2012 1:52 AM #2
a good starting point are the guides:
http://docs.sencha.com/ext-js/4-0/#!/guide
imho the biggest difference is the way you write code. with jquery it is still comon to write plain html and mix it with js code. with ext js the way to go is to write:
and let the js do everything. i would recommend to directly start using the 4.1 beta and use the ext mvc. this would probably require to rewrite big parts of your app (except the business logic), but you will gain benefits regarding maintenance etc.Code:<body></body>
-
1 Mar 2012 3:33 AM #3
I don't have problem learning sencha ExtJS. I was just wondering, can I write Ext code in html where I just don't have
<body></body>
-
1 Mar 2012 6:22 AM #4
I'm currently working on integrating Ext into an existing application structure. The basic idea is to have a placeholder in the html :
Assuming you're taking the MVC route, in your application.js file you use the renderTo attribute on your main container. Something like:Code:<div id="myDiv"></div>
On issue I ran into, is integrating the Ext css with my application. I had to make changes to the existing app so they play nice together.Code:launch : function() { Ext.create('Ext.grid.Panel', { renderTo : 'myDiv', height : 400, // Needs to be defined otherwise your grid won't appear to show up. ... }); }
-
1 Mar 2012 12:58 PM #5
ExtJS's scoped CSS helps massively in that department. The standard CSS file will totally ruin your page but the scoped one is much more reserved. I found that I had to make a few small tweaks to the scoped CSS to get it to work but that was considerably less effort than completely rewriting my pages.
-
1 Mar 2012 3:38 PM #6
Thanks for that information. The plan is to eventual create custom themes to match our app's multiple themes. Does the new theme generator create a 'scoped' version of the custom theme?
-
1 Mar 2012 5:06 PM #7
Yes, generating a scoped CSS version is really simple. Once you dig into the theming stuff it should be pretty obvious how to do it. It should also help you to understand the bugs in the scoped CSS... they all make sense once you understand how the files are generated. They're easily patched at the CSS level, it's just a shame they can't easily be fixed in the Sass.


Reply With Quote
