Welcome Guest, Not a member yet? Register   Sign In
Importing projects into CodeIgniter
#1

[eluser]Unknown[/eluser]
Hi everyone.

I have a PHP app which has been running for about a year now, which is a MySQL simple calendar planner, built for a specific purpose.

I now need to make some changes to add some functionality enhancements and CodeIgniter looks like a good way to control what I'm doing.

Is there any easy way to bring my PHP code into CodeIgniter or is it better to start again?

Just beginning to work my way through the user guide, so forgive me if I haven't got to the any instructions about importing code.
#2

[eluser]Ben Edmunds[/eluser]
Hey Ghostdog,

No, there is no "easy" way to change a project to using CodeIgniter. If the old project was previously built using an MVC pattern then it might not be that hard to change but if it isn't you would be basically starting from scratch.


Welcome, good luck and we'll be here to help when you have questions.
#3

[eluser]Unknown[/eluser]
Thanks for that. Unfortunately its all hand coded and probably badly. It was my first project using PHP.

oh well, it'll be a good learning exercise to do it again. It is not that complex anyway
#4

[eluser]jedd[/eluser]
Hi ghostdog, and welcome to the CI forums.

There's nothing in the user guide - so don't get too excited there! There's [url="/wiki/site_migrate"]this article[/url] in the Wiki, by Sophistry, about migrating an extant site - well worth a read. There was also an excellent post a month or so ago by someone, but a quick search doesn't turn up the post/thread I'm looking for. Hopefully the person who wrote it will pop up again and point you in the right direction.


Quote:Is there any easy way to bring my PHP code into CodeIgniter or is it better to start again?

My gut feel on the matter is ... if you have the luxury of being able to leave the existing site alone, and work elsewhere on the new site - you're better off doing this. It'll just be so much easier to manage. I'm doing this at the moment with a photo gallery I wrote a while ago, and it's fairly straightforward. I've copied all my old code into a LEGACY sub-directory in my CI instance - it's ignored by CI, and I just copy and past and heavily modify bits of code, removing them from the LEGACY/files as I go - in theory when I get to the end I'll have a working site Wink Seriously, though, it's been a good way to go for me so far.
#5

[eluser]n0xie[/eluser]
You could take a look at our method described here how to migrate a website. We had a rather interesting discussion about this on EECI2009 and we showcased a couple of success stories of how we slowly migrated legacy applications over a long period of time. You can find my slides here but I don't think it will be of much use without the context, but if you have questions feel free to PM me.




Theme © iAndrew 2016 - Forum software by © MyBB