We may earn an affiliate commission when you visit our partners.
Packt Publishing

This video will take you through Design Patterns and considerations required with the Spring framework. You will learn to use these design patterns to solve common problems when designing an application or system using the Spring Framework. This video will not only take you through ten of the essential GoF Design Patterns but also categories of patterns, considerations, and best practices required at different stages of Application Development.

Read more

This video will take you through Design Patterns and considerations required with the Spring framework. You will learn to use these design patterns to solve common problems when designing an application or system using the Spring Framework. This video will not only take you through ten of the essential GoF Design Patterns but also categories of patterns, considerations, and best practices required at different stages of Application Development.

Design Patterns help us write software that is flexible and future-proof. If you’re overusing if tests, you are probably not writing a well-designed object-oriented program. You will see how to use several design patterns, instead of if tests, to write a program where logic resides in an optimal location. The examples in this course use the command pattern, decorator pattern, visitor pattern, and several others.

You will understand the Dependency Injection pattern that is the main principle behind the decoupling process that Spring does, thus making it easier to manage your code. With practical examples, you will understand how patterns listed under the GoF patterns can be used in your Application Design. You will be introduced to the MVC pattern and how it treats controllers as Plain Old Java Objects, thus making it easier for testing the controllers. You will then learn about the Factory Method, and how it relates to one of the core components of object-oriented design: polymorphism.

About the Author

Brandan Jones has been an Adjunct Assistant Professor for the University of Cincinnati since the 2000-2001 school year. He has taught many courses in programming, from introductory programming to full stack development.

Brandan proposed and created the first Android programming course at the University of Cincinnati, and has been teaching it ever since. He reapplied this course and taught it at Northwestern University’s School of Continuing Studies as well.

Brandan is the creator of the Android app PlantPlacee Mobile, which allows users to search for plants by color, and GPS plants. He wrote this app in 2012, using TDD principles. He used selected JSON feeds from that app in the examples in this video course.

Brandan’s mix of both academic and professional experience means that he brings real-world concepts to the classroom. Most of his high level classes include hands on experience with unit testing, scrum, and distributed version control systems.

Brandan holds a BS in Accounting and Management Information Systems from Miami University in Oxford, Ohio. He also earned a BS in Horticulture from the University of Cincinnati’s College of Design, Art, Architecture and Planning, and a Masters of Business Administration from the University of Cincinnati, Lindner College of Business, with concentrations in Operations Management and Real Estate Finance.

Enroll now

What's inside

Learning objectives

  • How to create a spring project from the ground up
  • Why design patterns are important
  • Never call a constructor again! how to use the factory pattern and spring auto-wiring to create objects
  • Leverage the command pattern to future-proof software
  • Take advantage of spring's minimal-configuration deployment
  • Add behavior to existing compiled classes with aspect oriented programming
  • Use model-view-controller to separate user interface, business logic, and data access logic
  • Consider how to leverage existing business and data logic with a different user interface

Syllabus

In this section, we will discuss how Spring works, how it is configured, and its role in modern programming environment.
This video will give you an overview about the course.
Read more

In this video, we will get an overview of the tools needed to make the best of this course.

In this video, we will look at the uses and benefits of using Spring and design patterns.
Polymorphism is one of the four pillars of Object Oriented Design. Polymorphism is also central to design patterns. To understand design patterns, one must first understand polymorphism.
In this video, we will learn why and how to create objects.
In this video, we will learn about applicationContext.xml, configure objects in Spring XML, and use annotations and component-scan.
In this section, will begin a Spring project that will be a foundation for the pattern examples that we will discuss.
In this video, we will learn what our project will do.
In this video, we will explore Maven and its pom.xml file.

In this video, we will create a new Maven project in Eclipse.

In this video, we will discuss the Model View Controller.

In this video, we will start the look and feel of our application where we create a simple web page with a user interface, using Spring MVC, Spring Boot, and Thymeleaf.

In this section, will discuss and categorize design patterns. We will also consider learning strategies for design patterns.

In this video, we will discuss creational and structural design patterns.

This video is about a survey of design patterns that belong to the biggest category: behavioral.

The factory method is a common design pattern used to create the correct subclass object from a superclass-subclass hierarchy, or an interface-implements hierarchy.

In this video, we will demonstrate a factory method implementation in Spring, using annotations, in an example.

This video is a hands-on example which shows how to easily implement the Interceptor design pattern, using the Spring framework.

In this section, we will use the decorator and command patterns to create a user interface that changes based on attributes selected.
We can use the decorator design pattern to add behavior to objects at runtime. In this video, we describe the components of the Decorator Design Pattern.

