Muutke küpsiste eelistusi

E-raamat: Creating Components: Object Oriented, Concurrent, and Distributed Computing in Java [Taylor & Francis e-raamat]

(University of Maryland, College Park, USA)
  • Formaat: 448 pages, 177 Tables, black and white; 39 Illustrations, black and white
  • Ilmumisaeg: 28-Jul-2003
  • Kirjastus: Auerbach
  • ISBN-13: 9780429208652
Teised raamatud teemal:
  • Taylor & Francis e-raamat
  • Hind: 244,66 €*
  • * hind, mis tagab piiramatu üheaegsete kasutajate arvuga ligipääsu piiramatuks ajaks
  • Tavahind: 349,51 €
  • Säästad 30%
  • Formaat: 448 pages, 177 Tables, black and white; 39 Illustrations, black and white
  • Ilmumisaeg: 28-Jul-2003
  • Kirjastus: Auerbach
  • ISBN-13: 9780429208652
Teised raamatud teemal:
A textbook for courses in concurrent and object-oriented programming in Java at the advanced undergraduate or first-year graduate level. Students are expected to be familiar with procedural and GUI programming. Distributed in the US by CRC. Annotation (c) Book News, Inc., Portland, OR (booknews.com)

Concurrency is a powerful technique for developing efficient and lightning- fast software. For instance, concurrency can be used in common applications such as online order processing to speed processing and ensure transaction reliability. However, mastering concurrency is one of the greatest challenges for both new and veteran programmers. Software developers with all levels of experience can refer to Creating Components: Object Oriented, Concurrent, and Distributed Computing in Java to better understand how concurrency works, more effectively deploy it in program components, and reuse these components to improve program design, quality, and performance.

This text introduces concurrent and component programming to students, engineers, and programmers who are familiar with Java and procedural and GUI programming. It helps them to understand and apply concurrency in Java component programming, while exploring distributed program implementation, Java threads, objects, interfaces, exceptions, component reuse, and system design and management.

By providing the fundamental concepts of object-oriented components and offering templates for distributed program components, this valuable resource reveals how programmers can apply concurrency and components to solve complex problems.

