|
Chapter 1 gets us started gently. We begin with a quick survey of the context in which Struts 2 occurs, including short studies of web applications and frameworks. We then take the obligatory architectural look from 30,000 feet. Unless you’re familiar with WebWork, the true code base ancestor of Struts 2, this high-level overview of the framework will be your first look at a fairly new and interesting way of doing things. Chapter 2 revisits the architectural principle of the first chapter as demonstrated in a HelloWorld sample application. We do two versions of HelloWorld. First, we show how to use XML to declare your Struts 2 architectural metadata; then we do it again using Java annotations for that same purpose. Chapter 3 kicks off the core portion of the book by introducing and thoroughly covering the Struts 2 action component. Actions are at the heart of Struts 2, and it wouldn’t make sense to start anywhere else. Chapter 4 continues the core topics by introducing one of the most important components of the framework, the interceptor. Struts 2 uses interceptors to implement almost all of the important functionality of the framework. Chapter 5 finishes off the discussion of framework fundamentals by covering the data transfer mechanisms of the system. One of the most innovative features of Struts 2 is its automatic transfer and conversion of data between the HTTP and Java realms. Chapter 6 starts coverage of the view layer aspects of the framework. In particular, this chapter will introduce the Struts 2 Tag API. This introduction explains how to use the OGNL expression language to get your hands on the data in the ValueStack and ActionContext, which we met in the previous chapter. Chapter 7 introduces the second major chunk of the Struts 2 tags, the Struts 2 UI components. The UI components are the tags that you use to build the user interfaces of your web application. As such, they include form components, text field components, and the like. But don’t mistake the Struts 2 UI components for your father’s HTML tags, if you know what I mean. Chapter 8 rounds out treatment of the view layer of the framework by introducing the result component. This core component highlights the flexible nature of Struts 2. Chapter 9 begins to show you how to bring your basic Struts 2 application up to industry standards. In particular, we take the opportunity to go off topic by showing you how to use Struts 2’s Spring plug-in to bring dependency injection into your application. Chapter 10 continues the trend of making your application more refined by showing how to use Struts 2’s validation framework to gain metadata-driven validation of your data. Chapter 11 introduces the Struts 2 internationalization and localization support, and carefully walks you through all of the fine-grained details. Chapter 12 introduces the Struts 2 plug-in architecture. Like any well-designed software, you should be able to extend the functionality without modifying existing code, and Struts 2 leverages the plug-in architecture for this very purpose. Chapter 13 reveals best practices and tips from the trenches. This chapter presents topics that range from optimizing your development environment to registering your web features using a technique known as wildcard mappings. Of course, you will find a mishmash of useful tips in between. Chapter 14 organizes a migration plan to help you transition from Struts 1.x to the exciting Struts Web 2.0 world. This chapter also points out similarities and differences between the two Struts versions. Chapter 15 reveals techniques that let you leverage the true spirit of the framework. This chapter contains advanced concepts, and should be read several times before starting any large-scale Struts 2 project. Download free pdf ebooks on java: Manning: Struts 2 in Action May 2008(with source code)
|
Free programing ebooks
Chapter 1 gets us started gently. We begin with a quick survey of the context in which Struts 2 occurs, including short studies of web applications and frameworks. We then take the obligatory architectural look from 30,000 feet. Unless you’re familiar with WebWork, the true code base ancestor of Struts 2, this high-level overview of the framework will be your first look at a fairly new and interesting way of doing things.