0

I'm working in large app that have below module where every module have relation each other, the module is:

  1. Fiance
  2. Production
  3. Plan
  4. Laboratory

This app written in really-really php-native code with many security concern. I'm trying to rewrite it to Laravel Framework to make it better and easy to maintain.

My problem to rewrite this code is this app run on top of bad database design with this situation:

  1. Many table is not normalized
  2. Transaction table with master-detail record combined into one table. Example: Order transaction that should have two table orders and order_detail combined to one table named order_transaction

My task is to make sure user still can use the app while the development is start. So when the Finance module is already released, user will redirected to new app.

legacy app and new app should have single data source or synced data source

My question is: how to address this problem ?

Abu Dawud
  • 11
  • 5
  • This is a very complicated task and I don’t think anyone can give you a specific answer. I’d start with the authentication system first. Maybe transition everyone over to being a Laravel user while dropping a session/cookie for the legacy app. You might need to monkey-patch the legacy app to pull from the Laravel user data store. – Chris Haas Aug 13 '22 at 13:16
  • thanks @ChrisHaas for nice authentication scenario idea. And how about the single data source ? would you like to give me some idea – Abu Dawud Aug 15 '22 at 02:02
  • I'm interesting how a startup tech company recreate/refactor their legacy apps when it reach large number of user – Abu Dawud Aug 15 '22 at 02:25
  • I think it really depends on how integrated the modules are with each other. One method is to rebuild the whole thing, then take a maintenance/readonly window, export and import. Another way is to build a better foundation by refactoring the old code to a certain degree. The transaction table might be able to be normalized with a `view` mimicking the legacy way for readers, and only the insert/updates need to be changed. – Chris Haas Aug 15 '22 at 11:52

0 Answers0