Hi! I''m as new as you can be to Rails, discovered it yesterday. But I have big plans for converting a Java application to use Rails instead. But I''m not sure if I understand what Rails can do for me. The webbapp is written in Java and will receive POST requests from a Flash application. The backend will then do some computing and write the result back as XML. My question is this can this be done with Rails, ie. can I respond the POST requests and receive the data that the Flash application sends to me. Then doing some computing and talking with a MySQL database only to write the result back as an XML file? I haven''t had the time to really understand all that Rails can do but I''m looking forward to the next few days with it. Please have patient with my eager newbee question! Thanks! Marcus
No problem at all. Flash is just sending a POST - and serverside technology capable of handling and responding to the POST could be used - and Rails can certainly manage it. Putting my consultancy hat on for a minute though, what is the reason for changing the existing technology? On 5/11/05, Marcus Dübois <marcus.dubois-GWLJtjCW+GcOPmVbiNFCMNBPR1lH4CV8@public.gmane.org> wrote:> Hi! > > I''m as new as you can be to Rails, discovered it yesterday. But I have > big plans for converting a Java application to use Rails instead. But > I''m not sure if I understand what Rails can do for me. > > The webbapp is written in Java and will receive POST requests from a > Flash application. The backend will then do some computing and write the > result back as XML. My question is this > can this be done with Rails, ie. can I respond the POST requests and > receive the data that the Flash application sends to me. Then doing some > computing and talking with a MySQL database only to write the result > back as an XML file? > > I haven''t had the time to really understand all that Rails can do but > I''m looking forward to the next few days with it. > > Please have patient with my eager newbee question! > > Thanks! > Marcus > > _______________________________________________ > Rails mailing list > Rails-1W37MKcQCpIf0INCOvqR/iCwEArCW2h5@public.gmane.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- sam http://www.magpiebrain.com/
marcus.dubois-GWLJtjCW+GcOPmVbiNFCMNBPR1lH4CV8@public.gmane.org
2005-May-11 09:43 UTC
Re: Re: New to Rails
Hi! Sorry for sending double mail to the list, I''ve had a fight with our mail server this morning ;) The main reason for migrating to ruby and rails is that the project I''m working on has just begun. I''ve managed to setup tomcat and mysql created some of the domain objects and nearly finished the flash presentation layer. But as I understand most of what I''ve done so far comes nearly free with rails, so from my point of view it seems that I''m writing alot of code that rails can make for me, which leaves me to concentrate on the coming domain model. I may be wrong, but it seems smarter to use ruby and rails. Please enlight me! Thanks! Marcus
On 11 May 2005, at 09:35, Marcus Dübois wrote:> The webbapp is written in Java and will receive POST requests from > a Flash application. The backend will then do some computing and > write the result back as XML. My question is this > can this be done with Rails, ie. can I respond the POST requests > and receive the data that the Flash application sends to me. Then > doing some computing and talking with a MySQL database only to > write the result back as an XML file?You''ll be pleased to know that Rails has excellent support for generating XML out of the box. Take a look at the "Builder" section on this page of the Rails docs: http://api.rubyonrails.com/classes/ActionView/Base.html Generating XML in this way is much, much less hassle than generating it by gluing strings together, and it eliminates the chance of producing invalid XML due to forgetting to escape an ampersand or something. Hope that helps, Simon Willison http://simon.incutio.com/