In this video, we will discuss the components we need to create a dynamic input form, using Spring MVC and Thymeleaf.

In this hands-on example, we create an attribute-group selection screen. This is the start of our decorator pattern, as we will see how we can use these selections to apply decorators to our application.

In this video, we will dynamically include fragments in a ThymeLeaf form. We will also create a screen with attributes that were determined by the selections on the previous screen.

In this video, we will use the command pattern to process user-submitted form input.
In this section, we will see how we can use component-scan to enable both factory patterns and dependency injection.

In this video, we will describe the singleton design pattern, and show how to implement a variation of it with Spring. We will also show how to add an applicationContext.xml file to a Spring Boot application.

We have used many Spring annotations in this video course, and we have several more that we will use. In this video, we will provide a somewhat comprehensive list of the Spring annotations used in this course.

In this video, we will see how flexible our application is by adding new decorators, without touching existing source code.

In this video, we will discuss scope types in Spring: singleton, prototype, request, session, and global session. We will also discuss how to implement abstract factory and prototype patterns in Spring.

In this video, we will demonstrate abstract factory pattern and Prototype Pattern in an example.

In this section, we will use the template pattern and abstract classes. We will also use abstract methods to put hooks into future functionality.
In this video, we will describe what JSON is, how it is used, examples, and more.
Many programmers know the definition of abstract class. Knowing the business value as well is an incredible tool for making future-proof software. This is a core component of the template design pattern.

In this hands-on example, we describe the visitor design pattern, and how it can be used to enhance a set of existing classes.

In this hands-on example, we continue on our quest to create JSON, using the visitor design pattern.

In this video, we will summarize our project, the design patterns used in this course, and perform a grand walkthrough of the entire application.

Good to know

Know what's good
, what to watch for
, and possible dealbreakers
Explores GoF design patterns within the Spring Framework, which is valuable for developers aiming to write flexible and maintainable code
Uses Spring's minimal-configuration deployment, which simplifies the process of setting up and deploying Spring applications
Examines the Model-View-Controller (MVC) pattern, which is essential for structuring applications with a clear separation of concerns
Taught by an instructor with experience teaching programming at the university level, which suggests a structured and pedagogical approach
Requires familiarity with Maven, as the course uses it to manage project dependencies and build processes
Uses older technologies like Eclipse, Spring MVC, Spring Boot, and Thymeleaf, which may not be the latest versions available

Save this course

Save Spring Design Patterns and Best Practices to your list so you can find it easily later:
Save

Activities

Be better prepared before your course. Deepen your understanding during and after it. Supplement your coursework and achieve mastery of the topics covered in Spring Design Patterns and Best Practices with these activities:
Review Object-Oriented Programming Principles
Solidify your understanding of OOP principles like polymorphism, inheritance, and encapsulation, which are fundamental to grasping design patterns.
Browse courses on Object-oriented Design
Show steps
  • Review the four pillars of OOP: abstraction, encapsulation, inheritance, and polymorphism.
  • Practice implementing these principles in a simple Java project.
  • Identify examples of these principles in existing codebases.
Review 'Spring in Action'
Read 'Spring in Action' to get a broader understanding of the Spring ecosystem and its various modules.
Show steps
  • Read the chapters relevant to the design patterns covered in the course.
  • Compare the book's examples with the course examples.
  • Experiment with the code examples in the book to deepen your understanding.
Review 'Design Patterns: Elements of Reusable Object-Oriented Software'
Study the classic 'Gang of Four' design patterns book to gain a deep understanding of the core patterns covered in the course.
View Design Patterns on Amazon
Show steps
  • Read the introductory chapters on design principles and pattern classification.
  • Select 2-3 patterns relevant to the course and study their intent, structure, and implementation.
  • Compare the book's examples with the Spring-based examples in the course.
Four other activities
Expand to see all activities and additional details
Show all seven activities
Implement a Simple Factory Pattern in Spring
Practice implementing the Factory pattern in a small Spring application to solidify your understanding of dependency injection and object creation.
Show steps
  • Define an interface and several concrete classes that implement it.
  • Create a factory class that uses Spring's dependency injection to create instances of these classes.
  • Write a unit test to verify that the factory correctly creates the desired objects.
Create a Cheat Sheet of Spring Annotations
Compile a cheat sheet of commonly used Spring annotations to serve as a quick reference during development.
Show steps
  • List the most important Spring annotations (e.g., @Component, @Autowired, @Controller, @RequestMapping).
  • For each annotation, provide a brief description of its purpose and usage.
  • Include examples of how to use each annotation in code.
