出版時(shí)間:2010 年6月 出版社:東南大學(xué)出版社 作者:Charles Severance 頁(yè)數(shù):241
Tag標(biāo)簽:無(wú)
前言
The greatest single reason that the World Wide Web has been so widely used andadopted is because individuals are allowed to participate in the Web. People can pro-duce web Content and create a MySpace page or home pages provided by their schoolor organization and contribute their creativity and content to the Web. Free serviceslike Blogger, Flickr, Google Sites, Google Groups, and others have given us all an outletfor our creativity and presence on the Web——at no charge.For most of the life of the Web, if you wanted to have your own rich software-backedwebsite with data storage, your only choice was to purchase hosting services from anInternet Service Provider (ISP) and learn database management and a programminglanguage like PHP to build or run your software. Learning and paying for this muchtechnology was just beyond the reach of most web users, who simply had to accept thelimited features of MySpace, Blogger, or whatever system hosted their web content.In April 2008, Google announced a product called App Engine. When you write aprogram for the Web that runs on App Engine, your software runs on the Google serverssomewhere in the Google "cloud." It is as if you are a Google employee and you haveaccess to the entire scalable Google infrastructure. App Engine captures much of Goo-gle's experience of building fast, reliable, and scalable websites, and through App En-gine, Google is revealing many of the secrets about how its own applications scale to 'millions of users.The most exciting part of the Google App Engine announcement is the fact that it isfree for moderate levels of use. Every person with a Gmail account can have a numberof free applications running on the Google infrastructure. If your application becomesextremely popular and your traffic goes above the allowed levels of the free account,you can pay to use more of Google's resources. As your appli~:ation scales, Googleengineers and operations staff take care of all the hardware, data storage, backup, andnetwork provisioning for you.
內(nèi)容概要
即便你在編程或者Web開(kāi)發(fā)方面只有很少或者沒(méi)有任何經(jīng)驗(yàn),使用Google APP Engine和這本書就能快速并且充滿自信地構(gòu)建那些激動(dòng)人心的可擴(kuò)展Web應(yīng)用。 App Engine幾乎是近年來(lái)最引人注目的Web技術(shù),它提供了一個(gè)簡(jiǎn)單易用的應(yīng)用程序框架以及基本的Web工具。盡管Google自帶的教程已經(jīng)展示了主要的步驟,但是《Google App Engine開(kāi)發(fā)》將會(huì)幫助任何人開(kāi)始上手使用這個(gè)平臺(tái)。讀完本書你將學(xué)會(huì)如何構(gòu)建完整的交互應(yīng)用,并且將它們部署到和]Google搜索引擎使用同樣服務(wù)器的云中。 擁有這本書,你將會(huì):縱覽Google App Engine相關(guān)必備技術(shù);學(xué)習(xí)如何使用Python、HTML、層疊樣式表(CSS)、HTTP和IDataStore(App Engine的數(shù)據(jù)庫(kù));領(lǐng)會(huì)創(chuàng)建高級(jí)動(dòng)態(tài)web應(yīng)用的必備技術(shù)要點(diǎn);掌握部署應(yīng)用的前提要件。 《Google App Engine開(kāi)發(fā)》同樣也是那些想要獲得Web開(kāi)發(fā)技能的資深程序員的極佳參考資源。構(gòu)建Web應(yīng)用曾是專家們獨(dú)占的領(lǐng)地,但自從有了Google App Engine和這本書,任何人都能創(chuàng)建一個(gè)動(dòng)態(tài)Web網(wǎng)站。
作者簡(jiǎn)介
Charles Severance是密歇根大學(xué)信息學(xué)院的兼職助理教授。他也是IMS全球?qū)W習(xí)聯(lián)合會(huì)的IMS開(kāi)發(fā)者網(wǎng)絡(luò)協(xié)調(diào)員。
書籍目錄
Preface1. Programming on the Web The Request/Response Cycle What Is Google App Engine? What Is a "Cloud"? Why Did Google Build App Engine and Give It Away for Free? What Is the Google Infrastructure Cloud? Enter the Application Engine Your Application Must Be a Good Citizen in the Google Cloud How the Cloud Runs Your Application Why You Really Want to Run in the Cloud The Simplest App Engine Application Summary Exercises2. HTMLandCSS A Brief History of HTML and CSS HyperText Markup Language (HTML) A Well-Formed HTML Document Validating Your HTML HyperText Links (Anchor Tags) Multiple Files Lists in HTML Specifying Styles Using CSS Styling Tags with CSS Exerting More Control over Markup Validating CSS Tools to Help You Work with css Building the Navigation Menu The CSS Box Model Adding Navigation Hints for Users Summary Exercises3. Python What Is Programming? About Pyttion Installing Python The Essence of Programming Input, Processing, and Output Conditional Steps: A Number-Guessing Web Application Variables and Expressions Naming Variables Constants Handling Text Data Using Strings Using the String Library Types and Conversion Variables with Many Values at the Same Time: Lists Repeated Code: Loops Python's Backpack: Dictionaries Looping Through a Dictionary Stored and Reused Code: Python Functions Turning Traceback to Our Advantage Using Try and Except Object-Oriented Python Comments in Python The Tao of Programming Summary Exercises4. Sending Data to Your Application Making an HTTP Request Hacking the HTTP Protocol The HTTP Protocol Standards Watching HTTP in Action HTML: Building a Form Sending Form Data to the Server Using POST Handling Form Data in the App Engine Server Sending Form Data to the Server Using GET App Engine Log Looking at All the Data Available on an HTTP Request Advanced: Multipart POST Data with File Upload Summary Exercises5. TheApp Engine webapp Framework A Trivial App Engine Application An Equivalent Trivial webapp Application The Handler Callback Pattern Looking at the Handler Code What Is "self" and Why Is It There? Number Guessing Using the webapp Framework Web Server Logs Summary Exercises6. Templates Template Syntax Using the Templates from Python The Number-Guessing Game Using Templates Abstraction and Separation of Concerns: "Model View Controller" Building a Multiscreen Application Static Files in App Engine Referencing Static Files Generalizing Template Lookup with Multiple Templates Extending Base Templates Conditional Processing Templates Replacing More Than One Block in the Base Template Extending Our Application Syntax Errors More on Templates Summary Exercises7. Cookies and Sessions HTTP Cookies Logging In and Logging Out Using Sessions Installing the Simple Session Utility Using the Session to Mark Login and Logout Changing the User Interface for a Logged-In User Summary Exercises8. AppEngineDatastore The Model-View-Controller Pattern Defining Models Adding a New Account Form Adding a User Account Looking Through the Datastore Logging In and Checking Accounts and Passwords Retrieving and Displaying Many Objects Terminology: Different Types of Keys References Between Data Models Interactions Between Models Pt/tting the Primary Key into Session Adding the Chat Feature Summary Exercises9. lavaScript, jQuery, and AJAX jquery Create a View of the Chat Messages in HTML Asynchronously Updating a
章節(jié)摘錄
插圖:Running an application in the cloud is kind of like flying business class across the PacificOcean between Australia and the United States. You are vaguely aware that you aregoing really fast inside of a highly complex device that you barely understand. Thepilots, crew, maintenance people, chefs, logistics staff, traffic controllers, and gateagents all are making sure that your trip happens efficiently and comfortably——and thatit is uneventful. All you know is that you sit in a recliner, watch a movie, eat a nice filetmignon, have a glass of red wine, lay the seat fiat, sleep for a few hours, and wake uprefreshed on a different continent.Why You Really Want to Run in the CloudYou might initially think that you don't want to run in the Google cloud because youwant to make your own decisions and control your own destiny. You might want torun your own servers in your own facility and make all the decisions about your ap-plication. Perhaps you just like walking into a server room and seeing the hardwarethat is running the application. Although this sense of control might sound appealingat first, it is really just a lot of trouble and energy that does not advance the cause ofyourapplication. Here are a few of the things that you have to worry about when yourun on your own servers: what operating system should I run? What version of theoperating system is the most reliable? When do I apply vendor patches (especially thosepesky security patches)? How do I protect my system from intruders? Do I need afirewall to protect my servers? How do I monitor my servers to detect when an intrusionhappens and then how do I get notified? How far do I have to drive to the server roomto reformat and reinstall the software at 4:00 a.m. so that it is back up by 10:00 a.m.?What database do I run? What version? What patches? Should I upgrade the memoryof my database server, or should I add an additional disk to the RAID controller? CanI use a single database server, or do I need to cluster several database servers? How doesthe clustered database server get backed up? How long does it take to restore mydatabase when there is a hardware problem with the database server's disk drives? Howmany application web servers do I need? I know that my application's peak usage isfrom 7:00 p.m. to 9:00 p.m. each day. Do I buy enough hardware to handle that peakload, or do I buy a little less hardware and just let the servers slow down a bit duringthe 7:00 p.m. to 9:00 p.m. period? If my application is so popular that it is used bothin the United States and Europe, do I need to find a data center in Europe and put somehardware in Europe so that all the European users see a quick response time? Whenshould I upgrade my hardware? Should I add more hardware and keep the old hardwareor simply pitch the old hardware and install all new hardware? How much energy doesmy hardware take? Is there a way to reduce the energy footprint of my hardware?
媒體關(guān)注與評(píng)論
“《Google App EngiRe開(kāi)發(fā)》使幾乎不可能的事成為可能,幫助我這個(gè)老家伙學(xué)習(xí)一些難以置信的相關(guān)技術(shù)訣竅。我在過(guò)去整個(gè)職業(yè)生涯中一直想要更好地掌握Web開(kāi)發(fā),自從有了這本書,夢(mèng)想終于成真。” ——Robert Glushko.學(xué)生,密歇根大學(xué)
圖書封面
圖書標(biāo)簽Tags
無(wú)
評(píng)論、評(píng)分、閱讀與下載
Google App Engine開(kāi)發(fā) PDF格式下載