Announcing: Ext Scaffold Reloaded Plugin for Ruby on Rails
December 24th, 2008
Ext Scaffold just got “Reloaded” for Christmas. Never heard of Ext Scaffold? Ok, so first things first:
The Ext Scaffold Generator Plugin is a drop-in replacement for Rails’ standard Scaffold Generator. Accepting the very same options, it will generate views using data grid and form components from the Ext JS Javascript GUI framework as well as a controller acting as an Ext-compatible JSON web service. The generated code can be used as a starting point for further implementation and outlines solutions on how to integrate the Ext JS library with Rails as a backend.
When Ext Scaffold was first released earlier this year, it was a rather experimental shot at Ext/Rails integration. It still received a lot of great feedback, and more importantly it helped me gather things I would do different next time.
Ext Scaffold Reloaded is the fruit of all lessons learned since the first release, if you will. So without further ado, here are the top enhancements:
- One-page user interface: The Grid and the form are integrated into one single page. As no page reload is necessary when switching between grid and form, the interfaces is much more responsive.
- No more magic: The formerly introduced view helpers are gone. While they made the view code look very simple and elegant, they more so obfuscated what was actually going on.
- Easy refinement: All Javascript code is now generated explicitly and thus can be easily tweaked and refined to one’s needs.
Ext Scaffold also found its new home over at github. So give it a spin and let me know what needs to be radically different in the Revolutions release
.
If you like this plugin, please consider recommending me on Working with Rails. Thank you!
- Announcing: Ext Scaffold Generator Plugin for Rails
- Howto: Associations with ext_scaffold (aka ExtJS with Ruby on Rails)
- Tutorial: How to use the Ext JS Treeview (Ext.tree) with Ruby on Rails
- Mini-Tutorial - Ext JS Form Controls with Ruby on Rails: ComboBox
- Background Presentation: Ext JS and Rails, how do they get along?
Entry Filed under: Tools, Announcements, Ruby on Rails, Ext JS
4 Comments Add your own
1. Sergey | December 26th, 2008 at 9:24 am
I was trying to re-install reloaded plugin over existing one, I got “Plugin not found”
C:\InstantRails-2.0-win\rails_apps\ext_demo>ruby script/plugin install git://github.com/martinrehfeld/ext_scaffold.git –force
Plugin not found: [”git://github.com/martinrehfeld/ext_scaffold.git”]
I have ruby 1.8.6 and rails 2.2.2
2. martin.rehfeld | December 26th, 2008 at 11:37 am
@Sergey/#1: I just fixed the installer — please retry.
3. Steve Alex | January 9th, 2009 at 3:12 pm
Slick generator. I’m new to Ext JS and just dabble in RoR. Like everything new, it seems to require a steep learning curve (ExtJS) - but maybe not that bad.
I just wonder why you chose to use a single page layout and viewPort? I’d throw something together today using this if I could figure out how to put together a multiple table system (being able to go to multiple “has many” tables from a view). I experimented trying to put together a viewPort from the ExtJS API pages and put the ExtScaffold object in a tabpanel but all I could get to render was the Title and only on the active panel.
You must have something in mind on how to use this for something else other than a slick single table generator? Realizing that a scaffold is just a starting point, could you outline the approach you would take to move into a multiple table system with many relations?
4. Martin Rehfeld | January 9th, 2009 at 4:52 pm
@Steve/#3: You can easily render the scaffold into an exististing page element. Say you have a div with
id="ext-scaffold-placeholder" style="height: 200px"Then make the scaffold appear within that div instead of using a viewport:
Ext.onReady(function() {
// ...
var es = new ExtScaffold.MyScaffoldedClass({
applyTo: 'ext-scaffold-placeholder',
// ...
});
});
Leave a Comment
Some HTML allowed:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <code> <em> <i> <strike> <strong>
Trackback this post | Subscribe to the comments via RSS Feed