Saturday, October 31, 2009

XMLRPC for beginners




XML-RPC with the Incutio PHP Library: A Beginner's Guide



XMP-RPC stands for XML Remote Procedure Calling. It is a protocol for making and receiving procedure calls over the internet.



What this means is that different computers can use XML-RPC to "ask each other questions". Using XML-RPC is just like making a function call in PHP, only the computer that executes the function could be thousands of miles away.



With the Incutio XML-RPC Library, making and receiving XML-RPC requests is almost as simple as calling native PHP functions. Here's some sample code, which calls a function entitled "test.getTime" on our simple demonstration server:



$client = new IXR_Client('http://scripts.incutio.com/xmlrpc/simpleserver.php');

$client->query('test.getTime');
print $client->getResponse();
// Prints the current time, according to our web server


With error checking, the above code looks like this:



$client = new IXR_Client('http://scripts.incutio.com/xmlrpc/simpleserver.php');

if (!$client->query('test.getTime')) {
die('An error occurred - '.$client->getErrorCode().":".$client->getErrorMessage());
}
print $client->getResponse();


You can also send arguments along with your queries:



$client = new IXR_Client('http://scripts.incutio.com/xmlrpc/server.php');

if (!$client->query('test.add', 4, 5)) {
die('An error occurred - '.$client->getErrorCode().":".$client->getErrorMessage());
}
print $client->getResponse();
// Prints '9'


Arguments are not limited to simple values. You can send strings and arrays as well:



$client = new IXR_Client('http://scripts.incutio.com/xmlrpc/server.php');

if (!$client->query('test.addArray', array(3, 5, 7))) {
die('An error occurred - '.$client->getErrorCode().":".$client->getErrorMessage());
}
print $client->getResponse();
// Prints '3 + 5 + 7 = 15'


Writing an XML-RPC server is simple as well. Here's the full code for simpleserver.php:



<?php


include('IXR_Library.inc.php');

/* Functions defining the behaviour of the server */

function getTime($args) {
return date('H:i:s');
}

function add($args) {
return $args[0] + $args[1];
}

function addArray($array) {
$total = 0;
foreach ($array as $number) {
$total += $number;
}
return implode(' + ', $array).' = '.$total;
}

/* Create the server and map the XML-RPC method names to the relevant functions */

$server = new IXR_Server(array(
'test.getTime' => 'getTime',
'test.add' => 'add',
'test.addArray' => 'addArray'
));

?>







Pretty simple huh?



The Incutio XML-RPC Library can do a lot more than is demonstrated above. Be sure to read the manual for more information.




XMLRPC in PHP




