- •Contents
- •Practice №1 The study of cloud services Google. Gmail.
- •1.1 About Gmail
- •1.2 Why choose Gmail
- •1.3 Creating an account
- •1.4 Gmail as a Google Account
- •2. Gmail’s Interface
- •2.1 Inbox
- •2.2 Compose Mail
- •2.3 Drafts
- •2.4 Sent Mail
- •2.5 More
- •2.6 Report Spam
- •2.7 Delete
- •2.8 Keyboard Shortcuts
- •3. Organizing your Gmail
- •3.1 Contacts
- •3.2 Stars
- •3.3 Labels
- •4. Advanced Settings
- •4.1 General Settings
- •4.2 Accounts and Import
- •4.3 Filters
- •4.4 Forwarding and Pop/imap
- •4.5 Offline
- •5. The Fun Stuff
- •5.1 Buzz
- •5.2 Chat
- •5.3 Web Clips
- •5.4 Labs
- •5.5 Themes
- •5.6 Gmail Mobile
- •5.7 Google Docs
- •5.8 Google Calendar
- •5.9 Tasks
- •6. Conclusion
- •Practice №2 The study of cloud services Google Talk.
- •2.1 Use the native Gmail Talk option
- •2.2 Installing the voice/video chat plugin
- •Practice №3 The study of cloud services Google Calendar
- •3.1 Interface
- •3.2 Create an event
- •3.3 Add location
- •3.4 Invite people
- •3.5 Share meeting materials
- •3.6 Meet online
- •Invite guests, add attachments, and meet online.
- •3.7 New committee? New (shared) calendar.
- •Practice №4 Editing of electronic documents Google Apps
- •4.1 Creating new files
- •4.2 Using templates
- •Practice №5 The study of functions Google App Engine
- •5.1 Google App Engine Docs
- •5.2 Download the App Engine sdk for php
- •5.3 Creating the Configuration File
- •Practice №6 Creating a data warehouse environment Google App Engine
- •6.1 Setting up Objectify
- •6.2 Creating the data model classes
- •6.3 Adding the greetings and the form to the jsp template
- •6.4 Creating the form handling servlet
- •6.5 Testing the app
- •6.6 Creating required indexes
- •Practice №7 The study of cloud services Google Apps
- •7.1 Gmail
- •Google Drive
- •Google Docs, Sheets, Slides, and Forms
- •7.4 Google Sites
- •7.5 Google Calendar
- •7.6 Google Hangouts
- •7.8 Google Apps Vault
- •7.9 Usage
- •Practice №8 Microsoft Office Live Workspace
- •8.1 Setting up Microsoft Live Workspace
- •8.2 Features Available with Office Live Workspace
- •Practice №9 The study of cloud services Microsoft SkyDrive
- •9.1 Creating a Microsoft account
- •9.2 Getting to know OneDrive
- •9.3 Installing the Microsoft OneDrive app
- •9.4 OneDrive for mobile devices
- •Practice №10 Network services for the mobile user. Wi-Fi technology
- •10.1 What is Wi-Fi ?
- •Practice №11 Search engines in Internet
- •Veronica & Jughead:
- •Improve Your Searching Skills:
- •Infoseek:
- •Inktomi:
- •Vertical Search
- •Verticals Galore!
- •Information Retrieval as a Game of Mind Control
- •Increasing The Rate of Algorithmic Change
- •Practice №12 Search graphic information in Internet. Comparative analysis of search engines. Internet image search
- •Study Guide
- •3 55029, Stavropol, Pushkina, 1
Practice №6 Creating a data warehouse environment Google App Engine
In this practice, you'll extend the simple application created earlier by adding the ability to post greetings and display previously posted greetings. You'll add a new servlet that handles the form submission and save the data.
The database we are using is Google Cloud Datastore, a scalable, highly reliable data storage service that's easy to use from App Engine. Unlike a relational database, the Datastore is a schemaless object store, with an index-based query engine and transactional capabilities.
This tutorial uses the Objectify library, a Java data modeling library for the Datastore. There are several alternative APIs you can use: a simple low-level API, implementations of the Java Data Objects (JDO) and Java Persistence API (JPA) interfaces, or the Slim3 library.
This is what the app will look like after you add the message submission form:
You'll make these changes to your existing application:
Set up Objectify, and create data model classes for the guestbook.
Edit the JSP page to allow users to post greetings to the datastore, and to display all the greetings currently stored.
Create a new servlet named SignGuestbookServlet that handles the form submission.
Add entries in web.xml so requests can be routed to the new servlet.
6.1 Setting up Objectify
To use the Objectify library, you must declare the dependency in the pom.xml file, so Maven can install it. In the application root directory (guestbook/), edit pom.xml, locate the <dependencies> section, then add the following:
<dependency> <groupId>com.googlecode.objectify</groupId> <artifactId>objectify</artifactId> <version>4.0.1</version> </dependency>
Maven will install the library the next time you run a target that needs it (such as the development server).
In order to use Objectify in a JSP, we need a helper class that registers the model classes in the JSP servlet context. In guestbook/src/main/java/com/example/guestbook/, create a file named OfyHelper.java with the following contents:
package com.example.guestbook; import com.googlecode.objectify.Objectify; import com.googlecode.objectify.ObjectifyFactory; import com.googlecode.objectify.ObjectifyService; import javax.servlet.ServletContextListener; import javax.servlet.ServletContextEvent; /** * OfyHelper, a ServletContextListener, is setup in web.xml to run before a JSP is run. This is * required to let JSP's access Ofy. **/ public class OfyHelper implements ServletContextListener { public void contextInitialized(ServletContextEvent event) { // This will be invoked as part of a warmup request, or the first user request if no warmup // request. ObjectifyService.register(Guestbook.class); ObjectifyService.register(Greeting.class); } public void contextDestroyed(ServletContextEvent event) { // App Engine does not currently invoke this method. } }
This file refers to the Greeting and Guestbook model classes that you'll create in the next section.
Finally, in guestbook/src/main/webapp/WEB-INF/, edit web.xml, and add the following lines inside <web-app> to set up the JSP helper:
<filter> <filter-name>ObjectifyFilter</filter-name> <filter-class>com.googlecode.objectify.ObjectifyFilter</filter-class> </filter> <filter-mapping> <filter-name>ObjectifyFilter</filter-name> <url-pattern>/*</url-pattern> </filter-mapping> <listener> <listener-class>com.example.guestbook.OfyHelper</listener-class> </listener>
