From the course: Software Architecture: Breaking a Monolith into Microservices

Unlock the full course today

Join today to access over 22,600 courses taught by industry experts or purchase this course individually.

Refactor or rewrite?

Refactor or rewrite?

From the course: Software Architecture: Breaking a Monolith into Microservices

Start my 1-month free trial

Refactor or rewrite?

- [Instructor] Frankly, the expression, splitting out monolith into microservices might be misleading. It leads to the assumption that you can just take your legacy code and copy it into microservices. This would make it more of a refactoring approach. So is it possible to just reflect your code into microservices, maybe copy over controller into service put an AP in front of it and call it a day? Let's have a closer look at this topic and spoiler alert, I would recommend to rewrite because if you're attempted to reuse your code as is, it might be because you're again thinking in code and individual functions and not in capabilities. If you look at your legacy code, how much of this code does really provide the capability and how much is boilerplate code related to the monolith it is running on. If you just copied the code, you also just missed the opportunity for long cue improvements. Basically you are migrating…

Contents