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 -- Posted via http://www.ruby-forum.com/.
Jon Gretar Borgthorsson
2006-May-29 21:22 UTC
[Rails] re-coding a sizable PHP app in rails
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 Smith <steve@talcottsystems.com> 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 > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-- -------------- Jon Gretar Borgthorsson http://www.jongretar.net/
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. On 5/29/06, Jon Gretar Borgthorsson <jon.borgthorsson@gmail.com> wrote:> > 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 Smith <steve@talcottsystems.com> 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 > > > > -- > > Posted via http://www.ruby-forum.com/. > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > -- > -------------- > Jon Gretar Borgthorsson > http://www.jongretar.net/ > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060529/3b090255/attachment-0001.html
On May 29, 2006, at 1:44 PM, Steven Talcott Smith 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 > > -- > Posted via http://www.ruby-forum.com/. > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/railsHey 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-to-launch-http- 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
Steven Talcott Smith 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. > > StevenI 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 -- Posted via http://www.ruby-forum.com/.
Steven Talcott Smith
2006-Jun-01 02:43 UTC
[Rails] Re: re-coding a sizable PHP app in rails
Thank you to all who provided encouragement and suggestions. I will post some stats and results when the project is complete. Steven -- Posted via http://www.ruby-forum.com/.
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. On 5/29/06, Jeff Ward <animikii@gmail.com> wrote:> > 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. > > > > On 5/29/06, Jon Gretar Borgthorsson <jon.borgthorsson@gmail.com> wrote: > > > > 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 Smith < steve@talcottsystems.com> 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 > > > > > > -- > > > Posted via http://www.ruby-forum.com/. > > > _______________________________________________ > > > Rails mailing list > > > Rails@lists.rubyonrails.org > > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > > > > > -- > > -------------- > > Jon Gretar Borgthorsson > > http://www.jongretar.net/ > > _______________________________________________ > > Rails mailing list > > Rails@lists.rubyonrails.org > > http://lists.rubyonrails.org/mailman/listinfo/rails > > > > > _______________________________________________ > Rails mailing list > Rails@lists.rubyonrails.org > http://lists.rubyonrails.org/mailman/listinfo/rails > > >-------------- next part -------------- An HTML attachment was scrubbed... URL: http://wrath.rubyonrails.org/pipermail/rails/attachments/20060601/b7d868c0/attachment-0001.html