Welcome Guest, Not a member yet? Register   Sign In
Modular refactoring possible?
#15

[eluser]n0xie[/eluser]
The way I would do it:

If the current application has 1 entry point then it's pretty easy:

In your index.php:
1. check if the controller is available in /system/application/controllers by matching the url against the file system much in the same way Code Igniter does now (you could probably just hack it).
2. If so, run CI as normal.
3. If not, run the 'old' index.php code and execute the site 'old style'

This way you can start migrating/refactoring bits and pieces one by one (although if you have 500+ 'estimated' controllers you seriously should rethink your business logic imho).

The benefit is that you won't lose SEO rating since the old site is still there. When you have migrated certain parts you can use a 301 or 302 to the 'new' site so google won't penalize your 'broken links'.

If the application has different entry points I would replace them one by one by refactoring the entry points, again keeping both sites available (old and new) and rerouting the request either from your .htaccess or said entry point.

Then again it highly depends on how modular your original code base is. I would however advise you to read this article. Sometimes rebuilding from scratch isn't the best solution...


Messages In This Thread
Modular refactoring possible? - by El Forum - 05-05-2009, 09:04 AM
Modular refactoring possible? - by El Forum - 05-05-2009, 09:10 AM
Modular refactoring possible? - by El Forum - 05-05-2009, 09:18 AM
Modular refactoring possible? - by El Forum - 05-05-2009, 11:20 AM
Modular refactoring possible? - by El Forum - 05-05-2009, 11:23 AM
Modular refactoring possible? - by El Forum - 05-05-2009, 11:33 AM
Modular refactoring possible? - by El Forum - 05-05-2009, 11:40 AM
Modular refactoring possible? - by El Forum - 05-05-2009, 11:47 AM
Modular refactoring possible? - by El Forum - 05-05-2009, 12:16 PM
Modular refactoring possible? - by El Forum - 05-05-2009, 03:02 PM
Modular refactoring possible? - by El Forum - 05-06-2009, 01:42 AM
Modular refactoring possible? - by El Forum - 05-06-2009, 01:57 AM
Modular refactoring possible? - by El Forum - 05-06-2009, 02:09 AM
Modular refactoring possible? - by El Forum - 05-06-2009, 03:34 AM
Modular refactoring possible? - by El Forum - 05-06-2009, 03:35 AM
Modular refactoring possible? - by El Forum - 05-06-2009, 04:59 AM
Modular refactoring possible? - by El Forum - 05-06-2009, 05:16 AM
Modular refactoring possible? - by El Forum - 05-06-2009, 09:31 AM
Modular refactoring possible? - by El Forum - 05-06-2009, 09:37 AM



Theme © iAndrew 2016 - Forum software by © MyBB