Getting started with Dropwizard
4.0 (71 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
331 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Getting started with Dropwizard to your Wishlist.

Add to Wishlist

Getting started with Dropwizard

Creating RESTful APIs and Microservices using Java programming language and a popular Dropwizard framework
4.0 (71 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
331 students enrolled
Created by Dmitry Noranovich
Last updated 11/2015
English
Current price: $10 Original price: $20 Discount: 50% off
30-Day Money-Back Guarantee
Includes:
  • 4 hours on-demand video
  • 1 min on-demand audio
  • 8 Articles
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • create a database backed RESTlike API using Dropwizard
  • use test-driven approach to creating resources and access RESTful services using both a browser add-on and command line-tool
  • secure your API using Basic authentication and enable HTTPS using configuration
  • learn how to use database migrations
View Curriculum
Requirements
  • In order to succeed you’ll need basic knowledge of Java and SQL
  • Also, you should be able to install Java, MySQL, Git and an IDE or Maven on your computer
Description

In this course you'll learn how to create a simple RESTlike API using Java programming language and Dropwizard, a popular framework to build RESTful APIs and microservices. The course begins with a brief introduction to REST architecture style principles and an overview of an example application to store bookmarks, called DropBookmarks, we'll build throughout the course.

In the following parts you'll create a Hello World application using Dropwizard, learn how to test the application and use various tools to check the output of restful APIs. Also you'll learn how to connect to a relational database using Hibernate ORM framework, how to use database migrations with Liquibase and how to secure your API using Basic Authentication.

The course currently consists of 59 lectures and 4 hours of video. After taking this course you'll be able to start developing RESTlike APIs at Level 2 of Richardson Maturity Model and microservices using Java and Dropwizard. Also, some of the topics you'll learn may be useful for development of Web-based Java applications using other frameworks.

Who is the target audience?
  • This is an intermediate course for those with basic knowledge of Java, relational databases and SQL
  • This is not an introductory Java programming course
Curriculum For This Course
64 Lectures
04:14:14
+
Introduction
2 Lectures 05:40

This lecture gives an introduction and walks you through the course.

Preview 05:18

This lecture discusses the prerequisites for the course.

Prerequisites
00:22
+
What is REST
4 Lectures 11:21

In this lecture we'll discuss how to evaluate if an API is RESTful using Richardson Maturity model and discuss the example application on which we'll be working in our course.

Introduction to REST
05:36

In this lecture will briefly discuss what is a REST architecture style and also go over some terms pertaining to the style.

Richardson Maturity Model
03:38

This lecture presents a whirlwind tour of the Level 3 of Richardson Maturity Model.

HATEOAS
01:49

REST architecture style assignments.

Assignments
00:17
+
Hello Dropwizard
12 Lectures 44:25

In this lecture we'll create a Dropwizard project using Maven archetype from Command Line Interface. You can create the project from terminal and import it into your favorite IDE or skip this lecture and create the project using the IDE, which is explained in one of the following lectures.

Creating a Dropwizard project using Maven and CLI
05:26

In this lecture we'll create a Dropwizard project using Maven archetype and Netbeans

Creating a Dropwizard project using Netbeans IDE
03:12

In this lecture we'll create a Dropwizard project using Maven archetype and IntelliJ IDEA.

Creating a Dropwizard project using IntelliJ IDEA
04:10

In this lecture we'll create a Dropwizard project from Maven Archetype using Eclipse.

Creating a Dropwizard project using Eclipse
03:20

In this lecture we'll create a simple resource class with a single method which will allow us to output a greeting "Hello world".

Hello World with Dropwizard
03:46

In this lecture we'll learn how to run our project from Command Line Interface.

Running a Dropwizard project from CLI
02:55

In this lecture we'll learn how to run our project using NetBeans IDE.

Running a Dropwizard project from Netbeans IDE
04:11

In this lecture we'll learn how to run our project using IntelliJ IDEA Community Edition.

Preview 02:23

In this lecture we'll learn how to run our project using Eclipse.

Running a Dropwizard project from Eclipse
03:03

In this lecture you'll learn how to add testing capabilities to the project.

Adding tests to the project
04:13

In this lecture you'll learn how to create a unit-test.

Creating a unit test
02:57

In this lecture you'll learn how to test resource classes using in-memory Jersey.

Testing a resource class using in-memory Jersey
04:49
+
Basic Authentication
8 Lectures 29:26

In this lecture you'll learn what is the Basic Authentication and how it is used in a Dropwizard project.

Introduction
01:07

In this lecture you'll learn how to add a class implementing Authenticator interface to the project.

Adding a class implementing Authenticator interface
04:43

In this lecture you'll learn how to register a class implementing Authenticator interface in the Application class.

Registering Authenticator in the Application class
02:43

In this lecture you'll learn how to instruct Dropwizard to prompt a user for credentials when a particular method in a resource class is accessed.

Securing a method
02:06

In this lecture you'll learn how to check whether a secured resource works correctly using Postman Chrome add-on. If you prefer using CLI, you can skip this lecture.

Checking a secured resource using Postman
02:54

In this lecture you will learn how to access a secured resource using command-line cURL tool. You can skip this lecture if you don't like command-line interface.

Checking a secured resource using cURL
02:58

In this lecture we'll start writing a unit test for a password-protected resource.

Creating a unit test for password-protected resource
08:29

In this lecture we'll continue writing a unit test for a password-protected resource. You'll learn how to add Grizzly to your project to enable injection of User object to your method inside the test.

Enabling injection in tests with Grizzly
04:26
+
Configuration and HTTPS
9 Lectures 36:18

In this lecture you'll learn about YAML Dropwizard configuration files.

Adding a YAML configuration file
05:40

In this lecture you'll learn how to change the default port of your Dropwizard application.

Changing the default value of HTTP port
02:00

In this lecture we'll discuss why we need HTTPS in our application.

A brief introduction to HTTPS
04:03

In this lecture we'll switch on HTTPS support using Dropwizard configuration.

Adding HTTPS
03:56

In this lecture you'll learn how to add an integration test to you application. We'll test a sad path here whereby no credentials are provided when trying to access the resource.

Adding an Integration Test
07:18

In this lecture we'll write a test method for the happy path, namely when the credentials are provided when trying to access the resource.

Preview 03:24

In this lecture you'll learn how to use HTTPS in your tests.

Integration Testing continued: using HTTPS
03:40

In this lecture you'll learn how to set database connection parameters in the application configuration file.

Configuring Database Connection
06:11

Configuration assignments.

Assignments
00:06
+
Database Migrations with Liquibase
9 Lectures 40:11

In this lecture we'll discuss the schema of the database of our example project and how to create and populate tables using database migrations.

Introduction to Database Migrations with Liquibase
04:44

In this lecture you'll learn how to write change logs.

Adding changesets
05:16

In this lecture you'll learn about the convenient for development environment way to apply database refactorings.

Adding Liquibase Maven Support
07:30

In this lecture we'll continue writing database change log.

Adding more changesets
05:52

In this lecture you'll learn how to apply change sets to the database using Maven.

Applying database refactorings using Maven
05:02

In this lecture we'll continue learning how to apply change sets to the database using Maven.

Applying database refactorings using Maven continued
04:24

In this lecture you'll learn how to add a Liquibase module to the project, which will enable one to use application's CLI to apply migrations.

Adding Dropwizard Liquibase support
04:41

In this lecture you'll learn how to apply database refactorings using the command-line interface of your application.

Applying database refactorings using application's CLI
02:23

Migration assignments.

Assignments
00:19
+
Connecting to a Relational Database
11 Lectures 55:33

In this lecture we'll discuss what database tables are necessary for our application and how to map classes to tables using industry standard called JPA and its certified implementation Hibernate.

Mapping classes to the database using Hibernate
04:38

In this lecture you'll learn how to write JPQL queries to fetch users from the application database.

Writing queries to fetch data from the database
05:16

In this lecture we'll add a DAO to manipulate users from Java code.

Adding a Data Access Object
06:17

In this lecture we'll write a unit-test using in-memory database to check that queries return correct results.

Creating a unit test to check whether queries return correct results
11:39

In this lecture we'll continue writing a unit test using in-memory database.

Testing queries continued
05:25

In this lecture we'll add Hibernate bundle to the Application class.

Adding Hibernate support to the Application class
03:03

In this lecture we'll create a new Authenticator class that uses to search database for the user by provided credentials.

Using database for authentication
03:20

In this lecture we'll modify the previously-created integration test to use separate configuration file and in-memory database.

Modifying the integration test
04:28

In this lecture we'll create a Bookmark entity, map it to database and create an association with user entity.

Adding a Bookmark entity
05:42

In this lecture we'll create a DAO to manipulate bookmarks and add a couple of JPQL queries.

Adding a DAO for bookmarks
05:35

Database assignments.

Assignments
00:10
+
Creating Resources
8 Lectures 30:37

In this lecture we'll add a resource class which can access bookmark data in the database and produce JSON representations of bookmarks to a client and the first method that returns a list of bookmarks. At the end of this lecture you'll learn what annotations are used to decorate resource classes and methods and how to return a JSON representation of the list of objects.

Adding a database-backed resource class
03:25

In this lecture you'll learn how Dropwizard deals in exceptions in resource methods and what response is returned to the client in the case of an exception. We'll write a simple method that looks for a bookmark in the database by the id of a bookmark and throws an exception if the bookmark is present in the database but does not belong to authenticated user.

How Dropwizard deals with exceptions in resource methods
04:09

In this lecture a couple of sub-resource methods to manipulate bookmarks will be added.

Adding methods to query a single bookmark and to remove a bookmark
07:54

In this lecture a method to create new bookmarks will be added to the resource class.

Adding new bookmarks
03:48

In this lecture we'll learn how to check if the resource methods work correctly using Chrome add-on called Postman. Some actions are needed before you can start using Postman with HTTPS. See resources section for instruction. If you prefer cURL, you could skip this lecture.

Checking output sing Postman
05:49

In this lecture you'll learn how to use cURL to check whether the correct results are returned by the resource class.

Using cURL to query bookmarks
02:25

In this lecture you'll learn some additional cURL features suck as how to use HTTP POST and DELETE methods to add and delete bookmarks respectively.

Preview 02:47

Resources assignments.

Assignments
00:20
+
Conclusion
1 Lecture 00:22

In this lecture we'll sum up what was accomplished in this course.

Conclusion
00:22
About the Instructor
Dmitry Noranovich
4.0 Average rating
71 Reviews
331 Students
1 Course
Java Developer and Entrepreneur

Dmitry Noranovich has been programming since 1993 when he learned C language to produce code to carry out computations for his research. Since then he has used C++ and Java for this purpose and as well taught an extracurricular computational physics course in a big university in south Russia. His experience also includes teaching general physics at university level. Besides Java, which is his primary programming language, Dmitry is dabbling in Angular.js and Bootstrap and is passionate about everything concerning REST APIs. Dmitry is a technology enthusiast and lifelong learner, so he periodically takes MOOCs in computer science and likes to think that someday he will produce one and also tries to learn something new on his own. When he doesn't work, he spends time with his wife and two kids. Should he have spare time, he prefers to spend it hiking or with his Kindle.