Day 33 Networking Basics, MVC Pattern, JSP
26 Feb 2020Today was a packed day of learning about networking, model view controller, java server pages, and then doing code reviews.
About networking, we learned that when a user types a domain name into their web browser, the browser reaches out to a domain name system (DNS) server to lookup the IP address for that domain. Then, the web browser sends a request to the domains IP address. The server which hosts the requested website will generate a response and respond with the requested resource and a status code indicating the success of the request. There are typically many such requests in the loading of a single web page.
There are many diagrams out there that represent the MVC model in slightly different ways. Here’s one I found that is closest to what Brian drew on the board in class:
This is a design pattern we have been getting close to in our capstones, but now that we are going to start building web applications we have the chance to really nail it down.
Today, we learned how to create the views in a Java web application. These views are written in .jsp
files and use three languages:
- html –
<body>
- jstl (java standard tag library) –
<c:set var="variable" value="5" />
- EL (expression language) –
${ variable % 3 == 0 }
These languages allow us to build html pages dynamically.
Code Reviews:
Today we started code reviews for Capstone 2. This time, we are doing peer group reviews. Our group presented along with 5 other groups. Each group had about 20 minutes to discuss their code and answer questions. This wasn’t really enough time to get into the meat of anything, but it was good practice and I really enjoyed seeing how differently different people solved the same problems.