top | item 2896248

(no title)

MediaBehavior | 14 years ago

Does that mean that whenever you recommend server-side solutions that the server must have Ruby set up?

[OT question that has blocked this PHP-hobbyist from dabbling in RoR: do professionals ever add a new functionality as part of a web app via RoR when the bulk of project has already been built with something like PHP? (looking for motivation to start some experimentation in Ruby)]

discuss

order

chriswarren|14 years ago

Nope, we don't only talk about Ruby. We have a few PHP examples as well, but there's a lot more on CSS, JS, Git, server administration, etc.

There's not a lot of server-side code in the book, to be honest. Chapters like Creating a Widget focus on the client-side code - loading content in to your page and providing an example for what the data looks like, without getting in to "here's how you'd' do this in Ruby or PHP or .NET".

bphogan|14 years ago

Another author here - To answer your first question, no, this book is very front-end driven. We will have one server-side recipe that will use PHP. The rest of the recipes that use a backend use a "no setup required" server I wrote called QEDServer (http://qedserver.napcs.com/) which provides a JSON API full of records and a way to serve HTML pages so you can work with things like Knockout and Backbone without having to set up an API. We use it in a few recipes.

But we really wanted to keep the server-side stuff to a minimum, and while we all use Rails, it's not the answer to all web development - especially with things moving more client-side.

Your second question, yes you certainly can. I've done it and the only tricky part is making them work together, and thanks to web services, that's not terrible. I even have a new Rails app consuming some XML I wrote with classic ASP.

chriswarren|14 years ago

In reply to your OT question - does your PHP app have an API at all? You could make a small standalone app that pulls from your existing API. Or go the other direction and create a Ruby app in Rails or Sinatra that aggregates some information for you and makes it available for your existing app to consume.

tedkalaw|14 years ago

Hey there,

The core of the project I'm working on is built in PHP. However, we found that there were a few things that would make more sense in RoR, and there are many features in the future that will be better served as RoR apps. Basically, we are using mod_proxy to redirect to the Rails app.

If you'd like to talk more about it, I'd be more than happy.