GregH
2008-Apr-04 04:25 UTC
Updatable "datagrid" with ajax support? Is there any code/approach I can leverage?
Hi, I want to have a page in my Ruby on Rails application that is like a dynamic / updateable data grid. Like a matrix or spreadsheet segment (x rows, y columns) which one can click in any of the cells and make an update, which triggers some AJAX code to fire off the update, and then the responses come back and update whatever else needs updating based on this change. Is there a prototype example/project that provides this support that someone could point me to? Ideally one in a rails application. Thanks in advance Greg --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
David Lam
2008-Apr-04 06:36 UTC
Re: Updatable "datagrid" with ajax support? Is there any code/approach I can leverage?
mmm link_to_remote? i.e. Ajax.Updater? On Thu, Apr 3, 2008 at 9:25 PM, GregH <greg.hauptmann.ruby-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hi, > > I want to have a page in my Ruby on Rails application that is like a > dynamic / updateable data grid. Like a matrix or spreadsheet segment > (x rows, y columns) which one can click in any of the cells and make > an update, which triggers some AJAX code to fire off the update, and > then the responses come back and update whatever else needs updating > based on this change. > > Is there a prototype example/project that provides this support that > someone could point me to? Ideally one in a rails application. > > Thanks in advance > Greg > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Andrew Kaspick
2008-Apr-04 07:42 UTC
Re: Updatable "datagrid" with ajax support? Is there any code/approach I can leverage?
Maybe this would be a good start for you... http://www.millstream.com.au/view/code/tablekit/ On 4/3/08, GregH <greg.hauptmann.ruby-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> > Hi, > > I want to have a page in my Ruby on Rails application that is like a > dynamic / updateable data grid. Like a matrix or spreadsheet segment > (x rows, y columns) which one can click in any of the cells and make > an update, which triggers some AJAX code to fire off the update, and > then the responses come back and update whatever else needs updating > based on this change. > > Is there a prototype example/project that provides this support that > someone could point me to? Ideally one in a rails application. > > Thanks in advance > Greg > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
GregH
2008-Apr-04 11:25 UTC
Re: Updatable "datagrid" with ajax support? Is there any code/approach I can leverage?
actually Ext JS looks excellent however it isn''t doesn''t really align the best with Rails/Prototype, but is more of it''s own Javascript frame. But check out an example of an Ext JS datagrid example here ( http://extjs.com/deploy/dev/examples/grid/edit-grid.html ). Looks excellent no? There''s no prototype/rails equivalent that has the same level of finishing/user experience I suppose? (I''ve already had a look at active scafford & tablekit) On Apr 4, 5:42 pm, "Andrew Kaspick" <akasp...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Maybe this would be a good start for you...http://www.millstream.com.au/view/code/tablekit/ > > On 4/3/08, GregH <greg.hauptmann.r...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > > > Hi, > > > I want to have a page in my Ruby on Rails application that is like a > > dynamic / updateable data grid. Like a matrix or spreadsheet segment > > (x rows, y columns) which one can click in any of the cells and make > > an update, which triggers some AJAX code to fire off the update, and > > then the responses come back and update whatever else needs updating > > based on this change. > > > Is there a prototype example/project that provides this support that > > someone could point me to? Ideally one in a rails application. > > > Thanks in advance > > Greg--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Peter De Berdt
2008-Apr-04 11:39 UTC
Re: Updatable "datagrid" with ajax support? Is there any code/approach I can leverage?
On 04 Apr 2008, at 13:25, GregH wrote:> actually Ext JS looks excellent however it isn''t doesn''t really align > the best with Rails/Prototype, but is more of it''s own Javascript > frame. But check out an example of an Ext JS datagrid example here > ( http://extjs.com/deploy/dev/examples/grid/edit-grid.html ). Looks > excellent no? > > There''s no prototype/rails equivalent that has the same level of > finishing/user experience I suppose? (I''ve already had a look at > active scafford & tablekit)To straighten things out: it does integrate well with prototype (and a number of other javascript libraries out there like jquery, yui etc). You load the correct adapter and it will use prototype instead of its own DOM/ajax library: <script src="javascripts/extjs/ext-prototype-adapter.js" type="text/javascript" charset="utf-8"></script> <script src="javascripts/extjs/ext-all.js" type="text/javascript" charset="utf-8"></script> And with the latest prototype, it has actually become quite performant (the previous prototype version has awful performance with extjs, you were better off using its own library). Integration with Rails is perfectly possible and Martin Rehfeld has stepped up to the plate with his extjs scaffold plugin to provide some basic rails helpers and mixins. Tighter integration is only possible if someone else is willing so wrap all of the functionality (or for example the editable grid feature) into a Rails plugin. I sometimes get the feeling some people view rails plugins as buying a pack of chicken breasts in the supermarket: not knowing they came from a living chicken, that was killed, cut apart and then packed and transported to the supermarket. A plugin is something someone (most of the times) extracted from a live project, cleaned up, invested some expensive time in to make more generally usable and well tested and then made available as a courtesy to the community. Best regards Peter De Berdt --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Greg Hauptmann
2008-Apr-04 11:49 UTC
Re: Updatable "datagrid" with ajax support? Is there any code/approach I can leverage?
thanks Peter - what do you think overall then re which one I should go for? - I''m basically a Ruby on Rails hobbyist programmer that''s looking for a good way to get very user friendly grid editing functions for a few of the pages I''m working on. I''d like it to be a comparable experience to using thick client (e.g. custom app, or excel) to win my users (including myself) over. For example one of the pages is going to be maintain of expenses (e.g. one row per expense, e.g. date/company/amount etc etc). I''ve haven''t used either Ext JS or ActiveScaffold in anger yet so I''m starting fresh in either case. I''ve got the feeling I should probably dive into Ext JS and go for the tool that is more useable, albeit with a little more ramp up time. I''m guessing I''m less likely to get annoying some constraint I hit down the tack with Ext JS than I may with ActiveScaffold? On Fri, Apr 4, 2008 at 9:39 PM, Peter De Berdt <peter.de.berdt-LPO8gxj9N8aZIoH1IeqzKA@public.gmane.org> wrote:> > On 04 Apr 2008, at 13:25, GregH wrote: > > actually Ext JS looks excellent however it isn''t doesn''t really align > the best with Rails/Prototype, but is more of it''s own Javascript > frame. But check out an example of an Ext JS datagrid example here > ( http://extjs.com/deploy/dev/examples/grid/edit-grid.html ). Looks > excellent no? > > There''s no prototype/rails equivalent that has the same level of > finishing/user experience I suppose? (I''ve already had a look at > active scafford & tablekit) > > > To straighten things out: it does integrate well with prototype (and a > number of other javascript libraries out there like jquery, yui etc). You > load the correct adapter and it will use prototype instead of its own > DOM/ajax library: > > <script src="javascripts/extjs/ext-prototype-adapter.js" > type="text/javascript" charset="utf-8"></script> > <script src="javascripts/extjs/ext-all.js" type="text/javascript" > charset="utf-8"></script> > > And with the latest prototype, it has actually become quite performant > (the previous prototype version has awful performance with extjs, you were > better off using its own library). > > Integration with Rails is perfectly possible and Martin Rehfeld has > stepped up to the plate with his extjs scaffold plugin to provide some basic > rails helpers and mixins. Tighter integration is only possible if someone > else is willing so wrap all of the functionality (or for example the > editable grid feature) into a Rails plugin. > I sometimes get the feeling some people view rails plugins as buying a > pack of chicken breasts in the supermarket: not knowing they came from a > living chicken, that was killed, cut apart and then packed and transported > to the supermarket. A plugin is something someone (most of the times) > extracted from a live project, cleaned up, invested some expensive time in > to make more generally usable and well tested and then made available as a > courtesy to the community. > > > Best regards > > > Peter De Berdt > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Peter De Berdt
2008-Apr-04 12:15 UTC
Re: Updatable "datagrid" with ajax support? Is there any code/approach I can leverage?
If the examples extjs provides make you go like: "this is all i''ll ever need and even more", then that''s the library you should go for. The syntax of extjs is pretty simple to get a hang of, although the lack of a decent book out there that dives into a real project can make it quite hard for someone not all too familiar with javascript in general to find his way around the online docs. There''s the forums to help you out of course, but it''s going to take some time and frustration to get it to do what you want. What you need to keep in mind is that extjs is a clientside library, and the serverside end can be just about anything you want. I always start out by creating some mockups with a clientside dummy data store and once that all works out ok, you can replace that dummy data store with a remote serverside one. Database backed web development is harder than most people think, you need to learn a lot: XHTML, CSS, javascript (and any libraries you use), a serverside language (Ruby, PHP, .NET, … and possibly a framework such as Rails), some server management (linux for example, especially if you''re going the Rails way). They all tie in together. I''ve grown into rich web application over the last couple of years (after developing desktop applications) and popular web applications these days all have these nifty ajax and thick client-like features, but you need to ask yourself if you are ready to learn it all at once. I won''t say it can''t be done, but you''ll run into so many walls along the way you might lose the joy of programming along the way. If you''re not a hardcore object oriented programmer already, it''s better to start with some basic webpage mockups, simple XHTML and CSS IMHO. Once you feel comfortable with that, make those pages dynamic with some serverside language and framework (and I would certainly choose Ruby and Rails for it). A small project with just simple, nothing ajaxy, pages. Once you got that done, replace some of the page reloads with ajax stuff, get the gripes with javascript and prototype. As a last step, move on to something like extjs. It''s just easier to see how everything fits in together if you know all of the components by themselves. You can''t expect yourself to know everything right away and make it all work together. On 04 Apr 2008, at 13:49, Greg Hauptmann wrote:> thanks Peter - what do you think overall then re which one I should > go for? - I''m basically a Ruby on Rails hobbyist programmer that''s > looking for a good way to get very user friendly grid editing > functions for a few of the pages I''m working on. I''d like it to be > a comparable experience to using thick client (e.g. custom app, or > excel) to win my users (including myself) over. For example one of > the pages is going to be maintain of expenses (e.g. one row per > expense, e.g. date/company/amount etc etc). I''ve haven''t used > either Ext JS or ActiveScaffold in anger yet so I''m starting fresh > in either case. > > I''ve got the feeling I should probably dive into Ext JS and go for > the tool that is more useable, albeit with a little more ramp up > time. I''m guessing I''m less likely to get annoying some constraint > I hit down the tack with Ext JS than I may with ActiveScaffold? > > > On Fri, Apr 4, 2008 at 9:39 PM, Peter De Berdt <peter.de.berdt-LPO8gxj9N8aZIoH1IeqzKA@public.gmane.org > > wrote: > > To straighten things out: it does integrate well with prototype (and > a number of other javascript libraries out there like jquery, yui > etc). You load the correct adapter and it will use prototype instead > of its own DOM/ajax library: > > <script src="javascripts/extjs/ext-prototype-adapter.js" > type="text/javascript" charset="utf-8"></script> > <script src="javascripts/extjs/ext-all.js" type="text/ > javascript" charset="utf-8"></script> > > And with the latest prototype, it has actually become quite > performant (the previous prototype version has awful performance > with extjs, you were better off using its own library). > > Integration with Rails is perfectly possible and Martin Rehfeld has > stepped up to the plate with his extjs scaffold plugin to provide > some basic rails helpers and mixins. Tighter integration is only > possible if someone else is willing so wrap all of the functionality > (or for example the editable grid feature) into a Rails plugin. > I sometimes get the feeling some people view rails plugins as buying > a pack of chicken breasts in the supermarket: not knowing they came > from a living chicken, that was killed, cut apart and then packed > and transported to the supermarket. A plugin is something someone > (most of the times) extracted from a live project, cleaned up, > invested some expensive time in to make more generally usable and > well tested and then made available as a courtesy to the community.Best regards Peter De Berdt --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Greg Hauptmann
2008-Apr-04 12:25 UTC
Re: Updatable "datagrid" with ajax support? Is there any code/approach I can leverage?
thanks - I''ve already been building RoR apps with some limited use of prototype and rjs. BTW - How does extjs fit in with the other java script/AJAX libraries actually? (i.e. besides Prototype there are others which I can''t quite remember at the moment, Do...?, googles although it''s java based, YUI). That is if I''m after something that gives me rich ajax based grid controls is extjs a focused fit to this as opposed to being a framework? Or in other words should I consider the other java script libraries, or use the argument if I were i should just stick to prototype as it has Rails integration. Tks On Fri, Apr 4, 2008 at 10:15 PM, Peter De Berdt <peter.de.berdt-LPO8gxj9N8aZIoH1IeqzKA@public.gmane.org> wrote:> If the examples extjs provides make you go like: "this is all i''ll ever > need and even more", then that''s the library you should go for. The syntax > of extjs is pretty simple to get a hang of, although the lack of a decent > book out there that dives into a real project can make it quite hard for > someone not all too familiar with javascript in general to find his way > around the online docs. There''s the forums to help you out of course, but > it''s going to take some time and frustration to get it to do what you want. > > What you need to keep in mind is that extjs is a clientside library, and > the serverside end can be just about anything you want. I always start out > by creating some mockups with a clientside dummy data store and once that > all works out ok, you can replace that dummy data store with a remote > serverside one. Database backed web development is harder than most people > think, you need to learn a lot: XHTML, CSS, javascript (and any libraries > you use), a serverside language (Ruby, PHP, .NET, … and possibly a framework > such as Rails), some server management (linux for example, especially if > you''re going the Rails way). They all tie in together. > > I''ve grown into rich web application over the last couple of years (after > developing desktop applications) and popular web applications these days all > have these nifty ajax and thick client-like features, but you need to ask > yourself if you are ready to learn it all at once. I won''t say it can''t be > done, but you''ll run into so many walls along the way you might lose the joy > of programming along the way. > > If you''re not a hardcore object oriented programmer already, it''s better > to start with some basic webpage mockups, simple XHTML and CSS IMHO. Once > you feel comfortable with that, make those pages dynamic with some > serverside language and framework (and I would certainly choose Ruby and > Rails for it). A small project with just simple, nothing ajaxy, pages. Once > you got that done, replace some of the page reloads with ajax stuff, get the > gripes with javascript and prototype. As a last step, move on to something > like extjs. It''s just easier to see how everything fits in together if you > know all of the components by themselves. You can''t expect yourself to know > everything right away and make it all work together. > > On 04 Apr 2008, at 13:49, Greg Hauptmann wrote: > > thanks Peter - what do you think overall then re which one I should go > for? - I''m basically a Ruby on Rails hobbyist programmer that''s looking for > a good way to get very user friendly grid editing functions for a few of the > pages I''m working on. I''d like it to be a comparable experience to using > thick client (e.g. custom app, or excel) to win my users (including myself) > over. For example one of the pages is going to be maintain of expenses > (e.g. one row per expense, e.g. date/company/amount etc etc). I''ve haven''t > used either Ext JS or ActiveScaffold in anger yet so I''m starting fresh in > either case. > > I''ve got the feeling I should probably dive into Ext JS and go for the > tool that is more useable, albeit with a little more ramp up time. I''m > guessing I''m less likely to get annoying some constraint I hit down the tack > with Ext JS than I may with ActiveScaffold? > > > On Fri, Apr 4, 2008 at 9:39 PM, Peter De Berdt <peter.de.berdt-LPO8gxj9N8aZIoH1IeqzKA@public.gmane.org> > wrote: > > > > > To straighten things out: it does integrate well with prototype (and a > > number of other javascript libraries out there like jquery, yui etc). You > > load the correct adapter and it will use prototype instead of its own > > DOM/ajax library: > > > > <script src="javascripts/extjs/ext-prototype-adapter.js" > > type="text/javascript" charset="utf-8"></script> > > <script src="javascripts/extjs/ext-all.js" type="text/javascript" > > charset="utf-8"></script> > > > > And with the latest prototype, it has actually become quite performant > > (the previous prototype version has awful performance with extjs, you were > > better off using its own library). > > > > Integration with Rails is perfectly possible and Martin Rehfeld has > > stepped up to the plate with his extjs scaffold plugin to provide some basic > > rails helpers and mixins. Tighter integration is only possible if someone > > else is willing so wrap all of the functionality (or for example the > > editable grid feature) into a Rails plugin. > > I sometimes get the feeling some people view rails plugins as buying a > > pack of chicken breasts in the supermarket: not knowing they came from a > > living chicken, that was killed, cut apart and then packed and transported > > to the supermarket. A plugin is something someone (most of the times) > > extracted from a live project, cleaned up, invested some expensive time in > > to make more generally usable and well tested and then made available as a > > courtesy to the community. > > > > Best regards > > > Peter De Berdt > > > > >--~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---
Peter De Berdt
2008-Apr-04 12:45 UTC
Re: Updatable "datagrid" with ajax support? Is there any code/approach I can leverage?
On 04 Apr 2008, at 14:25, Greg Hauptmann wrote:> thanks - I''ve already been building RoR apps with some limited use > of prototype and rjs. > > BTW - How does extjs fit in with the other java script/AJAX > libraries actually? (i.e. besides Prototype there are others which I > can''t quite remember at the moment, Do...?, googles although it''s > java based, YUI). That is if I''m after something that gives me > rich ajax based grid controls is extjs a focused fit to this as > opposed to being a framework?ExtJS has its own Prototype-like DOM manipulation-AJAX module which you can use. It''s the most performant one too when you use extjs'' controls for most of your app, as it was clearly focussed on integrating with the rest of the ExtJS framework, which is indeed all about GUI controls. The ExtJS library however has a different syntax than Prototype. It leans more towards C# if you ask me, while Prototype is clearly inspired by Ruby.> Or in other words should I consider the other java script libraries, > or use the argument if I were i should just stick to prototype as it > has Rails integration.Depends on how you use Prototype in Rails. If you use the Rails helpers like link_to_remote etc, it would be better to stick with Prototype instead of switching to some other library. If on the other hand, you were already handcoding all javascript unobtrusively or you are using Rails 2 and foo.js.erb files (javascript code with erb processing) instead of RJS, you could consider dropping prototype and learning extjs'' own library. Rails doesn''t force you to use Prototype and Scriptaculous... unless you want to use RJS, although even this could be solved by replacing Rails'' RJS methods with ones that translate to some other library''s syntax, as has been done in jrails (http://agilewebdevelopment.com/plugins/jrails ). Best regards Peter De Berdt --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Ruby on Rails: Spinoffs" group. To post to this group, send email to rubyonrails-spinoffs-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-spinoffs-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-spinoffs?hl=en -~----------~----~----~----~------~----~------~--~---