What is Ruby on Rails able to do?

Hello Everybody,

I am starting with Rails and I am wandering questions about Rails
possibilities. Actually, I want to design an application that has
particular needs and I would like to know wether Rails can do them. As I
am newbie with Rails, I ask you these questions.

Basically, it is possible to execute shell commands from a rails pages
(eg: I want to launch a c++ program)?
Can it define a drawing area? ( if I want to draw charts and so on ) ?
can we parse xml files?

Actually, my question is, can Rails the same thing that Ruby?

Thanks a lot,

Thelo

Rails is a framework built on top of the language Ruby. So yes, you can do with Rails what you can do with Ruby alone too. All of what you want to achieve can be done in Ruby.

You might want to spend some time here: http://www.ruby-lang.org and here: http://guides.rubyonrails.org/ and perhaps here: http://railscasts.com/

Also, you might want to consider hiring a consultant that helps you with your project.

Best

Martin

Basically, it is possible to execute shell commands from a rails pages
(eg: I want to launch a c++ program)?

yes, there are various ways of achieving this, one is to use the
"system()" method to execute shell commands.

Can it define a drawing area? ( if I want to draw charts and so on ) ?

Draw in what way? There are PDF plugins; Flash plugins; graphics
plugins; most obviously, the most common output is for web in HTML,
and I've drawn "charts" with CSS styling before.

can we parse xml files?

Yes, there are plugins/gems for that (as well as just doing it
manually line-by-line)

Actually, my question is, can Rails the same thing that Ruby?

Of course. Rails *is* ruby. It's just a framework written in ruby.
Go to the "Rails guides" website, work through them, and you'll get
yourself going in no time.

Thanks for replying this fast,

@Martin Wawrusch, thanks for your links. Also, it's snmall a student
project actually, nothing too big, so I guess I do not need to hire a
consultant

@Michael Pavling thank you, thank to you, i know that i should take a
look to ruby first for this kind of application.

@Martin Wawrusch, about charts, I would like to know if you can draw as
you can do in java for example, I mean define a "canvas" then start
drawing in?

You could use imagemagik at the backend and draw through that, then render the generated image to the server. Normally you would do this client side in javascript with something like this www.highcharts.com/ or by using this api: http://code.google.com/apis/chart/

Thanks, www.highcharts.com seems nice, but assuming I also need to draw
something different than a charts, something like shapes and so on? Is
there any possibilities with Rails to do it?

Thelo Thelo wrote in post #1016345:

@Martin Wawrusch, about charts, I would like to know if you can draw as
you can do in java for example, I mean defining a "canvas" then start
drawing in?

1) You are talking about gui programming. gui programming produces one
or more windows which can be programmed to contain buttons or other
controls with graphs.

2) ruby executes on the server, and then it sends an html page back to
the browser. Using gui programming to produce a window on the server
would be pointless--the client can't see it.

Actually I think what he means is to create a drawing surface in java, write on it and send it to the client either embedded in a data-uri or through an extra get request. This was a common technique in the .Net world to create images server side and it would probably work with jruby and java, but even if it does there are better ways to do this in the browser, like http://raphaeljs.com/

Obviously, html pages can link to .jpg files. It's irrelevant how the
.jpg file was produced.