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

Thanks for replying this fast,

@Martin W., 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 P. thank you, thank to you, i know that i should take a
look to ruby first for this kind of application.

On 12 August 2011 09:15, Thelo T. [email protected] wrote:

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.

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: Charts  |  Google for Developers

@Martin W., 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?

Thelo T. wrote in post #1016345:

@Martin W., 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 programs launch 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 launch a window on the server
    would be pointless–the client can’t see it.

  3. The languages that execute in a browser are javascript and flash.
    They can be used to produce charts, etc. in the main window or in pop-up
    windows.

  4. Web programming is an inter disciplinary task. To produce modern
    looking websites, you need to know html, css, javascript or flash, and a
    server side language like php, python, perl, or ruby.

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?

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

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