Forum: Ruby on Rails re-coding a sizable PHP app in rails

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Steven Talcott S. (Guest)
on 2006-05-30 00:44
Hello,

I am the developer of a fairly major PHP app.  It has the full
compliment of web application goodies -- email, batch processes, cc
transactions, multi-level authentication, security, content management,
curl-type interaction with other applications, etc.  I am obsessed with
the idea of re-doing a year and a half of work in Rails and the more I
learn the worse my itch gets.  I feel like I will be able to make much
faster forward progress on features once this is done.   The app
consists of 250 PHP files and approximately 75 MySQL tables.  Has anyone
done anything like this?  Do you have any words of advice for me?  I
already used migrations to convert the DB to conform with Rails naming
conventions and I have recoded one of the two most complex pages.  I am
about about to go down a rabit hole for a month.  (I hope not more!)   I
need a sanity check.

Steven
Jón B. (Guest)
on 2006-05-30 01:24
(Received via mailing list)
I have not converted anything huge. Just smaller things.
Only advice I have is to completely forget the old code. Remember the
result but not how you did it. Not the solutions to the problems. I
have seem a bunch of code where PHP methods were used to accomplish
things and it's just messy and doesn't work.

But I guess the LoginEngine And RolesEngine should get you pretty far
in a short time.
Also go over all the plugins at
http://www.agilewebdevelopment.com/plugins and try to visualize how
they may help you out.
You might even manage to set this up in half a month. ;)

On 5/29/06, Steven Talcott S. <removed_email_address@domain.invalid> wrote:
> done anything like this?  Do you have any words of advice for me?  I
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails
>


--
Jeff W. (Guest)
on 2006-05-30 01:31
(Received via mailing list)
I am going through the process of re-doing an ASP.Net 1.1 Project. The
process has been this:

1. Consider the task at hand.
2. How did I do this in .Net?
3. Okay, how do I do it the way I did it in .Net ... in Rails?
4. This is annoying, Rails doesn't do what I need it to do.
5. Think that my task is very complicated in Rails.
6. Get frustrated with Rails.
7. Do some more research.
8. Get ready to drop Rails completely.
9. Realize that what I needed to do was a one-line of code
10. Get frustrated with self for overcomplicating it.
11. Get frustrated with Rails documentation.
12. Onto the next task...
13. OKAY, how do I do this 'the Rails way'

#9 Actually happened. It was :acts_as_tree.

And you'll find that Rails documentation is inconsistent across various
community sites. There are a whack of new print publications coming out
this
summer that will hopefully help this. The book "Agile Development with
Rails" has helped immensley. Inconsistant and out of date at times, but
I
appreciate the consistent voice throughout.
Ezra Z. (Guest)
on 2006-05-30 04:03
(Received via mailing list)
On May 29, 2006, at 1:44 PM, Steven Talcott S. wrote:

> faster forward progress on features once this is done.   The app
> Steven
>
> --
> Posted via http://www.ruby-forum.com/.
> _______________________________________________
> Rails mailing list
> removed_email_address@domain.invalid
> http://lists.rubyonrails.org/mailman/listinfo/rails

Hey Steven-

	I did this same thing in rails about a year ago. I converted the cms
and intranet for the http://yakimaherald.com newspaper. This website
is a huge content management thing that speaks with 5 differetn data
sources. The original version in php amounted to so much duck tape
and paperclip style hacking that it was unmaintainable any more. So I
rewrote it in rails. The important thing to remember is to try to
solve the same problems you solved with your old php app but don't
bring over preconceptions or methodologies from your php code base.
Now that you have solved the app once, you want to do as well and as
extensable as possible this time. So take some time  and plan things
out a bit as to how you approach things. Here is a write up I did
when I launched that site last summer:

http://brainspl.at/articles/2005/11/03/from-start-...
yakimaherald-com

	Good luck on your project. You will have fun rewriting it in rails.
It's a great way to jump right in and learn.

Cheers-
-Ezra
Joe (Guest)
on 2006-05-30 07:19
Steven Talcott S. wrote:
> Hello,
>
> I am the developer of a fairly major PHP app.  It has the full
> compliment of web application goodies -- email, batch processes, cc
> transactions, multi-level authentication, security, content management,
> curl-type interaction with other applications, etc.  I am obsessed with
> the idea of re-doing a year and a half of work in Rails and the more I
> learn the worse my itch gets.  I feel like I will be able to make much
> faster forward progress on features once this is done.   The app
> consists of 250 PHP files and approximately 75 MySQL tables.  Has anyone
> done anything like this?  Do you have any words of advice for me?  I
> already used migrations to convert the DB to conform with Rails naming
> conventions and I have recoded one of the two most complex pages.  I am
> about about to go down a rabit hole for a month.  (I hope not more!)   I
> need a sanity check.
>
> Steven

I say go for it. I switched over a similar PHP app (that was about half
as complicated as yours) to Rails. The first couple weeks were
frustrating trying to figure out how to do things the Rails way (which
was made even more difficult due to the sparse docs). But I'm glad I
switched. I definitely recommend reading AWDWR before getting started
(which I didn't do until well into the project).

Joe
Steven Talcott S. (Guest)
on 2006-06-01 06:42
Thank you to all who provided encouragement and suggestions.  I will
post some stats and results when the project is complete.

Steven
Paul B. (Guest)
on 2006-06-01 07:09
(Received via mailing list)
Jeff,

I have been having pretty much the same experience.  Currently my task
of
handling an object graph (see my previous posts to this mailing list)
has
lead me through all steps up to 8, which is where I'm out now.  I'm
anxiously awaiting step 9.

I also agree that I find the rails documentation throughly confusing,
but
I'm sure a long time RoR developer finds JavaDocs throughly confusing as
well.
unknown (Guest)
on 2006-06-01 15:21
(Received via mailing list)
On 01/06/06, Paul B. <removed_email_address@domain.invalid> wrote:
> but I'm sure a long time RoR developer finds JavaDocs throughly
> confusing as well.

Hmmm, doubt it.
This topic is locked and can not be replied to.