Google Wave Product Reviews

Google Wave is an online software application product of Google, described as a personal communication and collaboration tool. It was first announced at the Google I/O conference on May 27, 2009. It is a web-based service, computing platform, and communications protocol designed to merge e-mail, instant messaging, wikis, and social networking.It has a strong collaborative and real-time focus supported by extensions that can provide, for example, spelling/grammar checking, automated translation among 40 languages, and numerous other extensions. Initially released only to developers, a preview release of Google Wave was extended to 100,000 users in September 2009, each allowed to invite additional users. On the 29th of November 2009, Google accepted most requests submitted soon after the extended release of the technical preview in September 2009.



Google Wave is designed as a new Internet communications platform. It is written in Java using OpenJDK and its web interface uses the Google Web Toolkit. Google Wave works like previous messaging systems such as email and Usenet, but instead of sending a message along with its entire thread of previous messages, or requiring all responses to be stored in each user's inbox for context, message documents (referred to as waves) that contain complete threads of multimedia messages (blips) are perpetually stored on a central server. Waves are shared with collaborators who can be added or removed from the wave at any point during a wave's existence.
Waves, described by Google as "equal parts conversation and document", are hosted XML documents that allow seamless and low latency concurrent modifications. Any participant of a wave can reply anywhere within the message, edit any part of the wave, and add participants at any point in the process. Each edit/reply is a blip and users can reply to individual blips within waves. Recipients are notified of changes/replies in all waves in which they are active and, upon opening a wave, may review those changes in chronological order. In addition, waves are live. All replies/edits are visible in real-time, letter by letter, as they are typed by the other collaborators. Multiple participants may edit a single wave simultaneously in Google Wave. Thus, waves can function not only as e-mails and threaded conversations but also as an instant messaging service when many participants are online at the same time. A wave may repeatedly shift roles between e-mail and instant messaging depending on the number of users editing it concurrently. The ability to show messages as they are typed can be disabled, similar to conventional instant messaging.

Google plans to release most of the source code as open source, allowing the public to develop its features through extensions. Google will also allow third-parties to build their own Wave services as quickly as possible (be it private or commercial) because it wants the Wave protocol to replace the e-mai protocol.Initially, Google will be the only Wave service provider, but it is hoped that, as the protocol becomes standardized and the prototype server becomes stable, other service providers will launch their own Wave services, possibly designing their own unique web-based clients as is common with many email service providers. The possibility also exists for native Wave clients to be made, as demonstrated by Google with their CLI-based console client.
Google has made an initial open-source release of some components of Wave:
  1. the operational transformation (OT) code,
  2. the underlying wave model, and
  3. a basic client/server prototype that uses the wave protocol
In addition, Google has provided some detail about the next phases of the open-source release:
  1. wave model code that is a simplified version of Google's production code and is tied to the OT code; this code will evolve into the shared code base that Google will use and expects that others will too
  2. a testing and verification suite for people who want to do their own implementation (for example, for porting the code to other languages).
Google is building APIs that allow developers to use and build on Google Wave by way of:
  • Extensions, program robots to automate common tasks and/or build gadgets to extend or change user interaction (e.g., posting blips on microblog feeds or providing RSVP recording mechanisms).
  • Embed, dropping interactive windows into a given wave on external site, blogs, etc.
Google wave Extensions are mainly of 2 types:
  • 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 automated participants within a wave. They can talk with users and interact with waves. They can provide information from outside sources (i.e. Twitter, stock quotes, etc.)


PHP-Basic Tutorial

PHP is a server-side scripting language.PHP is a powerful tool for making dynamic and interactive Web pages.

PHP is the widely-used, free, and efficient alternative to competitors such as Microsoft's ASP.

Before you continue you should have a basic understanding of the following:

  • HTML/XHTML
  • JavaScript

PHP stands for PHP: Hypertext Preprocessor. PHP is an open source software, PHP files have a file extension of ".php", ".php3", or ".phtml"

PHP supports many databases (MySQL, Informix, Oracle, Sybase, Solid, PostgreSQL, Generic ODBC, etc.)

