We're a community of 1076K IT Pros here for help, advice, solutions, professional growth and fun. Join us!
1,075,878 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Start New Discussion Reply to this Discussion

Mixing PHP and Ruby together... opinions and suggestions.

Hey;
I have 6 months of work done in PHP and I really don't want to re-invent the wheel but I want to use some Ruby in my site. Is it possible to "mix languages" like PHP and ruby or will I run into some major problems? I would really appreciate your opinion. If your advice is helpful to my situation I'll add to your reputation.

3
Contributors
2
Replies
2 Weeks
Discussion Span
3 Years Ago
Last Updated
3
Views
tiger86
Posting Pro
548 posts since Feb 2008
Reputation Points: 48
Solved Threads: 11
Skill Endorsements: 2

It's completely plausible, as long as you're not trying to mix the two into the same file (it'd still be possible, just inefficient, as it'd have to be processed twice). And, it depends on what kind of site you're trying to build. For example, if you're building a 'web-app' where a large number of your PHP scripts just return data, and are never actually 'viewed' by a user, then your life will be quite simple.

chaines51
Junior Poster in Training
54 posts since Jun 2009
Reputation Points: 10
Solved Threads: 5
Skill Endorsements: 0

In short. No.
However, if, as noted before, you are using php files for data access, you can use pure ruby (or sinatra-like frameworks) to work with the data.
Rails will be extremely hard to mix code.
If your starting from scratch, learn ruby properly, and you won't need all that php code (if it's just crud code).
The whole idea of rails is to keep it clean, and what your suggesting isn't that clean. (would require a net://http to your own server, or using php command-line interface).

codejoust
Junior Poster
180 posts since Jul 2009
Reputation Points: 18
Solved Threads: 21
Skill Endorsements: 0

This article has been dead for over three months: Start a new discussion instead

Post: Markdown Syntax: Formatting Help
 
You
View similar articles that have also been tagged:
 
© 2013 DaniWeb® LLC
Page rendered in 0.3084 seconds using 2.64MB