Hi Folks, Just a quick message saying that, after much demand, I wrote a quick write-up for the RoR + XUL thing I did yesterday: http://www.zedshaw.com/blog/programming/ruby_xul.html It lays out the few simple things I did, has a bit of rant on an unrelated topic, and other stuff but it''s short still. On a related note, I''d like to thank "xal" on IRC for reminding me just how obnoxious people on IRC can be. Choice quotes like "well i don''t want to be taken seriously by java programmers because i sure don''t take them seriously" will do nothing but keep away potential converts, and Java programmers like me are the ones ripe for plucking. Enjoy! -- Zed A. Shaw http://www.zedshaw.com/
* Zed Shaw <zedshaw-dd7LMGGEL7NBDgjK7y7TUQ@public.gmane.org> [2005-01-24 20:17]:> It lays out the few simple things I did, has a bit of rant on an > unrelated topic, and other stuff but it''s short still.OK this isn''t the most useful comment but when I read this I almost pissed myself: Right now the Rails folks put everything in a Wiki, which is Hawaiian for "can''t find shit." Ha! I don''t know if you just made that up or it''s a common line, but it''s damn true I''m afraid (and funny - or maybe this weather has frozen my brain). Anyways, hope you hang around for a good while... -- ______________________________ toddgrimason*todd-AT-slack.net
Zed Shaw wrote:> > Hi Folks, > > Just a quick message saying that, after much demand, I wrote a quick > write-up for the RoR + XUL thing I did yesterday: > > http://www.zedshaw.com/blog/programming/ruby_xul.html > > It lays out the few simple things I did, has a bit of rant on an > unrelated topic, and other stuff but it''s short still. > > On a related note, I''d like to thank "xal" on IRC for reminding me just > how obnoxious people on IRC can be. Choice quotes like "well i don''t > want to be taken seriously by java programmers because i sure don''t take > them seriously" will do nothing but keep away potential converts, and > Java programmers like me are the ones ripe for plucking.This is great! I''m an old XUL hacker, myself (although I haven''t touched it in a couple years), so I am *very* interested in this. I have one request, though: could you zip or tar the source code. Its pretty painful to browse through the directory tree downloading files one at a time. Thanks, Curt
Hi, Zed: Thanks for the summary regarding XUL. One question I have is whether it is possible to embed XUL inside of a normal html page. Something like <html> <body> Normal html header <XUL> - XUL content for a list of appt Normal html form to edit one appt Normal html footer </body> </html> The main reason I want this is I only want to use XUL to display report style data but for other stuff (say edit), I will use normal html form. I have search google but haven''t found answer. The close solution I found is to use IFRAME to include a XUL source inside html document but I didn''t like use IFRAME. Thanks chong -----Original Message----- From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Zed Shaw Sent: Monday, January 24, 2005 7:17 PM To: Ruby On Rails List Subject: [Rails] Write-up on RoR + XUL Sample Hi Folks, Just a quick message saying that, after much demand, I wrote a quick write-up for the RoR + XUL thing I did yesterday: http://www.zedshaw.com/blog/programming/ruby_xul.html It lays out the few simple things I did, has a bit of rant on an unrelated topic, and other stuff but it''s short still. On a related note, I''d like to thank "xal" on IRC for reminding me just how obnoxious people on IRC can be. Choice quotes like "well i don''t want to be taken seriously by java programmers because i sure don''t take them seriously" will do nothing but keep away potential converts, and Java programmers like me are the ones ripe for plucking. Enjoy! -- Zed A. Shaw http://www.zedshaw.com/ _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
On Tue, 2005-01-25 at 08:49 -0600, ChongQing Xiao wrote:> Hi, Zed: > > Thanks for the summary regarding XUL. > One question I have is whether it is possible to embed XUL inside of a > normal html page. > > Something like > > <html> > <body> > Normal html header > <XUL> - XUL content for a list of appt > Normal html form to edit one appt > Normal html footer > </body> > </html> > > The main reason I want this is I only want to use XUL to display report > style data but for other stuff (say edit), I will use normal html form. > > I have search google but haven''t found answer. The close solution I > found is to use IFRAME to include a XUL source inside html document but > I didn''t like use IFRAME.XUL can contain normal HTML. Of course once you head down the XUL route your HTML has to be valid XML. -- Steven Critchfield <critch-wQLwMjUOumVBDgjK7y7TUQ@public.gmane.org>
Thanks for the answer. I am aware that XUL can contain html document but I try to not go with that approach. What I am trying to do is I will only use XUL in case it is hard to do it in html (such as List, Grid, Tab). For web browser which didn''t support XUL, I will still use HTML instead XUL. chong -----Original Message----- From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Steven Critchfield Sent: Tuesday, January 25, 2005 9:46 AM To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: RE: [Rails] Write-up on RoR + XUL Sample On Tue, 2005-01-25 at 08:49 -0600, ChongQing Xiao wrote:> Hi, Zed: > > Thanks for the summary regarding XUL. > One question I have is whether it is possible to embed XUL inside of a > normal html page. > > Something like > > <html> > <body> > Normal html header > <XUL> - XUL content for a list of appt > Normal html form to edit one appt > Normal html footer > </body> > </html> > > The main reason I want this is I only want to use XUL to displayreport> style data but for other stuff (say edit), I will use normal htmlform.> > I have search google but haven''t found answer. The close solution I > found is to use IFRAME to include a XUL source inside html documentbut> I didn''t like use IFRAME.XUL can contain normal HTML. Of course once you head down the XUL route your HTML has to be valid XML. -- Steven Critchfield <critch-wQLwMjUOumVBDgjK7y7TUQ@public.gmane.org> _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
* ChongQing Xiao <CqXiao-VSMm719ZX/VmbZtjAW+qKA@public.gmane.org> [2005-01-25 12:00]:> What I am trying to do is I will only use XUL in case it is hard to do > it in html (such as List, Grid, Tab). For web browser which didn''t > support XUL, I will still use HTML instead XUL.Depending on your audience and usage, an option with much higher penetration (over 90%) would be a small Flash compenent embedded for a functional listbox. I know many people hate Flash on principle, so please don''t freak out and flame me, it''s just a suggestion. And less limiting (audience-wise) than a Mozilla-only solution. -- ______________________________ toddgrimason*todd-AT-slack.net
I haven''t used flash before but I have read quite a bit about Flex recently. (If you are interested, you can take a look at http://www.macromedia.com/devnet/flex/example_apps.html?id=604) Too bad Flex is java based, it will be super cool if there is similar solution for ruby on rails. Compared with ASP.NET, flex or java face, one area I think ruby on rails can improve is the view part. The way how rhtml works is straight forward but I think the following style is cleaner and better than using helper method. <rails:DataGrid id="empGrid" dataSource="model:Employees"> ... </mx:DataGrid> chong -----Original Message----- From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Todd Grimason Sent: Tuesday, January 25, 2005 11:32 AM To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails] Write-up on RoR + XUL Sample * ChongQing Xiao <CqXiao-VSMm719ZX/VmbZtjAW+qKA@public.gmane.org> [2005-01-25 12:00]:> What I am trying to do is I will only use XUL in case it is hard to do > it in html (such as List, Grid, Tab). For web browser which didn''t > support XUL, I will still use HTML instead XUL.Depending on your audience and usage, an option with much higher penetration (over 90%) would be a small Flash compenent embedded for a functional listbox. I know many people hate Flash on principle, so please don''t freak out and flame me, it''s just a suggestion. And less limiting (audience-wise) than a Mozilla-only solution. -- ______________________________ toddgrimason*todd-AT-slack.net _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Don''t flame me either but I''ve been working on a flash/Ruby integration project for a little while now and it''s coming along nicely. Fisrt implementation uses loadvars in flash but The next version is going to be like phpobject/flash except done in ruby. I really like the flexibility of the interfaces you can make with flash and tying it to ruby and mysql on the server side really make s for some interesting possibilities. When I finish the RubyObject/flashMX integration I''ll post it for anyone else interested. On Jan 25, 2005, at 9:31 AM, Todd Grimason wrote:> * ChongQing Xiao <CqXiao-VSMm719ZX/VmbZtjAW+qKA@public.gmane.org> [2005-01-25 12:00]: >> What I am trying to do is I will only use XUL in case it is hard to do >> it in html (such as List, Grid, Tab). For web browser which didn''t >> support XUL, I will still use HTML instead XUL. > > Depending on your audience and usage, an option with much higher > penetration (over 90%) would be a small Flash compenent embedded for a > functional listbox. > > I know many people hate Flash on principle, so please don''t freak out > and flame me, it''s just a suggestion. And less limiting > (audience-wise) than a Mozilla-only solution. > > > -- > > ______________________________ > toddgrimason*todd-AT-slack.net > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > >-Ezra Zygmuntowicz Yakima Herald-Republic WebMaster 509-577-7732 ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
There is a RubyForge project that is similar to yours: http://rubyforge.org/projects/mingruby/ Ming/Ruby is a library for generating Macromedia Flash (SWF) based on Ming. Actually, Ming is a C library for generating SWF, and Ming/Ruby is a wrapper of Ming for Ruby. You might want to consider contacting the author of that project to see if combining your efforts would be mutually beneficial. Curt -----Original Message----- From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org]On Behalf Of Ezra Zygmuntowicz Sent: Tuesday, January 25, 2005 2:34 PM To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails] Write-up on RoR + XUL Sample Don''t flame me either but I''ve been working on a flash/Ruby integration project for a little while now and it''s coming along nicely. Fisrt implementation uses loadvars in flash but The next version is going to be like phpobject/flash except done in ruby. I really like the flexibility of the interfaces you can make with flash and tying it to ruby and mysql on the server side really make s for some interesting possibilities. When I finish the RubyObject/flashMX integration I''ll post it for anyone else interested. On Jan 25, 2005, at 9:31 AM, Todd Grimason wrote: * ChongQing Xiao <CqXiao-VSMm719ZX/VmbZtjAW+qKA@public.gmane.org> [2005-01-25 12:00]: What I am trying to do is I will only use XUL in case it is hard to do it in html (such as List, Grid, Tab). For web browser which didn''t support XUL, I will still use HTML instead XUL. Depending on your audience and usage, an option with much higher penetration (over 90%) would be a small Flash compenent embedded for a functional listbox. I know many people hate Flash on principle, so please don''t freak out and flame me, it''s just a suggestion. And less limiting (audience-wise) than a Mozilla-only solution. -- ______________________________ toddgrimason*todd-AT-slack.net _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails -Ezra Zygmuntowicz Yakima Herald-Republic WebMaster 509-577-7732 ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org
There is another rubyforge project that might be an option: http://alph.rubyforge.org/wiki/wiki.pl On Tue, 25 Jan 2005 14:55:36 -0600, Curt Hibbs <curt-fk6st7iWb8MAvxtiuMwx3w@public.gmane.org> wrote:> There is a RubyForge project that is similar to yours: > > http://rubyforge.org/projects/mingruby/ > Ming/Ruby is a library for generating > Macromedia Flash (SWF) based on Ming. > Actually, Ming is a C library for > generating SWF, and Ming/Ruby is a > wrapper of Ming for Ruby. > > You might want to consider contacting the author of that project to see if > combining your efforts would be mutually beneficial. > > Curt > > -----Original Message----- > From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org]On Behalf Of Ezra Zygmuntowicz > Sent: Tuesday, January 25, 2005 2:34 PM > To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: Re: [Rails] Write-up on RoR + XUL Sample > > > Don''t flame me either but I''ve been working on a flash/Ruby integration > project for a little while now and it''s coming along nicely. Fisrt > implementation uses loadvars in flash but The next version is going to be > like phpobject/flash except done in ruby. I really like the flexibility of > the interfaces you can make with flash and tying it to ruby and mysql on the > server side really make s for some interesting possibilities. When I finish > the RubyObject/flashMX integration I''ll post it for anyone else interested. > On Jan 25, 2005, at 9:31 AM, Todd Grimason wrote: > > * ChongQing Xiao <CqXiao-VSMm719ZX/VmbZtjAW+qKA@public.gmane.org> [2005-01-25 12:00]: > > What I am trying to do is I will only use XUL in case it is hard to do > it in html (such as List, Grid, Tab). For web browser which didn''t > support XUL, I will still use HTML instead XUL. > > Depending on your audience and usage, an option with much higher > penetration (over 90%) would be a small Flash compenent embedded for a > functional listbox. > > I know many people hate Flash on principle, so please don''t freak out > and flame me, it''s just a suggestion. And less limiting > (audience-wise) than a Mozilla-only solution. > > -- > > ______________________________ > toddgrimason*todd-AT-slack.net > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > -Ezra Zygmuntowicz > Yakima Herald-Republic > WebMaster > 509-577-7732 > ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
>While we''re at it, if there''s no "show me the goods" switch to thegenerator then make it. >One line files are nice, but when you''re trying to learn how to do it yourself, it''s nice to get a glimpse at the default setup without rooting through a source tree. Zed, Did you mean scaffold generator? ------------ script/generate scaffold Account action another_action ------------
On Tue, 25 Jan 2005 13:16:22 -0600, ChongQing Xiao <CqXiao-VSMm719ZX/VmbZtjAW+qKA@public.gmane.org> wrote:> I haven''t used flash before but I have read quite a bit about Flex > recently. > (If you are interested, you can take a look at > http://www.macromedia.com/devnet/flex/example_apps.html?id=604) > Too bad Flex is java based, it will be super cool if there is similar > solution for ruby on rails.A opensource alternative was http://www.openlaszlo.org/ . But like Flex it was for java and i think quite hard to port in ruby :(> > Compared with ASP.NET, flex or java face, one area I think ruby on rails > can improve is the view part. > The way how rhtml works is straight forward but I think the following > style is cleaner and better than using helper method. > > <rails:DataGrid id="empGrid" dataSource="model:Employees"> > ... > </mx:DataGrid> > > chong > > -----Original Message----- > From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Todd Grimason > Sent: Tuesday, January 25, 2005 11:32 AM > To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: Re: [Rails] Write-up on RoR + XUL Sample > > * ChongQing Xiao <CqXiao-VSMm719ZX/VmbZtjAW+qKA@public.gmane.org> [2005-01-25 12:00]: > > What I am trying to do is I will only use XUL in case it is hard to do > > it in html (such as List, Grid, Tab). For web browser which didn''t > > support XUL, I will still use HTML instead XUL. > > Depending on your audience and usage, an option with much higher > penetration (over 90%) would be a small Flash compenent embedded for a > functional listbox. > > I know many people hate Flash on principle, so please don''t freak out > and flame me, it''s just a suggestion. And less limiting > (audience-wise) than a Mozilla-only solution. > > -- > > ______________________________ > toddgrimason*todd-AT-slack.net > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
> Don''t flame me either but I''ve been working on a flash/Ruby integration > project for a little while now and it''s coming along nicely.I hope that no one would flame you here simply for working with Flash. Man, Jakob Neilsen''s really put the fear into us good if that''s the case. I would certainly find this kind of integration interesting and helpful at least to learn about. Good luck. andrew
On Tue, 25 Jan 2005 13:16:22 -0600, ChongQing Xiao <CqXiao-VSMm719ZX/VmbZtjAW+qKA@public.gmane.org> wrote:> I haven''t used flash before but I have read quite a bit about Flex > recently. > (If you are interested, you can take a look at > http://www.macromedia.com/devnet/flex/example_apps.html?id=604) > Too bad Flex is java based, it will be super cool if there is similar > solution for ruby on rails. > > Compared with ASP.NET, flex or java face, one area I think ruby on rails > can improve is the view part. > The way how rhtml works is straight forward but I think the following > style is cleaner and better than using helper method.That''s interesting, coming from a java background I find it refreshing that RoR *doesn''t* create ''yet another programming language'' just for view functionality. What in particular do you find cleaner about the ''psuedo-language'' approach? One drawback of the ''full code'' approach is that people can abuse it and cram all sorts of things in there. I''ve seen JSPs with class definitions in the scriptlets. However I think that this sort of thing is best handled through code reviews etc.> <rails:DataGrid id="empGrid" dataSource="model:Employees"> > ... > </mx:DataGrid> > > chong > > -----Original Message----- > From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Todd Grimason > Sent: Tuesday, January 25, 2005 11:32 AM > To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: Re: [Rails] Write-up on RoR + XUL Sample > > * ChongQing Xiao <CqXiao-VSMm719ZX/VmbZtjAW+qKA@public.gmane.org> [2005-01-25 12:00]: > > What I am trying to do is I will only use XUL in case it is hard to do > > it in html (such as List, Grid, Tab). For web browser which didn''t > > support XUL, I will still use HTML instead XUL. > > Depending on your audience and usage, an option with much higher > penetration (over 90%) would be a small Flash compenent embedded for a > functional listbox. > > I know many people hate Flash on principle, so please don''t freak out > and flame me, it''s just a suggestion. And less limiting > (audience-wise) than a Mozilla-only solution. > > -- > > ______________________________ > toddgrimason*todd-AT-slack.net > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Cheers Koz
And yet another (written by me). http://rubyforge.org/projects/amf4r/ It''s a Flash Remoting Gateway for Ruby. Much like phpamf and openamf. It''s still alpha, and I haven''t worked on it in a while, but I just finished some docs and plan to release it publicly soon, once I clean it up and give it a better suite of tests. It''s worth looking at now though, the code is in Rubyforge cvs. I''d be glad to answer any questions on it, or even better get some early feedback. Cheers, Gianni Steve Longdo wrote:>There is another rubyforge project that might be an option: >http://alph.rubyforge.org/wiki/wiki.pl > > >On Tue, 25 Jan 2005 14:55:36 -0600, Curt Hibbs <curt-fk6st7iWb8MAvxtiuMwx3w@public.gmane.org> wrote: > > >>There is a RubyForge project that is similar to yours: >> >> http://rubyforge.org/projects/mingruby/ >> Ming/Ruby is a library for generating >> Macromedia Flash (SWF) based on Ming. >> Actually, Ming is a C library for >> generating SWF, and Ming/Ruby is a >> wrapper of Ming for Ruby. >> >>You might want to consider contacting the author of that project to see if >>combining your efforts would be mutually beneficial. >> >>Curt >> >>-----Original Message----- >>From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>[mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org]On Behalf Of Ezra Zygmuntowicz >>Sent: Tuesday, January 25, 2005 2:34 PM >>To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>Subject: Re: [Rails] Write-up on RoR + XUL Sample >> >> >>Don''t flame me either but I''ve been working on a flash/Ruby integration >>project for a little while now and it''s coming along nicely. Fisrt >>implementation uses loadvars in flash but The next version is going to be >>like phpobject/flash except done in ruby. I really like the flexibility of >>the interfaces you can make with flash and tying it to ruby and mysql on the >>server side really make s for some interesting possibilities. When I finish >>the RubyObject/flashMX integration I''ll post it for anyone else interested. >>On Jan 25, 2005, at 9:31 AM, Todd Grimason wrote: >> >>* ChongQing Xiao <CqXiao-VSMm719ZX/VmbZtjAW+qKA@public.gmane.org> [2005-01-25 12:00]: >> >>What I am trying to do is I will only use XUL in case it is hard to do >>it in html (such as List, Grid, Tab). For web browser which didn''t >>support XUL, I will still use HTML instead XUL. >> >>Depending on your audience and usage, an option with much higher >>penetration (over 90%) would be a small Flash compenent embedded for a >>functional listbox. >> >>I know many people hate Flash on principle, so please don''t freak out >>and flame me, it''s just a suggestion. And less limiting >>(audience-wise) than a Mozilla-only solution. >> >>-- >> >>______________________________ >>toddgrimason*todd-AT-slack.net >> >>_______________________________________________ >>Rails mailing list >>Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>http://lists.rubyonrails.org/mailman/listinfo/rails >> >>-Ezra Zygmuntowicz >>Yakima Herald-Republic >>WebMaster >>509-577-7732 >>ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org >> >>_______________________________________________ >>Rails mailing list >>Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>http://lists.rubyonrails.org/mailman/listinfo/rails >> >> >> >_______________________________________________ >Rails mailing list >Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >http://lists.rubyonrails.org/mailman/listinfo/rails > >
Hi Andrew, Take a look at my reply to Steve Longdo above, if you''re interested in using Ruby with Flash Remoting. Cheers, Gianni Andrew Otwell wrote:>> Don''t flame me either but I''ve been working on a flash/Ruby >> integration project for a little while now and it''s coming along nicely. > > > I hope that no one would flame you here simply for working with Flash. > Man, Jakob Neilsen''s really put the fear into us good if that''s the > case. I would certainly find this kind of integration interesting and > helpful at least to learn about. Good luck. > > andrew > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails
I haven''t done java for a while so I won''t comment on how JSP will be compared to rhtml but my guess is they are close since both are mixing code with html tag. Compare rhtml with ASP.NET and Flex, Since rhtml is mixing ruby code with html tag, 1. It will be difficult to read if the page becomes complex. I have done some work with ASP and it is really a pain to maintain a bunch of .asp files which have mixed vb code and html tags. 2. If a designer (not a programmer) tries to use a standard html editor to load the rhtml page, the page might look very different than what it should look like because of the embed code. This will make the designer have a difficult time to figure out how to improve the looks. 3. No standard way to design reusable components. This is one thing I really like ASP.NET since you can easily plug in a menu, a tree, a tabstrip, a grid which is really a time saver for web development. I know I can reproduce the same function using rhtml + java script but without a standard way (or consistent way) to do it, everyone will reinvent the wheel. Having said above, I will say Ruby on rails is a wonderful framework. I especially like ActiveRecord, it really makes database related code much much simpler compared with ADO.NET. It is the view part which I hope it can be improved. Hopefully I will propose something in the future to make it better. Cheers Chong -----Original Message----- From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Michael Koziarski Sent: Tuesday, January 25, 2005 4:32 PM To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails] Write-up on RoR + XUL Sample On Tue, 25 Jan 2005 13:16:22 -0600, ChongQing Xiao <CqXiao-VSMm719ZX/VmbZtjAW+qKA@public.gmane.org> wrote:> I haven''t used flash before but I have read quite a bit about Flex > recently. > (If you are interested, you can take a look at > http://www.macromedia.com/devnet/flex/example_apps.html?id=604) > Too bad Flex is java based, it will be super cool if there is similar > solution for ruby on rails. > > Compared with ASP.NET, flex or java face, one area I think ruby onrails> can improve is the view part. > The way how rhtml works is straight forward but I think the following > style is cleaner and better than using helper method.That''s interesting, coming from a java background I find it refreshing that RoR *doesn''t* create ''yet another programming language'' just for view functionality. What in particular do you find cleaner about the ''psuedo-language'' approach? One drawback of the ''full code'' approach is that people can abuse it and cram all sorts of things in there. I''ve seen JSPs with class definitions in the scriptlets. However I think that this sort of thing is best handled through code reviews etc.> <rails:DataGrid id="empGrid" dataSource="model:Employees"> > ... > </mx:DataGrid> > > chong > > -----Original Message----- > From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of ToddGrimason> Sent: Tuesday, January 25, 2005 11:32 AM > To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: Re: [Rails] Write-up on RoR + XUL Sample > > * ChongQing Xiao <CqXiao-VSMm719ZX/VmbZtjAW+qKA@public.gmane.org> [2005-01-25 12:00]: > > What I am trying to do is I will only use XUL in case it is hard todo> > it in html (such as List, Grid, Tab). For web browser which didn''t > > support XUL, I will still use HTML instead XUL. > > Depending on your audience and usage, an option with much higher > penetration (over 90%) would be a small Flash compenent embedded for a > functional listbox. > > I know many people hate Flash on principle, so please don''t freak out > and flame me, it''s just a suggestion. And less limiting > (audience-wise) than a Mozilla-only solution. > > -- > > ______________________________ > toddgrimason*todd-AT-slack.net > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Cheers Koz _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Thanks I''ll check it out. But It doesn''t do the same thing as what I''m working on. What I''m making is a gateway so you can create any flash interface you want. Then create ruby scripts that are on the server and access mysql process login/password or whatever else you might want to do. Then this RubyObject Gateway lets you create object instances of ruby classes on the server in actionscript. RubyObject serializes the data and takes care of communicating between a swf file and the scripts on the server. So you instantiate one of your classes that are on the server in actionscript within your swf movie. Then you can call methods and constants from actionscript that execute on the server grabbing info from the db or whatever and returns the info back to the swf. You can see a php version of this here http://ghostwire.com/go/29 . Basically I''m rewriteing this to work with Ruby instead of PHP. On Jan 25, 2005, at 12:55 PM, Curt Hibbs wrote:> There is a RubyForge project that is similar to yours: > > http://rubyforge.org/projects/mingruby/ > Ming/Ruby is a library for generating > Macromedia Flash (SWF) based on Ming. > Actually, Ming is a C library for > generating SWF, and Ming/Ruby is a > wrapper of Ming for Ruby. > > You might want to consider contacting the author of that project to > see if > combining your efforts would be mutually beneficial. > > Curt > > -----Original Message----- > From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org]On Behalf Of Ezra > Zygmuntowicz > Sent: Tuesday, January 25, 2005 2:34 PM > To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: Re: [Rails] Write-up on RoR + XUL Sample > > > Don''t flame me either but I''ve been working on a flash/Ruby integration > project for a little while now and it''s coming along nicely. Fisrt > implementation uses loadvars in flash but The next version is going to > be > like phpobject/flash except done in ruby. I really like the > flexibility of > the interfaces you can make with flash and tying it to ruby and mysql > on the > server side really make s for some interesting possibilities. When I > finish > the RubyObject/flashMX integration I''ll post it for anyone else > interested. > On Jan 25, 2005, at 9:31 AM, Todd Grimason wrote: > > > * ChongQing Xiao <CqXiao-VSMm719ZX/VmbZtjAW+qKA@public.gmane.org> [2005-01-25 12:00]: > > What I am trying to do is I will only use XUL in case it is hard to do > it in html (such as List, Grid, Tab). For web browser which didn''t > support XUL, I will still use HTML instead XUL. > > > Depending on your audience and usage, an option with much higher > penetration (over 90%) would be a small Flash compenent embedded for a > functional listbox. > > I know many people hate Flash on principle, so please don''t freak out > and flame me, it''s just a suggestion. And less limiting > (audience-wise) than a Mozilla-only solution. > > > -- > > ______________________________ > toddgrimason*todd-AT-slack.net > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > -Ezra Zygmuntowicz > Yakima Herald-Republic > WebMaster > 509-577-7732 > ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > >-Ezra Zygmuntowicz Yakima Herald-Republic WebMaster 509-577-7732 ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Wow thats even closer to what I''m trying to do Thanks! But it seems that this technique is instantiating actionscript object in ruby. I''m trying to do it the other way around so I can create a cool looking interface in flash mx then deploy it on the web and let my flash movie have access to my database and whatever else I can get at from Ruby. Cool to see some similar projects though.... On Jan 25, 2005, at 1:47 PM, Steve Longdo wrote:> There is another rubyforge project that might be an option: > http://alph.rubyforge.org/wiki/wiki.pl > > > On Tue, 25 Jan 2005 14:55:36 -0600, Curt Hibbs <curt-fk6st7iWb8MAvxtiuMwx3w@public.gmane.org> wrote: >> There is a RubyForge project that is similar to yours: >> >> http://rubyforge.org/projects/mingruby/ >> Ming/Ruby is a library for generating >> Macromedia Flash (SWF) based on Ming. >> Actually, Ming is a C library for >> generating SWF, and Ming/Ruby is a >> wrapper of Ming for Ruby. >> >> You might want to consider contacting the author of that project to >> see if >> combining your efforts would be mutually beneficial. >> >> Curt >> >> -----Original Message----- >> From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org]On Behalf Of Ezra >> Zygmuntowicz >> Sent: Tuesday, January 25, 2005 2:34 PM >> To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> Subject: Re: [Rails] Write-up on RoR + XUL Sample >> >> >> Don''t flame me either but I''ve been working on a flash/Ruby >> integration >> project for a little while now and it''s coming along nicely. Fisrt >> implementation uses loadvars in flash but The next version is going >> to be >> like phpobject/flash except done in ruby. I really like the >> flexibility of >> the interfaces you can make with flash and tying it to ruby and mysql >> on the >> server side really make s for some interesting possibilities. When I >> finish >> the RubyObject/flashMX integration I''ll post it for anyone else >> interested. >> On Jan 25, 2005, at 9:31 AM, Todd Grimason wrote: >> >> * ChongQing Xiao <CqXiao-VSMm719ZX/VmbZtjAW+qKA@public.gmane.org> [2005-01-25 12:00]: >> >> What I am trying to do is I will only use XUL in case it is hard to do >> it in html (such as List, Grid, Tab). For web browser which didn''t >> support XUL, I will still use HTML instead XUL. >> >> Depending on your audience and usage, an option with much higher >> penetration (over 90%) would be a small Flash compenent embedded for a >> functional listbox. >> >> I know many people hate Flash on principle, so please don''t freak out >> and flame me, it''s just a suggestion. And less limiting >> (audience-wise) than a Mozilla-only solution. >> >> -- >> >> ______________________________ >> toddgrimason*todd-AT-slack.net >> >> _______________________________________________ >> Rails mailing list >> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> >> -Ezra Zygmuntowicz >> Yakima Herald-Republic >> WebMaster >> 509-577-7732 >> ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org >> >> _______________________________________________ >> Rails mailing list >> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > >-Ezra Zygmuntowicz Yakima Herald-Republic WebMaster 509-577-7732 ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
Thanks Gianni that is actually exactly what I am trying to do. I was just going about it a little differently. I''ve just checked out of cvs AMF4R and I''m going to sit down tonight and read up on it and play with it. This is great.. I''m doing a job right now for a website completely done in flash that need user login, database searches, credit card processing and all kinds of other stuff that actionscript can''t handle by itself. I started in php with phpobject but would much rather do it in ruby. It looks like you are further along than I am so I''m going to try out amf4r before I go any further... Thanks again Gianni On Jan 25, 2005, at 3:18 PM, Gianni Jacklone wrote:> And yet another (written by me). http://rubyforge.org/projects/amf4r/ > > It''s a Flash Remoting Gateway for Ruby. Much like phpamf and openamf. > > It''s still alpha, and I haven''t worked on it in a while, but I just > finished some docs and plan to release it publicly soon, once I clean > it up and give it a better suite of tests. It''s worth looking at now > though, the code is in Rubyforge cvs. > > I''d be glad to answer any questions on it, or even better get some > early feedback. > > Cheers, > Gianni > > Steve Longdo wrote: > >> There is another rubyforge project that might be an option: >> http://alph.rubyforge.org/wiki/wiki.pl >> >> On Tue, 25 Jan 2005 14:55:36 -0600, Curt Hibbs <curt-fk6st7iWb8MAvxtiuMwx3w@public.gmane.org> wrote: >> >>> There is a RubyForge project that is similar to yours: >>> >>> http://rubyforge.org/projects/mingruby/ >>> Ming/Ruby is a library for generating >>> Macromedia Flash (SWF) based on Ming. >>> Actually, Ming is a C library for >>> generating SWF, and Ming/Ruby is a >>> wrapper of Ming for Ruby. >>> >>> You might want to consider contacting the author of that project to >>> see if >>> combining your efforts would be mutually beneficial. >>> >>> Curt >>> >>> -----Original Message----- >>> From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>> [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org]On Behalf Of Ezra >>> Zygmuntowicz >>> Sent: Tuesday, January 25, 2005 2:34 PM >>> To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>> Subject: Re: [Rails] Write-up on RoR + XUL Sample >>> >>> >>> Don''t flame me either but I''ve been working on a flash/Ruby >>> integration >>> project for a little while now and it''s coming along nicely. Fisrt >>> implementation uses loadvars in flash but The next version is going >>> to be >>> like phpobject/flash except done in ruby. I really like the >>> flexibility of >>> the interfaces you can make with flash and tying it to ruby and >>> mysql on the >>> server side really make s for some interesting possibilities. When I >>> finish >>> the RubyObject/flashMX integration I''ll post it for anyone else >>> interested. >>> On Jan 25, 2005, at 9:31 AM, Todd Grimason wrote: >>> >>> * ChongQing Xiao <CqXiao-VSMm719ZX/VmbZtjAW+qKA@public.gmane.org> [2005-01-25 12:00]: >>> >>> What I am trying to do is I will only use XUL in case it is hard to >>> do >>> it in html (such as List, Grid, Tab). For web browser which didn''t >>> support XUL, I will still use HTML instead XUL. >>> >>> Depending on your audience and usage, an option with much higher >>> penetration (over 90%) would be a small Flash compenent embedded for >>> a >>> functional listbox. >>> >>> I know many people hate Flash on principle, so please don''t freak out >>> and flame me, it''s just a suggestion. And less limiting >>> (audience-wise) than a Mozilla-only solution. >>> >>> -- >>> >>> ______________________________ >>> toddgrimason*todd-AT-slack.net >>> >>> _______________________________________________ >>> Rails mailing list >>> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>> http://lists.rubyonrails.org/mailman/listinfo/rails >>> >>> -Ezra Zygmuntowicz >>> Yakima Herald-Republic >>> WebMaster >>> 509-577-7732 >>> ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org >>> >>> _______________________________________________ >>> Rails mailing list >>> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>> http://lists.rubyonrails.org/mailman/listinfo/rails >>> >>> >> _______________________________________________ >> Rails mailing list >> Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >> http://lists.rubyonrails.org/mailman/listinfo/rails >> > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > >-Ezra Zygmuntowicz Yakima Herald-Republic WebMaster 509-577-7732 ezra-gdxLOakOTQ9oetBuM9ipNAC/G2K4zDHf@public.gmane.org _______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
I''d be happy to answer any questions and more importantly get your feedback. I will post what documentation I have on the library tonight on a website, it will make things a lot easier to get started. I''ll get a quickstart guide togeter for you a little bit later tongiht. Feel free to email me off list at my address. Best Regards, Gianni
On Tue, 25 Jan 2005 17:44:21 -0600, ChongQing Xiao <CqXiao-VSMm719ZX/VmbZtjAW+qKA@public.gmane.org> wrote:> I haven''t done java for a while so I won''t comment on how JSP will be > compared to rhtml but my guess is they are close since both are mixing > code with html tag.No, not really. Scriptlets (embedded Java code in HTML) are more or less completely unnecessary now. Most JSP code looks like this: <html:form action="/creditcards/update"> Blah Blah <html:text property="someProperty" /> </html:form>> 1. It will be difficult to read if the page becomes complex. I have done > some work with ASP and it is really a pain to maintain a bunch of .asp > files which have mixed vb code and html tags.If you''re doing ''real''MVC development your .rhtml files should really only have control structures in them like <% for something in @somethings %> blah blah <% end %> Perhaps some conditional logic, but all the ''heavy code'' should be in the controllers. Views are only for display objects provided by the controllers, nothing else. > 2. If a designer (not a programmer) tries to use a standard html editor> to load the rhtml page, the page might look very different than what it > should look like because of the embed code. This will make the designer > have a difficult time to figure out how to improve the looks.This is definitely a concern, it''s one of the things that the Tapestry java framework has tried to work around, with some success apparently. However, the <rails:something /> tags would still confuse an editor wouldn''t they?> 3. No standard way to design reusable components. This is one thing I > really like ASP.NET since you can easily plug in a menu, a tree, a > tabstrip, a grid > which is really a time saver for web development. > I know I can reproduce the same function using rhtml + java script but > without a standard way (or consistent way) to do it, everyone will > reinvent the wheel.Have a look at TableHelper(http://rubyforge.org/projects/tablehelper/) it''s a reusable component that works with the erb views. Things are done slightly differently to a reusuable JSP tag library (and ASP.NET thingies) but it still works just fine.> Having said above, I will say Ruby on rails is a wonderful framework. I > especially like ActiveRecord, it really makes database related code much > much simpler compared with ADO.NET. > > It is the view part which I hope it > can be improved. Hopefully I will propose something in the future to > make it better.Excellent! I look forward to it ;)> Cheers > Chong > > > -----Original Message----- > From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Michael > Koziarski > Sent: Tuesday, January 25, 2005 4:32 PM > To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: Re: [Rails] Write-up on RoR + XUL Sample > > On Tue, 25 Jan 2005 13:16:22 -0600, ChongQing Xiao > <CqXiao-VSMm719ZX/VmbZtjAW+qKA@public.gmane.org> wrote: > > I haven''t used flash before but I have read quite a bit about Flex > > recently. > > (If you are interested, you can take a look at > > http://www.macromedia.com/devnet/flex/example_apps.html?id=604) > > Too bad Flex is java based, it will be super cool if there is similar > > solution for ruby on rails. > > > > Compared with ASP.NET, flex or java face, one area I think ruby on > rails > > can improve is the view part. > > The way how rhtml works is straight forward but I think the following > > style is cleaner and better than using helper method. > > That''s interesting, coming from a java background I find it > refreshing that RoR *doesn''t* create ''yet another programming > language'' just for view functionality. What in particular do you > find cleaner about the ''psuedo-language'' approach? > > One drawback of the ''full code'' approach is that people can abuse it > and cram all sorts of things in there. I''ve seen JSPs with class > definitions in the scriptlets. However I think that this sort of > thing is best handled through code reviews etc. > > > <rails:DataGrid id="empGrid" dataSource="model:Employees"> > > ... > > </mx:DataGrid> > > > > chong > > > > -----Original Message----- > > From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Todd > Grimason > > Sent: Tuesday, January 25, 2005 11:32 AM > > To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > Subject: Re: [Rails] Write-up on RoR + XUL Sample > > > > * ChongQing Xiao <CqXiao-VSMm719ZX/VmbZtjAW+qKA@public.gmane.org> [2005-01-25 12:00]: > > > What I am trying to do is I will only use XUL in case it is hard to > do > > > it in html (such as List, Grid, Tab). For web browser which didn''t > > > support XUL, I will still use HTML instead XUL. > > > > Depending on your audience and usage, an option with much higher > > penetration (over 90%) would be a small Flash compenent embedded for a > > functional listbox. > > > > I know many people hate Flash on principle, so please don''t freak out > > and flame me, it''s just a suggestion. And less limiting > > (audience-wise) than a Mozilla-only solution. > > > > -- > > > > ______________________________ > > toddgrimason*todd-AT-slack.net > > > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > -- > Cheers > > Koz > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- Cheers Koz
Michael Koziarski wrote:>On Tue, 25 Jan 2005 17:44:21 -0600, ChongQing Xiao ><CqXiao-VSMm719ZX/VmbZtjAW+qKA@public.gmane.org> wrote: > > >>1. It will be difficult to read if the page becomes complex. I have done >>some work with ASP and it is really a pain to maintain a bunch of .asp >>files which have mixed vb code and html tags. >> >> >If you''re doing ''real''MVC development your .rhtml files should really >only have control structures in them like > >Perhaps some conditional logic, but all the ''heavy code'' should be in >the controllers. Views are only for display objects provided by the >controllers, nothing else. >Let me add here that you can also resort to the helper modules to unclutter the views templates from Ruby code. Rgds
Hi, I believe you can freely mix the two since you can include HTML, then you can simply make the whole thing HTML with some XUL in it. Don''t trust me on this though, I haven''t tried it at all. Another approach is--as you mentioned--to use an IFRAME. Firefox supports IFRAME very well and rather seamlessly. But, I''d recommend that you look at the Flash solutions proposed here first. That would probably be a shorter path to what you want. My motivation with XUL and the whole XPFE environment available in Firefox is not to implement "web applications", but to implement cross platform thick clients or stand-alone applications. Because of this it''s not necessary for the implementation to be crossbrowser since it''s expected that the end user would either install our "software" or just install Firefox. The main target audience would be users who are using a dedicated application, internal users, and experts who are willing to install additional software. For example, we have several in house "HTML form hacks" that could easily be replaced by a very nice thick client in Firefox. Since these are our internal users, I can just have IT install Firefox (which they''re considering anyway for security). Additionally, I can create an XPI that will install on the fly and give them everything they need. Since the application is an in-house app, and the improved user experience from a XUL based UI is so much better, we can justify the minor cost. Another area where XUL is appropriate is "applications" masquerading as "web sites". By this I mean a web interface that is very interactive and provided to only known customers. In this case most companies have no problem installing a bit of client software to use the application, especially if it gives them an improved interface. Where I don''t recommend using XUL is in places where "IT" are Microsoft only, or in web sites like Google, Amazon, and E-bay that need to allow any Internet user to have random access. Another strategy I''m exploring is making a clear division between "admins", "experts", and "users". Many times developers insist on fitting a web UI to all three user types. My thought is that, admins and experts are better served by a rich XUL client, and users would be better served by a simple HTML interface. This gives a clear separation of concerns, and might improve security. Using E-bay as an example, you''d have a XUL admin interface for the help desk people who configure and manage seller''s accounts. Then the more advanced or "expert" sellers would get an advanced sellers XUL interface that is more real-time and interactive. Finally, buyers and casual sellers get a very simple HTML interface. Anyway, that''s my current thoughts on using XUL appropriately. As I said before, try it out to see if you can get what you want, but seriously look at the Flash ideas. Especially considering some of the very inexpensive and attractive charting libraries available for Flash. Zed On Tue, 2005-01-25 at 08:49 -0600, ChongQing Xiao wrote:> Hi, Zed: > > Thanks for the summary regarding XUL. > One question I have is whether it is possible to embed XUL inside of a > normal html page. > > Something like > > <html> > <body> > Normal html header > <XUL> - XUL content for a list of appt > Normal html form to edit one appt > Normal html footer > </body> > </html> > > The main reason I want this is I only want to use XUL to display report > style data but for other stuff (say edit), I will use normal html form. > > I have search google but haven''t found answer. The close solution I > found is to use IFRAME to include a XUL source inside html document but > I didn''t like use IFRAME. > > Thanks > chong > > > > -----Original Message----- > From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Zed Shaw > Sent: Monday, January 24, 2005 7:17 PM > To: Ruby On Rails List > Subject: [Rails] Write-up on RoR + XUL Sample > > Hi Folks, > > Just a quick message saying that, after much demand, I wrote a quick > write-up for the RoR + XUL thing I did yesterday: > > http://www.zedshaw.com/blog/programming/ruby_xul.html > > It lays out the few simple things I did, has a bit of rant on an > unrelated topic, and other stuff but it''s short still. > > On a related note, I''d like to thank "xal" on IRC for reminding me just > how obnoxious people on IRC can be. Choice quotes like "well i don''t > want to be taken seriously by java programmers because i sure don''t take > them seriously" will do nothing but keep away potential converts, and > Java programmers like me are the ones ripe for plucking. > > Enjoy!
* Michael Koziarski <koziarski-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> [2005-01-25 20:24]:> > > > 2. If a designer (not a programmer) tries to use a standard html editor > > to load the rhtml page, the page might look very different than what it > > should look like because of the embed code. This will make the designer > > have a difficult time to figure out how to improve the looks. > > This is definitely a concern, it''s one of the things that the > Tapestry java framework has tried to work around, with some success > apparently. However, the <rails:something /> tags would still > confuse an editor wouldn''t they?I can''t find where I originally read this, but one way of dealing with this (sort of) is possible in Cheetah, a python template system similar to velocity and such - what it does is allow the delimiters to be set (conf or in code, I can''t recall), and if you set the open delim to an HTML comment opening tag ''<!--'' and the closing delim the corresponding tag ''-->'', all your code vanishes in an WYSIWYG editor. I don''t know ERb well so I don''t know if this is possible but it might be worth looking into if this is important for you. This approach probably has some drawbacks too, but it seems they all do. Choose your poison... -- ______________________________ toddgrimason*todd-AT-slack.net
Xiao (that''s your first name, right): I do want to point out that I''ve worked with a lot of different web development models, and I''ve been fighting asp.net for the last 6 months. I''m quite unhappy with it, mainly because all of that newfangled stuff just isn''t working. The control idea is good in theory, but none of the built-in controls are flexible and featureful enough. There are also hardly any purchasable controls that are really worth even a dollar ... the only exception are the telerik controls. Also, the whole control structure brought with it a very tight coupling between codebehind and aspx (i.e. controller and view) with actual commands rather than just data going from C to V. I don''t much like having the V contain blocks of code either, but helpers and controllers make it easy for you to refrain from writing it. The viewstate and postback mechanisms needed to support the funky controls also have a lot of drawbacks. You can only have one form, so you have to go through all sorts of contortions to have simple things like a separate search textbox in the top-right of your layout. Postback doesn''t operate at all in a subrequest, so if you want to make your own layout mechanism, you can''t have dynamic layouts. Viewstate is just a big mess, easily bloating pages to 100K without you the developer even realizing it. The grid is particularly bad because it saves everything in viewstate, it doesn''t page data if the dataset is large, and it has plug-ins for basic features like sorting and editing, but has no implementation of those features or does it halfway. Even Microsoft seems to be dropping it for asp.net 2.0, building new controls with new names instead. It has felt to me like it''s trying to protect me from having to know web programming by getting between me and the HTML. But meanwhile, it''s all mediocre ... if you ever want to get beyond asp.net control blah into truly good-looking designs or fast sites (or both), you have to just drop the whole thing. That''s my experience. Rails is exciting to me because it does the things I don''t want to do when I''m rapidly developing things, but also doesn''t get in my way when I want to change half of it when the rapid development is done. On Tue, 25 Jan 2005 17:44:21 -0600, ChongQing Xiao <CqXiao-VSMm719ZX/VmbZtjAW+qKA@public.gmane.org> wrote:> I haven''t done java for a while so I won''t comment on how JSP will be > compared to rhtml but my guess is they are close since both are mixing > code with html tag. > > Compare rhtml with ASP.NET and Flex, > Since rhtml is mixing ruby code with html tag, > 1. It will be difficult to read if the page becomes complex. I have done > some work with ASP and it is really a pain to maintain a bunch of .asp > files which have mixed vb code and html tags. > > 2. If a designer (not a programmer) tries to use a standard html editor > to load the rhtml page, the page might look very different than what it > should look like because of the embed code. This will make the designer > have a difficult time to figure out how to improve the looks. > > 3. No standard way to design reusable components. This is one thing I > really like ASP.NET since you can easily plug in a menu, a tree, a > tabstrip, a grid > which is really a time saver for web development. > I know I can reproduce the same function using rhtml + java script but > without a standard way (or consistent way) to do it, everyone will > reinvent the wheel. > > Having said above, I will say Ruby on rails is a wonderful framework. I > especially like ActiveRecord, it really makes database related code much > much simpler compared with ADO.NET. It is the view part which I hope it > can be improved. Hopefully I will propose something in the future to > make it better. > > Cheers > Chong > > > -----Original Message----- > From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Michael > Koziarski > Sent: Tuesday, January 25, 2005 4:32 PM > To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: Re: [Rails] Write-up on RoR + XUL Sample > > On Tue, 25 Jan 2005 13:16:22 -0600, ChongQing Xiao > <CqXiao-VSMm719ZX/VmbZtjAW+qKA@public.gmane.org> wrote: > > I haven''t used flash before but I have read quite a bit about Flex > > recently. > > (If you are interested, you can take a look at > > http://www.macromedia.com/devnet/flex/example_apps.html?id=604) > > Too bad Flex is java based, it will be super cool if there is similar > > solution for ruby on rails. > > > > Compared with ASP.NET, flex or java face, one area I think ruby on > rails > > can improve is the view part. > > The way how rhtml works is straight forward but I think the following > > style is cleaner and better than using helper method. > > That''s interesting, coming from a java background I find it > refreshing that RoR *doesn''t* create ''yet another programming > language'' just for view functionality. What in particular do you > find cleaner about the ''psuedo-language'' approach? > > One drawback of the ''full code'' approach is that people can abuse it > and cram all sorts of things in there. I''ve seen JSPs with class > definitions in the scriptlets. However I think that this sort of > thing is best handled through code reviews etc. > > > <rails:DataGrid id="empGrid" dataSource="model:Employees"> > > ... > > </mx:DataGrid> > > > > chong > > > > -----Original Message----- > > From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Todd > Grimason > > Sent: Tuesday, January 25, 2005 11:32 AM > > To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > Subject: Re: [Rails] Write-up on RoR + XUL Sample > > > > * ChongQing Xiao <CqXiao-VSMm719ZX/VmbZtjAW+qKA@public.gmane.org> [2005-01-25 12:00]: > > > What I am trying to do is I will only use XUL in case it is hard to > do > > > it in html (such as List, Grid, Tab). For web browser which didn''t > > > support XUL, I will still use HTML instead XUL. > > > > Depending on your audience and usage, an option with much higher > > penetration (over 90%) would be a small Flash compenent embedded for a > > functional listbox. > > > > I know many people hate Flash on principle, so please don''t freak out > > and flame me, it''s just a suggestion. And less limiting > > (audience-wise) than a Mozilla-only solution. > > > > -- > > > > ______________________________ > > toddgrimason*todd-AT-slack.net > > > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > -- > Cheers > > Koz > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >
Hi, Steve: Thanks for your reply on asp.net issue. I think you have excellent points regarding ASP.NET. To some extent, many of the technology coming from Microsoft makes simple things easy but makes complex things near impossible. In that sense, I think ruby on rails makes simple things easy but still possible to do complex stuff. Having said that, I believe several issues you have mentioned in your post have being addressed in ASP.NET 2.0 - such as multi form support, postback without reloading the whole form and a new GRID. The main reason I bring up ASP.NET (or Flex) is not to suggest copying ASP.NET or Flex into ruby on rails, I am hoping we can borrow some ideas from other framework to make ruby on rails better. For example, dataBinding in ASP.NET makes binding data to html control very easy. For example, instead of <select name="document"> <%for @country in @Countries %> <option value="<%= @county> "> </select> We can use <selection name="patient[country]" dataSource="@Countries"/> </selection> Also, template in ASP.NET is also very useful to show table style or repeatable html content. Thanks Chong -----Original Message----- From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Steve Willer Sent: Friday, January 28, 2005 3:51 PM To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org Subject: Re: [Rails] Write-up on RoR + XUL Sample Xiao (that''s your first name, right): I do want to point out that I''ve worked with a lot of different web development models, and I''ve been fighting asp.net for the last 6 months. I''m quite unhappy with it, mainly because all of that newfangled stuff just isn''t working. The control idea is good in theory, but none of the built-in controls are flexible and featureful enough. There are also hardly any purchasable controls that are really worth even a dollar ... the only exception are the telerik controls. Also, the whole control structure brought with it a very tight coupling between codebehind and aspx (i.e. controller and view) with actual commands rather than just data going from C to V. I don''t much like having the V contain blocks of code either, but helpers and controllers make it easy for you to refrain from writing it. The viewstate and postback mechanisms needed to support the funky controls also have a lot of drawbacks. You can only have one form, so you have to go through all sorts of contortions to have simple things like a separate search textbox in the top-right of your layout. Postback doesn''t operate at all in a subrequest, so if you want to make your own layout mechanism, you can''t have dynamic layouts. Viewstate is just a big mess, easily bloating pages to 100K without you the developer even realizing it. The grid is particularly bad because it saves everything in viewstate, it doesn''t page data if the dataset is large, and it has plug-ins for basic features like sorting and editing, but has no implementation of those features or does it halfway. Even Microsoft seems to be dropping it for asp.net 2.0, building new controls with new names instead. It has felt to me like it''s trying to protect me from having to know web programming by getting between me and the HTML. But meanwhile, it''s all mediocre ... if you ever want to get beyond asp.net control blah into truly good-looking designs or fast sites (or both), you have to just drop the whole thing. That''s my experience. Rails is exciting to me because it does the things I don''t want to do when I''m rapidly developing things, but also doesn''t get in my way when I want to change half of it when the rapid development is done. On Tue, 25 Jan 2005 17:44:21 -0600, ChongQing Xiao <CqXiao-VSMm719ZX/VmbZtjAW+qKA@public.gmane.org> wrote:> I haven''t done java for a while so I won''t comment on how JSP will be > compared to rhtml but my guess is they are close since both are mixing > code with html tag. > > Compare rhtml with ASP.NET and Flex, > Since rhtml is mixing ruby code with html tag, > 1. It will be difficult to read if the page becomes complex. I havedone> some work with ASP and it is really a pain to maintain a bunch of .asp > files which have mixed vb code and html tags. > > 2. If a designer (not a programmer) tries to use a standard htmleditor> to load the rhtml page, the page might look very different than whatit> should look like because of the embed code. This will make thedesigner> have a difficult time to figure out how to improve the looks. > > 3. No standard way to design reusable components. This is one thing I > really like ASP.NET since you can easily plug in a menu, a tree, a > tabstrip, a grid > which is really a time saver for web development. > I know I can reproduce the same function using rhtml + java script but > without a standard way (or consistent way) to do it, everyone will > reinvent the wheel. > > Having said above, I will say Ruby on rails is a wonderful framework.I> especially like ActiveRecord, it really makes database related codemuch> much simpler compared with ADO.NET. It is the view part which I hopeit> can be improved. Hopefully I will propose something in the future to > make it better. > > Cheers > Chong > > > -----Original Message----- > From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Michael > Koziarski > Sent: Tuesday, January 25, 2005 4:32 PM > To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: Re: [Rails] Write-up on RoR + XUL Sample > > On Tue, 25 Jan 2005 13:16:22 -0600, ChongQing Xiao > <CqXiao-VSMm719ZX/VmbZtjAW+qKA@public.gmane.org> wrote: > > I haven''t used flash before but I have read quite a bit about Flex > > recently. > > (If you are interested, you can take a look at > > http://www.macromedia.com/devnet/flex/example_apps.html?id=604) > > Too bad Flex is java based, it will be super cool if there issimilar> > solution for ruby on rails. > > > > Compared with ASP.NET, flex or java face, one area I think ruby on > rails > > can improve is the view part. > > The way how rhtml works is straight forward but I think thefollowing> > style is cleaner and better than using helper method. > > That''s interesting, coming from a java background I find it > refreshing that RoR *doesn''t* create ''yet another programming > language'' just for view functionality. What in particular do you > find cleaner about the ''psuedo-language'' approach? > > One drawback of the ''full code'' approach is that people can abuse it > and cram all sorts of things in there. I''ve seen JSPs with class > definitions in the scriptlets. However I think that this sort of > thing is best handled through code reviews etc. > > > <rails:DataGrid id="empGrid" dataSource="model:Employees"> > > ... > > </mx:DataGrid> > > > > chong > > > > -----Original Message----- > > From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Todd > Grimason > > Sent: Tuesday, January 25, 2005 11:32 AM > > To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > Subject: Re: [Rails] Write-up on RoR + XUL Sample > > > > * ChongQing Xiao <CqXiao-VSMm719ZX/VmbZtjAW+qKA@public.gmane.org> [2005-01-25 12:00]: > > > What I am trying to do is I will only use XUL in case it is hardto> do > > > it in html (such as List, Grid, Tab). For web browser which didn''t > > > support XUL, I will still use HTML instead XUL. > > > > Depending on your audience and usage, an option with much higher > > penetration (over 90%) would be a small Flash compenent embedded fora> > functional listbox. > > > > I know many people hate Flash on principle, so please don''t freakout> > and flame me, it''s just a suggestion. And less limiting > > (audience-wise) than a Mozilla-only solution. > > > > -- > > > > ______________________________ > > toddgrimason*todd-AT-slack.net > > > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > -- > Cheers > > Koz > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >_______________________________________________ Rails mailing list Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org http://lists.rubyonrails.org/mailman/listinfo/rails
while we are comparing other frameworks, webwork2 would use something like this: getText() is for i18n this would be used for an Item screen where you want to select a Category for that Item <option value="value of category.id">value of category.name</option> another nice thing is that if say, I forgot to choose a category, a error message would appear directly above (or where ever you want by changing the templates) the select and change the color of the label <ww:select label="getText(''category.name'')" name="''item.category.id''" list="rootCategorys" listKey="id" listValue="name" value="item.category.id" /> most of my forms when using webwork would look like this: <ww:form action="''/user/create.action''"> <ww:textfield label="''user name''" name="''user.name''"/> <ww:password label="''user password''" name="''user.password''"/> <ww:textarea .../> <ww:radio .../> <ww:select .../> etc ........ </ww:form> theres templates you can change for all of this, works out quite well ChongQing Xiao wrote:> Hi, Steve: > > Thanks for your reply on asp.net issue. I think you have excellent > points regarding ASP.NET. To some extent, many of the technology coming > from Microsoft makes simple things easy but makes complex things near > impossible. > In that sense, I think ruby on rails makes simple things easy but still > possible to do complex stuff. > > Having said that, I believe several issues you have mentioned in your > post have being addressed in ASP.NET 2.0 - such as multi form support, > postback without reloading the whole form and a new GRID. > > The main reason I bring up ASP.NET (or Flex) is not to suggest copying > ASP.NET or Flex into ruby on rails, I am hoping we can borrow some ideas > from other framework to make ruby on rails better. > > For example, dataBinding in ASP.NET makes binding data to html control > very easy. > > For example, instead of > <select name="document"> > <%for @country in @Countries %> > <option value="<%= @county> "> > </select> > > We can use > <selection name="patient[country]" dataSource="@Countries"/> > </selection> > > Also, template in ASP.NET is also very useful to show table style or > repeatable html content. > > Thanks > Chong > > > > > -----Original Message----- > From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Steve Willer > Sent: Friday, January 28, 2005 3:51 PM > To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: Re: [Rails] Write-up on RoR + XUL Sample > > Xiao (that''s your first name, right): I do want to point out that I''ve > worked with a lot of different web development models, and I''ve been > fighting asp.net for the last 6 months. I''m quite unhappy with it, > mainly because all of that newfangled stuff just isn''t working. > > The control idea is good in theory, but none of the built-in controls > are flexible and featureful enough. There are also hardly any > purchasable controls that are really worth even a dollar ... the only > exception are the telerik controls. Also, the whole control structure > brought with it a very tight coupling between codebehind and aspx > (i.e. controller and view) with actual commands rather than just data > going from C to V. I don''t much like having the V contain blocks of > code either, but helpers and controllers make it easy for you to > refrain from writing it. > > The viewstate and postback mechanisms needed to support the funky > controls also have a lot of drawbacks. You can only have one form, so > you have to go through all sorts of contortions to have simple things > like a separate search textbox in the top-right of your layout. > Postback doesn''t operate at all in a subrequest, so if you want to > make your own layout mechanism, you can''t have dynamic layouts. > Viewstate is just a big mess, easily bloating pages to 100K without > you the developer even realizing it. > > The grid is particularly bad because it saves everything in viewstate, > it doesn''t page data if the dataset is large, and it has plug-ins for > basic features like sorting and editing, but has no implementation of > those features or does it halfway. Even Microsoft seems to be dropping > it for asp.net 2.0, building new controls with new names instead. > > It has felt to me like it''s trying to protect me from having to know > web programming by getting between me and the HTML. But meanwhile, > it''s all mediocre ... if you ever want to get beyond asp.net control > blah into truly good-looking designs or fast sites (or both), you have > to just drop the whole thing. > > That''s my experience. Rails is exciting to me because it does the > things I don''t want to do when I''m rapidly developing things, but also > doesn''t get in my way when I want to change half of it when the rapid > development is done. > > > On Tue, 25 Jan 2005 17:44:21 -0600, ChongQing Xiao > <CqXiao-VSMm719ZX/VmbZtjAW+qKA@public.gmane.org> wrote: > >>I haven''t done java for a while so I won''t comment on how JSP will be >>compared to rhtml but my guess is they are close since both are mixing >>code with html tag. >> >>Compare rhtml with ASP.NET and Flex, >>Since rhtml is mixing ruby code with html tag, >>1. It will be difficult to read if the page becomes complex. I have > > done > >>some work with ASP and it is really a pain to maintain a bunch of .asp >>files which have mixed vb code and html tags. >> >>2. If a designer (not a programmer) tries to use a standard html > > editor > >>to load the rhtml page, the page might look very different than what > > it > >>should look like because of the embed code. This will make the > > designer > >>have a difficult time to figure out how to improve the looks. >> >>3. No standard way to design reusable components. This is one thing I >>really like ASP.NET since you can easily plug in a menu, a tree, a >>tabstrip, a grid >>which is really a time saver for web development. >>I know I can reproduce the same function using rhtml + java script but >>without a standard way (or consistent way) to do it, everyone will >>reinvent the wheel. >> >>Having said above, I will say Ruby on rails is a wonderful framework. > > I > >>especially like ActiveRecord, it really makes database related code > > much > >>much simpler compared with ADO.NET. It is the view part which I hope > > it > >>can be improved. Hopefully I will propose something in the future to >>make it better. >> >>Cheers >>Chong >> >> >>-----Original Message----- >>From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>[mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Michael >>Koziarski >>Sent: Tuesday, January 25, 2005 4:32 PM >>To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>Subject: Re: [Rails] Write-up on RoR + XUL Sample >> >>On Tue, 25 Jan 2005 13:16:22 -0600, ChongQing Xiao >><CqXiao-VSMm719ZX/VmbZtjAW+qKA@public.gmane.org> wrote: >> >>>I haven''t used flash before but I have read quite a bit about Flex >>>recently. >>>(If you are interested, you can take a look at >>>http://www.macromedia.com/devnet/flex/example_apps.html?id=604) >>>Too bad Flex is java based, it will be super cool if there is > > similar > >>>solution for ruby on rails. >>> >>>Compared with ASP.NET, flex or java face, one area I think ruby on >> >>rails >> >>>can improve is the view part. >>>The way how rhtml works is straight forward but I think the > > following > >>>style is cleaner and better than using helper method. >> >>That''s interesting, coming from a java background I find it >>refreshing that RoR *doesn''t* create ''yet another programming >>language'' just for view functionality. What in particular do you >>find cleaner about the ''psuedo-language'' approach? >> >>One drawback of the ''full code'' approach is that people can abuse it >>and cram all sorts of things in there. I''ve seen JSPs with class >>definitions in the scriptlets. However I think that this sort of >>thing is best handled through code reviews etc. >> >> >>><rails:DataGrid id="empGrid" dataSource="model:Employees"> >>>... >>></mx:DataGrid> >>> >>>chong >>> >>>-----Original Message----- >>>From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>>[mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Todd >> >>Grimason >> >>>Sent: Tuesday, January 25, 2005 11:32 AM >>>To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>>Subject: Re: [Rails] Write-up on RoR + XUL Sample >>> >>>* ChongQing Xiao <CqXiao-VSMm719ZX/VmbZtjAW+qKA@public.gmane.org> [2005-01-25 12:00]: >>> >>>>What I am trying to do is I will only use XUL in case it is hard > > to > >>do >> >>>>it in html (such as List, Grid, Tab). For web browser which didn''t >>>>support XUL, I will still use HTML instead XUL. >>> >>>Depending on your audience and usage, an option with much higher >>>penetration (over 90%) would be a small Flash compenent embedded for > > a > >>>functional listbox. >>> >>>I know many people hate Flash on principle, so please don''t freak > > out > >>>and flame me, it''s just a suggestion. And less limiting >>>(audience-wise) than a Mozilla-only solution. >>> >>>-- >>> >>>______________________________ >>>toddgrimason*todd-AT-slack.net >>> >>>_______________________________________________ >>>Rails mailing list >>>Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>>http://lists.rubyonrails.org/mailman/listinfo/rails >>>_______________________________________________ >>>Rails mailing list >>>Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>>http://lists.rubyonrails.org/mailman/listinfo/rails >>> >> >> >>-- >>Cheers >> >>Koz >>_______________________________________________ >>Rails mailing list >>Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>http://lists.rubyonrails.org/mailman/listinfo/rails >>_______________________________________________ >>Rails mailing list >>Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org >>http://lists.rubyonrails.org/mailman/listinfo/rails >> > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails
Steve Willer
2005-Jan-29 03:24 UTC
Other template systems, and new ones too (was: Write-up on RoR + XUL Sample)
Hi Xiao: I didn''t know that asp.net 2.0 could do multiple forms. I''m glad they''re on their way to making it more usable. Still, MS traditionally takes 3 versions to get something right, so maybe I''ll keep on my path away from their frameworks. Since you talked about other template structures, I''d like to mention an idea I''ve been playing with. I''m building a kind of clone of Rails for .NET (yeah, it''s embarrassing, but business realities at work dictate this). I initially built my own aspx parser for the view side, but now I''ve replaced it with a new language that uses attributes. Like this: Hi, <span ss:var="ThisUser.Name">some name</span>; how are you doing? ...where the contents of the span tag would be replaced with the value of whatever was in the attr value, converted to string (the "some name"-type thrown out content lets you prototype the layout statically and then keep your dummy data). Or foreach: <li ss:foreach="User u in Users"> A user <b ss:var="u.Name">username</b></li> This setup seems like a cleanup of traditional tag-based languages without resorting to the somewhat inflexible databinding model. Just add if, elseif and else, and xpath-style {} stuff inside attrs, and that''s basically it. For forms, maybe there could be a helper or hook feature, like: <input type="text" name="firstname" ss:hook="autofill, validate_required"> ...where the hook functions could take a tag as input and transform them however they want. Maybe a prehook as well, so that hooks can read the data and save stuff in global state in a first pass through the tags. The part that I''m a bit confused about is why this isn''t in widespread use. I can''t think of any real flaws in this setup, at least in an environment that has a clean controller model and one-way dataflow from C to V. Maybe it could be used in Rails as a new type of view (yes, a new "easy to use" language). It took me only a few hours to build a working version that compiles to classes in .NET, including the time to switch between 3 parsing libraries; I''m sure it would take 15 minutes in Ruby. :-) On Fri, 28 Jan 2005 17:31:20 -0600, ChongQing Xiao <CqXiao-VSMm719ZX/VmbZtjAW+qKA@public.gmane.org> wrote:> Hi, Steve: > > Thanks for your reply on asp.net issue. I think you have excellent > points regarding ASP.NET. To some extent, many of the technology coming > from Microsoft makes simple things easy but makes complex things near > impossible. > In that sense, I think ruby on rails makes simple things easy but still > possible to do complex stuff. > > Having said that, I believe several issues you have mentioned in your > post have being addressed in ASP.NET 2.0 - such as multi form support, > postback without reloading the whole form and a new GRID. > > The main reason I bring up ASP.NET (or Flex) is not to suggest copying > ASP.NET or Flex into ruby on rails, I am hoping we can borrow some ideas > from other framework to make ruby on rails better. > > For example, dataBinding in ASP.NET makes binding data to html control > very easy. > > For example, instead of > <select name="document"> > <%for @country in @Countries %> > <option value="<%= @county> "> > </select> > > We can use > <selection name="patient[country]" dataSource="@Countries"/> > </selection> > > Also, template in ASP.NET is also very useful to show table style or > repeatable html content. > > Thanks > Chong > > -----Original Message----- > From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Steve Willer > Sent: Friday, January 28, 2005 3:51 PM > To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > Subject: Re: [Rails] Write-up on RoR + XUL Sample > > Xiao (that''s your first name, right): I do want to point out that I''ve > worked with a lot of different web development models, and I''ve been > fighting asp.net for the last 6 months. I''m quite unhappy with it, > mainly because all of that newfangled stuff just isn''t working. > > The control idea is good in theory, but none of the built-in controls > are flexible and featureful enough. There are also hardly any > purchasable controls that are really worth even a dollar ... the only > exception are the telerik controls. Also, the whole control structure > brought with it a very tight coupling between codebehind and aspx > (i.e. controller and view) with actual commands rather than just data > going from C to V. I don''t much like having the V contain blocks of > code either, but helpers and controllers make it easy for you to > refrain from writing it. > > The viewstate and postback mechanisms needed to support the funky > controls also have a lot of drawbacks. You can only have one form, so > you have to go through all sorts of contortions to have simple things > like a separate search textbox in the top-right of your layout. > Postback doesn''t operate at all in a subrequest, so if you want to > make your own layout mechanism, you can''t have dynamic layouts. > Viewstate is just a big mess, easily bloating pages to 100K without > you the developer even realizing it. > > The grid is particularly bad because it saves everything in viewstate, > it doesn''t page data if the dataset is large, and it has plug-ins for > basic features like sorting and editing, but has no implementation of > those features or does it halfway. Even Microsoft seems to be dropping > it for asp.net 2.0, building new controls with new names instead. > > It has felt to me like it''s trying to protect me from having to know > web programming by getting between me and the HTML. But meanwhile, > it''s all mediocre ... if you ever want to get beyond asp.net control > blah into truly good-looking designs or fast sites (or both), you have > to just drop the whole thing. > > That''s my experience. Rails is exciting to me because it does the > things I don''t want to do when I''m rapidly developing things, but also > doesn''t get in my way when I want to change half of it when the rapid > development is done. > > On Tue, 25 Jan 2005 17:44:21 -0600, ChongQing Xiao > <CqXiao-VSMm719ZX/VmbZtjAW+qKA@public.gmane.org> wrote: > > I haven''t done java for a while so I won''t comment on how JSP will be > > compared to rhtml but my guess is they are close since both are mixing > > code with html tag. > > > > Compare rhtml with ASP.NET and Flex, > > Since rhtml is mixing ruby code with html tag, > > 1. It will be difficult to read if the page becomes complex. I have > done > > some work with ASP and it is really a pain to maintain a bunch of .asp > > files which have mixed vb code and html tags. > > > > 2. If a designer (not a programmer) tries to use a standard html > editor > > to load the rhtml page, the page might look very different than what > it > > should look like because of the embed code. This will make the > designer > > have a difficult time to figure out how to improve the looks. > > > > 3. No standard way to design reusable components. This is one thing I > > really like ASP.NET since you can easily plug in a menu, a tree, a > > tabstrip, a grid > > which is really a time saver for web development. > > I know I can reproduce the same function using rhtml + java script but > > without a standard way (or consistent way) to do it, everyone will > > reinvent the wheel. > > > > Having said above, I will say Ruby on rails is a wonderful framework. > I > > especially like ActiveRecord, it really makes database related code > much > > much simpler compared with ADO.NET. It is the view part which I hope > it > > can be improved. Hopefully I will propose something in the future to > > make it better. > > > > Cheers > > Chong > > > > > > -----Original Message----- > > From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Michael > > Koziarski > > Sent: Tuesday, January 25, 2005 4:32 PM > > To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > Subject: Re: [Rails] Write-up on RoR + XUL Sample > > > > On Tue, 25 Jan 2005 13:16:22 -0600, ChongQing Xiao > > <CqXiao-VSMm719ZX/VmbZtjAW+qKA@public.gmane.org> wrote: > > > I haven''t used flash before but I have read quite a bit about Flex > > > recently. > > > (If you are interested, you can take a look at > > > http://www.macromedia.com/devnet/flex/example_apps.html?id=604) > > > Too bad Flex is java based, it will be super cool if there is > similar > > > solution for ruby on rails. > > > > > > Compared with ASP.NET, flex or java face, one area I think ruby on > > rails > > > can improve is the view part. > > > The way how rhtml works is straight forward but I think the > following > > > style is cleaner and better than using helper method. > > > > That''s interesting, coming from a java background I find it > > refreshing that RoR *doesn''t* create ''yet another programming > > language'' just for view functionality. What in particular do you > > find cleaner about the ''psuedo-language'' approach? > > > > One drawback of the ''full code'' approach is that people can abuse it > > and cram all sorts of things in there. I''ve seen JSPs with class > > definitions in the scriptlets. However I think that this sort of > > thing is best handled through code reviews etc. > > > > > <rails:DataGrid id="empGrid" dataSource="model:Employees"> > > > ... > > > </mx:DataGrid> > > > > > > chong > > > > > > -----Original Message----- > > > From: rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > [mailto:rails-bounces-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org] On Behalf Of Todd > > Grimason > > > Sent: Tuesday, January 25, 2005 11:32 AM > > > To: rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > Subject: Re: [Rails] Write-up on RoR + XUL Sample > > > > > > * ChongQing Xiao <CqXiao-VSMm719ZX/VmbZtjAW+qKA@public.gmane.org> [2005-01-25 12:00]: > > > > What I am trying to do is I will only use XUL in case it is hard > to > > do > > > > it in html (such as List, Grid, Tab). For web browser which didn''t > > > > support XUL, I will still use HTML instead XUL. > > > > > > Depending on your audience and usage, an option with much higher > > > penetration (over 90%) would be a small Flash compenent embedded for > a > > > functional listbox. > > > > > > I know many people hate Flash on principle, so please don''t freak > out > > > and flame me, it''s just a suggestion. And less limiting > > > (audience-wise) than a Mozilla-only solution. > > > > > > -- > > > > > > ______________________________ > > > toddgrimason*todd-AT-slack.net > > > > > > _______________________________________________ > > > Rails mailing list > > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > _______________________________________________ > > > Rails mailing list > > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > -- > > Cheers > > > > Koz > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > _______________________________________________ > > Rails mailing list > > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >