Suchen und Finden
Mehr zum Inhalt
Beginning Java and Flex - Migrating Java, Spring, Hibernate and Maven Developers to Adobe Flex
Contents at a Glance
5
Table of contents
6
About the Author
13
About the Technical Reviewer
14
Acknowledgments
15
Introduction
16
Who This Book Is For
16
The Book
17
CHAPTER 1 Developing with Java and Flex
19
Why Java?
19
Why ActionScript?
20
Why Java and ActionScript Together?
20
Introduction to Spring
22
Programming Using Lightweight Frameworks
21
Benefits of Lightweight Frameworks
21
Introduction to Hibernate
26
The Benefits of Hibernate
27
Introduction to BlazeDS
28
BlazeDS vs. Adobe LiveCycle Data Services
29
Introduction to Flex
31
Flex vs. Ajax
31
Flex, Flash Cs3, and ActionScript
32
ActionScript vs. MXML
33
Introduction to UML
33
Basic Diagrams
33
Summary
36
CHAPTER 2 Presenting the SampleApplication
38
Architecture
38
The Presentation Layer
42
The Service Layer
42
The Data Access Layer
44
The Domain Model
45
Summary
47
CHAPTER 3 Configuring YourDevelopment Environment
48
The Source Code Editor: Eclipse IDE
48
Eclipse Projects
49
Eclipse Plug-ins
52
Installing Eclipse
53
Configure Eclipse for Flex and J2EE
54
Version Control: Subversion
57
Subversion Installation
59
Basic SVN Project Structure
59
Using SVN with the Command-Line Client
59
Installing Subclipse
65
The Database Tools: MySQL
66
Install MySQL on Windows
67
Installing MySQL on a Mac
69
Adding the MySQL GUI Tools
70
Basic MySQL Operation from the Command Line
71
Basic MySQL Operations Using MySQL Query Browser
74
The Java Application Container: Tomcat
80
Installing Tomcat
81
Tomcat Directories
82
Tomcat Configuration Files
82
The Presentation Tools: Flex Builder
83
Installing the Flex Builder
83
Installing the Flex SDK 4
86
The Build, Test and Deploy Tool: Maven
88
Installing Maven
89
Configuring Maven
89
Installing the Maven Eclipse Plug-in
90
Creating Your First Maven Project
90
The POM Document
92
Building a Project with Maven
94
Using Maven Plug-ins
94
Using Maven Dependencies
96
Using Repositories
96
Deploying Your Application
98
Creating a Maven Archetype
99
Flex Maven Archetypes
100
Useful Maven Commands
100
Summary
104
CHAPTER 4 Inversion of Control
105
Spring Modules
107
Spring Maven Dependencies
109
Creating a Spring Project
113
Configure the Spring Container
124
XML-Based Configuration
124
Writing XML Bean Definitions
125
Constructor Dependency Injection
125
Setter Dependency Injection
127
Inner Beans
128
Injecting Lists and Collections
128
Annotation-Based Configuration
133
Spring Configuration Annotations
133
Using the Annotations @PostConstruct and @PreDestroy
136
Using the Annotations @Component and @Repository
138
The Bean Factory
141
ApplicationContext and WebApplicationContext
141
Properties
141
Summary
145
CHAPTER 5 Spring JDBC and Hibernate
146
The DAO Design Pattern
146
Introduction to Plain Old JDBC
148
Introduction to Spring JDBC
156
JDBC Template
156
JDBC DAO Support
157
Hibernate and Spring
163
Add Hibernate to your Spring Project
163
Configure Hibernate
165
XML-Based Configuration
168
Mapping a Database Table
169
Annotation-Based Configuration
172
Mapping a Database Table
172
Mapping a One-to-One Relationship
176
Mapping a One-to-Many or a Many-to-One Relationship
179
Mapping a Many-to-Many Relationship
182
Using Hibernate with Spring
188
Querying Using HQL
189
Passing Parameters in HQL Queries
190
Named Queries
191
HQL and Hibernate Support Matrix
192
Use Native SQL
194
Introduction to Transactions
194
Summary
197
CHAPTER 6 Spring Security
198
Introduction to Spring Security
198
Web Authorization Using URL Patterns
199
The Importance of Filters
199
Authentication and Authorization
201
Authentication Methods
202
Decision Managers and Voters
207
Summary
209
CHAPTER 7 Flex (The View Layer)
210
The FlashPlayer Overview
210
Flex Components
210
Flex Development Overview
213
Flex Builder
213
Create a Project
214
Flex Builder Perspectives
220
Build an Application
220
Run an Application
221
Debug an Application
222
Navigate between Classes
222
Shortcut keys
223
Flex Components
224
Containers
228
Layout Containers
228
Navigation Containers
229
Control Components
230
Standard Controls
230
Data-Driven Controls
232
Text Controls
233
Menu-Based Controls
233
Using External CSS Styles
234
Use Flex with Flash IDE
237
Create Flash Animations for Flex
241
Flex Events
244
Custom Events
248
Data Binding
252
Creating Custom Components
254
MXML Custom Components
255
AS Custom Components
256
Deploying Custom Components
260
SWC Libraries
261
RSL libraries
262
Summary
264
CHAPTER 8 Working with Data in Flex
265
An Overview of Data Models
265
Structuring Data for Views
270
Data Collections
270
Access to Remote Data
275
HTTPService Components
276
Building Our First Java and Flex Application
277
RemoteObject Component
300
WebService Component
303
Using Eclipse Web Services Explorer
305
Using the WebService Component
307
Creating ActionScript Code to Consume a Web Service using Flex Builder
308
Storing Data on the Local Machine
312
Summary
314
CHAPTER 9 BlazeDS
316
Flex BlazeDS Architecture
316
Configuring BlazeDS
318
Using Remoting Services
322
Creating a Flex Java POJO BlazeDS Application
324
Creating the DAO Layer
330
Creating a Test Case Using JUnit
335
Creating the Service Layer
339
Configuring Eclipse to Run and Debug a Maven Application
341
Creating the Flex Client
345
Using Messaging Services
351
Real-Time Messaging with BlazeDS
351
Creating a Simple Chat Application
351
Creating and Configuring the Maven BlazeDS Project
352
Creating the Flex Project
357
Creating the Flex Code for Real-Time Messaging
361
Summary
365
CHAPTER 10 Using Flex, Spring, and HibernateTogether
366
The Flex-Spring-Hibernate Maven Archetype
366
Using the Flex-Spring-Hibernate Archetype
370
Configuring the Application
374
Planning the Application with UML
376
The Data Model UML Diagrams
376
The DAOs UML Diagrams
378
The Service Layer UML Diagram
379
Architecting Application Security
380
Injecting the Spring Beans
381
Flex Client GUI Architecture
382
Develop the Flex-Java-Spring-Hibernate Application
386
Coding the Domain Objects
386
Coding the Hibernate DAO objects
393
Create a Test Case
395
Coding the Service layer
399
Export Spring Services to BlazeDS
403
Coding the Flex GUI application
404
Add a Login Form to Flex
408
Summary
427
Index
428
Alle Preise verstehen sich inklusive der gesetzlichen MwSt.