Do you want your Perl code on one server to call your PHP functions on another? "Impossible!" you say? Not with XML-RPC. XML-RPC is a standard way for any application to make requests and recieve responses from methods written in any language. Interested? I knew you would be.
What is XML-RPC?
XML-RPC was developed by UserLand Software (http://www.userland.com) in April of 1998 as
a technology to enable applications to talk to each other, no matter what
language they are written in or where they are running. Since then, many
implementations have been made beyond the original one for UserLand's Frontier
product, and many major companies have adopted the technology for their
products, including Microsoft's .NET and Apple's Mac OS X.

XML-RPC is a
great enabler for distributed systems and system interoperability, as it allows
any XML-RPC enabled applications to call the methods of other XML-RPC enabled
applications, regardless of what language either application is written in, or
on what machine either application is running on. This allows a perl function to
make a call to a Python method, or a Java Servlet to call a PHP function, for
example.

The upshot of XML-RPC is that a world of completely
heterogeneous applications can talk to each other with very little work from
their programmers.

Using XML-RPC with PHP - Compiling PHP with XML-RPC Support
(
Page 2 of 7 )


As of PHP 4.1.0, the XML-RPC extension is included in the source package with
the status of experimental. This extension is simply a copy of the XML-RPC EPI
extension that can be found at http://xmlrpc-epi.sourceforge.net/main.php?t=php_about

This
extension is by far the best way of implementing XML-RPC in PHP. Being an
extension to PHP and not a class or set of methods as the other solutions are,
it is written in C and is therefore much faster than any of the other
solutions.

The XML-RPC extension is not compiled with PHP by default. In
order to enable it, you will need to download the PHP 4.1.0 or greater source
from http://www.php.net/downloads.php and
run the configure script including the switch:

--with-xmlrpc
and compile and install as usual.

Doing this will make
available several new XML-RPC functions for use in your PHP scripts.

Now,
the built in XML-RPC functions are certainly not a joy to use, unless all you
want to do is encode PHP variables into XML-RPC requests. The built-in functions
will not make the actual requests themselves. I'll show you how to deal with
this later in the article.

Do you want your Perl code on one server to call your PHP functions on another? "Impossible!" you say? Not with XML-RPC. XML-RPC is a standard way for any application to make requests and recieve responses from methods written in any language. Interested? I knew you would be.
What is XML-RPC?
XML-RPC was developed by UserLand Software (http://www.userland.com) in April of 1998 as
a technology to enable applications to talk to each other, no matter what
language they are written in or where they are running. Since then, many
implementations have been made beyond the original one for UserLand's Frontier
product, and many major companies have adopted the technology for their
products, including Microsoft's .NET and Apple's Mac OS X.

XML-RPC is a
great enabler for distributed systems and system interoperability, as it allows
any XML-RPC enabled applications to call the methods of other XML-RPC enabled
applications, regardless of what language either application is written in, or
on what machine either application is running on. This allows a perl function to
make a call to a Python method, or a Java Servlet to call a PHP function, for
example.

The upshot of XML-RPC is that a world of completely
heterogeneous applications can talk to each other with very little work from
their programmers.

Using XML-RPC with PHP - Compiling PHP with XML-RPC Support
(
Page 2 of 7 )







As of PHP 4.1.0, the XML-RPC extension is included in the source package with
the status of experimental. This extension is simply a copy of the XML-RPC EPI
extension that can be found at http://xmlrpc-epi.sourceforge.net/main.php?t=php_about

This
extension is by far the best way of implementing XML-RPC in PHP. Being an
extension to PHP and not a class or set of methods as the other solutions are,
it is written in C and is therefore much faster than any of the other
solutions.

The XML-RPC extension is not compiled with PHP by default. In
order to enable it, you will need to download the PHP 4.1.0 or greater source
from http://www.php.net/downloads.php and
run the configure script including the switch:

--with-xmlrpc
and compile and install as usual.

Doing this will make
available several new XML-RPC functions for use in your PHP scripts.

Now,
the built in XML-RPC functions are certainly not a joy to use, unless all you
want to do is encode PHP variables into XML-RPC requests. The built-in functions
will not make the actual requests themselves. I'll show you how to deal with
this later in the article.

Using XML-RPC with PHP - Dissection of a XML-RPC Call
(
Page 3 of 7 )

An
XML-RPC call is sent from a client to a server via HTTP POST. This allows
XML-RPC applications to work fairly easily behind firewalls, as port 80 is
almost always open.

Here's a sample XML-RPC call:

POST xmlrpcexample.php HTTP/1.0
User-Agent: xmlrpc-epi-php/0.2 (PHP)
Host: localhost:80
Content-Type: text/xml
Content-length: 191
<?xml version='1.0' encoding="iso-8859-1" ?>
<methodCall>
<methodName>greeting</methodName>

<params>
<param>
<value>
<string>Lucas</string>
</value>
</param>

</params>
</methodCall>
The first part of the request is simply a standard HTML post
request. It's the data sent in the body of the request that interests
us.

The <methodCall> tags simply encapsulate the call,
with all the parameters enclosed in <params> and each
parameter enclosed in <param>.

Parameters are
specified enclosed in tags that tell the application what type of parameter they
are. In this case, "Lucas" is a string, so it is enclosed in
<string>, but there are a lot more parameter types:






























<i4> or <int>
four-byte signed integer
10
<boolean>
0 (false) or 1 (true)
1
<string>
ASCII string
Hello, DevShed!
<double>
double-precision signed 

floating point number
-21.2544
<dateTime.iso8601>
date/time
20011219T12:05:26
<base64>
base64-encoded binary
eW91IGNhbid0IHJlYWQgdGhpcyE=


In addition to
the basic types, there are also <struct>s and
<array>s, <struct>s containing any number
of <member>s that consist of <name>s and

<value>s (specified in the same manner as
<param>s):

<struct>
<member>
<name>name</name>
<value>

<string>Lucas Marshall</string>
</value>
</member>
<member>
<name>age</name>

<value>
<i4>20</i4>
</value>
</member>
</struct>
and arrays merely containing any number of
<value>s:

<array>

<value><i4>10</i4></value>
<value><i4>20</i4></value>
<value><i4>30</i4></value>

</array>





Using XML-RPC with PHP - Dissection of a XML-RPC Response
(
Page 4 of 7 )

And
here's the response to the call:

HTTP/1.1 200 OK
Connection: close
Content-Length: 191
Content-Type: text/xml
Date: Tue, 18 Dec 2001 14:23:52 GMT
Server: xmlrpc-epi-php/0.2 (PHP)
<?xml version='1.0' encoding="iso-8859-1" ?>
<methodResponse>
<params>
<param>

<value>
<string>Hello Lucas. How are you today?</string>
</value>
</param>
</params>
</methodResponse>
With your newly found knowledge of XML-RPC calls, it is easy
to decipher standard responses. Normal responses consist of

<params> container with <param> elements
(and all they are heir to) sent inside <methodResponse> tags,
but there is another type of response - a fault:

HTTP/1.1 200 OK
Connection: close
Content-Length: 356
Content-Type: text/xml
Date: Tue, 18 Dec 2001 13:52:25 GMT
Server: Apache/1.3.20
<?xml version='1.0' encoding="iso-8859-1" ?>
<methodResponse>
<fault>
<value>

<struct>
<member>
<name>faultCode</name>
<value>
<int>4</int>

</value>
</member>
<member>
<name>faultString</name>
<value>

<string>Too many parameters.</string>
</value>
</member>
</struct>
</value>

</fault>
</methodResponse>
As you can see, a fault response consists of a
<methodResponse> containing a <fault> which contains a
<value> which is a <struct> containing two
elements, one named <faultCode>, an <int>

and one named <faultString>, a
<string>.

Please note that a response cannot contain
both a <params> container and a <fault>
container.

Using XML-RPC with PHP - Creating an XML-RPC Server
(
Page 5 of 7 )

In the XML-RPC world,
you need a client and a server. The client is simply the application making the
request, and the server is simply the service that processes the request and
returns a response. In this section, we're looking at how to create an XML-RPC
server service.

PHP's XML-RPC extension has several methods that deal
with servers, the most important being xmlrpc_server_create(),
xmlrpc_server_register_method() and
xmlrpc_server_call_method().

xmlrpc_create_server()





simply tells PHP that you would like to create a
server.

xmlrpc_server_register_method() registers PHP
methods with the XML-RPC server so they may be called by a
client.

xmlrpc_server_call_method() is used for passing a
request to the XML-RPC server and receiving a response.

Nothing teaches
like an example, so here you go (the comments in the example provide more
details about the functions).

<?php
/*
* First, we define some PHP functions to expose via
* XML-RPC. Any functions that will be called by a
* XML-RPC client need to take three parameters:
* The first parameter passed is the name of the
* XML-RPC method called, the second is an array
* Containing the parameters sent by the client, and
* The third is any data sent in the app_data
* parameter of the xmlrpc_server_call_method()
* function (see below).
*/
function uptime_func($method_name, $params, $app_data)
{
return `uptime`;
}

function greeting_func($method_name, $params, $app_data)
{
$name = $params[0];
return "Hello, $name. How are you today?";
}

/*
* This creates a server and sets a handle for the
* server in the variable $xmlrpc_server
*/
$xmlrpc_server = xmlrpc_server_create();

/*
* xmlrpc_server_register_method() registers a PHP
* function as an XML-RPC method. It takes three
* parameters:
* The first is the handle of a server created with
* xmlrpc_server_create(), the second is the name to
* register the server under (this is what needs to
* be in the <methodName> of a request for this
* method), and the third is the name of the PHP
* function to register.
*/

xmlrpc_server_register_method($xmlrpc_server, "greeting", "greeting_func");
xmlrpc_server_register_method($xmlrpc_server, "uptime", "uptime_func");

/*
* When an XML-RPC request is sent to this script, it
* can be found in the raw post data.
*/
$request_xml = $HTTP_RAW_POST_DATA;

/*
* The xmlrpc_server_call_method() sends a request to
* the server and returns the response XML. In this case,
* it sends the raw post data we got before. It requires
* 3 arguments:
* The first is the handle of a server created with
* xmlrpc_server_create(), the second is a string containing
* an XML-RPC request, and the third is for application data.
* Whatever is passed into the third parameter of this function
* is passed as the third paramater of the PHP function that the
* request is asking for.
*/
$response = xmlrpc_server_call_method($xmlrpc_server, $request_xml, '');

// Now we print the response for the client to read.
print $response;

/*
* This method frees the resources for the server specified
* It takes one argument, a handle of a server created with
* xmlrpc_server_create().
*/
xmlrpc_server_destroy($xmlrpc_server);
?>


Using XML-RPC with PHP - Creating an XML-RPC Client
(
Page 6 of 7 )

Now that we
have a server, we need a client to call our methods. As mentioned before, the
XML-RPC EPI extension for PHP does not make HTTP requests by itself. For that
reason, before it was included in the PHP distribution, the XML-RPC EPI PHP
extension came with some include files that had functions that make it a lot
easier to work with XML-RPC requests.

The only way to get these functions
is to download the XML-RPC EPI PHP extension source package from http://xmlrpc-epi.sourceforge.net/,
and install the files in the /sample/utils directory into a
directory in your PHP include_path. For the purpose of the next
pieces of example code, I will assume that you have copied the entire




utils directory into a directory in your include_path,
and renamed it xmlrpcutils.

Making a client is fairly
simple. The function that does all the work when we call our methods is
xu_rpc_http_concise(), which is defined in the
utils.php file of the xmlrpcutils directory now in our
PHP include_path.

First we'll make a client that calls the
first method we defined in the server section of the article, the

uptime method. This method does not require any parameters, so we
won't pass any in. My comments about what we are doing and why will appear as
comments in the code.

<?php
/*
* This allows us to use the functions that make
* making XML-RPC requests easy.
*/

include("xmlrpcutils/utils.php");

/*
* For the next two lines use this guide.
* If your server script can be found at the URL:
* http://myhost.mydomain.com/xmlrpc_server.php
* $host should be "myhost.mydomain.com"
* and
* $uri should be "/xmlrpc_server.php"
*/

// Change these to match your configuration
$host = "myhost.mydomain.com";
$uri = "/xmlrpc_server.php";

/*
* Here's where we make the request. xu_rpc_http_concise()
* takes one parameter - a keyed array that specifies all
* the info needed for the request.
* The most important (and required) elements are:
* 'method' - specifies the method to call
* 'host' - specifies the host the server script is on
* 'uri' - specifies the uri of the server script on the server
* 'port' - specifies the port the server is listening on
*
* Here we are calling the uptime method of the
* server script who's uri is specified in $uri of the
* server that is at the hostname specified in $host and
* listening on port 80 and storing it's response (converted
* to a PHP data type) in $result.
*/

$result = xu_rpc_http_concise(
array(
'method' => "uptime",
'host' => $host,
'uri' => $uri,
'port' => 80
)
);

print "The uptime on " . $host . " is " . $result;
?>
When this is run it should print something like:

The uptime on myhost.mydomain.com is 9:43pm up 5:12, 2 users, load average: 0.25, 0.24, 0.22
Where the uptime numbers are the same as those you get if you
run the 'uptime' command on the server running the server script.

Our
second example will call the greeting method. This is one that
requires a parameter - a name.

<?php
include("xmlrpcutils/utils.php");

$host = "myhost.mydomain.com";
$uri = "/xmlrpc_server.php";

// Change this to your name
$name = "yourname";

/*
* The difference between this call and the last is we pass
* in an array as the 'args' element of the array passed as
* the argument of the xu_rpc_http_concise() function.
*/

$result = xu_rpc_http_concise(
array(
'method' => "greeting",
'args' => array($name),
'host' => $host,
'uri' => $uri,
'port' => 80
)
);

print $result;
?>
When run, this should print:

Hello, yourname. How are you today?
These are some very simple examples -

xu_rpc_http_concise() can take some other arguments as well, and
there are more functions available. I recommend that you read through the files
in the xmlrpcutils directory to learn these for
yourself.





Facebook Developers Guide




Before we begin, there are a few things you need to know. In order to create
a Facebook application, you should know or need the following:

  • You should be well versed in PHP or some other coding language —
    such as Ruby on Rails, JavaScript, or Python — especially one that has
    a client library for our API.
  • You need to have a basic understanding of the Internet, SSH, MySQL, and Unix
  • You need to be familiar with Web hosting fundamentals and have a place to host your
    application. You can read some fundamentals about hosting here

Now you're ready to get started! You can read in depth instructions on the Facebook Developers Wiki, but this outline here should give you good enough idea to get you going.

Setting Up Your Application

  1. First you need to log in to the Facebook Developer application:Go to the Facebook Developer AppAfter following the link, click “Allow” to let the Developer
    application access your profile.
  2. Begin setting up a new application. Go to the Developer application and
    click “Set Up New Application”. Give your application a name, check to accept
    the Terms of Service, then click Submit. You'll see some basic information
    about your application, including:
    • Your API key: this key identifies your application to Facebook. You
      pass it with all your API calls.
    • Your application secret: Facebook uses this key to authenticate the
      requests you make. As you can tell by its name, you should never share
      this key with anyone.
  3. Now we need to configure a few more settings before we can get into the
    code. Click "Edit Settings". Notice that the support and contact email
    addresses are pre-populated with the email address associated with your
    Facebook account.
  4. Enter a callback URL. This is the address where your application lives
    on your server, or the server where the application is being hosted.
  5. Enter a canvas page URL. A canvas page is the address where your
    application lives on Facebook. When users access your application on
    Facebook, they're taken to your canvas page. It's a good idea to use your
    application name or something similar. It must be at least 7 characters long
    and include only letters, dashes and underscores.
  6. You want users to be able to put your application on their profiles, so
    select “Yes” at “Can your application be added on Facebook?”
  7. Believe it or not, this is all we really need to get a simple application
    ready to go. Click "Save and continue".

Configuring Your Application on Your Host

Before you configure your application on your server, you need to make sure
your server is ready to host a Facebook application.

  • If you're using a hosting service like Joyent, it actually comes with the
    Facebook PHP client library installed, along
    with MySQL and memcached.
  • If you're not using a hosting service that provides you with a
    preconfigured environment for Facebook applications, then you need to upload
    the client library and install MySQL.

Once your host is configured, you can copy the sample code to the server:

  1. Go back to the Developer application, and click the example code link under your application information.
    You'll see a basic PHP file, but notice that this sample code already
    includes your application's API key and secret.
  2. Copy the contents of this file and paste it into a file called index.php
    on your server in the same directory where the Facebook client library
    resides.
  3. Your application is ready for testing. Go back to a browser and enter
    your canvas page URL (or click the link in step 3 of the Quick Creation
    Guide in the Developer application).
  4. You should see a page containing your first 25 Facebook friends.

And that's it. This was a simple demonstration on how to quickly build a
Facebook application. It demonstrated some basic Facebook Platform concepts,
as well as the Platform API and FBML, Facebook's markup language.






We didn't cover integration
points, which is how you can weave your application deeper into Facebook so
you can provide your users with a richer experience. Our sample application,
Smiley, includes all the integration points. And you can see them explained in
our anatomy of a Facebook application.

Need Help or Have Questions?

Facebook Platform is constantly evolving, so you need to keep up with the
changes. The best ways to keep up with what we're doing is to:

  • Check the Documentation and the Forum.
  • Keep an eye on the Facebook Developers blog. The Developers blog runs all our major announcements. You can subscribe
    to the blog here.
  • Read the Platform Status Feed. The status feed is where we send out
    various announcements and updates on the current state of Facebook Platform.
    You can subscribe to the status feed here.

Finally, every week we push our code out to our developers a day before we
release it to our users, so you can test your application against the new
changes. You can point your application to the beta site, www.beta.facebook.com.





Usefull tips for URL rewriting




If you are looking for the examples of URL rewriting then this post might be useful for you. In this post, I’ve given five useful examples of URL rewriting using .htacess. If you don’t know something about url rewriting then please check my older post about url rewriting using .htaccess.



Now let’s look at the examples


1)Rewriting product.php?id=12 to product-12.html


It is a simple redirection in which .php extension is hidden from the browser’s address bar and dynamic url (containing “?” character) is converted into a static URL.


RewriteEngine on


RewriteRule ^product-([0-9]+)\.html$ product.php?id=$1


2) Rewriting product.php?id=12 to product/ipod-nano/12.html


SEO expert always suggest to display the main keyword in the URL. In the following URL rewriting technique you can display the name of the product in URL.


RewriteEngine on

RewriteRule ^product/([a-zA-Z0-9_-]+)/([0-9]+)\.html$ product.php?id=$2


3) Redirecting non www URL to www URL


If you type yahoo.com in browser it will be redirected to www.yahoo.com. If you want to do same with your website then put the following code to .htaccess file. What is benefit of this kind of redirection?? Please check the post about SEO friendly redirect (301) redirect in php and .htaccess.


RewriteEngine On


RewriteCond %{HTTP_HOST} ^optimaxwebsolutions\.com$

RewriteRule (.*) http://www.optimaxwebsolutions.com/$1 [R=301,L]


4) Rewriting yoursite.com/user.php?username=xyz to yoursite.com/xyz


Have you checked zorpia.com.If you type http://zorpia.com/roshanbh233 in browser you can see my profile over there. If you want to do the same kind of redirection i.e http://yoursite.com/xyz to http://yoursite.com/user.php?username=xyz then you can add the following code to the .htaccess file.


RewriteEngine On

RewriteRule ^([a-zA-Z0-9_-]+)$ user.php?username=$1

RewriteRule ^([a-zA-Z0-9_-]+)/$ user.php?username=$1


5) Redirecting the domain to a new subfolder of inside public_html.



Suppose the you’ve redeveloped your site and all the new development reside inside the “new” folder of inside root folder.Then the new development of the website can be accessed like “test.com/new”. Now moving these files to the root folder can be a hectic process so you can create the following code inside the .htaccess file and place it under the root folder of the website. In result, www.test.com point out to the files inside “new” folder.



RewriteEngine On

RewriteCond %{HTTP_HOST} ^test\.com$ [OR]

RewriteCond %{HTTP_HOST} ^www\.test\.com$

RewriteCond %{REQUEST_URI} !^/new/

RewriteRule (.*) /new/$1






Know more about google wave




What is Google Wave?






Google Wave Image



While we suggest reading our article on the launch of Google Wave for more detailed information, here’s the sum of it: Google Wave is a real-time communication platform. It combines aspects of email, instant messaging, wikis, web chat, social networking, and project management to build one elegant, in-browser communication client. You can bring a group of friends or business partners together to discuss how your day has been or share files.



Google Wave has a lot of innovative features, but here are just a few:


- Real-time: In most instances, you can see what someone else is typing, character-by-character.


- Embeddability: Waves can be embedded on any blog or website.


- Applications and Extensions: Just like a FacebookFacebookFacebook application or an iGoogle gadget, developers can build their own apps within waves. They can be anything from bots to complex real-time games.



