Introduction to the Spring Framework3:46 with Chris Ramacciotti
In this video, I'll introduce the Spring Framework and the animated GIF library we'll be developing, called Giflib.
[SOUND] 0:00 [MUSIC] 0:01 [SOUND] >> Hi there. 0:03 My name is Chris and I'm a Java teacher here at Treehouse. 0:05 Chances are that you've spent some time online. 0:08 In fact, I know you've spent some time online, 0:11 since you're here taking this course now. 0:14 Even more, I know that you probably spend quite a bit of time on the internet, 0:16 given that you're learning path and 0:20 java, has probably taught you a few things before landing in this course. 0:21 You've probably poked around on many websites, whether that is the Treehouse 0:27 library, our forum, stack overflow, or the oracle java docs. 0:30 Or maybe it's during breaks from your learning that you spend the most 0:35 time online. 0:37 Twitter, Facebook, Instagram, Reddit, Buzzfeed. 0:39 While you're learning how to use Java to create programs to do sophisticated 0:43 things, do you ever look at the very sites you're browsing and 0:47 think, could I use Java to make a web application? 0:50 Fortunately for you, the answer is yes. 0:54 There are numerous ways to do this, and it's changed a lot throughout the years. 0:57 In this course, 1:01 we'll focus on using the Spring framework to help us accomplish this task. 1:02 We'll dive more deeply into the details of Spring, but 1:06 let me give you an overview here. 1:09 Writing a web application is like being the author of an ongoing dialogue. 1:12 As with any dialogue you might wonder who are the speakers? 1:16 For a basic web app, essentially there are two. 1:21 The server, and the client. 1:23 In general the user of a web application communicates with the server 1:25 through a web browser. 1:29 This could be Chrome, Safari, Firefox, Microsoft Edge, or maybe a mobile browser. 1:31 The web browser formats all user actions and sends them, 1:37 in a nicely formatted request, to the web server. 1:40 Upon receiving this request, the web server, according to how it's programmed, 1:43 crafts a nicely formatted response to send back to the browser. 1:47 The format of the request and 1:51 the response follows a very specific set of rules as defined by HTTP. 1:52 Or, the HyperText Transfer Protocol. 1:58 It is in the crafting of the response from a web server 2:01 where your Java code would come into play. 2:04 If you're a Java developer working on a web application, 2:07 likely most of your development time is spent here, on the web server. 2:10 You'd be writing the Java code necessary to respond to the requests coming from 2:15 your users' web browsers. 2:18 Coding a Java web app, means coding a bunch of components. 2:21 By component I simply mean a class or 2:24 collection of classes that handles a specific task in the application. 2:27 In a web application, your Java code needs a component to intercept the incoming 2:32 request, components to handle the requests to certain locations, and 2:36 more components to fetch and store any data related to the requester response. 2:40 And even more components to generate the response back to the web browser. 2:45 Now that's quite a few components. 2:50 Luckily, there are many libraries or frameworks that help you organize and 2:53 manage this request and response cycle. 2:56 One of the most popular for Java is the spring framework. 2:59 In this course we'll use the web components of the Spring framework 3:04 to write a site that serves as an animated GIF library. 3:07 We'll call this library GifLib. 3:10 This will be a website that lists a bunch of animated GIFs each with a name, 3:12 user and date uploaded. 3:17 Because the Spring framework provides some really sophisticated options for 3:20 writing web applications, 3:23 we'll take our time in fully understanding the setup of even a simple web app. 3:25 This will give you a solid foundation from which you can climb to more powerful, 3:31 industry ready apps. 3:35 So, when you're ready to start, head to the next video where we'll begin 3:38 installing what you'll need on your computer to code your first spring app. 3:42
You need to sign up for Treehouse in order to download course files.Sign up