Encapsulation is the simplest approach, and you may want to take this if the system is business-critical and needs to communicate with other applications running on the latest technology. In the encapsulation approach, you need to build an API wrapper around your legacy system, which will allow other business applications to communicate with a legacy application. An API wrapper is a common approach whereby you start migrating your applications to the cloud but need to keep the legacy application in the on-premises data center for modernization in the later phase. You can choose the encapsulation option if your legacy code is well written and maintained, but, again, you will not be able to get the benefit of technology advancement and hardware flexibility.
The rehosting approach is also among the most straightforward approaches, whereby you want to migrate your application into another hardware provider such as the cloud without any changes...