Spring Valley Hospital Medical Center is a for-profit hospital is owned by Universal Health Services and operated by Valley Health System. The 364-bed hospital is located in Spring Valley, Nevada..
Hexagonal architecture is basically another way to think about, organize, and model your applications (as opposed to a traditional MVC pattern architecture). In hexagonal architecture, we have the domain model itself contained within the heart of the application (as it should be), with the layers that handle the facilitation and management of objects in the domain model surrounding it (the application layer). Finally, there is an interface layer that wraps the whole thing and provides a means for requests to enter and interact with the application's internals by using ports to establish interfaces that will need to be satisfied by the client. Those implementations that satisfy the port contracts are called adapters.
In this chapter, you will learn the ins and outs of various Laravel facilities that, when used in combination with best practices, can have remarkable results in a relatively small amount of time. It is important that you set up your environment correctly, and there are many tutorials online (or visit Laravel.com and read the installation documentation, which is great). We will go over how to install Laravel on your local environment (using Composer with the Laravel installer script).
Domain-driven design (DDD) has been around for almost two decades. During this time, it has seen a sharp increase in interest because of its clear guidelines and tactical strategies and approaches to the problems that you might face when developing applications in any industry, particularly complex ones. It is immensely practical in the real world and has provided solutions for what used to be a lack of any standards or practices suggesting how to best go about solving the underlying business’s domain-specific problems…the kind you don’t see in everyday programming and wouldn’t even write if it weren’t in the context of the domain that your business operates in to achieve a goal (which is probably to make a profit, but may be to service customers, support users, market products, tracking metrics, etc.).
In the previous chapter, I gave you a little taste of some of the things we go on to explore in this and other chapters in regard to the ideas and concepts that DDD is built on. Along the way, I hoped to have whet your appetite for learning domain-driven design in Laravel. We will continue to explore the strategies and approaches offered by DDD and then discuss ways we can implement these ideas using Laravel.
In this chapter, we will get more acquainted with the concepts and practices of domain-driven design by formally applying them, and I will explain how these practices relate to an application in the real world and to a Laravel project in particular. Most of these core strategies apply to a much broader scope than that of a framework, however. Many of them are meant to be applied to any project, regardless of the language or framework it was built with. In fact, when abstracting out a model of your domain, it is best to keep the focus on the domain itself rather than the technical concerns that come with it. The technical concerns can be deferred, which is a good thing in programming, because the longer they are deferred, the more thought you put into the project, and you can then make the best possible decision. The technical concerns are meant to give you ideas on how to solve complex problems that relate to the core of your domain so you can properly create a usable model out of it that closely mimics the business objects and practices within that domain.