Not so many people, using Spring MVC consider or even know the alternative way of describing the controllers (or better say handlers) in the project. I would like just quickly show how nice and concise could be this approach, and also, what is not less important, fun. This is the main reason why we all are here, right? Spring CLI To show something, we need this “something”. Let’s quickly create the simple, sample MVC project in Spring.
This is a continuing of the previous reading about the core functionality of the Spring Framework provided for types conversion. Here we’ll take a look at the concepts of Converters and Formatters. Short reminding - the project serving as a victim for the conversion executions could be found here. Converter<,> The Converter concept is a more general one, it allows you to convert data between any two types. This means that you can use not only for the web-layer for converting from String but some more general conversion logic.
There are some basics that usually allow you to handle a bit more complicated abstractions on top of them. I think, in the case of Spring - the type conversions is one of such topics. I tried to structure a bit what Spring has and how we can use it in our applications. The reading may be more useful to the beginning developers with Spring, but I hope the experienced developers might find something interesting in it.
An interesting question came to my mind when I was playing around with AWS Autoscaling group setup. What is actually a better, most elegant way to deploy apps in your EC2 instances, especially in the AWS autoscaling group? To be honest, I don’t know the right question, but the alternative way of doing that to just pulling it from S3 in user data I know for sure now. I am going to use the CI tools provided by AWS: CodeBuild and CodeDeploy.
Well, I am pretty sure, that everyone who touched the AWS at least once, heard about the main service, which Amazon provides. I mean Elastic Compute Cloud or EC2. It comes with a very cool feature, which allows you to handle a peak load and at the same time absence of load too, adjusting capacity of resources and saving money in the end. I realized that I have never tried to set up this architecture myself and test how it actually works.