Hi Folks, I''ve been tracking RoR in the back of my head for a while, ever since I saw basecamp. After reading the oreillynet.com article I decided to give it a try and see if it meshed with my other interest in XUL. I have a temporary sample of the app up and running at: http://207.237.211.198:3000/recipe/list You''ll need firefox or mozilla to use it of course. It is basically the same app as in the oreillynet article, except for the following interesting points: 1. Most of the GUI is done with XUL and java script. 2. The lower pane that shows the actual recipe is implemented by dynamically getting the XUL from /recipe/show/ and then putting it into the XUL document. Do a view source and look at the bottom at the showRecipe() function. 3. Adding a recipe is still done with an HTML page because I mostly got bored with the whole recipe thing. 4. It''s using SQLite rather than mysql. Enjoy, and any comments are welcome. -- Zed A. Shaw http://www.zedshaw.com/
Hi, On Sun, 23 Jan 2005 17:36:30 -0500, Zed Shaw <zedshaw-dd7LMGGEL7NBDgjK7y7TUQ@public.gmane.org> wrote:> Hi Folks, > > I''ve been tracking RoR in the back of my head for a while, ever since I > saw basecamp. After reading the oreillynet.com article I decided to > give it a try and see if it meshed with my other interest in XUL. > > I have a temporary sample of the app up and running at: > > http://207.237.211.198:3000/recipe/list > > You''ll need firefox or mozilla to use it of course. It is basically the > same app as in the oreillynet article, except for the following > interesting points: > > 1. Most of the GUI is done with XUL and java script. > 2. The lower pane that shows the actual recipe is implemented by > dynamically getting the XUL from /recipe/show/ and then putting it into > the XUL document. Do a view source and look at the bottom at the > showRecipe() function. > 3. Adding a recipe is still done with an HTML page because I mostly got > bored with the whole recipe thing. > 4. It''s using SQLite rather than mysql. > > Enjoy, and any comments are welcome.Cool. :-) Cheers, Joao
Zed Shaw wrote:> Hi Folks,Moin.> I''ve been tracking RoR in the back of my head for a while, ever since I > saw basecamp. After reading the oreillynet.com article I decided to > give it a try and see if it meshed with my other interest in XUL. > > I have a temporary sample of the app up and running at: > > http://207.237.211.198:3000/recipe/listInteresting stuff, though I can see a few oddities: - The application should not use that much canvas place. It should be limited to a static size somehow. (I''m getting artifacts on the "Edit" button because it''s just too wide and it just looks a bit odd.) - &, < and > ought to be escaped or you will get XML parser errors. Still, very nice. I can see how this could be useful in intranets etc.
On Sun, 23 Jan 2005 17:36:30 -0500, Zed Shaw <zedshaw-dd7LMGGEL7NBDgjK7y7TUQ@public.gmane.org> wrote:> Hi Folks, > > I''ve been tracking RoR in the back of my head for a while, ever since I > saw basecamp. After reading the oreillynet.com article I decided to > give it a try and see if it meshed with my other interest in XUL. > > I have a temporary sample of the app up and running at: > > http://207.237.211.198:3000/recipe/list > > You''ll need firefox or mozilla to use it of course. It is basically the > same app as in the oreillynet article, except for the following > interesting points: > > 1. Most of the GUI is done with XUL and java script. > 2. The lower pane that shows the actual recipe is implemented by > dynamically getting the XUL from /recipe/show/ and then putting it into > the XUL document. Do a view source and look at the bottom at the > showRecipe() function. > 3. Adding a recipe is still done with an HTML page because I mostly got > bored with the whole recipe thing. > 4. It''s using SQLite rather than mysql. > > Enjoy, and any comments are welcome. > > -- > Zed A. Shaw > http://www.zedshaw.com/Hi, Are you properly escaping ''&'' and friends? I''m getting a XML parsing error right after someone apparently entered "Fish & Chips". Joe
Oh, and maybe the list at the front page should live update itself?
* Zed Shaw (zedshaw-dd7LMGGEL7NBDgjK7y7TUQ@public.gmane.org) [050123 17:39]:> I''ve been tracking RoR in the back of my head for a while, ever since I > saw basecamp. After reading the oreillynet.com article I decided to > give it a try and see if it meshed with my other interest in XUL. > > I have a temporary sample of the app up and running at: > > http://207.237.211.198:3000/recipe/list > > You''ll need firefox or mozilla to use it of course. It is basically the > same app as in the oreillynet article, except for the following > interesting points:Some of us had done some (pre-Rails) experimentation with Mozilla+XUL+JS+SOAP and got some good results. I really like the potential here for rich client apps using Mozilla and Rails. Have you written up the process of tying in XUL to Rails anywhere? If not I think this would be a great Wiki topic or even a Rails "Manual" (see http://documentation.rubyonrails.com/ or http://manuals.rubyonrails.com/). Rick -- http://www.rickbradley.com MUPRN: 524 | the beach outside The random email haiku | Hague while Milosevic | barked down the phone.
On Sun, Jan 23, 2005 at 05:36:30PM -0500, Zed Shaw wrote:> Hi Folks, > > I''ve been tracking RoR in the back of my head for a while, ever since I > saw basecamp. After reading the oreillynet.com article I decided to > give it a try and see if it meshed with my other interest in XUL. > > I have a temporary sample of the app up and running at: > > http://207.237.211.198:3000/recipe/list > > You''ll need firefox or mozilla to use it of course. It is basically the > same app as in the oreillynet article, except for the following > interesting points: > > 1. Most of the GUI is done with XUL and java script. > 2. The lower pane that shows the actual recipe is implemented by > dynamically getting the XUL from /recipe/show/ and then putting it into > the XUL document. Do a view source and look at the bottom at the > showRecipe() function. > 3. Adding a recipe is still done with an HTML page because I mostly got > bored with the whole recipe thing. > 4. It''s using SQLite rather than mysql. > > Enjoy, and any comments are welcome.Extremely nice.
Hi, comments below... On Sun, 2005-01-23 at 19:08 -0500, Rick Bradley wrote:> Some of us had done some (pre-Rails) experimentation with > Mozilla+XUL+JS+SOAP and got some good results. I really like the > potential here for rich client apps using Mozilla and Rails. Have you > written up the process of tying in XUL to Rails anywhere? >Nope, this was just me fooling around with the tech for around 4 hours yesterday while I was snowed in. I''m not trying to break any records or do anything even remotely possible as a sample application. Just something of interest.> If not I think this would be a great Wiki topic or even a Rails "Manual" > (see http://documentation.rubyonrails.com/ or > http://manuals.rubyonrails.com/). >I''d probably do that, but I really don''t know ruby or rails that well. As I learn more I''ll consider writing something. Thanks for the interest! I''ll keep you posted if I actually write something worthy of a write-up. -- Zed A. Shaw http://www.zedshaw.com/
On Sun, 2005-01-23 at 15:41 -0800, Joe Van Dyk wrote:> Hi, > > Are you properly escaping ''&'' and friends? >Nope. There''s a lot of stuff not being done behind the scenes. For the most part I just took the recipe app from the oreillynet article and slapped a different front on it as a test. One thing I''d like to point out though is that there was no HTML escaping in the oreillynet examples either? That''s probably something which should be mentioned so that future generations do not repeat the mistakes of the past.> I''m getting a XML parsing error right after someone apparently entered > "Fish & Chips". >Yep, and there''s even cross site scripting and lots of other stuff. I tried the <%h= %> syntax to have the variables escaped, but that didn''t worked, it just produced empty results. Any advice on how to best do this? -- Zed A. Shaw http://www.zedshaw.com/
On Mon, 2005-01-24 at 00:40 +0100, Florian Groß wrote:> Interesting stuff, though I can see a few oddities: > > - The application should not use that much canvas place. It should be > limited to a static size somehow. (I''m getting artifacts on the "Edit" > button because it''s just too wide and it just looks a bit odd.)Yep, but keep in mind it was just a test of what you could do. Whole thing took about an hour which is pretty good considering I don''t know ruby or rails. I think what you''re seeing on the edit button is more of how I''m organizing the lower pane. I originally tried a grid control, but that totally hosed the layout. No idea why, but it actually organized the children backwards.> - &, < and > ought to be escaped or you will get XML parser errors.I mentioned this before, but I don''t see much escaping being done in any of the docs or examples I''ve read. I''ve only glanced through a couple (starting with the oreillynet.com stuff), but it seems RoR will run into constant problems with newbies like me duplicating bad habits from examples. Another comment related to this is, "Why not just always escape in the HTML templates, and have special syntax for unescaped situations?" It is the more common case after all. An additional error is that you can actually inject your own XUL code into the results since it places some of the Recipe fields inside <description></description> tag combinations. This really make cross site scripting a nightmare for sure.> Still, very nice. I can see how this could be useful in intranets etc. >Thanks. I''ve been exploring thicker clients in XUL for a while. I''ll probably be posting a more extensive example once I learn ruby and feel it lives up to the hype. -- Zed A. Shaw http://www.zedshaw.com/
Zed Shaw wrote:> Yep, and there''s even cross site scripting and lots of other stuff. I > tried the <%h= %> syntax to have the variables escaped, but that didn''t > worked, it just produced empty results. Any advice on how to best do > this?I think you have to use <%= h ... %>
Zed Shaw wrote:> Yep, but keep in mind it was just a test of what you could do. Whole > thing took about an hour which is pretty good considering I don''t know > ruby or rails.Agreed, just did my usual nitpicking in the hopes of seeing this addressed in later applications. It''s already quite nice and I could imagine it being a wonderful new area where Rails could be used.> Thanks. I''ve been exploring thicker clients in XUL for a while. I''ll > probably be posting a more extensive example once I learn ruby and feel > it lives up to the hype.I''m already looking forward to it. :) Sorry if I sounded a bit too negative and thank you a lot for sharing your efforts with the mailing list.