Muutke küpsiste eelistusi

Google App Engine Java and GWT Application Development [Pehme köide]

  • Formaat: Paperback / softback, 480 pages, kõrgus x laius: 235x191 mm
  • Ilmumisaeg: 24-Nov-2010
  • Kirjastus: Packt Publishing Limited
  • ISBN-10: 1849690448
  • ISBN-13: 9781849690447
Teised raamatud teemal:
  • Pehme köide
  • Hind: 51,84 €*
  • * saadame teile pakkumise kasutatud raamatule, mille hind võib erineda kodulehel olevast hinnast
  • See raamat on trükist otsas, kuid me saadame teile pakkumise kasutatud raamatule.
  • Kogus:
  • Lisa ostukorvi
  • Tasuta tarne
  • Lisa soovinimekirja
  • Formaat: Paperback / softback, 480 pages, kõrgus x laius: 235x191 mm
  • Ilmumisaeg: 24-Nov-2010
  • Kirjastus: Packt Publishing Limited
  • ISBN-10: 1849690448
  • ISBN-13: 9781849690447
Teised raamatud teemal:
This is a practical guide with a step-by-step approach that builds an application in stages. Each stage of the application is used along with screenshots to introduce or develop your understanding of how to write powerful GAE applications. If you are a developer with prior programming experience of Java development and object-oriented programming and want to understand the key concepts of how to build AJAX web applications with Java, then this book is for you. The book assumes some previous exposure to the basics of using GWT, for example at the level of Google's online introductory GWT tutorials. You don't need to know anything about Google App Engine. This book will teach you everything you need.
Preface 1(6)
Chapter 1 Introduction
7(16)
Overview of the chapter
8(1)
Introduction to Google App Engine
8(8)
The Datastore
9(1)
App Engine's scalable services
9(1)
Java App Engine runtime and the application development environment
10(1)
GAE/J and the Eclipse IDE
10(1)
App Engine application hosting
11(1)
App Engine "surprises" for new developers
11(1)
Introduction to GWT
12(1)
GWT UI support
13(1)
Other GWT features
14(1)
GWT's RPC API
14(1)
GWT with GAE
14(1)
The GWT/GAE Eclipse plugin
15(1)
GWT support for Java
15(1)
Recommended GWT background
16(1)
Example application: Connectr
16(3)
A look ahead
19(1)
Online resources
19(2)
GAE and GWT galleries
20(1)
Documentation, blogs, and discussion groups
20(1)
Summary
21(2)
Chapter 2 Using Eclipse and the Google Plugin
23(28)
Installing the plugin and supporting software
24(5)
Installing the Java SDK
24(1)
Installing Java on Mac OS X
25(1)
Installing Java on other platforms
26(1)
Installing Eclipse
26(1)
Installing the Google plugin
26(2)
Updating the Google plugin
28(1)
Developing your application in Eclipse
29(5)
Creating a new web application project in Eclipse
29(1)
First look: The anatomy of a web application project
30(3)
The Google plugin wizards and helpers
33(1)
Running and debugging your application
34(7)
Running your application in Development Mode
35(1)
Developing the application in debug mode
35(1)
Development Mode and the GWT browser plugin
36(2)
Defining a run or debug configuration
38(1)
Debugging
38(2)
Compiling your GWT code for production mode
40(1)
Deploying your application
41(5)
Registering and setting an application ID for your application
41(2)
How to set the application ID and version for a project
43(1)
Uploading and deploying your application
44(1)
Your App Engine Admin Console
45(1)
Importing an existing application
46(3)
Adding the Google SDKs to your project's build path
47(1)
Adding third-party JAR files
47(1)
Managing multiple Google SDKs
48(1)
Running Google's demo apps in Eclipse
48(1)
Summary
49(2)
Chapter 3 Building the Connectr User Interface with GWT
51(38)
Installing the (first version of) the Connectr project in Eclipse
52(4)
AJAX and its benefits
56(1)
Why AJAX apps are the way forward
56(2)
AJAX apps minimize traffic and workload both on the client and the server
57(1)
Challenges associated with AJAX programming and how GWT solves them
58(4)
JavaScript browser's implementation is not consistent
59(1)
Mastering JavaScript---an uphill battle
60(1)
How GWT comes to the rescue to make developers more efficient
61(1)
Google Web Toolkit overview---modern tools for modern developers
62(2)
GWT user interface building blocks
63(1)
Building the Connectr application---the user interface
64(15)
User interface design elements of Connectr
65(1)
Coding the Connectr user interface
66(1)
Introducing UiBinder to increase productivity
66(1)
Declarative UiBinder versus procedural Java---let's compare
67(3)
Implementing the application layout with UiBinder
70(3)
Tying the view to the Java code
73(1)
Adding custom widgets to UiBinder
74(1)
Adding CSS styles to the application
75(2)
Implementing CSS styles in a global CSS file
77(1)
Adding a logo to the application
77(1)
Catching mouse and keyboard events
78(1)
Grouping CSS files and images for faster speed with ClientBundle
79(3)
Creating a ClientBundle
80(1)
Using image resources in Connectr
81(1)
Automatically checking CSS styles at compile time with CssResource
82(1)
Getting data from the server using GWT RPC
82(5)
Creating the login service
83(1)
Implementing the server-side login service
84(1)
Creating the asynchronous interface
85(1)
Invoking the login service
85(1)
Catching exceptions
86(1)
Summary
87(2)
Chapter 4 Persisting Data: The App Engine Datastore
89(52)
Introduction
89(2)
The Connectr server-side object model
90(1)
The Datastore
91(5)
Datastore entities and their properties
91(2)
Entity keys
93(1)
Datastore queries and indexes
94(1)
Queries are supported by indexes
94(1)
App Engine queries are fast
95(1)
The Datastore versus a relational database
95(1)
JDO
96(1)
Setting up JDO
97(1)
Creating Connectr's data models
97(37)
The PersistenceManager and the PersistenceManagerFactory
98(1)
Making data classes persistable
99(1)
Class and field annotations
99(2)
Persistable field types
101(1)
Core value types
102(1)
Collections and multi-valued properties
103(2)
Datastore keys and JDO key fields
105(4)
Defining keys and core value type fields for Friend and UserAccount
109(2)
Referencing complex objects
111(1)
Serializable objects and serialized fields
112(3)
Embedded classes
115(2)
Data class inheritance
117(2)
Saving, updating, and deleting data objects
119(1)
Persisting an object
119(1)
Fetching a persisted object by its key
120(1)
Deleting a persisted object
121(1)
An object has an associated PersistenceManager
121(1)
Fetch groups
122(1)
Connectr example: creating and modifying UserAccount and Friend data objects
123(1)
Creating new Friend objects
124(2)
Deleting a Friend object
126(1)
Fetching a list of Friend objects using the key list
126(1)
Detached objects
127(2)
Detached Data Access Objects and Data Transfer Objects
129(1)
DTOs in the Connectr application
130(4)
Inspecting the Datastore
134(5)
The local development console
134(2)
The App Engine Datastore
136(1)
Browsing the App Engine Datastore
136(2)
Viewing application data statistics
138(1)
Resources
139(1)
Summary
140(1)
Chapter 5 JDO Object Relationships and Queries
141(36)
Modeling relationships between objects
141(10)
Owned relationships and entity groups
143(1)
Uni-directional owned relationships
144(1)
Supporting uni-directional owned relationships in Connectr
144(3)
Dependent children
147(1)
Bi-directional owned relationships
148(1)
Bi-directional one-to-one relationship
148(1)
Bi-directional one-to-many relationship
149(1)
One-to-many Collection ordering
150(1)
Unowned relationships
150(1)
Finding objects---queries and indexes
151(14)
Constructing JDOQL queries
151(1)
Query examples
152(2)
Query filter operators
154(3)
Query filters on fields with multiple values
157(1)
Query sort orders and ranges
158(1)
Executing a query and getting the results
159(1)
Query cursors
159(3)
Unset and unindexed entity fields
162(1)
Deleting by query
163(1)
Batch fetches using a list of keys
164(1)
Keys-only queries
164(1)
Extents: fetching all objects of a particular kind
165(1)
The App Engine Datastore index
165(10)
Automatically-generated indexes
166(2)
Custom indexes
168(1)
Revisiting constraints on queries
169(1)
Exploding indexes
170(1)
Using the Admin Console Datastore index viewer and index vacuuming
170(3)
Side-stepping query constraints
173(1)
Pre-persist callbacks---normalizing Friend name information
174(1)
Summary
175(2)
Chapter 6 Implementing MVP, an Event Bus, and Other GWT Patterns
177(40)
Introducing MVP - The need for design patterns in software
178(1)
Introduction to MVP
179(1)
The view
179(1)
The model
179(1)
The Presenter
180(1)
Connectr MVP application architecture overview
180(1)
Package and file organization
181(1)
Coding MVP into Connectr
181(10)
Starting up the application
182(1)
Inside a presenter
183(1)
Populating the Friend list view
184(1)
Responding to user interface events
185(2)
Listening to the event bus
187(1)
Integrating UiBinder views into MVP
188(3)
Events and the event bus
191(2)
Creating a custom event class
192(1)
Adding an application controller
193(1)
Adding support for browser history
193(1)
Introducing the browser history stack and navigation tokens
194(1)
Implementing browser history management
194(2)
Bootstrapping the browser history at application startup
196(1)
Centralizing RPC calls for better handling and usability and reliability
196(7)
Introducing an encompassing RPC class
197(1)
Displaying a loading indicator when the app is busy
198(2)
Catching server exceptions
200(2)
Retrying a call after failure
202(1)
Putting it all together
202(1)
MVP Development with Activities and Places
203(13)
Building a basic application
204(1)
Traditional MVP versus MVP with Activities and Places
205(1)
Moving parts of ProfileMVP
205(1)
Activities
205(2)
Places and the Place History Mapper
207(1)
Views
208(3)
The Browser Factory
211(2)
Adding deferred binding for iPhone and Android views
213(1)
Activity mapper
214(1)
Putting the pieces together: the onModuleLoad method
215(1)
Summary
216(1)
Chapter 7 Background Processing and Feed Management
217(62)
Overview of the chapter
218(1)
Using Servlets in App Engine
218(9)
Making your Servlets accessible---the deployment descriptor
219(1)
Defining a Servlet
220(1)
Servlet requests and responses
221(1)
Generating a response
222(1)
App Engine Servlet limitations
223(1)
Restricting access to a Servlet
223(2)
Sessions
225(1)
The JRE whitelist and system restrictions
226(1)
Accessing static application files
226(1)
Using migrations to evolve the Datastore entities
227(13)
Removing a field from a JDO data class definition
228(1)
Adding a field to a JDO data class definition
229(1)
Facilitating "schema" transitions via migrations
230(1)
Approach---defining a migration
231(1)
The Migration interface
231(1)
Implementing a Migration: The FriendMigration class
232(3)
Running the Migration: A Migration Servlet and the Task Queue
235(3)
Invoking the Servlet as a web request
238(1)
Servlet admin authentication
239(1)
Pulling in Feeds: The URL Fetch service
240(9)
App Engine services
240(1)
URL Fetch
241(1)
Java support for URL Fetch
242(1)
Using java.net.URL Connection
242(1)
Making an HTTP request
243(1)
Using HTTP(S) URL Connection objects
243(3)
The "low-level" Java URL Fetch API
246(1)
The ROME and ROME Fetcher RSS/Atom libraries
246(1)
Downloading the ROME and ROME Fetcher jars and their dependencies
247(1)
Installing the library JAR files
248(1)
Using RSS/Atom feeds in the Connectr app
249(16)
Adding feed support
249(1)
The feed classes
250(5)
Adding and removing friend feeds
255(4)
Fetching and updating feeds
259(2)
Subclassing the ROME Fetcher HttpURLFeedFetcher class
261(3)
Processing changes to Friend URLs
264(1)
Enabling background feed updating and processing
265(13)
Add some test feeds to your app
266(1)
Updating the most recently requested FeedInfo objects
267(2)
The FeedUpdateServlet mapping
269(1)
Using an admin-only Servlet URL for the feed update job
270(1)
Updating all feeds for the Friends of a UserAccount
271(4)
Updating the feeds for a specific Friend
275(2)
A simple Servlet to display feed contents
277(1)
Summary
278(1)
Chapter 8 Authentication using Twitter, Facebook OAuth, and Google Accounts
279(30)
Connectr login implementation
280(4)
Step-by-step implementation of the login sequence
281(3)
OAuth: a new way to login and authorize
284(1)
Integrating with Facebook
284(1)
Registering Connectr with Facebook
284(8)
Authenticating with Facebook OAuth
286(5)
Integrating Connectr inside Facebook
291(1)
Authenticating against Google
292(3)
Authenticating against Twitter with OAuth
295(4)
Registering Connectr with Twitter
295(2)
Introducing the Twitter login Servlet
297(1)
Analyzing the Twitter callback Servlet
298(1)
Logging out
299(5)
Logging out when authenticating against Google or Twitter
300(2)
Logging out of Facebook
302(2)
Uniquely identifying Connectr users
304(1)
Automatically registering users when they login
305(2)
Summary
307(2)
Chapter 9 Robustness and Scalability: Transactions, Memcache, and Datastore Design
309(40)
Data modeling and scalability
309(10)
Reducing latency---read consistency and Datastore access deadlines
310(1)
Splitting big data models into multiple entities to make access more efficient
311(1)
Discussion
312(1)
Splitting a model by creating an "index" and a "data" entity
313(4)
Use of property lists to support "join" behavior
317(1)
Supporting the semantics of more complex joins
318(1)
Using transactions
319(16)
Transaction commits and rollbacks
321(1)
Example---a JDO transaction
321(1)
App Engine transactions use optimistic concurrency
322(1)
Transaction retries
322(1)
Transactions and entity groups
323(1)
Creating entities in the same entity group
324(2)
Getting the entity parent key from the child key
326(1)
Entity group design considerations
326(1)
What you can do inside a transaction
327(1)
When to use a transaction
328(1)
Adding transactional control to the Connectr application
328(1)
Transactional tasks
329(6)
Using Memcache
335(13)
Using the App Engine Memcache Java API in Connectr
336(3)
Memcache error handlers
339(1)
Memcache statistics
340(1)
Atomic increment/decrement of Memcache values
340(1)
Using Memcache with JDO data objects
340(2)
JDO lifecycle listeners
342(1)
Defining a cacheable interface
343(1)
The Connectr application's lifecycle listeners
344(4)
Summary
348(1)
Chapter 10 Pushing Fresh Content to Clients with the Channel API
349(14)
Why use push technology
349(1)
Implementation overview
350(1)
Setting up the application to handle pushed messages
351(4)
Server side channel creation
351(1)
Under the hood of ChannelServer
352(1)
Preparing the GWT client for pushed messages
353(1)
Adding a handler to process pushed messages
354(1)
Pushing messages to clients
355(1)
Creating custom classes of pushed messages
356(3)
Telling the server a client is inactive
359(1)
Adding a refresh button to allow on-demand news updates
360(1)
Summary
361(2)
Chapter 11 Managing and Backing Up your App Engine Application
363(34)
Configuration and deployment
363(15)
Configuration
364(1)
The deployment descriptor---web.xml
364(4)
Configuring DoS protection blacklists---dos.xml
368(2)
App configuration---appengine-web.xml
370(5)
App engine application versions
375(2)
Application file limits
377(1)
The Admin Console
378(5)
Browsing an app version's logs
378(2)
App server startup latency
380(1)
Quotas and billing
380(2)
Monitoring your quota levels and resource usage
382(1)
Application behavior when a quota is depleted
383(1)
Adding developers for an application
383(1)
Command-line administration
383(6)
Using appcfg.sh
383(1)
Locating appcfg.sh
384(1)
Using appcfg.sh
384(1)
Downloading application logs
385(1)
Bulk download and upload of an app's Datastore
386(1)
Downloading data
387(1)
Uploading or restoring data
388(1)
Using Appstats
389(2)
Enabling and configuring Appstats
389(1)
Browsing the Appstats statistics page
390(1)
Using your own domain for an app
391(4)
Summary
395(2)
Chapter 12 Asynchronous Processing with Cron, Task Queue, and XMPP
397(48)
Introduction
397(4)
What the client sees
398(1)
What goes on behind the scenes
399(2)
Overview of the chapter
401(1)
Activity stream classes
401(5)
The StreamItem persistent class
401(4)
HTML `sanitization'
405(1)
The StreamItem DTOs
406(1)
Server-Side asynchronous processing
406(17)
Tasks and Task Queues
407(1)
Task Queue specification
408(1)
Task Queue quotas and limits
409(1)
Monitoring tasks in the App Engine Admin Console
410(1)
Using application-defined Task Queues
410(1)
Defining a task: TaskOptions
411(1)
Some Task Queue design considerations
412(2)
Cron Jobs
414(2)
Asynchronous server-side tasks in Connectr
416(1)
Regular background tasks
416(6)
Context-Specific feed update tasks
422(1)
Supporting synchronous content delivery: Datastore queries and caching
423(8)
Making StreamItem queries fast
424(1)
Finding StreamItems for all Friends of a user: doing write-time work to make queries fast
424(2)
Filtering the StreamItems on a subset of the user's Friends: Using key paths and contains()
426(4)
Stream cache management
430(1)
XMPP: Information push to the app
431(12)
The App Engine XMPP service and API
432(1)
XMPP addresses
432(1)
Sending an XMPP message
433(2)
Receiving an XMPP message
435(2)
XMPP-related quotas and limits
437(1)
Setting up Connectr as an XMPP client
437(1)
Subscribing a Connectr app to the XMPP Breaking News Gateway App
438(3)
Processing the incoming XMPP notifications
441(2)
Summary
443(2)
Chapter 13 Conclusion and Final Thoughts
445(4)
What lies ahead for App Engine and GWT?
448(1)
Index 449
Daniel Guermeur is the founder and CEO of Metadot Corporation. Daniel holds a Diplome d'Ingenieur of Informatique from the University of Technology of Compiegne (France) as well as a Master in Photonics from the Ecole Nationale Superieure de Physique of Strasbourg (France). Before starting Metadot in 2000, he worked for oil services companies including giant Schlumberger Ltd, where he helped improve the worldwide IT infrastructure. Daniel has been developing large-scale database-backed web applications since the very beginning of the democratization of the Internet in 1995, including: an open source software content management system, Metadot Portal Server; Mojo Helpdesk, a web-based customer support application; and Montastic, a popular website monitor service. Amy Unruh currently does technical training and course development, with a focus on web technologies. Previously, she was a Research Fellow at the University of Melbourne, where she taught web technologies and researched building robust agent systems. Prior to that, she worked at several startups, served as adjunct faculty at the University of Texas, and was a member of the InfoSleuth Distributed Agents Program at MCC. She received her Ph.D. in CS/AI from Stanford University, in the area of AI planning, and has a BS degree in CS from UCSB. She has numerous publications, and has co-edited a book on Safety and Security in Multiagent Systems.