- Wiki functionality: Anything written within a Google Wave can be edited by anyone else, because all conversations within the platform are shared. Thus, you can correct information, append information, or add your own commentary within a developing conversation.


- Open source: The Google Wave code will be open source, to foster innovation and adoption amongst developers.


- Playback: You can playback any part of the wave to see what was said.


- Natural language: Google Wave can autocorrect your spelling, even going as far as knowing the difference between similar words, like “been” and “bean.” It can also auto-translate on-the-fly.



- Drag-and-drop file sharing: No attachments; just drag your file and drop it inside Google Wave and everyone will have access.


While these are only a few of the many features of Google Wave, it’s easy to see why people are extremely excited.


Google Wave was the brainchild of a team based out of Sydney, AustraliaAustraliaAustralia. The core team members are two brothers, Jens and Lars Rasmussen, and lead project manager Stephanie Hannon, all of whom were involved in Google MapsGoogle MapsGoogle Maps previously. Google Wave was announced today at Google’s I/O Developer conference, although the product will not be available to the public for several months.



We detail even more of these features in our article The Top 6 Game-Changing Features of Google Wave.




Terminology






Wave Entitles Google Image



Google Wave actually has its own lingo – yes, you have to learn a few definitions if you’re going to really understand this new communication platform. Having knowledge of these terms will help you understand more about Google’s newest project.



