Port your Ruby / Rails application to PHP 5

I have a very large Ruby on Rails application that I would like to port to PHP 5.2 or possibly PHP 5.3 (if 5.3 is ever released).

I was looking for a way to automatically convert simple things like simple classes and ERB templates. I would expect that I would have to do more complex things when the languages ​​are just too different.

Can anyone suggest an approach for this? Or a script that can automate some of them?

EDIT:

There is a business affair for this. Whether this is a valid business case is another issue that I do not want to talk about here. We have a structure that is quite similar to Rails - the real problem is the conversion from Ruby to PHP, not Rails to PHP. I'm not really looking for something that will magically do all the work, just something simple that will give a hat. Even if all this has been done, this change:

def somemethod somearg
  some.ruby.code
end

in

public function somemethod($somearg) {
  // some.ruby.code
}

and left the insides as ruby ​​in the php comments, which would make things easier anyway.

Ideally, there would be something that already does this or the like. Otherwise, I may need the recording tool itself.

+3
source share
5 answers

troelskn, , , .

, .

, . , ORM- PHP, Rails ActiveRecord. findersm .. . , , , PHP ActiveRecord.

, , , ... RoR PHP. , , , - , , Ruby, -, PHP. .

+1

. , - php ruby. - .

( ), php-, . , , Symfony PHP Framework.

, - ?

EDIT:

php . , , . - - . , . phps (__get/__set/__call), , . - .

, , rumld, . . , ruby-to-uml.

+6

...

. ERP $ENTERPRISE_DB_VENDOR 20 . COBOL $ENTERPRISE_DB_VENDOR / . ( C). - , $ENTERPRISE_DB_VENDOR . , , .

" " - $ERP_VENDOR , C. , , C. , , , , , "".

10 ... - , . C. - " ", . . C.

, .

+3

,

JRuby JVM, PHP-.

, !

+1

, ruby ​​ php. , . https://rubygems.org/gems/php http://php.rubyforge.org/

+1

All Articles