Exploring Some More Ideas

Learn about some more ideas that we can implement in the reservation application.

Expansions in the application

How about making the price depend on the hotel? What would change is that we’d get another type of data in the database, probably with the prefix HOTEL#, containing all relevant information about a hotel, like its name, location, and pricing. We’d also have to change the code in the Create Lambda before calculating the price, we’d do a retrieval of price data from the database, meaning our Either would become a TaskEither a bit earlier than before. Furthermore, to pass the information along, we could enrich our CreateReservationRequest with price information (roomPrice, for example), while leaving CreateReservationPricedRequest as-is because when the request has been priced, we no longer need that information. As usual, having the right kind of information in our data structure at the right time helps our compiler help us. This would require changes in quite a few files (index ...