- Wave: A wave, specifically, refers to a specific threaded conversation. It can include just one person, or it can include a group of users or even robots (explained below). The best comparison I can make is that it’s like your entire instant messaging (IM) history with someone. Anything you’ve ever discussed in a single chat or conversation is a wave.


- Wavelet: A wavelet is also a threaded conversation, but only a subset of a larger conversation (or a wave). It’s like a single IM conversation – a small part of a larger conversation and a larger history. Wavelets, though, can be created and managed separately from a wave.


- BlipBLIPBLIP: Even smaller than a Wavelet, a Blip is a single, individual message. It’s like a single line of an IM conversation. Blips can have other blips attached to them, called children. In addition, blips can either be published or unpublished (once again, it’s sort of like typing out an IM message but not yet sending it).



- Document: A document actually refers to the content within a blip. This seems to refer to the actual characters, words, and files associated with a blip.


- Extension: An extension is a mini-application that works within a wave. So these are the apps you can play with while using Wave. There are two main types of extenisons: Gadgets and Robots


- Gadgets: A gadget is an application users can participate with, many of which are built on Google’s OpenSocial platform. A good comparison would be iGoogle gadgets or Facebook applications.


- Robots: Robots are an automated participant within a wave. They can talk with users and interact with waves. They can provide information from outside sources (i.e. TwitterTwitterTwitter) or they can check content within a wave and perform actions based on them (i.e. provide you a stock quote if a stock name is mentioned).