Follow a Spring Boot MVC Tutorial
Work through a tutorial that demonstrates how to build a web application using Spring Boot and MVC to reinforce the concepts covered in the course.
Show steps
  • Find a reputable online tutorial for building a Spring Boot MVC application.
  • Follow the tutorial step-by-step, paying attention to the configuration and code structure.
  • Modify the tutorial project to add a new feature or customize the user interface.
Contribute to a Spring Open Source Project
Contribute to an open-source Spring project to gain practical experience and learn from experienced developers.
Show steps
  • Find a Spring-related open-source project on GitHub or GitLab.
  • Identify a small bug or feature request that you can address.
  • Submit a pull request with your changes, following the project's contribution guidelines.

Career center

Learners who complete Spring Design Patterns and Best Practices will develop knowledge and skills that may be useful to these careers:
Java Developer
A Java Developer specializes in developing applications using the Java programming language. Given that this course focuses on design patterns within the Spring framework, a core technology in Java development, it provides a strong advantage to those wanting to become Java Developers. The course delves into using design patterns to solve problems encountered when designing applications using Spring. The practical examples and hands-on approach of the course will make you adept at implementing these patterns in your work. This course specifically covers the Model View Controller pattern and implementation, which is essential for building web applications. One should take into account that this course can help with decoupling code, thus making it easier to manage.
Software Engineer
A Software Engineer designs, develops, and maintains software applications. This course is particularly relevant as it focuses on design patterns within the Spring framework, which is a common tool for enterprise software development. The course helps a software engineer write flexible and maintainable code by using design patterns like the command and decorator patterns. It also explores dependency injection, a core principle for decoupling code in Spring, important for managing code complexity. Learning how to implement these patterns in Spring, as this course demonstrates, will lead to writing more efficient and robust applications. This course will also help you understand how to use several design patterns instead of if tests, which makes logic reside in an optimal location.
Backend Developer
A Backend Developer works on the server-side of applications, focusing on logic, databases, and APIs. This course provides a crucial background for a Backend Developer as it covers various design patterns within the Spring framework. The course teaches how to use design patterns to solve numerous problems relevant to building robust systems. By diving into patterns like the factory and interceptor patterns, and by exploring Spring's minimal configuration approach, a candidate will be ready to develop scalable and efficient backend systems. The course also helps you understand the dependency injection pattern. This all is exceptionally important to a good backend developer.
Application Architect
An Application Architect is responsible for designing the overall structure of an application. This course helps someone become an Application Architect by teaching how to apply design patterns to achieve flexibility and maintainability in software systems. The course offers a deep dive into how to use the Spring framework to implement various design patterns, such as the decorator and command patterns. An Application Architect, who takes this course, would have an understanding of patterns necessary for proper decoupling, which is essential for system design. Application Architects will appreciate the course's focus on using patterns rather than if tests, thereby improving application design and logic placement.
Software Development Lead
A Software Development Lead manages a team of developers and guides the technical direction of projects. A Software Development Lead should take this course as it focuses on design patterns and best practices when using the Spring framework. This will allow the leader to have their team follow the best practices discussed in this course. By understanding how to implement various patterns, a Software Development Lead can lead their team to produce more scalable, flexible, and maintainable code. The course's exploration of dependency injection and the Model View Controller also means that a lead would have the knowledge to develop well designed, testable software. This course may help a development lead understand how to make software future proof.
Full-Stack Developer
A Full Stack Developer is proficient in both front-end and back-end technologies. This course is helpful for a Full Stack Developer due to its focus on Spring, a key technology in the back end. This course provides understanding of design patterns and their implementation in Spring making a Full Stack developer better equipped to design and create software. An understanding of the Model View Controller pattern detailed in the course is very useful for anyone working with user interfaces. A full stack developer will need a good understanding of the decoupling process, which is a prominent topic in this course.
Solutions Architect
A Solutions Architect designs technological solutions to meet specific business needs. This course is particularly helpful for understanding which patterns to use when building software, especially when implementing systems in Java, using the Spring framework. This course focuses on the application of design patterns to create solutions. Taking this course would aid in how patterns such as the Factory Method and Command patterns work. When a solutions architect has to make decisions about what to use when designing systems, they may benefit from the course's focus on creating adaptable and future-proof software. In particular, a solutions architect who has to make decisions about object creation should take this course.
Technical Consultant
A Technical Consultant provides expert advice on technology-related issues. This course may help a Technical Consultant as it provides a strong background in designing software using the Spring framework. A technical consultant should be able to recognize proper design and best practices discussed in this course. The course focuses on design patterns, such as the decorator and visitor patterns, which help build flexible software. This course may be useful when advising on how to separate concerns when writing software. This course also helps a technical consultant understand how to make software more testable.
System Analyst
A System Analyst studies and improves computer systems and processes. This course may be helpful for a System Analyst as it provides an understanding of the capabilities of the Spring Framework. This course may help system analysts understand how design patterns can be used to make software more robust. A system analyst may have to make decisions about how a system should be designed and the command pattern, design pattern, and visitor pattern should assist in making decisions about how to create a robust system. Also, the course covers decoupling with dependency injection.
Enterprise Architect
An Enterprise Architect is responsible for the high-level design of an organization's IT systems. This course may be useful to an Enterprise Architect as it goes into depth regarding design patterns and their uses within the Spring framework. This course covers the Model View Controller which can be helpful when choosing how to implement user interfaces. In addition, a deep understanding of how to decouple code, discussed in depth in this course, can inform strategic decisions about how to build systems. This course may also help when considering which design pattern is most appropriate when creating system architecture.
Database Administrator
A Database Administrator manages and maintains databases. While this course primarily focuses on software design within the Spring framework, certain concepts like dependency injection and understanding application architecture may be useful for a Database Administrator. Understanding how the application interacts with the database may help with optimizing the database for the application. This course does provide a general understanding of software design and how to create flexible code, which may assist a database administrator. This course may enhance a database administrator's understanding of the context in which they work.
Project Manager
A Project Manager oversees the planning, execution, and closure of projects. This course may be helpful for a Project Manager in getting a general overview of how software is designed and how the Spring framework works. This course helps with understanding some of the best practices of software design. The course teaches how to use patterns to solve common software problems. A project manager would have a general idea of the trade-offs made when creating software using the best practices from this course. This course also may help a project manager understand the Model View Controller and how it pertains to user interfaces.
Quality Assurance Engineer
A Quality Assurance Engineer tests software to find and fix defects. This course may be helpful as it provides insights into how software is built, specifically within the Spring framework. While this course does not focus on testing directly, knowing how design patterns are implemented and how a system is structured may help a Quality Assurance Engineer better understand the software. This course also covers dependency injection, which may be useful when testing different components of an application. By understanding the patterns and frameworks discussed in the course, a quality assurance engineer may better design test cases.
Business Analyst
A Business Analyst identifies and analyzes business needs and translates them into requirements for technology solutions. This course may be helpful if a business analyst wants a better understanding of how software is constructed. This course does not focus on business analysis, however it does provide some insight into how the Spring framework is used and how design patterns are implemented. This course does touch upon the Model View Controller, which can give a business analyst a better understanding of user interfaces. Taking this course may make a business analyst better at communication with software developers.
Web Designer
A Web Designer focuses on the visual aspects of websites and user interfaces. This course may be useful to a web designer, as it covers the Model View Controller pattern that is important when designing user interfaces. This course dives deeply into using the Spring framework, which may help a web designer understand the constraints and capabilities of the technology. The course covers how to separate business logic from the user interface, which is key to good design. This course may help a Web Designer better understand the software development process.

