Book Image

Full Stack Development with JHipster,

By : Deepu K Sasidharan, Sendil Kumar Nellaiyapen
Book Image

Full Stack Development with JHipster,

By: Deepu K Sasidharan, Sendil Kumar Nellaiyapen

Overview of this book

JHipster is a development platform to generate, develop, and deploy Spring Boot and Angular/React applications and Spring microservices. It provides you with a variety of tools that will help you quickly build modern web applications. This book will be your guide to building full stack applications with Spring and Angular using the JHipster tool set. You will begin by understanding what JHipster is and the various tools and technologies associated with it. You will learn the essentials of a full stack developer before getting hands-on and building a monolithic web application with JHipster. From here you will learn the JHipster Domain Language with entity modeling and entity creation using JDL and JDL studio. Moving on, you will be introduced to client side technologies such as Angular and Bootstrap and will delve into technologies such as Spring Security, Spring MVC, and Spring Data. You will learn to build and package apps for production with various deployment options such as Heroku and more. During the course of the book, you will be introduced to microservice server-side technologies and how to break your monolithic application with a database of your choice. Next, the book takes you through cloud deployment with microservices on Docker and Kubernetes. Going forward, you will learn to build your client side with React and master JHipster best practices. By the end of the book, you will be able to leverage the power of the best tools available to build modern web applications.
Table of Contents (23 chapters)
Title Page
Copyright and Credits
Dedication
Packt Upsell
Foreword
Contributors
Preface
Index

Choosing the right pattern


When starting a new project, it is always difficult to choose an architecture pattern these days. There are so many factors to take into account and it is easy to get confused with all the hype around different patterns and technologies (see Hype Driven Development (https://blog.daftcode.pl/hype-driven-development-3469fc2e9b22)). Following are some general guidelines on when to choose a monolithic web application architecture over a microservice architecture and vice versa.

When to choose a monolithic architecture

The following list can be used as a general guide when choosing a monolithic architecture. This is not a definitive list but gives an idea of when to go with a monolithic architecture over microservices:

  • When the applicationscope is small and well defined, and you are sure that the application will not grow tremendously in terms of features. For example, a blog, a simple online shopping website, a simple CRUD application, and so on.
  • When the team size is small, say less than eight people (it's not a hard limit but rather practical).
  • When the average skill set of the team is either novice or intermediate.
  • When time to market is critical.
  • When you do not want to spend too much on infrastructure, monitoring, and so on.
  • When your user base is rather small and you do not expect them to grow. For example, an enterprise app targeting a specific set of users.

In most practical use cases, a monolithic architecture would suffice. Read on to the next section to see when you should consider a microservice architecture over monolithic.

When to choose a microservice architecture

The following list can be used as a general guide when choosing a microservice architecture. This is not a definitive list but gives an idea of when to go with microservices architecture over a monolith. Please note that unlike choosing a monolithic architecture, the decision here is more complex and may involve cross consideration among many of the following points:

  • When the applicationscope is large and well defined and you are sure that the application will grow tremendously in terms of features. For example, an online e-commerce store, a social media service, a video streaming service with a large user base, an API provider, and so on.
  • When the team size is large, there must be enough members to effectively develop individual components independently.
  • When the average skill set of the team is good and team members are confident about advanced microservice patterns.
  • When time to market is not critical. The microservice architecture will take more time to get right up front.
  • When you are ready to spend more on infrastructure, monitoring, and so on, in order to improve the product quality.
  • When your user base is huge and you expect them to grow. For example, a social media application targeting users all over the world.

Though a monolithic architecture would suffice in most cases, investing up front in a microservice architecture will reap long-term benefits when the application grows huge.

Note

For more on these architecture patterns, you can refer to https://articles.microservices.com/monolithic-vs-microservices-architecture-5c4848858f59.