At the beginning of the year 2020, my wife wanted to redo her CV, so I offered to give her a small tool where she had only to inform her trainings, her diplomas and her experiences and who would then put them in a document.
At first I wanted to create a document in word format, but I was not satisfied with the rendering, the HTML of the frontend looked better than the final document, that’s when I wondered if there was no way to turn this HTML into PDF. …
If you have followed the previous tutorials, you will only need to install docker to host our prometheus and grafana.
Else you need a running API, you can do that with these 2 options :
To add grafana and Prometheus…
In order to follow this tutorial, you will need a REST API, so you can :
After creating our API in the previous step, we will now secure it using Spring Security.
In order to do so, we need to add 2 dependencies to our pom.xml file
If you have read my previous articles, you may know that i like to use an object that symbolises human as example, so I will continue in this tutorial about building a REST API with Spring Boot, but in order to make it less scholar and more fun, I will use Star Wars reference (because i’m a geek and fan of this film franchise).
So welcome to Kamino.
In class-based programming, the factory method pattern is a creational pattern that uses factory methods to deal with the problem of creating objects without having to specify the exact class of the object that will be created. This is done by creating objects by calling a factory method — either specified in an interface and implemented by child classes, or implemented in a base class and optionally overridden by derived classes — rather than by calling a constructor.
In software engineering, the composite pattern is a partitioning design pattern. The composite pattern describes a group of objects that are treated the same way as a single instance of the same type of object. The intent of a composite is to “compose” objects into tree structures to represent part-whole hierarchies. Implementing the composite pattern lets clients treat individual objects and compositions uniformly.
When we want to implement the same interface on leaves and composites so that they are handled in the same way.
The prototype pattern is a creational design pattern in software development. It is used when the type of objects to create is determined by a prototypical instance, which is cloned to produce new objects.
If the cost for creating a new object is expensive and costs resources.
The builder pattern is a design pattern that allows for the step-by-step creation of complex objects using the correct sequence of actions. The construction is controlled by a director object that only needs to know the type of object it is to create.
When you have a simple object, this pattern is not very useful, but when you begin to have a more complex object and want to have a clear code you can use it without hesitation
For example :
A constructor with a limited number of parameters won’t be something that will make your code unreadable. …
With the covid-19 pandemic and the lockdown period, I reopened my cookbooks to take up my free time.
Being someone who likes to share his experiences, I created a web application where I shared the recipes I had tried, as well as tips for making them.
But a computer is not something practical in the kitchen, so I looked for a solution to export the recipes to a more convenient format to use: a printable PDF.
Firstly run the following command to add the dependencies to your package management
npm i html2canvas
npm i jspdf
With that done, you’re all…