| Introduction | 1 |
| J2EE Myths | 2 |
| How is this Book Different? | 5 |
| My Approach | 6 |
| Who this Book is for | 7 |
| Aims of this Book | 7 |
| What this Book Covers | 7 |
| Assumed Knowledge | 8 |
| Recommended Reading | 9 |
| What You Need to Use this Book | 9 |
Chapter 1 | J2EE Architectures | 15 |
| Goals of an Enterprise Architecture | 16 |
| Deciding Whether to Use a Distributed Architecture | 18 |
| New Considerations in J2EE Design | 19 |
| When to Use EJB | 20 |
| Implications ofUsing EJB | 20 |
| Questionable Arguments for Using EJB | 22 |
| Compelling Arguments for Using EJB | 22 |
| Arguments for Using EJB to Consider on a Case-by-Case Basis | 23 |
| Accessing Data | 24 |
| J2EE Data Access Shibboleths | 24 |
| State Management | 26 |
| J2EE Architectures | 26 |
| Common Concepts | 27 |
| Non-distributed Architectures | 28 |
| Distributed Architectures | 32 |
| Web Tier Design | 36 |
| The Model View Controller (MVC) Architectural Pattern | 36 |
| Connectivity Between the Web Tier and Business Objects | 38 |
| Designing Applications for Portability | 38 |
| Summary | 40 |
Chapter 2 | J2EE Projects: Choices and Risks | 43 |
| Developing a Policy on Specification Versions | 44 |
| Choosing an Application Server | 45 |
| When to Choose an Application Server | 46 |
| Defining the Requirements | 47 |
| Evaluation Criteria | 48 |
| Choice Process | 54 |
| Top Mistakes in Choosing an Application Server | 54 |
| The "Neat Technology" Trap | 55 |
| When to Use Alternative Technologies to Supplement J2EE | 56 |
| Portability Issues | 56 |
| What does Portability Mean? | 57 |
| A Pragmatic Approach to Portability | 58 |
| Staging Environments and Release Management | 58 |
| Building a Team | 60 |
| Team Structure | 60 |
| Choosing Development Tools | 63 |
| Visual Modeling Tools | 64 |
| IDEs | 64 |
| Build Utilities | 64 |
| Code Generators | 66 |
| Version Control | 67 |
| Identifying and Mitigating Risks | 67 |
| Summary | 71 |
Chapter 3 | Testing J2EE Applications | 73 |
| What Can Testing Achieve? | 74 |
| Definitions | 75 |
| Testing Correctness | 76 |
| The XP Approach to Testing | 76 |
| Writing Test Cases | 78 |
| Unit Testing | 78 |
| Should Testing Strategy Affect How We Write Code? | 90 |
| Integration and Acceptance Testing | 92 |
| Testing Business Objects | 92 |
| Testing Web Interfaces | 100 |
| Design Implications | 105 |
| Testing Performance and Scalability | 105 |
| Load Testing EJBs and Other Business Objects | 106 |
| Load Testing Web Interfaces | 107 |
| Automating Tests | 107 |
| Complementary Approaches to Testing | 108 |
| Summary | 110 |
Chapter 4 | Design Techniques and Coding Standards for J2EE Projects | 113 |
| 00 Design Recommendations for J2EE Applications | 114 |
| Achieving Loose Coupling with Interfaces | 115 |
| Prefer Object Composition to Concrete Inheritance | 115 |
| The Template Method Design Pattern | 117 |
| The Strategy Design Pattern | 119 |
| Using Callbacks to Achieve Extensibility | 120 |
| The Observer Design Pattern | 122 |
| Consider Consolidating Method Parameters | 124 |
| Exception Handling--Checked or Unchecked Exceptions | 125 |
| Using Reflection | 132 |
| Using JavaBeans to Achieve Flexibility | 138 |
| Avoid a Proliferation of Singletons by Using an Application Registry | 139 |
| Refactoring | 142 |
| Coding Standards | 142 |
| Start from the Standard | 143 |
| Allocation of Responsibilities | 145 |
| Avoid Code Duplication | 146 |
| Avoid Literal Constants | 147 |
| Visibility and Scoping | 149 |
| Using the final Keyword | 153 |
| Implementing toString() Methods Useful for Diagnostics | 155 |
| Defensive Coding Practices | 156 |
| Prefer Arrays to Collections in Public Method Signatures | 157 |
| Documenting Code | 158 |
| Logging | 160 |
| Why (and How) Not to Reinvent the Wheel | 166 |
| Help! API Overload | 167 |
| Using Frameworks | 167 |
| Summary | 171 |
Chapter 5 | Requirements for the Sample Application | 179 |
| Overview | 180 |
| User Populations | 180 |
| Public Internet Users | 180 |
| Box Office Users | 181 |
| Administrators | 182 |
| Assumptions | 182 |
| Scope Limitations | 183 |
| Delivery Schedule | 183 |
| Internet User Interface | 183 |
| Basic Workflow | 184 |
| Error Handling | 185 |
| Application Screens | 185 |
| Box Office User Interface | 198 |
| Non-Functional Requirements | 198 |
| Hardware and Software Environment | 199 |
| Summary | 200 |
Chapter 6 | Applying J2EE Technologies | 203 |
| When is a Distributed Architecture Appropriate? | 204 |
| Distributed Applications and Scalability | 205 |
| Distributed Applications and Reliability | 206 |
| Scalable and Robust Architectures | 207 |
| High-level Architecture for the Sample Application | 209 |
| Deciding When to Use EJB | 209 |
| Using EJB to Implement a Distributed Architecture | 209 |
| Transaction Management | 210 |
| EJB and Authorization | 213 |
| EJB and Multi-threading | 214 |
| Declarative Configuration Management | 214 |
| The Downside of EJB | 214 |
| EJBs in the Sample Application | 222 |
| Deciding How to Use EJB | 223 |
| What Should EJBs Do? | 223 |
| When to Use Local or Remote Interfaces | 223 |
| Using EJBs in the Sample Application | 227 |
| Deciding when to use Asynchronous Calling with JMS | 228 |
| Message-Oriented Middleware (MOM) and JMS | 228 |
| Producing Messages | 228 |
| Consuming Messages | 229 |
| When to Use Asynchronous Calling | 232 |
| JMS in the Sample Application | 234 |
| Authentication and Authorization | 235 |
| The Standard Security Infrastructure | 235 |
| The Server Implementation | 237 |
| Deciding When to Use XML | 238 |
| Using XSLT in J2EE Applications | 238 |
| "Deep" Use of XML | 239 |
| Converting Between JavaBeans and XML | 241 |
| J2EE and XML in the Future | 244 |
| XML in the Sample Application | 245 |
| Caching to Improve Performance | 245 |
| Caching Options | 245 |
| A Caching Strategy for the Sample Application | 247 |
| Summary | 248 |
Chapter 7 | Data Access in J2EE Applications | 251 |
| Data Access Goals | 252 |
| Business Logic and Persistence Logic | 252 |
| Object-Driven and Database-Driven Modeling: A Philosophical Debate | 253 |
| O/R Mapping and the "Impedance Mismatch" | 255 |
| The Data Access Object (DAO) Pattern | 257 |
| Working with Relational Databases | 259 |
| Referential Integrity | 259 |
| Stored Procedures, Triggers, and Views | 259 |
| RDBMS Performance Issues | 262 |
| Portability Versus Performance | 263 |
| Exchanging Data in Distributed Applications | 265 |
| The Value Object J2EE Pattern | 265 |
| "Generic" Value Objects | 267 |
| "Disconnected" Data Access Using JDBC Rowsets | 267 |
| Common Data Access Issues | 268 |
| Transaction Isolation | 268 |
| Pessimistic and Optimistic Locking | 269 |
| Primary Key Generation Strategies | 269 |
| Where to Perform Data Access | 273 |
| Data Access in the EJB Tier | 273 |
| Data Access in the Middle Tier without Using EJB | 275 |
| Data Access in the Web Tier | 276 |
| Summary | 278 |
| Data Modeling in the Sample Application | 278 |
Chapter 8 | Data Access Using Entity Beans | 285 |
| Entity Bean Concepts | 286 |
| Definition | 287 |
| How Should We Use Entity Beans? | 288 |
| CMP Versus BMP | 292 |
| Entity Beans in EJB 2.0 | 294 |
| Local Interfaces | 294 |
| Home Interface Business Methods | 295 |
| EJB 2.0 CMP | 296 |
| Entity Bean Caching | 300 |
| Entity Bean Locking Strategies | 301 |
| Read-only and "Read-mostly" Entities | 302 |
| Transactional Entity Caching | 304 |
| Entity Bean Performance | 305 |
| Tool Support for Entity Beans | 306 |
| Summary | 306 |
Chapter 9 | Practical Data Access | 311 |
| Data Access Technology Choices | 312 |
| SQL-Based Technologies | 312 |
| O/R Mapping Technologies | 315 |
| Choosing a Data Access Strategy for the Sample Application | 319 |
| JDBC Subtleties | 320 |
| Correct Exception Handling | 320 |
| Extracting Information from SQLExceptions | 322 |
| The PreparedStatement Question | 323 |
| A Generic JDBC Abstraction Framework | 324 |
| Motivation | 325 |
| Aims | 326 |
| Exception Handling | 327 |
| Two Levels of Abstraction | 333 |
| A Framework to Control JDBC Workflow and Error Handling | 333 |
| A Higher Level of Abstraction: Modeling RDBMS Operations as Java Objects | 342 |
| JDBC Abstraction Summary | 351 |
| Implementing the DAO Pattern In the Sample Application | 353 |
| Summary | 360 |
Chapter 10 | Session Beans | 363 |
| Using Stateless Session Beans | 364 |
| Benefits of Stateless Session Beans | 364 |
| Stateless Session Beans and Internal State | 365 |
| Implications of Stateless Session Bean Pooling | 365 |
| Using Stateful Session Beans | 366 |
| Why Not to Use Stateful Session Beans | 366 |
| When to Use Stateful Session Beans | 370 |
| Session Synchronization | 370 |
| Protecting Stateful Session Beans from Concurrent Calls | 371 |
| Patterns for Achieving Stateful Functionality with SLSBs | 371 |
| Using a Stateful Session Bean as Controller | 373 |
| J2EE Design Patterns Applicable to Session Beans | 373 |
| The Session Facade Pattern in Distributed J2EE Applications | 374 |
| The EJB Command Design Pattern | 374 |
| Session Bean Implementation Issues | 379 |
| Error Handling in EJBs | 379 |
| Transaction Attributes for EJBs using CMT | 382 |
| The Business Methods Interface "Pattern" | 386 |
| Session Beans in the Sample Application | 389 |
| Summary | 389 |
Chapter 11 | Infrast
Login
| Complaints
| Blog
| Games
| Digital Media
| Souls
| Obituary
| Contact Us
| FAQ
CAN'T FIND WHAT YOU'RE LOOKING FOR? CLICK HERE!!!
You must be logged in to add to Wishlist
This item is in your Wish List
This item is in your Collection
This Item is in Your
Inventory
You must be logged in to review the products
Add
Expert One-on-One J2EE Design and Development, 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, Expert One-on-One J2EE Design and Development to the inventory that you are selling on WonderClub
Add
Expert One-on-One J2EE Design and Development, 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, Expert One-on-One J2EE Design and Development to your collection on WonderClub
| |