- Embeded Wave: An embeded wave is a way to take a Google Wave and the conversation within it and place it on your website. Users could use this as a chatroom, as a way to contact you, or for something more.




Wave Gadgets






Google Wave Gadgets Image



A Wave Gadget is one of two types of Google Wave extensions. Gadgets are fully-functional applications. According to Google, gadgets are primarily for changing the look and feel of waves, although this seems to only scratch the surface of the potential of a wave gadget.


First: almost any iGoogle or OpenSocial gadget can run within Google Wave. That means thousands of applications that have been already created will work in Google Wave. Second: a gadget built within Google Wave can take advantage of live interaction with multiple users. This means something like a live online game with active participation from all users. In that way, it has similarities to Facebook or MySpaceMySpaceMySpace applications, which take advantage of your friend network to make games, quizzes, and applications more meaningufl and useful.



Gadgets are specific to individual waves, rather than to specific users. Thus, it’s not like having a Facebook app on your profile – the gadget belongs to everyone within the wave. They also do not have titles, to better integrate with the actual conversation. Some of the gadgets already built include a Sudoku gadget, Bidder (which turns your wave into an auction), and Maps (which allows for collaboration on a Google Map).


For a more technical explanation, be sure to check out Google’s Wave Gadgets Tutorial.




Wave Robots






Google Wave Robots Image




Robots are the other type of Google Wave extension. Robots are like having another person within a Google Wave conversation, except that they’re automated. They’re a lot like the old IM bots of the past, although far more robust. Robots can modify information in waves, interact with users, communicate with others waves, and pull information from outside sources.


Because it acts like a user, you can define its behavior based on what happens in the chat. You could build one as simple as “change the word dog to the word cat” or one as complex as a fully-functional debugger. We’ll probably start seeming some very advanced robots in the near future.


