best ui toolkit?

As subject.
I abandoned prototype, I' seeing jquery ui but I was impressed by ExtJS.
What do you use/recommend in general?

Look at the demos

http://jqueryui.com/demos/

Yes I've seen.
Have you looked at extjs?
http://dev.sencha.com/deploy/dev/examples/

Extjs is free only when your project is not commercial

Extjs has a complicated syntax and semantic

Extjs is very powerfull but not flexible then jquery ui

JqueryUI’s community is bigger then Extjs

you want datagrid? its here with jquery http://www.trirand.com/blog/jqgrid/jqgrid.html

What else you want?? i will help you =D

jqgrid to rails

https://github.com/ahe/2dc_jqgrid

I am using this with rails 3… perfect, but i will develop my own datagrid in future… with jquery offcourse =D

Great, thank you.
Will you develop your own datagrid because you don't like that one?

I love this datagrid, but i need some extra behaviour like add columns and improve the filter. The application is mine and will be perfect

But jqgrid is great… i am very meticulous with my application =D

I'm tryingjqgrid.
As I read in http://www.2dconcept.com/jquery-grid-rails-plugin I've
installed the plugin, there isn't a gem, create a scaffold, modifyed
the controller and the index.html.erb but this is the page result:

<script src="/javascripts/jqgrid/jquery.js?1294673964"
type="text/javascript"></script> <script
src="/javascripts/jqgrid/jquery-ui-1.7.1.custom.min.js?1294673964"
type="text/javascript"></script> <script
src="/javascripts/jqgrid/jquery.layout.js?1294673964"
type="text/javascript"></script> <script
src="/javascripts/jqgrid/i18n/grid.locale-en.js?1294673964"
type="text/javascript"></script> <script
src="/javascripts/jqgrid/jquery.jqGrid.min.js?1294673964"
type="text/javascript"></script> <script
src="/javascripts/jqgrid/jquery.tablednd.js?1294673964"
type="text/javascript"></script> <script
src="/javascripts/jqgrid/jquery.contextmenu.js?1294673964"
type="text/javascript"></script> <script type="text/javascript"> var
lastsel; jQuery(document).ready(function(){ var mygrid =
jQuery("#players").jqGrid({ url:'/users?q=1', editurl:'', datatype:
"json", colNames:['ID','Firstname','Lastname'], colModel:[{name:'id',
index:'id',width:35,resizable:false},{name:'firstname',
index:'firstname'},{name:'lastname', index:'lastname'}], pager:
'#players_pager', rowNum:10, rowList:[10,25,50,100], imgpath:
'/images/jqgrid', sortname: '', viewrecords: true, height: 150,
sortorder: '', gridview: false, scrollrows: true, autowidth: false,
rownumbers: false, multiselect: false, subGrid:false, caption:
"Football Players" }) .navGrid('#players_pager',
{edit:false,add:false,del:false,search:false,refresh:true},
{afterSubmit:function(r,data){return true;(r,data,'edit');}},
{afterSubmit:function(r,data){return true;(r,data,'add');}},
{afterSubmit:function(r,data){return true;(r,data,'delete');}} )
.navButtonAdd("#players_pager",{caption:"",title:"Toggle Search
Toolbar", buttonicon :'ui-icon-search', onClickButton:function(){
mygrid[0].toggleToolbar() } })
mygrid.filterToolbar();mygrid[0].toggleToolbar() }); </script> <table
id="players" class="scroll" cellpadding="0" cellspacing="0"></table>
<div id="players_pager" class="scroll"
style="text-align:center;"></div>

It is text not html.
I'm using rails 3, have I missed something?

this plugin was developed in rails 2

rails 3 need the command html_safe to transform plain texto to html

find the file vendor/plugins/2dc_jqgrid.rb and find the method jqgrid_javascript and put html_safe

or put on the controllers or view… i changed this plugin and i don’t know exactly where you have to put the html_safe =D

html_safe works well: “

”.html_safe

and it will transform to html

I''ve find a lot of errors, for example the method total_entries does
not exists, there isn't a plugin for rails 3?

It should be clear by now that gems/plugins for javascript generation are to be avoided. Not only will it generate ugly inline code in most cases, but you also lose a lot of control. If you want to use Javascript, then write Javascript, don’t let some ruby gem write the code for you.

