I Find rails great but theres lack of rich components, i mean any
components except standard html controls..
I cant build everytime my table with all features, we are crud right ?
So any component repository planned ?
Maybe rails isnt good solution for my requirements ?
So far im programming asp.net and im using components library from
www.telerik.com, see what im talking about.
I developed ASP.NET for a couple of years, and I actually used some of the
Telerik controls. (I'll mention that I wound up debugging a bunch of their
JavaScript for them, to the point where they considered my feedback so
valuable that they provided me with the unobfuscated JS source to make it
easier for me to send them useful patches; the point being that the
availability of commercial controls is no guarantee of quality or
suitability, though Telerik's controls definitely saved me development
time.) ASP.NET makes it easy to provide "web controls" in tidy,
encapsulated packages.
Rails doesn't have the same facility for easily packaged reusable
components. The now-deprecated components feature was one stab at it.
Plugins, plugems, and engines are other attempts at it. None of them are
quite at the right level of simplicity and encapsulation, though they are
definitely useful in many ways. (Where "right level" means the same level
as ASP.NET controls; I've used good ones and understand what made them
good.) I think there could be a lot of value to a really good framework for
reusable components, and might lead to a similar ecosystem of web controls
that ASP.NET has. I might even try my hand at it in my copious (note:
sarcasm) free time. If anyone else is likely to have time to make the
effort before I get around to it, however, I would be happy to discuss
requirements (i.e. what it is about ASP.NET web controls that makes them
appealing, valuable, and usable).
If you want to understand a little more about the sweet spot that ASP.NET
controls inhabit and that components, plugins, plugems, and engines miss,
read on. Otherwise, you've already read the meat of the post.
Plugins/plugems are most useful when they are of the cross-cutting variety.
We're talking about aspect-oriented things, like act_as_versioned and the
like. This allows you to modify the behavior of disparate pieces of your
system in a simple way. The most popular plugins modify the behavior of
models or controllers, rarely both and rarely anything in the views. Things
like WYSIWYG editor integration (e.g. fckeditor) is the closest thing to
ASP.NET web controls. Engines are really full-fledged mini webapps embedded
in a Rails app to provide some particular functionality at a particular
URL, which encompasses more than an ASP.NET control.
A typical ASP.NET control provides a way of rendering some particular data
to the user, interaction with that data on the client-side through
JavaScript, and a way of reconstituting that data on the server side from
what is submitted back from the user. A Rails implementation would probably
look like a view helper method that takes some data model as an argument
and another method that is used by the controller to reconstitute the data
from part of the params hash.
pete
--Greg