The Insider's Guide to the Java Web Developer Nanodegree
Written by Nikos Vaggalis   
Thursday, 23 July 2020

Learn to program the Web with Java and Spring in Udacity's newest four month Nanodegree program. Nikos Vaggalis has accepted the challenge and is preparing to embark on an adventure of coding and learning.

 

 

Nowadays it's difficult to to tell programming languages apart. More or less everybody does everything, others do it easier, others more difficult but you'll get to the end result one way or another. For instance, every language does functional programming, reactive programming, text munging with regular expressions or programming the server backend; you name it; you see where this is going.

So what's the melting point? Frameworks. Frameworks are the Trojan horses to the language. Choosing a framework gets you a deal with a particular language too. For example, a lot of commotion going on for years was about why to learn Perl, generally considered by many a dead language (which of course is totally untrue). For the naysayers there's now a really good reason to try it out;- the postmodern Web development framework of Mojolicious.

The same counts for Java and Spring. Even if you're not familiar with Java, it's almost certain that you have heard of the venerable Spring framework and its ecosystem. And while Spring MVC is battle-vetted, Spring Boot makes it even easier to start with.

In an earlier article, "Enrollment Open for New Java Developer Nanodegree", I pondered:

Java? I hear you say. Does this old horse stand a chance in the era of cool programming languages? The short answer is yes.

The reasons are plenty. One is that enterprises value most is backwards compatibility, being notoriously allergic to radical updates and upgrades. Systems that worked 20 years ago, written in Java 5, should be able to compile and run under version 8. Stability is what matters.

Then under a more frequent release cycle than it used to, already jumping from version 9 to 12 in just two years time, the language looks set to be refreshed with the latest developments.

Modernization does not stop at the language and API level however. Support for Java is built into the newest tools too. So aside from the venerable Eclipse and Netbeans, you can also write Java in Android Studio, Intellij IDEA and lately in Visual Studio Code.

If still not convinced after that, then Spring will make you reconsider, that is, if you are looking to build Web applications and APIs that take advantage of the latest state of the art frameworks.

udacity-java2

So this Nanodegree has it all.Together with learning the ins and outs of the Spring framework, you also get a chance to advance your Java skills to the level of expert.

It's a situation I find myself in right at the moment. I have knowledge in Java which was acquired by graduating from the Android Developer Nanodegree, but I'm also actively looking to sharpen that skillset and built something stellar with it, acting as a career-worthy showcase to anyone interested in the future. That's the first reason.The other is that since developing for the Android platform has changed enormously as well as now being mostly Kotlin-focused, I was looking for other ways to invest in Java.

The Java Web Developer Nanodgree has given me this opportunity. Of course, other people are going to take the course for other reasons, be it educational, expanding mindsets, looking to get a job out of it, or looking to kickstart a project at work.

Speaking from the experience of graduating from the Android Developer Nanodegree, an act which I documented in detail in my seven-part "Insider" mega series, I'm expecting the same level of professionalism andl quality of course materials from this Nanodegree. And of course I'm going to document it the same way in a new series of posts, this being the very first one.

Prerequisites and Nanodegree Structure 

For starters, I'm just going to go through the prerequites and basic layout of the course.To get the most out of this course, you should already be familiar with the basics of Java, SQL, and IDEs. Familiarity with SQL is not that essential though as you'll be limited to simple CRUD operations hidden behind an ORM, but familiarity with Java at least on a basic level is necessary. Also we'll be using the open-source Community Edition of the IntelliJ IDE.

The other necessity is that of JDK 14, which means that modern Java features like Records and Multiline code blocks are going to be available at our disposal. At this point, just to jot down that the instructors assume using the official Oracle JDK and not an OpenJDK version.Given that Oracle has changed the license requirements of Java, something that had fueled the debate of whether Java is still free, I considered reaching out to the instructors for an official comment.With it I also asked why the course uses Maven for dependency management instead of its newest counterpart Gradle ,given that Spring Boot's build has already migrated from Maven to Gradle, and finally, why MyBatis is preferred over the standard of Hibernate for the database access.

Peter Zastoupil, one of the course instructors and responsible for the first part of the course has kindly provided the following answers:

On JDK:Since Oracle's license changes only affect commercial use, I felt that it was appropriate for student use. Its ease of installation, as well as the level of support and maintenance from Oracle, were key factors in its favor. I agree that Oracle's recent licensing changes are not good, generally speaking, and for developers that are more comfortable with environment configuration, I would absolutely recommend OpenJDK. However, its lack of support for past versions and generally less-friendly installation and configuration process feels like a lot to ask of a beginner-to-intermediate Java developer.

On Gradle:To be honest, the main reason was that the other courses in the nanodegree already incorporated Maven, and I wanted the students to have a consistent tooling experience from course to course. That being said, while Gradle is a powerful and useful tool, it isn't simply an upgrade to Maven. It has its own pros and cons, and some of the cons are a steep learning curve and somewhat limited IDE support - which is not ideal for less-experienced developers. It absolutely makes sense that the Spring source code is managed with a Gradle build, because it's a massive, multi-project framework, and Gradle is a mature and flexible build tool with good performance and support for multi-project builds. However, the applications we work on in the class are single projects with simple dependencies, and Maven is more than sufficient for our purposes. I fundamentally agree that Gradle is likely the future of Java builds, but it poses a lot of hurdles compared to Maven when teaching the concepts of Java dependency management.

On Hibernate:We considered teaching Hibernate (or more likely JPA) for the course, but there were two problems with that. First, taking the time to explain full ORM with relationship mapping, entity managers, etc. would have taken more than the single lesson we had set aside for an introduction to persistent data and security. Second, the third course of the nanodegree is a deep, deep dive into JPA, and any topics I'd cover on the subject might conflict or overstep the topics covered in that course. Ultimately, we decided to go forward with MyBatis because it demonstrates the basic concept of ORM (abstract away the barrier between relational data and Java objects) without the complexity of the feature set provided by JPA (or Hibernate). Since this course is meant to be a broad introduction to the concepts and components of enterprise Java development with Spring Boot, we decided it was more important to cover additional topics (like Spring Security and testing with Selenium) that represent crucial concepts in enterprise development, especially since JPA is covered in-depth later in the course.

This cleared things up.

So the material is built around Spring MVC and as such we'll be splitting our application into MVC's layers, with Spring Security added on top for authentication and authorization.  Of course along with it, Spring Boot which takes care of the bootstraping and the configuration.

udacity-java3

The Controller part will be handled by both Spring Boot's beans and the ones which we will be writing to address our application's specific needs.

The Model/data Storage part will be handled behind the scenes by the in-memory SQL database H2, while access to it will be given through the Java library MyBatis.The View component will be handled by the Thymeleaf HTML template engine, while automated testing will handled by JUnit and Selenium.Of course the course will also involve writing Restful APIs which do not require a templating engine.

All of this knowledge and work is going to be funneled towards building the very first project of "SuperDuperDrive", a
personal storage app for a new company in the cloud storage business that allows users to store files, personal notes, and website credentials. We'll be responsible for developing the registration, login, and data storage features of the application, as well as writing tests to verify that the app is feature-complete.

At this point it's important to reveal the nanodegree's  organization.In total there are five chapters (for lack of a better term). Each one is broken down to five or more lessons, with each lesson being itself broken down to 15+ sub-lessons, plus a final project.That's a lot of material which really supplies everything necessary in order to master the framework.

At the highest level, the Chapters are:

1. Introduction
2. Spring Boot Basics
3. Web Services and APIs
4. Data Stores and Persistence
5. Security and DevOps

So, having covered the Introductory chapter and the high-level overview of the entire program, we're ready to up continue with Spring Boot Basics - and that will be the topic of my next installment of this Insider's Guide.

 

udacity-java-logo

 

 

More Information

Java Web Developer Nanodgree

Related Articles

Two New Nanodegree Programs - Java and JavaScript

Enrollment Open for New Java Developer Nanodegree

Is Java Still Free?

Insider's Guide To Udacity Android Developer Nanodegree

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Copilot Improves Code Quality
27/11/2024

Findings from GitHub show that code authored with Copilot has increased functionality and improved readability, is of better quality, and receives higher approval rates than code authored without it.

 [ ... ]



Hour Of Code 2024 Is About To Kick Off
04/12/2024

This year the event that aims to provide a coding experience for all school students and anyone else who wants to join in runs between December 9th and 15th and includes new activities. Let's find out [ ... ]


More News

espbook

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Saturday, 01 August 2020 )