100% found this document useful (1 vote)
51 views12 pages

Rc001-Gwt Style Online Merged

The Google Web Toolkit (GWT) is a set of tools for writing JavaScript applications in Java. GWT allows a Java developer to use the same tools they use today like Eclipse, Maven, and JUnit. This refcard is a guide to everything that your IDE can't already tell you.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
100% found this document useful (1 vote)
51 views12 pages

Rc001-Gwt Style Online Merged

The Google Web Toolkit (GWT) is a set of tools for writing JavaScript applications in Java. GWT allows a Java developer to use the same tools they use today like Eclipse, Maven, and JUnit. This refcard is a guide to everything that your IDE can't already tell you.
Copyright
© Attribution Non-Commercial (BY-NC)
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

#1

Get More Refcardz! visit refcardz.com


CONTENTS INCLUDE:
n

About Google Web Toolkit (GWT) Official GWT Web Sites Styling Widgets with CSS GWT Module Configuration JavaScript Native Interface Hot Tips and more...

Style, Configuration and JSNI Reference


STYLING WIDGETS WITH CSS
Styling widgets is done using Cascading Style Sheets (CSS). CSS can be applied to the widgets in the application three different ways. Adding a style element inside the <head> of the HTML page that is hosting the application.
<style type=text/css> /* CSS style rules*/ </style>

GWT

By Robert Hanson

ABOUT GOOGLE WEB TOOLKIT (GWT)


The Google Web Toolkit is a set of tools for writing JavaScript applications in Java. The cornerstone of the tool suite is a Java to JavaScript compiler that can not only compile Java down to JavaScript, but can also compress and optimize your code as well. GWT was released to the public in June of 2006 and has been an overwhelming success, boasting 1 million downloads in its first year. The benefit of using GWT over some of the other JavaScript frameworks like JQuery or Ext-JS is the environment in which you code. GWT allows a Java developer to use the same tools they use today like Eclipse, Maven, and JUnit, making the transition from Java server-side development to GWT clientside development nearly seamless. The GWT toolkit comes ready with its own widget library, internationalization tools, image bundling tools, tools for client-server communication, and many others. Since its launch GWT has become an open-source project, and although led by the GWT team at Google, many from the community have contributed patches to the toolkit. GWT boasts a thriving community, proving for a multitude of free widgets, integration tools, and utilities. This reference card is a guide to everything that your IDE cant already tell you. Specifically, IDEs like Eclipse provide auto-completion capabilities for perusing a list of methods on an object, and often they also provide support for viewing javadocs in the IDE as well. This refcard is meant to supplement that capability by providing details that are only available in books and online documentation. Specifically this includes a CSS style for the widgets that ship with GWT, a reference for the JavaScript Native Interface, and a complete guide to the GWT module configuration file.

Adding a <link> element to the <head> of the HTML page, referencing an external CSS stylesheet.
<link type=text/css rel=stylesheet href=url-to-file.css />

www.dzone.com

Adding a <stylesheet> element to the GWT projects module configuration, causing the stylesheet to be injected into the host HTML page.
<stylesheet src=url-to-file.css/>

Most of the widgets that come with GWT have been pre-assigned CSS class names. For example, the Button widget uses the CSS class name gwt-Button. So you could set the width of all Button widgets in your application by using the following CSS rule. In order to reference a CSS class in a CSS rule you prefix the class name with a period ..
.gwt-Button { width: 100px; }

Style, Configuration and JSNI Reference

tech facts at your fingertips

Get More Refcardz


(Theyre free!)
n n

Element <description> <import> <description>

Description

bean. context or an individual Used to describe a Spring context definition. Imports another Spring container, Although ignored by the Documents the bean. Spring used by tools that document <description> can be contexts. by way of method replacement. Enables getter-injection a will be overridden to return Specifies a method that known as getter-injection. specific bean. Commonly of the bean. Only useful Allows for meta-configuration and acts configured that interprets when there are beans on the meta information. property reference into a specific Injects a value or a bean known as setter-injection. of the bean. Commonly the bean with a new implementation. Replaces a method of

<lookup-method>

OFFICIAL GWT WEB SITES


WebSite: http://code.google.com/webtoolkit/ Blog: http://googlewebtoolkit.blogspot.com/ Forum: http://groups.google.com/group/Google-Web-Toolkit
Element <alias> Description Creates an alias for a Defines a bean in the bean definition. <bean> <constructor-arg> Spring container. of the reference into an argument Injects a value or a bean known as constructor injection. beans constructor. Commonly

<meta>

<property> <replaced-method>

Attribute abstract autowire

Description

autowire-candidate class dependency-check

by and will not be instantiated If true, the bean is abstract the Spring container. Valid bean should be autowired. or Declares how and if a constructor, autodetect, values are byType, byName, no for no autowiring. into a candidate for autowiring If false, the bean is not another bean. name of the bean. The fully-qualified class setting on the should enforce property should Determines how Spring that all primitive type properties bean. simple indicates that all complex type properties be set; objects indicates or all. values are default, none, should be set. Other value by the should be instantiated Identifies a bean that is instantiated. container before this bean
tech facts at your fingertips

n n n n n

depends-on

GW T

Issue Tracker: http://code.google.com/webtoolkit/issues/ Articles: http://code.google.com/webtoolkit/articles.html Examples: http://code.google.com/webtoolkit/examples/ Dev Guide: http://code.google.com/webtoolkit/documentation/
DZone, Inc.
|

Authoritative content Designed for developers Written by top experts Latest tools & technologies Hot tips & examples Bonus content online New issue every 1-2 weeks

Subscribe Now for FREE! Refcardz.com

www.dzone.com

2
tech facts at your fingertips

GWT Style, Configuration and JSNI Reference

STYLING WIDGETS WITH CSS, continued

Widget HorizontalSplitPanel

Default Name .gwt-HorizontalSplitPanel { the panel } .gwt-HorizontalSplitPanel hsplitter { splitter } .gwt-HTML { } .gwt-Hyperlink { } .gwt-Image { } Note: Transformations between clipped and upclipped will result in the loss of any CSS style names that were set or added.

Altering Style Names


You can programmatically alter the CSS class name used on a widget by calling any of these methods. widget.setStylePrimaryName(styleName) In HTML you may provide any number of CSS class names on an element by separating them with spaces, like in the HTML snippet below.
<div class=style1 style2 style3></div>
HTML Hyperlink Image