Reading list

We've selected two books that we think will supplement your learning. Use these to develop background knowledge, enrich your coursework, and gain a deeper understanding of the topics covered in Spring Design Patterns and Best Practices.
This book, often referred to as the 'Gang of Four' book, is the seminal work on design patterns. It provides detailed explanations and examples of creational, structural, and behavioral patterns. While some examples may not directly translate to Spring, the underlying concepts are crucial for understanding how to apply patterns effectively. must-read for anyone serious about software design.
Provides a comprehensive introduction to the Spring Framework, covering topics such as dependency injection, aspect-oriented programming, and Spring MVC. It's a great resource for understanding the practical application of Spring concepts. It serves as a useful reference tool for understanding the various components of the Spring Framework and how they work together.

Share

Help others find this course page by sharing it with your friends and followers:

Similar courses

Similar courses are unavailable at this time. Please try again later.
Our mission

OpenCourser helps millions of learners each year. People visit us to learn workspace skills, ace their exams, and nurture their curiosity.

Our extensive catalog contains over 50,000 courses and twice as many books. Browse by search, by topic, or even by career interests. We'll match you to the right resources quickly.

Find this site helpful? Tell a friend about us.

Affiliate disclosure

We're supported by our community of learners. When you purchase or subscribe to courses and programs or purchase books, we may earn a commission from our partners.

Your purchases help us maintain our catalog and keep our servers humming without ads.

Thank you for supporting OpenCourser.

© 2016 - 2025 OpenCourser