Some of the robots already in service include Debuggy (an in-wave debugger), Stocky (which pulls stock prices based on stock quote mentions), and Tweety (the Twave robot, which displays tweets inside of a wave).


A more advanced explanation is available at Google’s Wave Robots Overview. We also have an inside look at Google Wave extensions and robots.





Wave Embeds






Google Wave Embeds Image



Wave embeds are a little more complex than embedding a YouTubeYouTubeYouTube video onto your blog, yet in the end, that’s really what Google Wave Embeds are: a way to take Google Wavesgoogle wavesgoogle waves onto a third party website. Embedded Waves support many of the functions of the actual Google Wave client, including dragging-and-dropping files.



While the Wave Embeds is still very early stage, Google has already built two: YouTube Playlist Discuss and Multiple Extensions Embed. The former allows you to discuss a YouTube video via a wave and the latter allows for interaction with multiple waves on the same page.


One possibility: Google Wave Embeds may be a real-time replacement to static comments. If Google perfects wave embeds, you could even see YouTube.com comments replaced with waves, although it is way too early to make any calls on the potential of this.


Google’s Wave Embed Developer’s Guide has more advanced information embedding waves.





All about SEO




Basic SEO plan in 7 steps


Starting a SEO Plan is not a difficult exercise. However, for many people, getting started with a SEO plan sounds daunting and rather confusing. I’m here to tell you it needn’t be. With some basic processes in place you’re site will start to climb the search ranks organically and won’t cost you a penny (cent).



SEO research


If you know your website - its structure and content – then creating a SEO plan is more about order and process and then staying on top of it to monitor its success. Whilst I’m not going to delve into specific SEO techniques (url submission, white-hat tricks, content optimisation, link building etc) I’m am going to concentrate on the sites information structure and how that relates to optimisation. My SEO plan can be used across different types websites so there are no limits to it.


Before you embark on this process you need to firmly establish goals – absolute goals. For example, By 30th May 2009 the keyword ’seo’ will rank within the top 50 on Google.co.uk. If you look at this goal statement nothing is unclear – date, keyword, position and search engine. Make it clear and unambiguious. Also, to help identify keywords / key phrases I’d suggest use your team – you/marketing, sales, management… people who really know this market and do not use terms/phrases that use the same name as your url/domain/title. For example, Apple would not use the keyword ‘Mac’ as a measure – it’s obvious that the term ‘Mac’ would naturally rank highly anyway.



The basic SEO plan in 7 easy steps:


1. Research.

Look at your existing analytical data (website report) and see what visitors are searching. This is a great starting point and can tell you a lot about your visitors behaviour and needs. Remember to eliminate the url/domain/title from this list. These people already know the product/title exists so no need to optimise it.


2. Targets.

Make sure you have an objective and achievable targets set in place (see ‘Mac’ example above). Then do some benchmarking so you have a starting point.



3. Collaborate.

Use your team – you/marketing, sales, management… people who really know this market – to identify not only keywords, but key phrases too for every part of your website (for multi-channel websites).



4. Filter/Sort.

When you have a pool of data (feedback) sort it and remove generic terms that you know no one would search for e.g. water. DON’T bother with data that includes your url/domain/title – that should be picked up naturally with little effort.


5. Prioritise.

You can’t target every single keyword/phrase at once. Look at starting off with the top ten or top three (multi-channel) and ensure your team knows what’s been targeted.


6. Documentation.


Make sure all your research, your plans and keyword/phrase identification is clearly documented and shared. Circulate this list of agreed keywords/phrases to your team so they all know what’s been targetted.


7. Monitoring.

To ensure you stay on track and can see progress you need to set up some sort of monitoring and record/log it. There are many ways you can do this. A fantastic free tool called Rank Checker, SEOBook.com is a Firefox add-on which allows you to check and export your SEO ranking.



In summary, the SEO plan sets out to provide you with a guide of what to do – a logical step-by-step guide. The SEO plan only gets you started, it does not cover implementing your plan.


Ensure that you re-evaluate and adjust your activity if it’s not working and do more of the same if you find your activitie increase your SEO rankings.