Label ListBox MenuBar

.gwt-Label { } .gwt-ListBox { } .gwt-MenuBar { the menu bar itself } .gwt-MenuBar .gwt-MenuItem { menu items } .gwt-MenuBar .gwt-MenuItem-selected { selected menu items } .gwt-PasswordTextBox { primary style } .gwt-PasswordTextBox-readonly { dependent style set when the password text box is read-only } .gwt-PushButton-up {} .gwt-PushButton-down {} .gwt-PushButton-up-hovering {} .gwt-PushButton-down-hovering {} .gwt-PushButton-up-disabled {} .gwt-PushButton-down-disabled {} <any of the above> .html-face {} .gwt-RadioButton { } .gwt-RichTextArea { } .gwt-StackPanel { the panel itself } .gwt-StackPanel .gwt-StackPanelItem { unselected items } .gwt-StackPanel .gwt-StackPanelItem-selected { selected items } .gwt-SuggestBox { the suggest box itself } .gwt-SuggestBoxPopup { the suggestion popup } .gwt-SuggestBoxPopup .item { an unselected suggestion } .gwt-SuggestBoxPopup .item-selected { a selected suggestion } .gwt-TabBar { the tab bar itself } .gwt-TabBar .gwt-TabBarFirst { the left edge of the bar } .gwt-TabBar .gwt-TabBarRest { the right edge of the bar } .gwt-TabBar .gwt-TabBarItem { unselected tabs } .gwt-TabBar .gwt-TabBarItem-selected { additional style for selected tabs } .gwt-TabPanel { the tab panel itself } .gwt-TabPanelBottom { the bottom section of the tab panel (the deck containing the widget) } .gwt-TextArea { primary style } .gwt-TextArea-readonly { dependent style set when the text area is read-only } .gwt-TextBox { primary style } .gwt-TextBox-readonly { dependent style set when the text box is read-only } .gwt- ToggleButton-up {} .gwt- ToggleButton-down {} .gwt- ToggleButton-up-hovering {} .gwt- ToggleButton-down-hovering {} .gwt- ToggleButton-up-disabled {} .gwt- ToggleButton-down-disabled {} <any of the above> .html-face {} .gwt-Tree { the tree itself } .gwt-Tree .gwt-TreeItem { a tree item } .gwt-Tree .gwt-TreeItem-selected { a selected tree item } .gwt-VerticalSplitPanel { the panel itself } .gwt-VerticalSplitPanel vsplitter { the splitter }

The primary style name in GWT is defined as the first style name in the class attribute. In the example provided, this would be the style style1. Calling setStylePrimaryName() allows you to alter this first style. widget.addStyleDependentName(styleName) When you add a dependent style name, its name in the HTML is the primary name plus the depende nt name, separated with a dash (-). Example: Button button = new Button(); button.setStylePrimaryName(foo); button.addStyleDependentName(bar); Result:
<BUTTON class=foo foo-bar></BUTTON>

PasswordTextBox

PushButton

RadioButton RichTextArea StackPanel

widget.setStyleName(styleName) Using setStylename() will clear all current style names, including the primary style name, and adds the one provided. widget.addStyleName(styleName) Adds an additional style name to any existing style names. Example: Button button = new Button(); button.setStyleName(foo); button.addStyleName(bar); Result:
<BUTTON class=foo bar></BUTTON>
TabPanel TabBar SuggestBox

widget.removeStyleName(styleName) Allows you to remove an existing style name on a widget.


TextArea

Default GWT Widget Style Names


Most of the widgets provided by the GWT library have pre-defined primary style names. The following is a list of the default names for each widget.
Widget Button Checkbox DialogBox DisclosurePanel Default Name .gwt-Button { } .gwt-CheckBox { } .gwt-DialogBox { the box container } .gwt-DialogBox .Caption { the box caption } .gwt-DisclosurePanel { primary style } .gwt-DisclosurePanel-open { when open } .gwt-DisclosurePanel-closed { when closed } .header { the panel header area } .content { the panel content area }

TextBox

ToggleButton

Tree

VerticalSplitPanel

DZone, Inc.

www.dzone.com

3
tech facts at your fingertips

GWT Style, Configuration and JSNI Reference

GWT MODULE CONFIGURATION


A module in GWT is best described as a set of classes that are bound by a single module configuration file. The module configuration defines what classes are a part of the module, what other modules that the module depends on, as well as rules for deferred binding, resource injection, and everything else that the GWT compiler and shell needs to know about your module. A module configuration file is located in the GWT project, with an extension of .gwt.xml. The location on the classpath and the module configuration file name determine the full module name. Module Name = Java Package + Module File Name (-gwt.xml) For example, if you have a module configuration file named Demo.gwt.xml, in the java package com.gwtsandbox.demo, the module name would be com.gwtsandbox.demo.Demo.

Source Path
The source path is a relative path name used to override the default location of the client-side Java source destined to be compiled into JavaScript. The source path you specify is appended to the path where the module configuration file resides, and you may specify multiple source paths.
<source path=path/>

By default the source path is client. So by way of example, if your GWT module configuration file is located at com.example. MyApp.gwt.xml, then the default path of client will dictate that your client-side Java source will be located in the Java package com.example.client.*, as well as all packages below this one. All source code in the source path(s) must be able to be compiled to JavaScript with the GWT compiler. This implies that only classes from the JRE emulation library and GWT user library be used. For example, you can not include Java servlets or use the java.sql.* classes under this path.

Public Path

Hot Tip

The module configuration is only used at design and compile-time, it is not used at run-time. This is a common mistake for new GWT developers.

The public path is used to store non-Java files that need to be included in the application. This includes HTML files, JavaScript files, images, CSS, and anything else. By default this will be the public directory below where the module configuration is stored. You can override the default by using the <public> tag in the module configuration.
<public path=path/>

Simple Module Configuration


A simple module configuration must inherit the User module and specify a single entry point. The entry point is the class that implements the EntryPoint interface and acts as the starting point for the application.
<module> <inherits name=com.google.gwt.user.User /> <entry-point class=org.gwtsandbox.demo.client.Demo /> </module>

You may specify multiple public paths if required for your project.

Defining GWT-RPC Servlets


You can use the <servlet> tag in the module configuration to define your GWT-RPC servlets.
<servlet path=/path class=org.gwtsandbox.demo.server.Demo />

