Learn Java for Web Development

(Tina Meador) #1

xx Introduction


Instead of simply pronouncing one web framework the best, Learn Java for Web Development
shows the strengths of the most popular web frameworks by means of a real-world bookstore
application. Developing a complete real application necessitates a seamless collaboration of
dynamic functionalities, and the code for building such components is contrived and too involved.
Instead of focusing on developing such moving parts, this book confines its attention on leveraging
the strengths of each web framework.


How the Book Is Structured


The book consists of eight chapters, which I’ll describe next, plus the three previously mentioned
appendixes that introduce the Java, Groovy, and Scala languages.


Chapter 1: Introducing Java Web Development

Chapter 1 explains the main objective that shapes this book and highlights what appears in the
subsequent chapters. This chapter begins with a discussion of a significant change in the Java
landscape, its implication, and what Java exactly means today. The chapter then discusses the three
key players that join forces in building modern Java web applications: the JVM languages, Java EE,
and the Java web frameworks.


This chapter introduces the key features of a modern Java web application such as Ajax and REST,
WebSocket for real-time web application, the Typesafe stack for a reactive web application, and
client-side MVC frameworks for responsive and single-page web applications. Finally, the chapter
introduces some important aspects of modern web development that are beyond the scope of this
book, such as Java information retrieval on the Web, and briefly introduces the central component of
Web 3.0, which is still an open subject of research, the Semantic Web.


Chapter 2: Building Web Applications Using Servlets and JSP

Chapter 2 begins with a discussion of the evolution and architecture of web applications. The
chapter then highlights how to use the standard web API. The first pass at the sample application
uses only servlets and JSP. Then the chapter shows you how to build the same application as a
Model 2 application.


Chapter 3: Best Practices in Java EE Web Development

Chapter 3 examines the chain of causality that leads to the need for following best practices.
The chapter explains the need to evolve projects and introduces Expression Language and JSTL.
The chapter then discusses the Java EE web tier patterns.


Chapter 4: Building a Web Application Using Struts 2

In Chapter 4, you’ll learn about Struts 2. Not as popular as it used to be, Struts 2 is introduced in
this book for developers who have to maintain legacy applications. This chapter first introduces
the key architectural components of Struts 2. Then you will learn to develop your first application
using Struts 2 and Maven 4. Moving forward, you will learn to develop the bookstore application and
integrate with Tiles 3.

Free download pdf