Expert one-on-one J2EE design and development / Rod Johnson.
By: Johnson, Rod
.
Material type:
BookSeries: Programmer to programmer.Publisher: Indianapolis, Ind. ; UK : Wrox, 2002Description: xv, 742 p. : ill. ; 23 cm.Content type: text Media type: unmediated Carrier type: volumeISBN: 0764543857 (pbk.); 9780764543852.Subject(s): Java (Computer program language)| Item type | Current library | Call number | Status | Barcode | |
|---|---|---|---|---|---|
| General lending | MTU Kerry North Campus Library Ground Floor Main | 005.71262 JOH (Browse shelf(Opens below)) | Available | 38888000878730 |
Enhanced descriptions from Syndetics:
What is this book about?
The results of using J2EE in practice are often disappointing: applications are often slow, unduly complex, and take too long to develop. Rod Johnson believes that the problem lies not in J2EE itself, but in that it is often used badly. Many J2EE publications advocate approaches that, while fine in theory, often fail in reality, or deliver no real business value.
Expert One-on-One: J2EE Design and Development aims to demystify J2EE development. Using a practical focus, it shows how to use J2EE technologies to reduce, rather than increase, complexity. Rod draws on his experience of designing successful high-volume J2EE applications and salvaging failing projects, as well as intimate knowledge of the J2EE specifications, to offer a real-world, how-to guide on how you too can make J2EE work in practice.
It will help you to solve common problems with J2EE and avoid the expensive mistakes often made in J2EE projects. It will guide you through the complexity of the J2EE services and APIs to enable you to build the simplest possible solution, on time and on budget. Rod takes a practical, pragmatic approach, questioning J2EE orthodoxy where it has failed to deliver results in practice and instead suggesting effective, proven approaches.
What does this book cover?
In this book, you will learn
When to use a distributed architecture When and how to use EJB How to develop an efficient data access strategy How to design a clean and maintainable web interface How to design J2EE applications for performanceWho is this book for?
This book would be of value to most enterprise developers. Although some of the discussion (for example, on performance and scalability) would be most relevant to architects and lead developers, the practical focus would make it useful to anyone with some familiarity with J2EE. Because of the complete design-deployment coverage, a less advanced developer could work through the book along with a more introductory text, and successfully build and understand the sample application. This comprehensive coverage would also be useful to developers in smaller organisations, who might be called upon to fill several normally distinct roles.
What is special about this book?
Wondering what differentiates this book from others like it in the market? Take a look:
It does not just discuss technology, but stress its practical application. The book is driven from the need to solve common tasks, rather than by the elements of J2EE. It discuss risks in J2EE development It takes the reader through the entire design, development and build process of a non-trivial application. This wouldn't be compressed into one or two chapters, like the Java Pet Store, but would be a realistic example comparable to the complexity of applications readers would need to build. At each point in the design, alternative choices would be discussed. This would be important both where there's a real problem with the obvious alternative, and where the obvious alternatives are perhaps equally valid. It emphasizes the use of OO design and design patterns in J2EE, without becoming a theoretical bookIncludes index.
Using a practical focus, this book shows how to use J2EE technologies to reduce complexity. It helps you to solve common problems with J2EE and avoid the mistakes often made in J2EE projects. It guides you through the complexity of the J2EE services and APIs to enable you to build the simplest possible solution, on time and on budget.
Table of contents provided by Syndetics
- Introduction (p. 1)
- J2EE Myths (p. 2)
- How is this Book Different? (p. 5)
- My Approach (p. 6)
- Who this Book is for (p. 7)
- Aims of this Book (p. 7)
- What this Book Covers (p. 7)
- Assumed Knowledge (p. 8)
- Recommended Reading (p. 9)
- What You Need to Use this Book (p. 9)
- Chapter 1 J2EE Architectures (p. 15)
- Goals of an Enterprise Architecture (p. 16)
- Deciding Whether to Use a Distributed Architecture (p. 18)
- New Considerations in J2EE Design (p. 19)
- When to Use EJB (p. 20)
- Implications of Using EJB (p. 20)
- Questionable Arguments for Using EJB (p. 22)
- Compelling Arguments for Using EJB (p. 22)
- Arguments for Using EJB to Consider on a Case-by-Case Basis (p. 23)
- Accessing Data (p. 24)
- J2EE Data Access Shibboleths (p. 24)
- State Management (p. 26)
- J2EE Architectures (p. 26)
- Common Concepts (p. 27)
- Non-distributed Architectures (p. 28)
- Distributed Architectures (p. 32)
- Web Tier Design (p. 36)
- The Model View Controller (MVC) Architectural Pattern (p. 36)
- Connectivity Between the Web Tier and Business Objects (p. 38)
- Designing Applications for Portability (p. 38)
- Summary (p. 40)
- Chapter 2 J2EE Projects: Choices and Risks (p. 43)
- Developing a Policy on Specification Versions (p. 44)
- Choosing an Application Server (p. 45)
- When to Choose an Application Server (p. 46)
- Defining the Requirements (p. 47)
- Evaluation Criteria (p. 48)
- Choice Process (p. 54)
- Top Mistakes in Choosing an Application Server (p. 54)
- The "Neat Technology" Trap (p. 55)
- When to Use Alternative Technologies to Supplement J2EE (p. 56)
- Portability Issues (p. 56)
- What does Portability Mean? (p. 57)
- A Pragmatic Approach to Portability (p. 58)
- Staging Environments and Release Management (p. 58)
- Building a Team (p. 60)
- Team Structure (p. 60)
- Choosing Development Tools (p. 63)
- Visual Modeling Tools (p. 64)
- IDEs (p. 64)
- Build Utilities (p. 64)
- Code Generators (p. 66)
- Version Control (p. 67)
- Identifying and Mitigating Risks (p. 67)
- Summary (p. 71)
- Chapter 3 Testing J2EE Applications (p. 73)
- What Can Testing Achieve? (p. 74)
- Definitions (p. 75)
- Testing Correctness (p. 76)
- The XP Approach to Testing (p. 76)
- Writing Test Cases (p. 78)
- Unit Testing (p. 78)
- Should Testing Strategy Affect How We Write Code? (p. 90)
- Integration and Acceptance Testing (p. 92)
- Testing Business Objects (p. 92)
- Testing Web Interfaces (p. 100)
- Design Implications (p. 105)
- Testing Performance and Scalability (p. 105)
- Load Testing EJBs and Other Business Objects (p. 106)
- Load Testing Web Interfaces (p. 107)
- Automating Tests (p. 107)
- Complementary Approaches to Testing (p. 108)
- Summary (p. 110)
- Chapter 4 Design Techniques and Coding Standards for J2EE Projects (p. 113)
- 00 Design Recommendations for J2EE Applications (p. 114)
- Achieving Loose Coupling with Interfaces (p. 115)
- Prefer Object Composition to Concrete Inheritance (p. 115)
- The Template Method Design Pattern (p. 117)
- The Strategy Design Pattern (p. 119)
- Using Callbacks to Achieve Extensibility (p. 120)
- The Observer Design Pattern (p. 122)
- Consider Consolidating Method Parameters (p. 124)
- Exception Handling--Checked or Unchecked Exceptions (p. 125)
- Using Reflection (p. 132)
- Using JavaBeans to Achieve Flexibility (p. 138)
- Avoid a Proliferation of Singletons by Using an Application Registry (p. 139)
- Refactoring (p. 142)
- Coding Standards (p. 142)
- Start from the Standard (p. 143)
- Allocation of Responsibilities (p. 145)
- Avoid Code Duplication (p. 146)
- Avoid Literal Constants (p. 147)
- Visibility and Scoping (p. 149)
- Using the final Keyword (p. 153)
- Implementing toString() Methods Useful for Diagnostics (p. 155)
- Defensive Coding Practices (p. 156)
- Prefer Arrays to Collections in Public Method Signatures (p. 157)
- Documenting Code (p. 158)
- Logging (p. 160)
- Why (and How) Not to Reinvent the Wheel (p. 166)
- Help! API Overload (p. 167)
- Using Frameworks (p. 167)
- Summary (p. 171)
- Chapter 5 Requirements for the Sample Application (p. 179)
- Overview (p. 180)
- User Populations (p. 180)
- Public Internet Users (p. 180)
- Box Office Users (p. 181)
- Administrators (p. 182)
- Assumptions (p. 182)
- Scope Limitations (p. 183)
- Delivery Schedule (p. 183)
- Internet User Interface (p. 183)
- Basic Workflow (p. 184)
- Error Handling (p. 185)
- Application Screens (p. 185)
- Box Office User Interface (p. 198)
- Non-Functional Requirements (p. 198)
- Hardware and Software Environment (p. 199)
- Summary (p. 200)
- Chapter 6 Applying J2EE Technologies (p. 203)
- When is a Distributed Architecture Appropriate? (p. 204)
- Distributed Applications and Scalability (p. 205)
- Distributed Applications and Reliability (p. 206)
- Scalable and Robust Architectures (p. 207)
- High-level Architecture for the Sample Application (p. 209)
- Deciding When to Use EJB (p. 209)
- Using EJB to Implement a Distributed Architecture (p. 209)
- Transaction Management (p. 210)
- EJB and Authorization (p. 213)
- EJB and Multi-threading (p. 214)
- Declarative Configuration Management (p. 214)
- The Downside of EJB (p. 214)
- EJBs in the Sample Application (p. 222)
- Deciding How to Use EJB (p. 223)
- What Should EJBs Do? (p. 223)
- When to Use Local or Remote Interfaces (p. 223)
- Using EJBs in the Sample Application (p. 227)
- Deciding when to use Asynchronous Calling with JMS (p. 228)
- Message-Oriented Middleware (MOM) and JMS (p. 228)
- Producing Messages (p. 228)
- Consuming Messages (p. 229)
- When to Use Asynchronous Calling (p. 232)
- JMS in the Sample Application (p. 234)
- Authentication and Authorization (p. 235)
- The Standard Security Infrastructure (p. 235)
- The Server Implementation (p. 237)
- Deciding When to Use XML (p. 238)
- Using XSLT in J2EE Applications (p. 238)
- "Deep" Use of XML (p. 239)
- Converting Between JavaBeans and XML (p. 241)
- J2EE and XML in the Future (p. 244)
- XML in the Sample Application (p. 245)
- Caching to Improve Performance (p. 245)
- Caching Options (p. 245)
- A Caching Strategy for the Sample Application (p. 247)
- Summary (p. 248)
- Chapter 7 Data Access in J2EE Applications (p. 251)
- Data Access Goals (p. 252)
- Business Logic and Persistence Logic (p. 252)
- Object-Driven and Database-Driven Modeling: A Philosophical Debate (p. 253)
- O/R Mapping and the "Impedance Mismatch" (p. 255)
- The Data Access Object (DAO) Pattern (p. 257)
- Working with Relational Databases (p. 259)
- Referential Integrity (p. 259)
- Stored Procedures, Triggers, and Views (p. 259)
- RDBMS Performance Issues (p. 262)
- Portability Versus Performance (p. 263)
- Exchanging Data in Distributed Applications (p. 265)
- The Value Object J2EE Pattern (p. 265)
- "Generic" Value Objects (p. 267)
- "Disconnected" Data Access Using JDBC Rowsets (p. 267)
- Common Data Access Issues (p. 268)
- Transaction Isolation (p. 268)
- Pessimistic and Optimistic Locking (p. 269)
- Primary Key Generation Strategies (p. 269)
- Where to Perform Data Access (p. 273)
- Data Access in the EJB Tier (p. 273)
- Data Access in the Middle Tier without Using EJB (p. 275)
- Data Access in the Web Tier (p. 276)
- Summary (p. 278)
- Data Modeling in the Sample Application (p. 278)
- Chapter 8 Data Access Using Entity Beans (p. 285)
- Entity Bean Concepts (p. 286)
- Definition (p. 287)
- How Should We Use Entity Beans? (p. 288)
- CMP Versus BMP (p. 292)
- Entity Beans in EJB 2.0 (p. 294)
- Local Interfaces (p. 294)
- Home Interface Business Methods (p. 295)
- EJB 2.0 CMP (p. 296)
- Entity Bean Caching (p. 300)
- Entity Bean Locking Strategies (p. 301)
- Read-only and "Read-mostly" Entities (p. 302)
- Transactional Entity Caching (p. 304)
- Entity Bean Performance (p. 305)
- Tool Support for Entity Beans (p. 306)
- Summary (p. 306)
- Chapter 9 Practical Data Access (p. 311)
- Data Access Technology Choices (p. 312)
- SQL-Based Technologies (p. 312)
- O/R Mapping Technologies (p. 315)
- Choosing a Data Access Strategy for the Sample Application (p. 319)
- JDBC Subtleties (p. 320)
- Correct Exception Handling (p. 320)
- Extracting Information from SQLExceptions (p. 322)
- The PreparedStatement Question (p. 323)
- A Generic JDBC Abstraction Framework (p. 324)
- Motivation (p. 325)
- Aims (p. 326)
- Exception Handling (p. 327)
- Two Levels of Abstraction (p. 333)
- A Framework to Control JDBC Workflow and Error Handling (p. 333)
- A Higher Level of Abstraction: Modeling RDBMS Operations as Java Objects (p. 342)
- JDBC Abstraction Summary (p. 351)
- Implementing the DAO Pattern In the Sample Application (p. 353)
- Summary (p. 360)
- Chapter 10 Session Beans (p. 363)
- Using Stateless Session Beans (p. 364)
- Benefits of Stateless Session Beans (p. 364)
- Stateless Session Beans and Internal State (p. 365)
- Implications of Stateless Session Bean Pooling (p. 365)
- Using Stateful Session Beans (p. 366)
- Why Not to Use Stateful Session Beans (p. 366)
- When to Use Stateful Session Beans (p. 370)
- Session Synchronization (p. 370)
- Protecting Stateful Session Beans from Concurrent Calls (p. 371)
- Patterns for Achieving Stateful Functionality with SLSBs (p. 371)
- Using a Stateful Session Bean as Controller (p. 373)
- J2EE Design Patterns Applicable to Session Beans (p. 373)
- The Session Facade Pattern in Distributed J2EE Applications (p. 374)
- The EJB Command Design Pattern (p. 374)
- Session Bean Implementation Issues (p. 379)
- Error Handling in EJBs (p. 379)
- Transaction Attributes for EJBs using CMT (p. 382)
- The Business Methods Interface "Pattern" (p. 386)
- Session Beans in the Sample Application (p. 389)
- Summary (p. 389)
- Chapter 11 Infrastructure and Application Implementation (p. 393)
- Infrastructure (p. 394)
- Goals of a Strong Infrastructure (p. 395)
- Using a Framework to Configure Application Components (p. 396)
- Managing API Complexity (p. 410)
- Implementing Business Logic (p. 428)
- Implementing the Sample Application (p. 428)
- Summary (p. 437)
- Chapter 12 Web-Tier MVC Design (p. 441)
- The Challenges of Web Development (p. 442)
- Lessons Learned in Java Web Development (p. 443)
- The Shortcomings of Servlet-only Solutions (p. 443)
- JSP: Promise and Temptation (p. 444)
- Striking a Balance (p. 446)
- Web-Tier Design Goals (p. 447)
- A Clean Web Tier (p. 447)
- A Thin Web Tier (p. 447)
- MVC Concepts and the Front Controller J2EE Pattern (p. 448)
- Concepts (p. 449)
- Pattern Variants (p. 453)
- Implementation Goals (p. 455)
- Web Application Frameworks (p. 456)
- Common Concepts (p. 456)
- Available Frameworks (p. 457)
- Integrating a Web Application Framework into Overall Application Architecture (p. 465)
- The Web Application Framework Used in the Sample Application (p. 467)
- Design Goals (p. 468)
- Basic MVC Control Flow (p. 469)
- Workflow Refinements (p. 479)
- Examples (p. 480)
- Web-Tier Session Management (p. 488)
- Session State Managed by the J2EE Server (p. 488)
- Session State Held in the Browser (p. 490)
- Processing User Input (p. 492)
- Data Binding and Displaying Input Errors for Resubmission (p. 492)
- Data Validation (p. 496)
- Implementing the Web Tier in the Sample Application (p. 506)
- Overview (p. 506)
- Handling a Seat Reservation Request (p. 508)
- Implementation Review (p. 511)
- Summary (p. 512)
- Chapter 13 Views in the Web Tier (p. 515)
- Decoupling Controllers and Views (p. 517)
- Constructing the View for the Reservations Page (p. 519)
- Information Presented and Required Formatting (p. 519)
- The Model Behind this View (p. 521)
- Model Principles (p. 524)
- JSP Views (p. 526)
- What We Want to Avoid (p. 527)
- How to Use JavaBeans in JSP Pages (p. 531)
- JSP Custom Tags (p. 532)
- Guidelines for JSP Use (p. 536)
- Looking Ahead: Implications of JSP 2.0 (p. 538)
- A JSP View for the Example (p. 538)
- JSP Summary (p. 543)
- Dedicated Template Languages (p. 544)
- Common Concepts (p. 544)
- WebMacro (p. 545)
- Velocity (p. 546)
- FreeMarker (p. 551)
- XSLT (p. 551)
- When to Use XSLT (p. 552)
- What Do We Want from XSL? (p. 553)
- How to Use XSLT in Views (p. 553)
- Implementing our Example Using a "Pure" XSLT Approach (p. 555)
- Alternative Approaches to Markup Generation (p. 561)
- HTML Generation Libraries (p. 562)
- XMLC (p. 563)
- Generating Binary Content (p. 571)
- Generating PDF with iText (p. 571)
- View Composition and Page Layout (p. 575)
- Summary (p. 579)
- Chapter 14 Packaging and Application Deployment (p. 583)
- Packaging (p. 584)
- Deployment Units (p. 584)
- Expanded Deployment Units (p. 585)
- Understanding J2EE Class Loading (p. 585)
- Packaging the Sample Application (p. 592)
- Application Deployment: Common Concepts (p. 596)
- Configuring a Server to Run the Application (p. 596)
- Writing Proprietary Deployment Descriptors for an Application (p. 598)
- Deploying an Application (p. 600)
- Deployment Parameters for the Sample Application (p. 600)
- Deploying the Sample Application on JBoss 3.0 (p. 601)
- Understanding the JBoss Directory Structure (p. 601)
- Configuring a JBoss Server to Run the Sample Application (p. 602)
- Writing JBoss Deployment Descriptors for the Sample Application (p. 605)
- Deploying the Application (p. 607)
- Summary (p. 608)
- Chapter 15 Performance Testing and Tuning an Application (p. 611)
- Strategic Issues and Definitions (p. 612)
- Performance and Scalability (p. 613)
- Setting Clear Goals for Performance and Scalability (p. 614)
- Design Versus Code Optimization (p. 614)
- Tools for Testing Performance and Throughput (p. 615)
- Preparing to Benchmark (p. 616)
- Web Test Tools (p. 617)
- Non-Web Testing Tools (p. 619)
- Locating Performance or Scalability Problems (p. 622)
- Testing in Layers (p. 623)
- Profiling Tools (p. 623)
- Addressing Performance or Scalability Problems (p. 630)
- Server Choice and Server Configuration (p. 630)
- Dispensing with Redundant Container Services (p. 631)
- Caching (p. 632)
- Code Optimization (p. 638)
- Case Study: The "Display Show" Page in the Sample Application (p. 643)
- Performance in Distributed Applications (p. 653)
- The Overhead of Remote Method Invocation (RMI) (p. 653)
- Minimizing Remote Calls (p. 655)
- Moving Data Efficiently (p. 658)
- Collocating Components in the Same JVM (p. 663)
- Web-Tier Performance Issues (p. 663)
- View Performance (p. 663)
- Web Caching Using HTTP Capabilities (p. 666)
- Edged Side Caching and ESI (p. 671)
- The Primary Causes of Performance and Scalability Problems in J2EE Applications (p. 672)
- Summary (p. 673)
- Chapter 16 Conclusion: Making J2EE Work for You (p. 675)
- Appendix A Implementing View Technologies (p. 683)
- Decoupling Controllers from View Technologies Using a View Interface (p. 684)
- View Implementations (p. 686)
- JSP (p. 688)
- Configuring the JSTL (p. 688)
- The InternalResourceView View Implementation (p. 689)
- Defining JSP Views for Use in an Application (p. 691)
- Velocity (p. 691)
- Installing and Configuring Velocity (p. 691)
- Implementing the View Interface for Velocity (p. 692)
- Defining Velocity Views for Use in an Application (p. 695)
- XSLT (p. 696)
- Installing Domify (p. 696)
- Implementing the View Interface for XSLT (p. 697)
- Defining XSLT Views for Use in an Application (p. 701)
- XMLC (p. 703)
- Installing and Configuring XMLC (p. 703)
- Defining XMLC Views for Use in an Application (p. 705)
- Generating PDF with IText (p. 705)
- Installing iText (p. 705)
- Implementing the View Interface for PDF Generation with iText (p. 705)
- Defining PDF Views for Use in an Application (p. 707)
- Additional Views (p. 707)
- Custom Views (p. 708)
- Index (p. 711)