The.Pragmatic.Bookshelf开发丛书 云端代码:利用Google.AppEngine编程
中文名: The Pragmatic Bookshelf开发丛书-云端代码:利用Google AppEngine编程原名: Code in the Cloud: Programming Google AppEngine作者: Mark C. Chu-Carroll资源格式: PDF版本: 更新源代码出版社: The Pragmatic Bookshelf书号: 978-1-93435-663-0发行时间: 2011年4月14日地区: 美国语言: 英文简介: 内容介绍:Join the next wave of Web 2.0 software developmentCode in the CloudProgramming google app engineMark c chu-CarrollThe Pragmatic BookshelfRaleigh, North Carolina Dallas, TexasPragmaticBookshelfMany of the designations used by manufacturers and sellers to distinguish their prodcts are claimed as trademarks. Where those designations appear in this book, and ThePragmatic Programmers, LLC was aware of a trademark claim, the designations havebeen printed in initial capital letters or in all capitals. The Pragmatic Starter Kit, ThePragmatic Programmer, Pragmatic Programming, Pragmatic Bookshelf and the linking gdevice are trademarks of The Pragmatic Programmers, LLCEvery precaution was taken in the preparation of this book. However, the publisherassumes no responsibility for errors or omissions, or for damages that may result fromthe use of information (including program listings) contained hereinOur Pragmatic courses, workshops, and other products can help you and your teamcreate better software and have more fun for more information as well as the latestPragmatictitlespleasevisitusathttp://www.pragprog.comThe team that produced this book includesEditor.Colleen ToporekIndexing:Sara Lynn EasterCopy editKim WimpsettProductionJanet furlowCustomer support: Ellie CallahanInternationalJuliet bendaCopyright o 2011 Pragmatic Programmers, LLCAll rights reservedNo part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form, or by any means, electronic, mechanical, photocopying, recording, orotherwise, without the prior consent of the publisher.Printed in the united states of americaISBN-10:1-934356-63-8ISBN-13:978-1934356-63-0Printed on acid-free paper.P1.0 printing, April, 2011Version: 2011-4-14contentsI Getting Started with Google App Engine1 Introduction101. 1 What's Cloud Computing?101.2 Cloud Computing Programming Systems161. 3 Acknowledgments192 Getting Started202.1 Setting Up a Google App Engine Account202.2 Setting Up Your Development Environment222.3 Starting to Program in Python with App Engine252.4 Monitoring Your Application32II Programming Google App Engine with Python363 A First Real Cloud Application373.1 The Basic Chat Application373.2Thebasicsofhttp413.3 Mapping Chat into Http454 Managing Data in the Cloud534.1 Why Didn't Chat Work?534.2 Making Chat Persistent565 Google App Engine Services for Login Authentication655.1 Introducing the Users Service655.2 The Users service665.3 Integrating the Users Service into Chat676 Organizing Code: Separating UI and Logic706. 1 Getting Started with Templates706. 2 Building Related Views with Templates6.3 Multiple Chat Rooms81CONTENTS 67 Making the UI Pretty: Templates and CSS877.1 Introducing CSS887.2 Styling Text Using CSS897.3 Page Layouts Using CSS947.4 Building Our Interface Using Flowed Layout1027.5 Including CSS Files in App Engine Applications1058 Getting Interactive1078.1 Interactive Web services: The Basics1078.2 The Model-View-Controller Design Pattern1108.3 Talking to the Server without Disruption1138.4 References and Resources121III Programming Google App Engine with Java1229 Google App Engine and Java1239.1 Introducing GWT1259.2 Getting Started with Java and GWT1279. 3 RPC in GWT1359.4 Testing and Deploying with GWT14010 Managing Server-Side Data14110.1 Data persistence in Java14110.2 Storing Persistent Objects in GWT14510.3 Retrieving Persistent Objects in GWT......... 14910.4 Gluing the Client and the Server Together15110.5 References and Resources15311 Building User Interfaces in Java15411.1 Why Use GWT?15411.2 Building GWT UIs with Widgets15511.3 Making the UI Active: Handling Events16211.4 Making the UI Active: Updating the Display16711.5 Wrapping Up with GWT16911. 6 References and resources17012 Building the Server Side of a Java Application17112.1 Filling in Gaps: Supporting Chat Rooms17112.2 Proper Interactive Design: Being Incremental17612.3 Updating the Client18412.4 Chat Administration185this copy is(P1.0 printing, April, 2011)CONTENTS 712.5 Running and Deploying the Chat Application18712.6 Wrapping Up the Server Side189I Advanced Google App Engine19013 Advanced Datastore: Property Types19113.1 Building a Filesystem Service19113.2 Modeling the Filesystem: A First Cut19513.3 Property Types Reference21213.4 Wrapping Up Property Types21514 Advanced Datastore: queries and Indices21614. 1 Indices and queries in Datastore21714.2 More Flexible models22314.3 Transactions, Keys, and Entity groups22414.4 Policy and Consistency Models22614.5 Incremental retrieval23015 Google App Engine Services23215.1 The Memcache Service23315.2 Accessing Other Stuff: The URL Fetch Service23815.3 Communicating with People: Mail and Chat Services 23915.4 Sending and Receiving Email24315.5 Wrapping Up Services24616 Server Computing in the Cloud24816. 1 Scheduling Jobs with App Engine Cron24916.2 Running Jobs Dynamically Using the Task Queue. 25316.3 Wrapping Up Server Computing25917 Security in App Engine Services26017.1 What Is Security?26017.2 Basic Security26117.3 Advanced securit26918 Administering Your App Engine Deployment27718.1 Monitoring27718.2 Peeking at the datastore28118.3 Logs and Debugging28218.4 Managing Your Application28418.5 Paying for What You Use285this copy is(P1.0 printing, April, 2011)CONTENTS 819 Wrapping Up28719.1 Cloud Concepts28719.2 Google App Engine Concepts28819.3 Where to Go from here29019.4 References and resources292Index293this copy is(P1.0 printing, April, 2011)Part iGetting Started with GoogleApp EngineChapter 1ntroductionCloud computing is an innovative and exciting style of programmingand using computers. It creates tremendous opportunities for softwaredevelopers: cloud computing can provide an amazing new platform forbuilding new kinds applications. In this chapter, we'll look at the basicconcepts: what cloud computing is, when and why you should use itand what kinds of cloud-based services are available to you as an application developer1.1 What's Cloud Computing?Before we look at how to write cloud programs with Google App Enginelet's start at the very beginning and ask just what we mean by cloudcomputing? What is the cloud? How is it different from desktop computing or old-fashioned client-server computing? And most importantly,why should you, as a software developer, care about the cloud? Whenshould you use it, and what should you use it for?The Cloud ConceptIn the modern world of the internet and the world wide Web. thereare thousands upon thousands of computers sitting in data centerscattered around the world. We use those computers constantly--forchatting with other people, sending email, playing games, and readingand writing blogs. When we're doing one of these everyday activitieswe're accessing a program running on a server, using our browser as aclientBut where is the program actually running? Where is the data? Whereare the servers? They 're somewhere out there, somewhere in some
下载地址
用户评论