PHP combined with MySQL are cross-platform (you can develop in Windows and serve on a Unix platform).

  • PHP runs on different platforms (Windows, Linux, Unix, etc.)
  • PHP is compatible with almost all servers used today (Apache, IIS, etc.)

A PHP scripting block always starts with <?php and ends with ?>. A PHP scripting block can be placed anywhere in the document.

On servers with shorthand support enabled you can start a scripting block with <? and end with ?>.

For maximum compatibility, we recommend that you use the standard form (<?php) rather than the shorthand form.

<?php ?>

we have an example of a simple PHP script which sends the text "Hello World" to the browser:

<html>
<body>
<?php
echo "Hello World";
?>
</body>
</html>

All variables in PHP start with a $ sign symbol. The correct way of declaring a variable in PHP:

$var_name = value;

New PHP programmers often forget the $ sign at the beginning of the variable. In that case it will not work.

Let's try creating a variable containing a string, and a variable containing a number:

<?php
$txt="Hello World!";
$x=16;
?>

PHP is a Loosely Typed Language

In PHP, a variable does not need to be declared before adding a value to it.In the example above, you see that you do not have to tell PHP which data type the variable is.PHP automatically converts the variable to the correct data type, depending on its value.In a strongly typed programming language, you have to declare (define) the type and name of the variable before using it.In PHP, the variable is declared automatically when you use it.

A variable name should not contain spaces. If a variable name is more than one word, it should be separated with an underscore ($my_string), or with capitalization ($myString)

The Concatenation Operator

There is only one string operator in PHP.

The concatenation operator (.)  is used to put two string values together.To concatenate two string variables together, use the concatenation operator:

<?php
$txt1="Hello World!";
$txt2="What a nice day!";
echo $txt1 . " " . $txt2;
?>

The strlen() function is used to return the length of a string.

<?php
echo strlen("Hello world!");
?>

The strpos() function is used to search for character within a string.If a match is found, this function will return the position of the first match. If no match is found, it will return FALSE.

<?php
echo strpos("Hello world!","world");
?>

You can use conditional statements in your code to do this.

In PHP we have the following conditional statements:

  • if statement - use this statement to execute some code only if a specified condition is true
  • if...else statement - use this statement to execute some code if a condition is true and another code if the condition is false
  • if...elseif....else statement - use this statement to select one of several blocks of code to be executed
  • switch statement - use this statement to select one of many blocks of code to be executed

Use the if statement to execute some code only if a specified condition is true.

<?php
$d=date("D");
if ($d=="Fri") echo "Have a nice weekend!";
?>

Use the if....else statement to execute some code if a condition is true and another code if a condition is false.

<?php
$d=date("D");
if ($d=="Fri")
  echo "Have a nice weekend!";
else
  echo "Have a nice day!";
?>

Use the if....elseif...else statement to select one of several blocks of code to be executed.

<?php
$d=date("D");
if ($d=="Fri")
  echo "Have a nice weekend!";
elseif ($d=="Sun")
  echo "Have a nice Sunday!";
else
  echo "Have a nice day!";
?>

This is how it works: First we have a single expression n (most often a variable), that is evaluated once. The value of the expression is then compared with the values for each case in the structure. If there is a match, the block of code associated with that case is executed. Use break to prevent the code from running into the next case automatically. The default statement is used if no match is found.

<?php
switch ($x)
{
case 1:
  echo "Number 1";
  break;
case 2:
  echo "Number 2";
  break;
case 3:
  echo "Number 3";
  break;
default:
  echo "No number between 1 and 3";
}
?>

An array stores multiple values in one single variable. A variable is a storage area holding a number or text. The problem is, a variable will hold only one value.

An array is a special variable, which can store multiple values in one single variable.If you have a list of items (a list of car names, for example), storing the cars in single variables could look like this:

In PHP, there are three kind of arrays:

  • Numeric array - An array with a numeric index

In the following example the index are automatically assigned (the index starts at 0):

$cars=array("Saab","Volvo","BMW","Toyota");

