On Aug 21, 2009, at 10:33 AM, Sam Souvlaki wrote:
>
>
>
> Hi,
>
> I''m new to Ruby on Rails. I must admit, the Ruby language is quite
> straightforward for me, but the Rails thing has me a bit confused.
> Here
> is my problem, I can''t quite figure out what the best approach
would
> be.
>
> I have data in various tables on a server X running Windows, IIS and
> MS
> SQL Server which I control and which is not accessible to the public.
> Separately, I have Ruby on Rails setup on a linux webhosting service
> elsewhere.
> I need to make a web interface (secure with HTTPS and Login) on the
> linux webserver which in turn accesses and manipulates the data on the
> Windows machine.
>
> From what I read about Ruby on Rails, it is difficult to interface
> with
> existing systems, as there are rigid rules on the way the database
> should be built (for example the required ID field in every table). I
> get the impression that Rails are mostly suited for standalone
> webserver
> applications. That is my impression, but I''m pretty sure
I''m wrong. So
> before giving up on Rails I decided to join this forum and ask for
> some
> advice. My other option is to build my web interface in PHP. But I
> like
> the idea of high level rapid development and am willing to learn Ruby
> and Rails.
>
> Idealy in Rails I would use standard HTTP POST (or xmlhttprequest) on
> the backend to send requests from the webserver to the windows
> machine.
> I would like my windows machine to be considered as a datasource but
> using HTTP instead of SQL directly to manipulate the remote data
> (IIS on
> the windows box would do the actual SQL bits).
>
> Or is there a better strategy?
Sounds reasonable to me. Do some research into ''REST'' and
''restful
interfaces'' and ''Active Resource''. You
don''t have to use REST... you
can use SOAP or XML-RPC or work up your own. But there''s some nice
stuff in Rails for making a model that normally talks directly to a
database talk to a RESTful server without your code needing to know
anything...
-philip