Programmers can refer to Creating Components: Object Oriented, Concurrent, and Distributed Computing in Java to better understand how concurrency and component reuse affect program design, deployment, performance, and quality. This text introduces component and concurrent programming to students and programmers familiar with Java and procedural and GUI programming. It explains how to apply concurrency to Java components, while exploring distributed program implementation, Java threads, objects, interfaces, exceptions, component reuse, and system design and management. This valuable resource reveals how programmers and software engineers can apply components and concurrency to solve complex problems and improve program performance and quality.
Introduction to Concurrent Programming and Components
1(21)
Introduction
1(1)
Chapter Goals
2(1)
What Is Concurrent Programming?
2(10)
Why Do Concurrent Programming?
3(3)
A Definition of Concurrent Programming
6(1)
Asynchronous Activities
7(2)
Synchronization of Asynchronous Activities
9(2)
Concurrent Programming
11(1)
Components
12(2)
Types of Concurrent Programming
14(3)
Conclusion
17(1)
Further Reading
17(1)
Problems
18(3)
Threads and Program Contexts
21(46)
Introduction
21(1)
Chapter Goals
22(1)
Writing Threads in Java
22(5)
Simple Procedural and Concurrent Programs
22(2)
Extending Class Thread
24(1)
Programs with Multiple Threads
24(3)
A Simple Execution Model
27(15)
A Simple Memory Model (SMM)
28(1)
Threads, Processes, and Web Servers
29(3)
Program Execution for a Procedural Program
32(2)
Program Execution and Context Switching with Threads
34(5)
Sleeping and Blocking
39(1)
Nondeterminism and Concurrency
40(2)
Program Safety
42(13)
Race Conditions
42(1)
Race Conditions in Programs
43(2)
Locking Objects
45(3)
Proving Exhibit 20 (Program2.7b) Is Correct
48(1)
The Synchronized Modifier
49(2)
The Wait and Notify/NotifyAll Methods
51(2)
Semantics of a Wait Call
53(2)
Deadlock
55(6)
Coordinating Threads
55(1)
Deadlock
55(6)
Conclusion
61(1)
Further Reading
61(1)
Problems
62(5)
Designing and Implementing Concurrent Programs with State Diagrams
67(28)
Introduction
67(1)
Chapter Goals
67(1)
Background
68(1)
Steps to Create a Concurrent Program
69(1)
The Producer/Consumer Problem
70(9)
Problem Description
70(1)
Write a Short Description of the Problem
70(1)
Define the Objects and Relationships
70(1)
Design and Implement the Active Objects
71(1)
Design the Passive Object (Components)
71(3)
Implementing Passive Objects
74(2)
Implementing the Controlling Object
76(3)
Why Passive Objects Are Components
79(1)
Gas Station Simulation Problem
80(6)
Problem Statement
80(1)
Gas Station Simulation
80(6)
Conclusion
86(1)
Further Reading
86(1)
Problems
87(8)
Identifiers, Variables, Objects, and Collection Classes
95(34)
Introduction
95(1)
Chapter Goals
96(1)
Identifiers and Variables
96(3)
Java Identifiers and Variables
99(1)
Primitives
99(1)
Objects
100(15)
Using Runtime Data Type Tags Results in Safer Programs
102(4)
Memory Allocation is Simpler and Safer
106(4)
Serialization
110(1)
The Serializable Interface
110(1)
Serializing Data
111(1)
Writing External Data
112(2)
Performance Considerations
114(1)
Collection Classes in Java
115(4)
Arrays in Java
115(1)
Arrays of Objects
116(2)
Collection Classes
118(1)
Further Reading
119(2)
Problems
121(8)
Programming to an Interface
129(24)
Introduction
129(1)
Chapter Goals
130(1)
Reuse with Interfaces
130(2)
Programming to a Promise
132(6)
Programming to a Fact
132(2)
Implementing and Using Promises
134(3)
Some Notes on Interfaces
137(1)
Dynamic Polymorphism
138(1)
Using Multiple Interfaces
139(2)
Implementing the SortedPrintTable
141(2)
Using the SortedPrintTable
143(2)
Expression Trees
145(3)
Further Reading
148(1)
Problems
148(5)
Exceptions in Java
153(28)
Introduction
153(1)
Chapter Goals
154(1)
How to Handle Errors Incorrectly
154(7)
Handle an Error When It Occurs
155(4)
Use Return Values
159(2)
Java Exception Handling
161(6)
Try-Catch Blocks
161(4)
Exception Propagation: Unwinding the Stack
165(2)
Finally Blocks
167(1)
Checked and Unchecked Exceptions
167(5)
Exception Hierarchy
169(2)
Checked and Unchecked Exceptions
171(1)
Writing Exceptions
172(3)
Writing the Exception Class
173(1)
Advertise the Exception
174(1)
Throw the Exception
174(1)
Further Reading
175(1)
Problems
176(5)
Implementing an Animator Component Using the Java Event Model
181(50)
Introduction
181(1)
Chapter Goals
182(1)
A Very Simple Animator
182(7)
The Path Class
184(2)
A Simple Animator
186(3)
Adding a Speed Control to the Animator
189(4)
Implementing a Generic Animator
193(17)
The Basic Design of the Animator
197(4)
Extending the Class Vector
201(3)
How the Repaint Events Are Generated
204(1)
Adding the Component Controls
205(1)
Minimalist Approach to Design
206(2)
Race Condition in the Generic Animator
208(2)
Implementing the Animator Using the Java Event Model
210(5)
Java Event Model
210(3)
Implementing the Corrected Animator Component
213(2)
Event Multicaster
215(7)
Further Reading
222(5)
Problems
227(4)
Cooperative Synchronization
231(30)
Introduction
231(1)
Chapter Goals
232(1)
Cooperative and Competitive Synchronization
232(3)
Coordinating Threads Using Long Sleep Times
235(2)
Using Wait and Notify to Coordinate Threads
237(3)
A Solution with a Hidden Race Condition
240(3)
Solving the Race Condition
243(5)
Notification Objects
248(3)
What Are Notification Objects?
248(1)
Implementing a Notifying Object
248(3)
Animating the Gas Station Problem
251(8)
Further Reading
259(1)
Problems
259(2)
Combining Concurrent Techniques
261(42)
Introduction
261(1)
Chapter Goals
262(1)
A First-In/First-Out Binary Semaphore
263(4)
Readers/Writers Problem
267(10)
Confinement
274(2)
Notification Objects
276(1)
An Improved Gas Station Simulation
277(10)
Adapters
283(4)
Improving the Animator
287(13)
Decoupling the Animator from the Control Panel
288(4)
Correcting the Repaint Problem
292(6)
Designing the Controller
298(2)
Conclusion
300(1)
Further Reading
301(1)
Problems
301(2)
Organizing the Problem for Reuse: Reuse of Utility Classes
303(30)
Introduction
303(1)
Chapter Goals
304(1)
Types of Reuse
304(3)
Finding Commonality in Code
307(1)
Reuse by Copy
307(3)
Procedural Reuse in Java
310(6)
Classification: Reuse by Extension
316(4)
Composition: Reuse by Delegation
320(5)
Defining the Java Event Model by Extending a Vector
325(4)
Using Cohesion and Coupling to Evaluate Designs
329(2)
Conclusion
331(1)
Further Reading
332(1)
Problems
332(1)
Object-Oriented Design
333(34)
Introduction
333(1)
Chapter Goals
334(1)
Organizing Objects
334(13)
Composition: ``Has-a'' Relationships
335(3)
Aggregation
338(1)
Association
339(1)
Using Aggregation and Association
340(1)
Classification: ``Is-a'' Relationships
341(1)
Abstract Classes versus Interfaces
341(3)
Using Classification to Mimic Composition
344(3)
Choosing Composition or Classification
347(10)
Check to Ensure That the Relationship Is an ``Is-a'' Relationship
347(1)
Be Sure the Object Type Is Not Mutable
348(3)
Check If the Type Simply Represents a Role
351(1)
Check for Subclasses with Multiple Roles
352(2)
Check for Compatibility with the Program Implementation
354(3)
Conclusion
357(3)
Further Reading
360(1)
Problems
360(7)
Program Management in Java
367(18)
Introduction
367(1)
Chapter Goals
368(1)
What Is Program Management?
368(2)
Implementation Attributes Not Defined in Java
370(3)
Naming Conventions
370(1)
Indenting Style
371(1)
Accessor Methods
372(1)
Interactive Development Environment (IDE)
373(1)
Source Code Control
373(1)
Implementation Attributes Defined in Java
373(6)
Source File Names
373(2)
Definition Files
375(1)
Stateless Methods
375(1)
Final Classes and Methods
376(1)
Inner Classes
376(2)
``Making'' a Program
378(1)
Packages
379(4)
What Are Packages?
379(1)
Scope Resolution Modifiers
380(1)
Distributing Source Programs
380(3)
Further Reading
383(2)
Distributed Programming Using RMI
385(24)
Introduction
385(1)
Chapter Goals
386(1)
A Brief History of Distributed Computing
386(1)
Overview of RMI
387(3)
Implementing a Simple Program Using RMI
390(1)
Implement the RMI Interface
390(6)
Implement the RMI Server Class
391(1)
Implement the RMI Client Class
392(2)
Creating and Distributing the Skeleton and Stub Files
394(1)
Distributing and Running the Program
395(1)
Migrating and Non-Migrating Objects
396(4)
Chat Program
400(6)
The Chat Server
400(3)
The Chat Client
403(3)
Conclusions
406(1)
Further Reading
406(1)
Problems
406(3)
Appendix A Key Words 409(6)
References 415(4)
Index 419


Charles W. Kann