In the following example we assign the index manually:

$cars[0]="Saab";
$cars[1]="Volvo";
$cars[2]="BMW";
$cars[3]="Toyota";

In the following example you access the variable values by referring to the array name and index:

<?php
$cars[0]="Saab";
$cars[1]="Volvo";
$cars[2]="BMW";
$cars[3]="Toyota";
echo $cars[0] . " and " . $cars[1] . " are Swedish cars.";
?>

  • Associative array - An array where each ID key is associated with a value

An associative array, each ID key is associated with a value. With associative arrays we can use the values as keys and assign values to them.

In this example we use an array to assign ages to the different persons:

$ages = array("Peter"=>32, "Quagmire"=>30, "Joe"=>34);

This example is the same as example 1, but shows a different way of creating the array:

<?php
$ages['Peter'] = "32";
$ages['Quagmire'] = "30";
$ages['Joe'] = "34";
echo "Peter is " . $ages['Peter'] . " years old.";
?>

  • Multidimensional array - An array containing one or more arrays

PHP Loops

In PHP, we have the following looping statements:

  • while - loops through a block of code while a specified condition is true
  • do...while - loops through a block of code once, and then repeats the loop as long as a specified condition is true
  • for - loops through a block of code a specified number of times
  • foreach - loops through a block of code for each element in an array

The while loop executes a block of code while a condition is true.

The example below defines a loop that starts with i=1. The loop will continue to run as long as i is less than, or equal to 5. i will increase by 1 each time the loop runs:

<?php
$i=1;
while($i<=5)
  {
  echo "The number is " . $i . "<br />";
  $i++;
  }
?>

The do...while statement will always execute the block of code once, it will then check the condition, and repeat the loop while the condition is true. The example below defines a loop that starts with i=1. It will then increment i with 1, and write some output. Then the condition is checked, and the loop will continue to run as long as i is less than, or equal to 5:

<?php
$i=1;
do
  {
  $i++;
  echo "The number is " . $i . "<br />";
  }
while ($i<=5);
?>

The for loop is used when you know in advance how many times the script should run.

for (init; condition; increment)
  {
code to be executed;
  }

Parameters:

  • init: Mostly used to set a counter (but can be any code to be executed once at the beginning of the loop)
  • condition: Evaluated for each loop iteration. If it evaluates to TRUE, the loop continues. If it evaluates to FALSE, the loop ends.
  • increment: Mostly used to increment a counter (but can be any code to be executed at the end of the loop)

<?php
for ($i=1; $i<=5; $i++)
  {
  echo "The number is " . $i . "<br />";
  }
?>

The foreach loop is used to loop through arrays. For every loop iteration, the value of the current array element is assigned to $value (and the array pointer is moved by one) - so on the next loop iteration, you'll be looking at the next array value.

<?php
$x=array("one","two","three");
foreach ($x as $value)
  {
  echo $value . "<br />";
  }
?>

Output:

one
two
three

The real power of PHP comes from its functions.In PHP, there are more than 700 built-in functions.

In this chapter we will show you how to create your own functions.To keep the browser from executing a script when the page loads, you can put your script into a function.A function will be executed by a call to the function.You may call a function from anywhere within a page.

<?php
function writeName()
{
echo "Kai Jim Refsnes";
}
echo "My name is ";
writeName();
?>

To add more functionality to a function, we can add parameters. A parameter is just like a variable.

<?php
function writeName($fname)
{
echo $fname . " Refsnes.<br />";
}
echo "My name is ";
writeName("Kai Jim");
echo "My sister's name is ";
writeName("Hege");
echo "My brother's name is ";
writeName("Stale");
?>

<?php
function writeName($fname,$punctuation)
{
echo $fname . " Refsnes" . $punctuation . "<br />";
}
echo "My name is ";
writeName("Kai Jim",".");
echo "My sister's name is ";
writeName("Hege","!");
echo "My brother's name is ";
writeName("Ståle","?");
?>

The rest of php basic is detailed on next tutorials, watch it.