Java Enterprise Best Practices 1st Edition by O Reilly Java – Ebook PDF Instant Download/Delivery. 0596003846, 9780596003845
Full download Java Enterprise Best Practices 1st Edition after payment
Product details:
ISBN 10: 0596003846
ISBN 13: 9780596003845
Author: O Reilly Java
Java developers typically go through four ‘stages’ in mastering Java. In the first stage, they learn the language itself. In the second stage, they study the APIs. In the third stage, they become proficient in the environment. It is in the fourth stage –‘the expert stage’– where things really get interesting, and Java Enterprise Best Practices is the tangible compendium of experience that developers need to breeze through this fourth and final stage of Enterprise Java mastery.Crammed with tips and tricks, Java Enterprise Best Practices distills years of solid experience from eleven experts in the J2EE environment into a practical, to-the-point guide to J2EE.Java Enterprise Best Practices gives developers the unvarnished, expert-tested advice that the man pages don’t provide–what areas of the APIs should be used frequently (and which are better avoided); elegant solutions to problems you face that other developers have already discovered; what things you should always do, what things you should consider doing, and what things you should never do–even if the documentation says it’s ok.Until Java Enterprise Best Practices, Java developers in the fourth stage of mastery relied on the advice of a loose-knit community of fellow developers, time-consuming online searches for examples or suggestions for the immediate problem they faced, and tedious trial-and-error. But Java has grown to include a huge number of APIs, classes, and methods. Now it is simply too large for even the most intrepid developer to know it all. The need for a written compendium of J2EE Best Practices has never been greater.Java Enterprise Best Practices focuses on the Java 2 Enterprise Edition (J2EE) APIs. The J2EE APIs include such alphabet soup acronyms as EJB, JDBC, RMI, XML, and JMX.
Java Enterprise Best Practices 1st Table of contents:
Acknowledgments
Introduction to Java Enterprise Best Practices
How Does a Best Practice Come About?
Can Best Practices Be Arguable?
What’s in This Book?
About the Practices Themselves
Enterprise Java Programming Resources Online
EJB Best Practices
Design
Know When to Use EJBs
Use Standard Design Architecture
Use CMP Entity Beans
Use Design Patterns
Session façade
Value objects
Implementation
Use Local Interfaces for Entity Beans
Use Business Interfaces
Handle Exceptions in EJB Code Correctly
Know When to Use Compound Primary Keys
Know How to Handle Large Queries
Use Dirty Flags in ejbStore
Use Lazy Loading
Cache JNDI Lookup Objects
Use Business Delegates for Clients
Write Dual CMP/BMP Entity Beans
Create Domain Object Factories
Deployment and Packaging
Create a Build Environment
Separate Components and Create Shared Libraries
Write Testing and Diagnostics Code
Servlet Best Practices
Working Effectively with Servlets
Choose the Right Servlet Framework
Tips for selecting a framework
High-profile frameworks
Use Pre-Encoded Characters
Load Configuration Files from the Classpath
Think of Sessions as a Local Cache
Architecture of a shopping cart
When to use sessions
Don’t Use SingleThreadModel
Caching with Servlets
Pregenerate Content Offline and Cache Like Mad
Pregeneration tools
Cache on the client
Cache at the proxy
Cache on the server
. . . Or don’t cache at all
Other Servlet Tips
Use Content-Disposition to Send a File
Hire a UI Designer
JDBC Best Practices
Configuration
Avoid Type 1 and Type 3 Drivers
When to use a Type 1 or Type 3 driver
Choosing between Type 2 and Type 4 drivers
Use DataSource Whenever Possible
Leverage Proprietary Connection Properties
Pool Database Connections
Design
Separate Application, Persistence, and JDBC Logic
Avoid Long-Lived Transactions
Do Not Rely on Built-in Key Generation
Don’t Be Afraid to Use Optimistic Concurrency
Code
Use PreparedStatement
Leverage PreparedStatement Pooling
Question Using Nonstandard SQL
Delay Access to Metadata
Reference Columns by Number
Navigate a ResultSet Forward Only
Close Statements and Result Sets
Thread JDBC Code in Swing Applications
Minimize Database Calls and Perform Lazy-Loading
Cache Lookup Tables
Use wasNull( ) Checks
General Database
Always Optimize SQL Before Other Optimizations
Do Not Store Binary Data in Database
Normalize First, Denormalize Later
Do Not Use Primary Keys with Real-World Meaning
XML Best Practices
XML Authoring
Use Entity References
Use Parameter Entities
Use Elements Sparingly, Attributes Excessively
SAX
Use the InputSource Class Correctly
Understand How SAX Handles Entity Resolution
Consider Using Partial Validation
DOM
Bootstrap DOM Correctly
DOM Levels 1 and 2
DOM Level 3
Don’t Be Afraid to Use Helper Classes
Avoid Class Comparisons
JAXP
Don’t Be Afraid to Use Format Transformations
RMI Best Practices
Marshalling and Unmarshalling Objects
Use Value Objects to Separate Marshalling Code from Your Application Logic
Use Flat Hierarchies When Designing Value Objects
Be Aware of How Externalization and Serialization Differ with Respect to Superclasses
Don’t Marshal Inner Classes
Always Explicitly Initialize Transient Fields Inside Marshalling Methods
Always Set the serialVersionUID
Set Version Numbers Independently of serialVersionUID
Never Use Default Serialization
Always Unit-Test Marshalling Code
Profile Before Customizing
Consider Using Byte Arrays to Store Marshalling Results
Making Applications More Robust
Include Logic for Retrying Remote Calls
Associate Unique Identifiers with Requests
Distinguish Between Network Lag Time and Server Load
Wrap RMI Calls in Command Objects
Consider Using a Naming Service
Don’t Throw RemoteException in Your Server Code
Distinguish Between Different Types of Remote Exceptions
Use the Unreferenced Interface to Clean Up Allocated Server State
Always Configure the Distributed Garbage Collector
Improving Application Performance
Cache Stubs to Remote Servers
Consider Caching Return Values from Distributed Calls
Use Batch Methods to Group Related Method Calls
Use a Server-Side Proxy to Manage Transactions Across Servers
Use Asynchronous Messaging Wherever Possible
Further Reading
Java Management Extensions
Naming
Name MBean Domains Just Like Packages
Use the Key Property List to Help Avoid Collisions
Instrumentation
Avoid Overinstrumentation
Monitoring (attributes)
Controlling (operations)
Events (notifications)
Implement MBeanRegistration
Use Dynamic MBeans
Each MBean feature can have a description
You, as the MBean developer, have control over the creation of the metadata . . .
The management interface can change dynamically
There are fewer source files to maintain
Use a Dynamic MBean Façade Pattern
Attributes
Operations
Notifications
DynamicMBean implementation
Externalize the Description of an MBean’s Management Interface
Use createMBean( ) to Create MBeans
Enterprise Internationalization
Internationalization and Localization
The Model-View-Controller Paradigm
Presentation Layer
Do Not Rely on Browser Settings for Storing Localization Preferences
Use JSP Custom Tags or the JSTL for Locale-Specific Data Presentation
Take a Portal-Based Approach to JSP Development
Customize Localization and Data Manipulation Using XML and XSTL
Business Object Layer
Design Internationalization-Ready Business Objects
Create a Simple Interface for Supporting Localization in Business Objects
Take the Locale into Consideration in the Application Controller
Data Access Layer
Configure Your Database for Internationalization
Use Standard Java Classes (Instead of Database Constructs) for Collation and for Sorting Database…
Design Your Database Schema to Be Internationalization-Ready
JSP Best Practices
Appropriate Usage of JSP in an Enterprise Application
Favor Using JSP as the View Only
Consider Using Separate JSP Pages for Each Role
Avoid Using Scripting Elements
Page Design
Put Shared Page Elements in Separate Files
Use a Layout Page to Merge Shared Parts and Main Content
Choose an Appropriate Include Mechanism
Consider Using a Shared Configuration File
Consider Using Filters to Simplify URLs
Consider Internationalization from the Start
Enable URL Rewriting
Caching
Cache Data Used in Pages
Consider Enabling Client-Side Caching for Semistatic Pages
Prevent Client-Side Caching for Dynamic Pages
Error Handling
Use Common Error Pages for the Whole Application
Capture Enough Information to Fine-Tune the Application
Consider Using to Handle Recoverable Errors
Custom Component Development
Choosing Between Beans and Custom Actions
Consider Using Immutable Objects
Consider Using a Reset Property When Capturing Input
Always Include the Element in the TLD
Design Tag Handler Classes for Instance Pooling
Consider Adopting the JSTL Conventions
Leverage the JSTL Classes and Interfaces
Consider Developing a Tag Library Validator
Deployment
Consider Precompilation
JavaMail Best Practices
Understanding Enterprise Email
Sending Email
Use Dynamic Content Strategies
Use XML for Content
Use Templates for Repeated Content
Accommodate Various Client Capabilities
Use Multipart/Related for Rich Messages
Use Related Alternatives
Email for System Integration
Consider Email as an Enterprise Bridge
Retrieve Incoming Mail Efficiently
Use Inbox Listeners Carefully
Choose an Effective Delivery Mechanism
Beware Email in Transactions
Cut and Run
Use an Email Management Framework
Incorporate Security
Use Secure Protocols
Use JAF for Bridging Content
Performance Optimization
Use Fetch Profiles
Manage Attachments in Memory
Use JavaMail to Search
Enterprise Performance Tuning Best Practices
Performance Planning
Perform Initial Performance Planning
Set Performance Targets
The Performance Environment
Use a Client Simulation Tool
Don’t Use JVM Profiling Tools
Use Monitoring Tools
Use Test Systems
Proactive Performance Management in Production
Plan for Performance Factors
Efficient Distributed Computing Architecture
Know Distributed Computing Restrictions
Tuning Procedure
User Perceptions
Tuning Techniques
Choose the Right Data Structure
Transactions
Miscellaneous Best Practices
People also search for Java Enterprise Best Practices 1st:
java enterprise best practices.doc
java enterprise best practices
java enterprise best practices pdf
java docs best practices
java documentation best practices