If you ever want to work with a framework (which is in no way comparable to jquery ui components, which are more granular and only implement the view layers and not a client side datastore etc) such as ExtJS or SproutCore or one of the MVC Javascript frameworks, you’ll simply have no other choice than to write proper Javascript (although with Sproutcore that’s quite debatable, but still).

Best regards

Peter De Berdt

Peter De Berdt wrote in post #973721:
[...]

you'll
simply have no other choice than to write proper Javascript (although
with Sproutcore that's quite debatable, but still).

Just out of curiosity: what do you mean by that last remark? (I've been
interested in SproutCore but haven't really played with it yet.)

Best regards

Peter De Berdt

Best,

it was made in rails 2 but it’s works fine for me on rails 3… i fix some problems in my migration to rails 3, but it was easy

try this https://github.com/springbok/jqgrid-rails3

It’s for rails 3

=D

Apart from the fact that SproutCore uses ruby generators to generate its files and compile to a static build not much to be honest, but there’s always people nitpicking :slight_smile: The actual code you write is still Javascript of course.

I’m more familiar with ExtJS (using it in production apps) although in a way I wish I wasn’t. Don’t get me wrong, it certainly has its merits, but there’s just too much in there that doesn’t gel with me for some reason. It’s probably just personal preference though, just like I prefer Ruby and Rails over some other languages, frameworks and DSLs.

Only dipped my toes into SproutCore but it’s certainly an interesting framework and I might pick it up if the right project comes along. However, I’m especially looking forward to Yehuda’s work of abstracting certain parts of SproutCore so I can hook those into existing and new apps (the whole binding MVC part for example).

Best regards

Peter De Berdt

It seems to me that this plugin doesn't generate any javascript code.

Peter De Berdt wrote in post #973735:

you'll
simply have no other choice than to write proper Javascript (although
with Sproutcore that's quite debatable, but still).

Just out of curiosity: what do you mean by that last remark? (I've
been
interested in SproutCore but haven't really played with it yet.)

Apart from the fact that SproutCore uses ruby generators to generate
its files and compile to a static build not much to be honest, but
there's always people nitpicking :slight_smile: The actual code you write is
still Javascript of course.

Right, that makes sense.

I'm more familiar with ExtJS (using it in production apps) although in
a way I wish I wasn't. Don't get me wrong, it certainly has its
merits, but there's just too much in there that doesn't gel with me
for some reason. It's probably just personal preference though, just
like I prefer Ruby and Rails over some other languages, frameworks and
DSLs.

Yeah, I looked at ExtJS, and it just seems (from the little I've been
able to figure out) like the wrong approach, starting right from its
distrust of HTML and the resulting insistence on building the whole DOM
programmatically (or am I getting that wrong?).

Only dipped my toes into SproutCore but it's certainly an interesting
framework and I might pick it up if the right project comes along.
However, I'm especially looking forward to Yehuda's work of
abstracting certain parts of SproutCore so I can hook those into
existing and new apps (the whole binding MVC part for example).

Interesting.

Best regards

Peter De Berdt

Best,

I'm using this generator in rails 2, it is great. It does require the
squirrel plugin, if you look at the generated controller code you
should see the squirrel syntax. total_entries looks like it's defined
in paginator.rb

It does, the jqgrid() method in your view layer generates it. IMO
that's OK, if you need something customized you can take the generated
code and tweak it later, like we do with scaffolds

Quite a lot of Javascript GUI frameworks build the whole DOM from code, that’s the least of my worries.

The main things that bother me about ExtJS:

  • It’s one huge library, even if you only intend to use one or two components.

  • It requires quite a bit of configuration except for the most basic setups… to put it mildly, and that for a framework that touts being able to make complex web apps

  • The built-in components can behave unexpectedly from time to time, e.g. the grouping views

  • Finding the right method to achieve a certain result is a disaster sometimes or it simply doesn’t exist

  • The documentation is there, but it still requires a lot of trial-and-error (and console logging) to get the job done

That said, there are some pretty powerful and complex UI components in there that would take quite a while to develop from scratch and have no (satisfactory) counterpart (jQuery plugin etc). So if you are on a tight budget or deadline the ExtJS license will be worth the money.

Best regards

Peter De Berdt

Did you know https://github.com/linoj/gridify?