From the basic module configuration you can build on it by adding additional elements to inherit additional modules, change the default source path, add servlet mappings, and add deferred binding rules.

The path specified should be absolute.

Hot Tip

Inheriting Modules
If your GWT project needs to reference external GWT modules you must explicitly inherit them in your module configuration. The core GWT libraries are split into several modules, each of which is listed here. You will always need to include the User module, and optionally one or more of the others.
GWT widgets and core utilities
<inherits name=com.google.gwt.user.User />

These servlet mappings are for the benefit of hosted-mode use only, and does not imply that these mappings will be carried over to your production environment. For that you would set them up in the deployment descriptor, just as you would with any other servlet.

Resource Injection
You can have external JavaScript and CSS files automatically injected into the hosting web page. By injecting the resources you avoid the need to have the hosting HTML page explicitly include them with <link> and <script> tags. Resources loaded in this way will be loaded prior to the executing of the GWT application.
<script src=js-url/> <stylesheet src=css-url/>

RequestBuilder and associated classes


<inherits name=com.google.gwt.http.HTTP />

Internationalization tools and date/number formatting


<inherits name=com.google.gwt.i18n.I18N />

Tools for using RPC with JavaScript Object Notation


<inherits name=com.google.gwt.json.JSON />

XML parser and associated classes


<inherits name=com.google.gwt.xml.XML />

To inject a resource you can either place the JavaScript or CSS file into the public package of the GWT module (see above), referencing it with a relative path, or reference an external CSS file by using a full URL.

DZone, Inc.

www.dzone.com

4
tech facts at your fingertips

GWT Style, Configuration and JSNI Reference

GWT MODULE CONFIGURATION, continued Deferred Binding


In some cases you need to write low-level functionality that differs based on the client browser, or you need to trigger a generator to generate code at compile time. For these functions you use deferred binding. Deferred binding allows you to write code to an interface and have the concrete class determined at compile-time. For example, you may be familiar with GWTs RPC mechanism. You use the GWT.create() method to return a concrete class that can serialize and send your data to the server.
MyServiceAsync svc = (MyServiceAsync) GWT.create(MyService.class);

Generate-With and Replace-With Expressions


The following expression tags can be used within generate-with and replace-with tags. When any of the expression tags within the rule returns a true value, the code generation or class replacement is performed.
<when-property-is name=prop-name value=matched-value />

Returns true when the value of the property matches the specified value. For details on setting properties, see the Setting Properties section.
<when-type-assignable class=assignable-type />

The target class is tested to see if it can be assigned to the specified assignable type.
<when-type-is class=type />

When this code is compiled the compiler examines the argument passed to the create method, then attempts to match the target class to a set of rules that reside in the module configuration.

Similar to when-type-assignable, except that the class must be an exact match.


<all>, <any>, <none>

Using Generate-With to Trigger Generators


In this case the compiler rule is specified in the module com. google.gwt.user.RemoteService, which is inherited from your module when using GWT-RPC.
<generate-with class=com.google.gwt.user.rebind.rpc. ServiceInterfaceProxyGenerator> <when-type-assignable class=com.google.gwt.user.client.rpc.RemoteService/> </generate-with>

Use these expression tags to group other expression tags. The <all> tag implies that all of the tags contained within it must be true. The <any> tag requires only one of the containing expressions to be true. The <none> tag requires that all contained expression tags return false.

Setting Properties
Property names and their possible values can be defined in the module configuration.
<define-property name=prop-name values=vals />

This rule states that when the target class of the GWT.create() is assignable to RemoteService, that the generator ServiceInterfaceProxyGenerator is executed. The generator then creates the code and returns the name of the class that should be returned by the create method.

Creates a new property and comma separated list of the possible values. For example, you could use the following to define a view property that could be used to define three unique view types for the application.
<extend-property name=prop-name values=vals />

Extends the possible values for a property that has already been defined.
<set-property name=prop-name value=value />

Using Replace-With to Trigger Class Replacement


The other use of deferred binding is to specify a alternate class to be returned by GWT.create() based on available properties. The most common use of this is to use an alternate class depending on the client browser. The property that can be examined to determine this is user.agent. For example, the DOM class in GWT is used to perform low-level functions, where the browser implementations can differ. In order to allow for different browsers the following rule can be found in the com.google.gwt.user.DOM module.
<replace-with class=com.google.gwt.user.client.impl.DOMImplIE6> <when-type-is class=com.google.gwt.user.client.impl.DOMImpl/> <when-property-is name=user.agent value=ie6/> </replace-with>

Sets the value of a defined property. The value must be one of the possible values as defined by the <define-property> tag or one of the extended values as defined by the <extended-property> tag.
<property-provider name=prop-name>

