Bummer! This is just a preview. You need to be signed in with a Basic account to view the entire video.
Start a free Basic trial
to watch this video
Let's discuss the project for this course
Prerequisites
-
0:00
[MUSIC]
-
0:05
Hello and welcome.
-
0:06
I'm Craig and I'm a developer.
-
0:07
In this workshop we are going to take on task of implementing an SQL back REST API
-
0:13
using the Java micro web framework Spark.
-
0:16
So I hope you understood that mouthful of words I just spouted out.
-
0:19
If not, there's some prerequisites to this workshop that I've listed in
-
0:23
the teacher's notes.
-
0:24
Now, after reviewing those, we'll be on the same page and
-
0:26
talking the same language.
-
0:28
As always, there are video controls to slow me way down and speed me up.
-
0:33
If I start getting bored.
-
0:35
The ability to build a REST API is becoming more and
-
0:38
more a required skill that you absolutely need to have in your Java tool bell.
-
0:43
Client side framework are taking off and
-
0:45
they expect a backend server to do all the heavy lifting.
-
0:49
They all almost follow REST out of the box.
-
0:51
Mobile applications have exploded and just about every company has or
-
0:56
wants a mobile app these days.
-
0:58
These apps need to talk to the existing infrastructure and
-
1:01
usually they do that using REST.
-
1:03
So, what better way to get started exploring building a REST API
-
1:07
than using a very straightforward approach to the problem.
-
1:10
Spark is once again is going to do this for us.
-
1:13
I thought we'd take a chance with this project to also explore using a database
-
1:17
implementation and land on a friendly middle ground between raw SQL and
-
1:21
an object relational mapper.
-
1:23
We'll also explore using a package that allows us to take our model objects and
-
1:27
turn them into JSON or JavaScript object Notation.
-
1:31
So the project that we're going to be building together is a public facing
-
1:34
REST API that will allow people to review online courses.
-
1:38
Now there are a ton of online tutorials and we'll be providing a way for
-
1:42
people to submit a brand new course.
-
1:44
For instance, something like this.
-
1:46
A course might be how to beat angry birds.
-
1:48
That's what the course looks like.
-
1:50
And then after that you can submit reviews for each course.
-
1:53
Like a glowing one.
-
1:54
Five stars.
-
1:55
Loved it.
-
1:56
Or one that isn't so great.
-
1:58
Obviously, when reviewing tree house courses these are going to be
-
2:00
five out of a possible five.
-
2:02
But our API is made to exact courses from anywhere.
-
2:06
So the client of the API can request a list of courses that have reviews
-
2:10
as well as submit a new course and a new review.
-
2:13
This aggregating of information is a common use case of software as a service,
-
2:18
or SAAS.
-
2:19
Sound fun?
-
2:20
Let's get this party started.
You need to sign up for Treehouse in order to download course files.
Sign up