Property values can be set at run-time by supplying a property provider. The contents of the <property-provider> tag is a block of JavaScript that returns the property value. The JavaScript code must be placed in a CDATA block to avoid parsing errors.
<property-provider name=view><![CDATA[ var view = __gwt_getMetaProperty(view); if (!__gwt_isKnownPropertyValue(view, view = basic; } return view; ]]></property-provider> view)) {

In the DOM class the following code is used to create the correct implementation of the DOM class.
DOMImpl impl = (DOMImpl) GWT.create(DOMImpl.class);

When the user.agent property is ie6 the replace-with rule specified above will return a DOM implementation that is specifically designed for Internet Explorer.

The JavaScript block can utilize the __gwt_getMetaProperty() method to get the value of GWT property defined in a <meta> tag in the HTML page, and can use __gwt_isKnownPropertyValue() to test that it is an allowed value. Heres an example of using the HTML <meta> tag to set the view as extended.
<meta name=gwt:property content=view=extended />

DZone, Inc.

www.dzone.com

5
tech facts at your fingertips

GWT Style, Configuration and JSNI Reference

JAVASCRIPT NATIVE INTERFACE


The JSNI interface is used as a gateway between your Java and JavaScript code. It allows you to create Java methods that have JavaScript code in the body, and then to have the JavaScript code call Java methods.

Calling Java Methods from JavaScript, continued


The instance expression is the name of the variable passed into the method, or this to refer to the class instance, or blank for calling static methods. The class name is the fully qualified name, followed by double colons and the method name. The parameter signature is a list of the parameter types in the method that you are calling. This is needed in order to distinguish between two Java methods that have the same name but different sets or parameters. The following table defines the codes used to specify the parameter type.
Type Code Z B C S I J F D L fully-qualified-class ; [ type Java Type Boolean Byte Char Short Int Long Float Double Java objects. Uses / to delimit parts of the package name, e.g. Ljava/lang/String; Int

JSNI Methods
Methods containing JavaScript must use the native modifier so that a Java compiler will not validate its contents. Methods in Java marked as native may not have a method body.
public native void doStuff ();

GWT introduces a special comment syntax that follows the Java native rule of having no method body, while allowing you to provide JavaScript code that can be picked up by the GWT compiler.
public native void doStuff () /*-{ // JavaScript code goes here }-*/;

JSNI Variables
Due to the way GWT applications load, the window and document JavaScript objects point to the wrong objects. GWT provides these special variables for use in JSNI methods.
Variable $wnd $doc Purpose Alias for the JavaScript window object Alias for the JavaScript document object

Types are listed one after the other without spaces. For example, ZLjava/lang/String;[F defines the method signature (boolean, String, float[]). The argument list is exactly that, a list of the arguments being passed to the method. Below are examples of calling methods from JavaScript on well known Java types. Calling instance method with no arguments:
public native long extractTime (Date date) /*-{ return [email protected]::getTime()(); }-*/;

public native void doStuff () /*-{ $wnd.alert(Hello World); }-*/;

Passing Values Between Java and JavaScript


You can pass both Java primitives and objects into a JSNI method. The following rules define how Java values are available in JSNI methods and visa versa.
Java type numeric primitive (byte, short, char, int, long, float, double) boolean primitive String JavaScriptObject Java array Where created Both JavaScript type numeric value

Calling instance method with a single argument:


public native void appendText (StringBuffer sb, String txt) /*-{ [email protected]::append(Ljava/lang/String;) (txt); }-*/;

Both Both Must be created in JSNI method Must be created in Java

boolean value string value An object Not directly usable, can be passed back into Java code Special, see below

Calling static method with multiple arguments:


public native int maxValue (int x, int y) /*-{ return @java.lang.Math::max(II)(x, y); }-*/;

All other Java objects

Must be created in Java

Accessing Java properties from JavaScript


Accessing properties of a Java object from JavaScript is similar to calling a Java method. [instance-expr.]@class-name::field-name The same value rules apply as calling methods (see Calling Java Methods from JavaScript). The instance expression is the variable name passed into the JSNI method, this for the instance of the class, or left off to access a static property. The class name is the fully qualified package and class, and is separated from the field name with two colons. On the following page are some examples.
www.dzone.com

JSNI methods that have Java objects passed to them may use a special syntax in order to call methods and access properties of the object.

Calling Java Methods from JavaScript


The following syntax is used to call a Java method from a JSNI method.
[instance-expr.]@class-name::method-name(param-signature) (arguments)

DZone, Inc.

6
tech facts at your fingertips

GWT Style, Configuration and JSNI Reference

JAVASCRIPT NATIVE INTERFACE, continued


Accessing Java properties from JavaScript, continued
Reading and writing to field on this
// int currentIndex; var cur = [email protected]::currentIndex; [email protected]::currentIndex = 0;

You can use JSNI to dynamically create JavaScript methods that can be used by external JavaScript code to make calls into your application. The following code creates a JavaScript method jsMethod(string) on startup in the browser that can be used to call the javaMethod(String) in the GWT application.

Hot Tip

Reading and writing to field on object


// String welcomeMessage; var msg = [email protected]::welcomeMessage; [email protected]::welcomeMessage = Hello;

public void onModuleLoad () { createJsMethod(this); } private native void createJsMethod (Main obj) /*-{ $wnd.jsMethod = function (s) { return [email protected]::javaMethod(Ljava/lang/ String;)(s); }; }-*/; public String javaMethod (String in) { return I got your message: + in; } <button onclick=alert(jsMethod(Hello))>Say Hello</button>

Reading and writing to a static field


// boolean lastResult; var last = @org.example.Demo::lastResult; @org.example.Demo::lastResult = true;

ABOUT THE AUTHOR

RECOMMENDED BOOK
GWT in Action shows you how to set up your development environment, use and create widgets, communicate with the server, and much more. Readers will follow an example running throughout the book and quickly master the basics of GWT: widgets, panels, and event handling.

Robert Hanson
Robert Hanson is an Applications Manager for Quality Technology Services, a company providing hosting, managed services, and application development. He is passionate about programming and architecture, and has developed opensource software for both the Perl and Java communities. His latest venture is the GWT Widget Library, a set of tools for use with the Google Web Toolkit, a toolkit allowing you to write JavaScript applications in Java. In 2007 Robert co-authored the book GWT in Action with Adam Tacy, providing instruction on using the Google toolkit. Robert provides tutorials and random thoughts about the craft on his blog found at roberthanson.blogspot.com.

Publications
n

Blog
Roberthanson.blogspot.com

BUY NOW
books.dzone.com/books/gwt-in-action

GWT in Action with Adam Tacy

Get More FREE Refcardz. Visit refcardz.com now!


Upcoming Refcardz:
Core Seam Core CSS: Part III Hibernate Search Equinox EMF XML JSP Expression Language ALM Best Practices

Available:
Essential Ruby Essential MySQL
JUnit and EasyMock Getting Started with MyEclipse Spring Annotations Core Java Core CSS: Part II PHP Getting Started with JPA JavaServer Faces Core CSS: Part I Struts2 Core .NET Very First Steps in Flex C# Groovy NetBeans IDE 6.1 Java Editor RSS and Atom

FREE

Visit refcardz.com for a complete listing of available Refcardz.


DZone, Inc. 1251 NW Maynard Cary, NC 27513

Design Patterns
Published June 2008

ISBN-13: 978-1-934238-07-3 ISBN-10: 1-934238-07-4


50795

DZone communities deliver over 4 million pages each month to more than 1.7 million software developers, architects and decision makers. DZone offers something for everyone, including news, tutorials, cheatsheets, blogs, feature articles, source code and more. DZone is a developers dream, says PC Magazine.

888.678.0399 919.678.0300 Refcardz Feedback Welcome [email protected] Sponsorship Opportunities [email protected]

9 781934 238073
Version 1.0

Copyright 2008 DZone, Inc. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, photocopying, or otherwise, without prior written permission of the publisher.

$7.95

#82
Get More Refcardz! Visit refcardz.com
CONTENTS INCLUDE:
n n

About Cloud Computing Usage Scenarios Underlying Concepts Cost Data Tier Technologies Platform Management and more...

Cloud Computing
By Daniel Rubio
also minimizes the need to make design changes to support one time events.

Getting Started with

ABOUT CLOUD COMPUTING


Web applications have always been deployed on servers connected to what is now deemed the cloud. However, the demands and technology used on such servers has changed substantially in recent years, especially with the entrance of service providers like Amazon, Google and Microsoft. These companies have long deployed web applications that adapt and scale to large user bases, making them knowledgeable in many aspects related to cloud computing. This Refcard will introduce to you to cloud computing, with an emphasis on these providers, so you can better understand what it is a cloud computing platform can offer your web applications.

Automated growth & scalable technologies


Having the capability to support one time events, cloud computing platforms also facilitate the gradual growth curves faced by web applications. Large scale growth scenarios involving specialized equipment (e.g. load balancers and clusters) are all but abstracted away by relying on a cloud computing platforms technology. In addition, several cloud computing platforms support data tier technologies that exceed the precedent set by Relational Database Systems (RDBMS): Map Reduce, web service APIs, etc. Some platforms support large scale RDBMS deployments.

www.dzone.com

CLOUD COMPUTING PLATFORMS AND UNDERLYING CONCEPTS


Amazon EC2: Industry standard software and virtualization
Amazons cloud computing platform is heavily based on industry standard software and virtualization technology. Virtualization allows a physical piece of hardware to be utilized by multiple operating systems. This allows resources (e.g. bandwidth, memory, CPU) to be allocated exclusively to individual operating system instances. As a user of Amazons EC2 cloud computing platform, you are assigned an operating system in the same way as on all hosting providers that preceded cloud computing platforms.

USAGE SCENARIOS

Pay only what you consume


Web application deployment until a few years ago was similar to most phone services: plans with alloted resources, with an incurred cost whether such resources were consumed or not. Cloud computing as its known today has changed this. The various resources consumed by web applications (e.g. bandwidth, memory, CPU) are tallied on a per-unit basis (starting from zero) by all major cloud computing platforms. This can be beneficial for web applications that have disproportionate resource requirements (e.g. bandwidth intensive vs. memory intensive), since only consumed resources incur in cost.

Getting Started with Cloud Computing

One time event provisioning


Web applications are often subject to traffic spikes due to one time events (e.g. National broadcast exposure, SuperBowl commercial). Not only can this type of provisioning be expensive, but often times difficult to achieve. By using a cloud computing platform, provisioning of this sort can be greatly simplified. Cloud computing platforms allow web applications on tap access to resources without an application owner (i.e. you) footing the bill for stand-by equipment. Additionally, since the underlying architecture of a web application is built around a cloud computing platform, this
DZone, Inc.
|

Get over 70 DZone Refcardz FREE from Refcardz.com!

www.dzone.com

Getting Started with Cloud Computing

The primary difference is that such an instance is highly customizable, in addition to having its resources tallied on a per unit basis, as well as being equipped to scale to larger loads on a case by case basis. Key characteristics of Amazon EC2 Choice of industry standard server operating system (e.g. Windows, Linux, Solaris) Deployment building block consists of an Amazon Machine Image(AMI). An AMI is a standard server operating system image with pre-selected applications. AMIs can be found at: http://developer.amazonwebservices.com/
connect/kbcategory.jspa?categoryID=171

Application development tightly integrated with Microsofts Visual Studio, in addition to having its own Software Development Kit (SDK)
http://go.microsoft.com/fwlink/?LinkID=128752

Free usage under CTP (Community Technology Preview), but limited to 2000 hours, 50 GB of persistent storage and 20GB/day bandwidth.

Selection Grid by Web Application Language


Web application language PHP .NET Java Python Ruby Amazon EC2 Google App Engine Microsoft Azure

Application development open to any server-side development tool, compatible with industry standard server operating system.

Google App Engine: Google infrastrcture & SDK


Googles cloud computing platform is heavily based on Googles own server infrastructure. As a user of Googles App Engine, your web applications are built on the same principles as Google applications. Key Characteristics of Google App Engine Built on Google infrastructure (i.e. No commercially available server operating system). Choice of either Python or Java run-time for running web applications. Other pre-selected applications are available via services (e.g. Mail, Memcache). Application development tightly pegged to Googles Software Development Kit (SDK). (http://code.google.com/ appengine/downloads.html#Download_the_Google_App_Engine_SDK) Tightly integrated with Googles web services APIs (e.g. For authenticating users and sending email). Free quotas for applications limited to: 500MB of persistent storage and CPU & bandwidth for approximately 5 million page views a month.

Resources (Bandwidth, CPU, I/O)


Cloud computing providers keep track of consumed resources on a more granular basis than traditional service providers. The following list illustrates a series of consumption units: Server Per Hour Bandwidth Per Gigabyte Storage Per Gigabyte CPU/Memory Per unit Emails Per recipient This approach gives an application owner (i.e. you) greater leverage and cost effectiveness. The next section on Costs illustrates case scenarios with side by side comparisons for the various cloud computing platforms.

Other cloud computing providers


In addition to Amazons EC2 , Googles App Engine and Microsofts Azure cloud computing platforms, other providers in this space have also emerged. Some of these providers include: Slice Host - http://www.slicehost.com/ Linode - http://www.linode.com/ Prgmr - http://prgmr.com/ Heroku - http://heroku.com/ Rackspace - http://www.rackspacecloud.com/ GoGrid - http://www.gogrid.com/ Many of these providers rely on industry standard virtualization and operating system technology, making them close competitors to Amazons EC2 cloud computing platform. Comparing these other providers to Googles App Engine or Microsofts Azure cloud computing platforms can be more difficult. This in light of the greater proprietary nature of both Googles and Microsofts platforms. Still, with the brand recognition and breadth of companies like Amazon, Google and Microsoft, these other cloud computing providers can often fall short of being deemed platforms. This can be due to a lack of end-to-end integration (e.g. application development, tools and application deployment),
|

Microsoft Azure: Azure & Visual Studio


Microsofts cloud computing platform is tightly integrated with Microsofts product line. As a user of Microsoft Azures cloud computing platform, you can expect your web applications to have streamlined integration with Microsofts product line. Key Characteristics of Microsoft Azure Operates on Microsofts virtualized 64-bit Windows Server 2008 operating system. Support for .NET applications, as well as other third party applications available for the same OS running on a standard server (i.e. unmanaged code apps). Support for .NET services: .NET Access Control Service & .NET Service Bus. Originally known as BizTalk services, focused on enterprise application scenarios.
DZone, Inc.

www.dzone.com

Getting Started with Cloud Computing

lack of scalable data tier technology options, to service level agreements (e.g. uptime and indemnity) that can only be offered by large corporations the size of Amazon, Google and Microsoft. Nevertheless, some of these other cloud computing providers have carved out niche markets in the cloud computing market. Some do so by adopting more aggressive pricing structures, catering to the specific needs of certain communities (e.g. Ruby/Rails, or Linux), or providing better customer service than their larger rivals.

Assuming the data for a mailing list or report batch is already stored on a cloud computing platform: A conservative estimate of 1 day (24 hours) for processing and 5GB of outgoing bandwidth, would equal approximately $3.00 in cost from each of the previous cloud computing providers. As you can surely attest, at this price point its only such cloud computing providers that are able to offer dedicated resources at such competitive rates, especially compared to leasing your own hardware or using one of the many commercial hosting providers.

COSTS
Cloud computing platform costs are fairly competitive. However, some metrics used by providers are sufficiently different from others to make holistic cost comparisons difficult. For example, stored data can have added costs related to the number of Input/Output operations or transactions. Other aspects, like CPU consumption, can also vary in the form they are tallied by provider. The following table illustrates comparable resources and their associated costs in each cloud computing platform.
Resources Outgoing bandwidth (Gigabyte) Incoming bandwidth (Gigabyte) CPU time (hours) Stored data (Gigabytes per month) Recipients emailed (Recipients) Amazon EC2 (Small instance) $0.10 (Over 150 TB) ~$0.17(First 10 TB) $0.10 Google App Engine $0.12 $0.10 Microsoft Azure $0.15 $0.10

Spot pricing on Amazon EC2


Providing what can potentially be the most competitive rates among cloud computing platforms, Amazon EC2 offers what it calls spot instances. A spot instance allows you to make a bid for unused Amazon EC2 capacity and run applications for as long as your bid exceeds the current spot price. For web application tasks that are not time sensitive (e.g. long-running scientific calculations or historical reports) this approach can substantially reduce a web applications running costs. Since spot prices change based on supply and demand, this allows you to obtain the most competitive rates at any given time, without exceeding your maximum bid.

$0.085 (Unix/Linux)~ 0.12 (Windows) $0.10 (+ $0.10 per 1 million I/O requests N/A

$0.10 $0.15

$0.12 $0.15 ( +$0.01 for 10K transactions) N/A

$0.0001

Cost Calculators
For an accurate cost estimate pertaining to each cloud computing platform, I recommend you use the following calculators offered by each provider: Amazon EC2 http://calculator.s3.amazonaws.com/calc5.html

More information on Amazon EC2 Spot instances can be found at: http://aws.amazon.com/ec2/spot-instances/
Figure - Amazon EC2 spot pricing behavior

Google App Engine http://code.google.com/appengine/docs/billing.html

CLOUD COMPUTING PLATFORMS & DATA TIER TECHNOLOGIES

(ONLY budgeting resources No calculator)

Microsoft Azure http://www.microsoft.com/windowsazure/tco/

Cost case scenarios: Mailing list or report processing


To give added cost context to the use of cloud computing platforms in web applications, lets take the case of common one-time events in web applications. Mailing list or end of month report processing can consume substantial resources from a web applications main environment, in addition to being short-lived tasks. Instead of leasing a stand-alone server for such tasks or hampering the performance level of a web applications main environment, a cloud computing platform can be a cost effective solution.
DZone, Inc.
|

Scaling a web applications data tier entails a different approach than scaling its business logic and web tier. This is due to limitations and features pertaining to specific data tier technologies. Most web applications are underpinned by Relational Database Management Systems (RDBMS) that use Structured Query Language (SQL) as their access mechanism. Though a series of cloud computing platforms now offer RDBMS/SQL data tier support, many cloud computing platforms grew to address data tier demands for which RDBMS/SQL technology had limiting factors. Namely those pertaining to data mining and the complexities involved in providing fault-tolerant & high-availability RDBMS/SQL solutions.
www.dzone.com

Getting Started with Cloud Computing

Hot Tip

NoSQL movement The industry has blossomed healthy debates over the suitability of RDBMS/SQL vs. alternate data tier technologies for developing large scale web applications. Now often cataloged as the NoSQL movement http://en.wikipedia.org/wiki/nosql

Amazon Relational Database Service Provides data tier capabilities for deploying RDBMS/SQL web applications. Amazon Relational Database Service has the following characteristics: Out-of-the-box RDBMS/SQL capabilities built on MySQL. Scale and compute capacity managed through Amazon APIs. Automated backup and patch management.

Amazon EC2 Data Tier


Amazons cloud computing platform offers the largest array of data tier technologies. Amazon SimpleDB SimpleDB technology has the following characteristics: Storage and retrieval based on Amazon API; available via web service. Low administrative overhead compared to RDBMS (e.g. No index maintenance and performance tuning required) Schema-less; requiring no up-front data modeling tasks. Provides the building block for querying Amazon S3 data. Amazon Simple Storage Service (S3) Whereas Amazon SimpleDB provides the foundations for querying data in Amazons EC2 cloud computing platform, Amazons Simple Storage Service (S3) is used for the actual storage of data. Simple Storage Service (S3) has the following characteristics: Storage of objects between 1 byte and 5 gigabytes. REST and SOAP interfaces, as well as authentication mechanisms. Objects are assigned a unique ID, with meta-data assignment done in Amazon SimpleDB for querying purposes. Built on Amazon infrastructure. Amazon Simple Queue Service Provides data tier capabilities similar to those of message orientated middleware ( http://en.wikipedia.org/wiki/Message-oriented_ middleware ) for web applications. Amazon Simple Queue Service has the following characteristics: Messages can contain up to 8 KB of text in any format. Messages can be sent and read simultaneously. Access is supported through standard SOAP web services. Amazon Elastic MapReduce Provides data tier capabilities based on Googles MapReduce framework (http://en.wikipedia.org/wiki/MapReduce) built on Amazons EC2 cloud computing platform. Amazon Elastic MapReduce has the following characteristics: Out-of-the-box MapReduce capabilities built on Apaches MapReduce implementation Hadoop. Depends on Amazon Simple Storage Service (S3). Support for third party MapReduce tools (e.g. Karmasphere)
DZone, Inc.
|

Google App Engine Data Tier


Googles cloud computing platform is built entirely on Googles data tier technology stack. Googles App Engine data tier has the following characteristics: Storage and retrieval based on either Java available via Java Data Objects (JDO), Java Persistence API (JPA) or low-level datastore API as well as Python available via a data modeling API and a SQL-like query language called GQL. Schema-less; requiring no up-front data modeling tasks. Built on Google infrastructure (i.e. BigTable, Google File System).

Figure - Google App Engine Data Tier Advantages

Microsoft Azure Data Tier


Microsofts cloud computing platform offers similar data tier solutions to the previous cloud computing platforms, based on Microsoft technology. Windows Azure Storage Service Storage and retrieval based on .NET API: ADO.NET or LINQ, as well as web services (e.g. REST). Schema-less; requiring no up-front data modeling tasks. Built on Microsoft infrastructure, including storage replication. Windows SQL Azure Out-of-the-box RDBMS/SQL capabilities built on Microsoft SQL Server. Minimal operational management (e.g. Disk usage, log files) Synchronization availability between various RDBMS instances (a.k.a Huron Data Sync)
www.dzone.com

Getting Started with Cloud Computing

CLOUD COMPUTING PLATFORM MANAGEMENT


For all the benefits of cloud computing platforms, the term cloud often comes with the connotation of loosing control over ones web applications and being at the mercy of a service provider. While its true that some cloud computing platforms have certain proprietary elements that can lock-in your applications to their service offerings, cloud computing management and security concerns are often unfounded.

Google App Engine Administrative console: Basic web console for managing Google App Engine.
https://appengine.google.com/

Google App Engine API: Googles App Engine development kit (SDK) includes an API to communicate remotely with Google App Engine servers. Python - http://code.google.com/appengine/docs/python/tools/ Java - http://code.google.com/appengine/docs/java/tools/ ) Microsoft Azure Microsofts Azure computing platform can be managed through the following means: Microsoft Azure Administrative console: Basic web console for managing Windows Azure instances.
https://windows.azure.com/Cloud/Provisioning/Default.aspx

Cloud computing platform management


Management of cloud computing platforms which is to say provisioning or modifying (e.g. starting, stopping or deleting) an underlying environment is achieved by either a providers administrative web console, through APIs or other third party tools. Administrative web consoles provide practical access to standard cloud computing tasks. APIs on the other hand allow the execution of more sophisticated cloud management chores, such as the integration of tasks into custom applications or automation of tasks altogether. Third party tools can range from browser plug-ins to open source libraries. Amazon EC2 management Amazons cloud computing platform can be managed through the following means: Amazon EC2 Administrative console: Basic web console for managing EC2 instances, Elastic Block Store volumes and modifying configuration settings (e.g. I.P addresses).
http://aws.amazon.com/console/

Windows Azure API: Windows Azure development kit (SDK) includes an API to communicate remotely with Windows Azure servers.
http://msdn.microsoft.com/en-us/library/dd179367.aspx

Windows Azure Management Tool: Provides a desktop (i.e. fat-client) to communicate remotely with Windows Azure servers. http://code.msdn.microsoft.com/windowsazuremmc

CLOUD COMPUTING PLATFORM SECURITY


Generally speaking, security for web applications running on cloud computing platforms is no different than security pertaining to any web application accesible to the public at large. Issues such as code injection ( http://en.wikipedia.org/wiki/Code_injection ) or cross-site scripting ( http://en.wikipedia.org/wiki/Cross_site_scripting ) can just as easily present themselves in web applications running on cloud computing platforms, given they are issues entirely under the control of an applications designer. As a user of a cloud computing platform, your security concerns should span to contemplate the security vulnerabilities and security limitations inherent to a providers services, in addition to those of web applications in general. The following sections enumerate key security characteristics to take into account when choosing a cloud computing platform. Amazon EC2 security characteristics Full access to host operating system instance. Vulnerability and hardening policies are the responsibility of a user, as with any other public operating system. Amazon Security groups to facilitate and limit access to instances by port, protocol and or incoming IP. Optional multi-factor authentication, to limit access through a six-digit, single-use code from an authentication device in your physical possession ( http://aws.amazon.com/mfa/ ) Google App Engine security characteristics Access to underlying host provided entirely through a Google account. Limiting a users security accountability (e.g. no operating system to harden)
|

Amazon CloudWatch: Advanced web console billed separately for determining resource utilization, operational performance, and demand metrics (e.g. CPU utilization, disk reads and writes, and network traffic).
http://aws.amazon.com/cloudwatch/

Amazon EC2 API: Web services API for inspecting and modifying EC2 instances from remote/custom applications.
http://docs.amazonwebservices.com/AWSEC2/latest/APIReference/

Libcloud API: Python API for inspecting and modifying EC2 instances from remote/custom applications.
http://incubator.apache.org/libcloud/

Elasticfox & S3Fox browser plug-ins: Firefox plug-ins for managing EC2 instances & EC3 data. Elasticfox - http://developer.amazonwebservices.com/connect/entry.
jspa?externalID=609

S3Fox - http://developer.amazonwebservices.com/connect/entry.
jspa?externalID=771

Lifeguard: provides an automatic, Spring based monitoring solution to dynamically scale EC2 resources based on load.
http://code.google.com/p/lifeguard/issues/list

Google App Engine Googles App Engine computing platform can be managed through the following means:
DZone, Inc.

www.dzone.com

Getting Started with Cloud Computing

No custom domain SSL certificate support (i.e. https:// access). SSL is supported, but only routed via a domain in the form
https://your-app-id.appspot.com

Role based access mechanisms. Supported are Web roles as defined by ASP.NET and Worker roles for general purpose tasks.

Google Secure Data Connector (SDC) support. Allows data encryption between applications running on Google App Engine and a corporate network. Microsoft Azure security characteristics Access to underlying host provided entirely through Windows Live ID account, limiting a users security accountability. Windows host operating system instance with limited security accountability. Updates are performed automatically.

CLOUD COMPUTING TEAM BLOGS


In order to keep abreast on the latest offerings made by cloud computing providers, I recommend you consult each platforms team blog. Google App Engine team blog:
http://googleappengine.blogspot.com/

Amazon EC2 team blog:


http://aws.typepad.com/

Microsoft Azure team blog:


http://blogsmsdn.com/windowazure/

ABOUT THE AUTHOR

RECOMMENDED BOOK

Daniel Rubio is an independent technology


consultant with over 10 years of experience in enterprise and web based systems. He is the author of several books focused on enterprise Java, in addition to participating as technical writer and editor for several online technical publishers. He maintains a blog covering software platforms and emerging technologies at http://www.webforefront.com/

This book is an industry-leading primer on cloud computing: its background, the purpose it serves, how the cloud can be best utilized, which platforms offer which features, and how to get started.

BUY NOW
books.dzone.com/books/cloud-computing

Bro

ugh

t to

you

by...

Professional Cheat Sheets You Can Trust


Exactly what busy developers need: simple, short, and to the point.
r

#8
z.co m

it ! V is arz

E: LUD IN C y TS bilit EN onsi NT esp CO of R in Cha and m Com reter rp Inte tor ... ore Itera tor dm dia d an Me rver tho se Me S Ob RN plate TTE Tem
n n n n n n n

ired Insp e by th GoF ller se Best

ns tter Pa sign De
Cha in e of R ns spo ibil ity, con tinu ed
re le a que st an d th ndle e ha ue req r doe snt st w ith th e ha

nald cDo nM Jaso By


have to ndle

James Ward, Adobe Systems

one

DZone communities deliver over 6 million pages each month to


C

e to th nce in fere ted k re s lis ctquic PA s, a es a bje ern IGN tt vid s, le O pro n pa DES sab iagram . UT fcard F) desig of Reu r ple s re ss d o ABO oke xam ents des cla ttern our (G Inv de h lem n Pa of F worl suc s: E inclu esig cts D ang attern real ern is D AN Th P obje enting 23 G patt , and a uct MM inal Design . Each m nd str tion ple CO orig ma k re con rma om ir im boo Softwa nt teC d to info the cre Clie the d Use om age nd Con () ns: d fr ente on, us ma ct cute Ori tter Com ) uple s obje nati ( +exe low l Pa eco is al rge cute ch xpla ona ed la e . Th s su . ati nb +exe bject nship form bjects Cre y ca an o tio e d to rate o d as ed rela ms, t th eate Use rith tha e tr ject bas . . ispa ns: lgo b to b er jects lly o g it stem tter many d ge a iv b sy win ona Pa ana allo traditi Rece en o ers. ral en uest ord to m betwe ctu twe req ndled in riant n. sa sed s Stru s be an . in va late catio e ha s: U ilitie psu at c invo to b llbacks es or cture the Enca quest s th ttern sponsib d ca stru nt tim lity. ling re g l Pa ship ng an tiona at varia the hand pose ssin func ueui tion iora , and re ject Pur led k roce to be ob av as q rela us p llbac be hand ed. y the Beh nships n be ed rono tionalit y need ject ed ca to from ch ne b d ca an tio You ne s need asyn func sts is couple ith o that st the rn the without n it is rela que ar ls w ate ips Reque y of re be de cilit d patte ssing entatio particul nsh or Dea e. ould ce Use to fa an r sh A hist pro implem ents its ting. n latio pe: pe used e comm voke for ec m Whe ntim s re al Sco ely toty The in exp th ueue actu d imple wid clas Pro ject ed at ru ue is are utilizing a job q of the ue C Ob ues with y e que the que g to en dg que s. B an en als xy . Job orithm be giv knowle that is terface Pro e ch : De e time g ct b n e in S r le of al ed ca to have d obje of the er mp cop pil rato ut an Exa serv nes ss S at com exec e queue comm Deco Ob confi S Cla e th B d the n . Th for de nge king leto ithin invo hm w Faca cha Sing od tory
n n n n

nd le a outc ay ha an tial hand sm hen oten ject le to . .W le p le ob tern ethod bject be ab tab pat ultip ecific o should cep n M this if the m up the s sp an ac d e ents ject ime. d is be a lem ks to se e passe de to of ob at runt handle imp b Use ec set til co t ld ch ges n A n ined being shou peats un paren ime ngua erm Whe not e la the runt or if it det ore s re uest som d tion proces e no m req g in metho cep n A e e ar a ndlin e ex ack th ther n ha rown in ndle th ll st until ptio th e ca Exce ion is sm to ha up th tered or ral un le cept echani passed avio co ex mp Beh . is en am Exa hen tion uest to has ack. W ject q cep st Ob e re e ex call le th nd th hand s to ha ct obje

ome.

Upcoming Titles
Blaze DS Domain Driven Design Virtualization Java Performance Tuning Expression Web Spring Web Flow BPEL

Most Popular
Spring Configuration jQuery Selectors Windows Powershell Dependency Injection with EJB 3 Netbeans IDE JavaEditor Getting Started with Eclipse Very First Steps in Flex

re f c

Download Now

a rd

Refcardz.com

Get

Mo

ef re R

.com

DZone, Inc. 140 Preston Executive Dr. Suite 100 Cary, NC 27513 888.678.0399 919.678.0300

ISBN-13: 978-1-934238-82-0 ISBN-10: 1-934238-82-1

50795

ww

more than 3.3 million software developers, architects and decision


S S

z w. d

Fac ract Abst r pte Ada B e ridg

makers. DZone offers something for everyone, including news,


B

Y tutorials, cheatsheets, blogs,IBfeature articles, source code and more. ILIT NS


S

f in o ty Cha nsibili o Resp d man om C B site po Com

Me

diato m

Me

ento

Ob
or

ject

Beh

avio

ral

O AIN DZone is a developers dream, says PC Magazine. CH


>> ace terf r <<in andle () H uest req ndle +ha

ES FR

PO

succ

ess

Sponsorship Opportunities [email protected]

9 781934 238820
Version 1.0

Copyright 2010 DZone, Inc. All rights reserved. No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in any form or by means electronic, mechanical, 2 ler nt and Clie photocopying, or otherwise, without prior written permission ConcreteHqpublisher. of the uest ( )

ern

Con

cre

teH

and () uest

1 ler

+ha

ndle

re

hand

le a

req

uest

ki by lin

ng

ww

z w.d

one

.c o

$7.95

Build

er

Meth tory Fac t eigh Flyw ter rpre Inte B tor Itera

State

algo

rit

Stra

y od Meth plate Tem teg Visit or

Refcardz Feedback Welcome [email protected]

You might also like