You are on page 1of 15

GTUGers and Googlers experiences for publishing educational, technical and business articles.

GTUG magazine

August 2011.

google tehnology user groups

Dear Readers,
Let me introduce you to the the first- August issue of GTUG magazine. This months cover story is focused on Introductory topics about Google Apps, APIs and Products. Different topics discussing business, technical and general issues with the aid of Google Technologies.

Editor in Chief:

Mohammed Farrag

Contributing: Vardan Grigoryan, Antonella Blasetti, Nils Hitze, Alberto Mancini, Francesca Tosi.
Art Director: Tihomir Budic Special Thanks: Dusan Stranatic (Desktop Publisher), Vardan Grigoryan (Blog Designer), Taher Mestiri (Android App Developer)

Google Technology User Groups


Google Talks Section

1. Google Plus. Today and Tomorrow -> Vardan Grigoryan, GTUG Armenia 2. Whos Afraid of Google? -> Antonella Blasetti, GTUG Lazio
Google Business Section

1. Manage Your Business with Google APPs and Google APIs -> Mohammed Farrag, Shibin Al-Kawm GTUG 2. Google and Schools -> Antonella Blasetti, GTUG Lazio
Google Game Development

1. HTML5 Gaming Frameworks -> Nils Hitze, GTUG Munich 2. HTML5 Websockets for fun -> Alberto Mancini (Firenze-gtug mancini@gtugs.org) & Francesca Tosi (Firenze-gtug tosi@gtugs.org), Firenze-GTUG
Google Services

1. Smart Login for Smart Applications -> Antonella Blasetti, GTUG Lazio
Country Specific

1. Google Tools and Products in Armenia -> Vardan Grigoryan, GTUG Armenia

Google Plus. Today and Tomorrow


Vardan Grigoryan, GTUG Armenia

On June 28, 2011 I received an unexpected letter by gmail. Here are the first lines of the letter from Stephanie Liu. Hi, Id like to invite you to an early Field Trial of the Google+ project, a new way to share with the people that matter the most. It was impossible to describe my feelings when I realized that I was one of those rare people who can explore the initial version of the system. I fell in love with it at first sight... Everything was so clear, well organized and so easy to manage that even beginner users of the Internet would not need help. And I realized that Google-Plus is what we expected for a long time. To be honest, we were expecting a system like this, but it was planned to called Google Me. Id like to express my opinion about the name of this project. Google Me is a better name for a social network. But lets not forget that it is not a simple social network. I am sure that as the network develops, it will have all the Google services and tools.

Thus Plus is the best name for such a system. I dont want to write about the inner structure of the network, because it is already written inside the system. Ill try to mention what we have today, and what we will have in future. Google Plus Today Based on Paul Allens post and the note that I received the invitation on 4th of July, there were already more than 1.7 million people registered on the network only a week after I received the invitation. And also I must mention that the system was turned on for only 3 days. We must agree that in one week 1.7 million registered profiles are a serious challenge to all other social networks, particularly to Facebook. So the struggle is just beginning. Only after a few days we could see many interesting extensions and sites on the Internet, created by third parties. Especially I would like to mention gplus.to , which allows users to create their short url addresses for their profiles (http://gplus.to/ USERNAME), because G+ still doesnt pro-

vide their users with their preferred urls and nicknames. I also want to mention socialstatistics.com and I consider it as an important resource because it also took advantage of the fact that G + doesnt have API, and created a rating system for the profiles. I am not going to tell more about the mentioned extensions. I will be glad to help with advice people who are interested, and if there are suck people, they may follow this link and read more about the sources. In short, today we have 1.7 million users and a system that is growing minute by minute. Google Plus tomorrow And here, perhaps, I should report my subjective opinion. So, what do I expect to see in G + 1. I think the most important and urgent task is the API-creation. Personally, being a programmer, Im already looking forward to the API. It will allow a sudden increase of the users. But I

also realize that for creating an API for such a system a lot of time and human resources are required. So all we can do is wait. 2. It is also important that other Google services will be integrated into Plus. Especially the upper toolbar notification number, as it is done with the help of Google + Enhancer 3. I look forward to the integration of Google Sites into users profile. This will allow users to create their site or their organizations website within Google Plus. It is a step, which not a single social network can do better than Google Plus. 4. I also have great expectations for the Google Groups integration into Google Plus. It will allow filling in the gap of the groups in G+. 5. And with the last point, of course, I cannot forget the awaited integration of Google Music which is in experimental mode now. Maybe I forgot to mention some facts or expectations; in any case, I hope Google Plus will surprise us with a lot more thing than a mentioned.

Whos Afraid of Google?


Antonella Blasetti, GTUG Lazio

Google is different... Let us try to explain why: Largest global IT companies (Oracle IBM Microsoft) Corporate Clients Very high license fees Proprietary software Difficult to use Technology, sometimes out of date Business Philosophy based on Success Google People customers, even in Companies Free or affordable fees Easy to use Technology full of creativity and innovation Business Philosophy based on serious Fun, Research and fast Communication Suitable for people of any age and social environment and above all ... not just software ... but all you can do better with technology and the Internet Well, it is enough to be scared of...(from

the point of view of the Big Companies, of course) But: why didnt they realize all that before? What will it happen? My personal opinion Why didnt they realize all that before? They didnt so far realized this because Google was related to the Search Engines Business and to the distribution of experimental software for final users. In others words, they did not consider Google a dangerous competitor... Maybe Google did its best to make them think so, too. What will happen? From the perspective of the business war, I am sure that Google will win. its too far ahead. But we have to consider that the struggle will cover the advertising and publishing fields too... not only Information Technology. .. Competitors will play the card of privacy

and security: they will try to scare us with the menace that our secrets will be discovered and we will publicly stripped naked and humiliated (Google and Internet fault, of course). But let us look at the current situation. What do you prefer: to be overwhelmed by obsessive and expensive (paid by us at the supermarket and elsewhere) advertising, affordable only for the biggest companies or to be informed only about what we care about or we are interested in, maybe at the best value for money and close to home.... together with the possibility of using the same means for promoting our business? This is the choice... What will change? I think that Cloud Computing will really change our life: expanding and improving software quality and exploitation

facilitating transparency in government and making control an easier task breaking down barriers and boundaries We hope that Google, the Cloud Computing Giant, will stick to the current principles... Hopefully.. What do you think about? I think that the opinion and the work of GTUGer, Googlers and Google Users (expecially the younger ones) is really important. The possibility of a better future will be in their hands. In their Hands and in their Mind. References Google philosophy: http://www.google.com/corporate/tenthings.html

Manage Your Business with Google APPs and Google APIs


Mohammed Farrag, GTUG Shibin Al-Kawm

Lately, Google has become the leader in Computer Software Marketing. This leadership is a result of sacrifices with the aid of organized and structured work. In addition to Google Software, Google offers Open Source Organization for supporting open source projects. Due to the fact that Google has the largest number of followers from all over the world, Google didnt stop its work to pay Others attention. Supporting Google free services for targeting new developers and self organizations was one of the milestones Google working to achieve. In this article, we will talk about some Google Apps and APIs for making your own business and manage it. First of all is the Google AdWords which is Googles main advertising product and main source of revenue. AdWords offers pay-per-click (PPC) advertising, cost-per-thousand (CPM) advertising, and site-targeted advertising for text, banner, and rich-media ads. The AdWords program includes local, national, and international distribution. Googles text advertisements are short, consisting of one

headline consisting of 25 characters and two additional text lines consisting of 35 characters each. Image ads can be one of several different Interactive Advertising Bureau (IAB) standard sizes. Google Also cares about programmers so it provides APIs for those interesting in their own programs to interact with AdWords. AdWords APIs are SOAP/WSDL web-based services APIs which Let you write software that interacts programmatically with the AdWords service with the aid of Bid management, Account Management, Compain Management, Traffic Estimation, Reporting/Analytics and Keyword generation. Other common one for Google business beginners is Google AdSense. Google AdSense is a free, simple way for website publishers of all sizes to earn money by displaying targeted Google ads on their websites. AdSense also lets you provide Google search to your site users, while earning money by displaying Google ads on the search results pages. In addition, Google has noticed that online marketing takes part in the real life shopping so it

provided us with Google Checkout. Google Checkout is an alternative checkout process that provides a fast, secure way to buy and sell online. No worry about cheating with shoppers using Google Checkout badges provided on their websites. Google Shoppers has many advantages over other shoppers with more sales and lower costs with free transactions. Simple Business Scenario with Google services can be achieved with promoting your business with AdWords, getting more traffic with the Google Checkout badge, getting higher sales conversions by offering a streamlined checkout process and offering lower costs with free transaction processing. Google didnt forget to provide Web Administrators who use Google Services and APIs with Web Analytic Tool for giving advantages to them over other Administrators. Google Analytics Web Interface has 4 components. Those components are Data collection, Data Management, Core Processing with about 100 metrics for evaluation and Data Exporting. This gives the opportunity

for Googler Web Administrators to achieve what others cant. Finally, Life becomes easier with Google because thats what Google aims to.

Google and Schools


Antonella Blasetti, GTUG Lazio

Why school sucks? Why kids have so much fun doing very tiresome activities but are bored to death at school? Exploiting our natural intellectual talent is one of the most challenging activities in our life. When we realize to have learned something new we feel more alive and strongly motivated. And again ... .. Why students are not allowed to copy? In real life it is the first thing to do, being the first step for innovation and intellectual evolution. Why all school information is so stiff, crystallized, stolen of all the emotions that these strong life experiences aroused? Why students should be ashamed when dont understand something, to the point that it is more fashionable to flaunt indifference and disinterest?

Young people that enjoy studying and playing with their minds are, most of the times, treated as careerists with a servile behavior with teachers. It is totally wrong. You would say ... what has to do all this with Google? Internet and Google may represent powerful tools of freedom and individual expression. They can help make learning a game, a creative fun. Take for example the books. Study of monolithic textbooks no longer makes any sense: besides all, are unnecessarily expensive. I remember sad images of experiments in physics ... All that is now outdated, since we can access videos and simulations. Why dont let and help students compose themselves virtual books? Picking up material on the Internet (yes,

copying) and working together with other people, of any age..capable of evolving, generation by generation. Moreover: it is well known that the best way to learn is to teach. Isnt it better to prepare and give lessons than to be interviewed? And getting rated and supported by schoolmates, too. In other words, the Internet and Google (Apps, Google +) can be tools by which students can express their ideas and personalities. Together, learning how to collaborate. Despite the rules, often inadequate, of the adult world. This is the first in a series of articles in which, starting from the opinions and behaviour of young students, ideas and techniques will be collected, proposed and explained. Each article will cover a subject (history, literature, other arts, mathematics, natural sciences, geography, ancient/modern

foreign languages...), trying to highlight the interdisciplinary and social aspects. Any ideas, suggestions and contributions are welcome.

HTML5 Gaming Frameworks

Nils Hitze, GTUG Munich, Germany http://munich.gtugs.org

So, everybody is talking about HTML5 right now. Especially those who call themselves casual gamers, but have no time for long start screens, initializing maps and all the Nonsense, Schmonsens that real games bring along, will come to enjoy HTML5 sooner or later. HTML5 offers new functionality such as, among other things, audio, video or local storage and dynamic 2D and 3D graphics, which were not supported in their original form in the past and required special plugins like Adobe Flash or Silverlight. But the name HTML5 is a bit misleading, because it does not just describe a new version of HTML, or HyperTextMark- upLanguage. It is much more a catch phrase for everything new and shiny in the world of Web Development. There is a pretty nice graphic about the differences on focus.com
http://www.focus.com/images/view/11905/

games in which one builds up planets/villages/[insert name here] and then, either with an alliance or alone, one must go to war over other plants/villages/[insert name here] (Travian is a popular example in Germany). There are countless more Flash games and it feels like there is next to no possible game that has not already been done with Flash. Anyone interested can find a number of really good games at http://kongregate.com. I know from painful personal experience that one can spend hours there.

The advantages of Flash were/are the simple implementation of graphic elements and a low entry threshold. The advantages of browser games were the lack of hardware limitations and the low cost of availability. All one needed was a Web server. That brings us right to the point - the fact that one can get into game development very quickly with the new HTML5 Game Engines. Things like hardware, the availability of licenses or distribution channels arent that important anymore. The only thing needed is a server to make the content available and a bit of basic knowledge about HTML, CSS and JavaScript, and there you go. I will list three examples of popular gaming frameworks and/or the implementation of games using the new elements of HTML5.

www.kesiev.com/akihabara on www.kesiev.com Akihabara is not only a game store mile in Tokyo and a Mecca for retro videogamers but also the name of a powerful libraries, tools and templates that Kesiev put together on the basis of JavaScript and some of the new HTML5 features. Akihabara manages completely without Flash, plays music, offers routines for game worlds and is, just by the way, available on many mobile units. The drawing element Canvas is the most important element at this point.

Anyone who developed games for browsers in the past, had to do with either so-called browser games or Flash-based games. Browser games are (most often) MMOG games based on taking turns or strategy

A short example for two overlapping squares in Canvas:


<html> <head> <script type = application/javascript> function draw() { var canvas = document.getElementById(canvas); var ctx = canvas.getContext(2d); ctx.fillStyle = rgb(200,0,0); ctx.fillRect (10, 10, 55, 50); ctx.fillStyle = rgba(0, 0, 200, 0.5); ctx.fillRect (30, 30, 55, 50); } </script> </head> <body onload=draw()> <canvas id=canvas width=300 height=300></ canvas> </body> </html>

last update and is always activated in the stable version. An overview of possibilities of WebGL in the following GoogleCode Repository: http://code.google.com/p/webglsamples Andrew Woolridge, alias Tryptych blogs about various JS Engines and other ferocious things on the Web under: http://andrewwooldridge.com/blog - you should also have a look at his TwitterAccount and his Favorites. You can find a list of currently available HTML5 Game Engines at https://gist.github.com/768272

Biolab is based on the ImpactJS Engine and is really WOW. With the help of the ImpactJS Engine, you can, at least according to the developers and also according to what I have seen in the source code up to now, implement your own game ideas relatively quickly. The only disadvantage of ImpactJS is the price tag of 99 US- Dollars. In relation to its performance, however, that is still a bargain.

http://code.google.com/p/quake2-gwt-port/

Quake 2 GWT Port is an implementation of Quake 2 developed using GWT (Google Web Toolkit), which utilizes, among other things, the <audio>-Tag, Websockets und WebGL. WebGL is one of the most interesting features because it allows access to the 3D accelerator of the computers graphic hardware directly from the browser without having to install additional plugins. The library is still partially in the early stages of development, but has been in Chrome since the

http://playbiolab.com

HTML5 Websockets for fun

Alberto Mancini , Francesca Tosi GTUG Firenze tosi@gtugs.org

During the development of our product jooink.com (the web platform that names our company and that is going to be released; if youre interested you can ask for an invite at http://www.jooink.com) we faced the problem of letting users to interact smootly and to exchange information in real time. For the actual purposes of jooink long polling and a few tricks to let aggregation of messages in single responses is enough but we were interested and courious to experiment how the recently introduced html5s websockets behave. Preliminary experiments on the platform appeared to be really promising but measuring interactivity on jooink is hard because of the large codebase and because it has been optimized for long-polling, so we started a tiny pet-project just to measure websockets behaviour. The code has been presented at the GTUG session during Google Country Day that Firenze GTUG organized with Google Italia (goo.gl/sXpqb). Being just a test we posed some rules to ourselves: weekend-app, no more than a couple of days of development (reads, ugly

code), trivial graphics, an easy to understand application, interactive, GWT based. Being unable to figure out a better application we ended developing a game, a classical game: pong Interactivity in this game is vital and also it is quite obvious how to implement the program: we must share between the browsers the ball position and the players positions; somewhere we must have the code to let the ball bounce on borders and on players and to acknowledge the eventual winner. Wrapping the javascript native object Websocket in GWT is quite trivial and we do not spend time here to describe the wrapper (our is almost identical to http://code. google.com/p/gwt-comet/source/browse/ trunk/src/net/zschech/gwt/websockets/ client/WebSocket.java ) what is important is to know that after opening the connection to the server (the uri is something like ws://hostname/...) we get an object able to send text messages, through a send(String msg) method, and to receive asynchronous messages through an han-

dler (onMessage(String msg)) that is called by the browser. Server-side we chosen to use jetty 8 (actually because jetty is the container we use in production so we feel comfortable with it). Even if we found that the online documentation is not so exhaustive, it is quite straightforward to write a serverside-websocket with jetty; the following is the echo responder websocket you can find searching google for jetty websocket sample, slightly modified to be jetty 8 ready. EchoResponder: public class EchoResponder extends WebSocketServlet { private static final long serialVersionUID = 1L; public EchoResponder() { super(); } protected void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {

response.getWriter(). println(EchoResponder); } protected void doPost(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { getServletContext(). getNamedDispatcher(default). forward(request, response); } public WebSocket doWebSocketConnect(H ttpServletRequest request, String protocol) { return new TheWebSocket(); } class TheWebSocket implements WebSocket, WebSocket.OnTextMessage { Connection outbound; @Override public void onClose(int arg0, String arg1) { System.out.println(CLOSE); } @Override public void onOpen(Connection connection) { System.out.println(OPEN); outbound = connection;

Alberto Mancini, Francesca Tosi Firenze-gtug tosi@gtugs.org

} @Override public void onMessage(String msg) { try { this.outbound.sendMessage(msg); } catch (IOException e) { e.printStackTrace(); } } } } On the other hand a snippet of the client code using the websocket in gwt looks as the following: private TinyHandler h = new TinyHandler() { @Override public void onOpen(JavaScriptObject o) { ... } @Override public void onClose(JavaScriptObject o) { ... } @Override public void onMessage(JavaScriptObject o,String data) { Window.alert(message: + data); } public void onError(JavaScriptObject o) { } }; Websocket ws = Websocket(uri, onOpenH andlers,onCloseHandler,onMessageHandl

er); ws.send(Hello world); The game logic of pong is trivial and elastic collisions are really easy to code in 2D but we chosen to be lazy so we decided to base the game on a physics engine (actually, it is more fun because we can later develop different games): Jbox2d. JBox2D is the java porting of Box2D an impressive C++ library that handles very well rigid body interactions (aka collisions) and physical simulations. So, at the end of the first day of our two days project we ended with a code working as in fugure: The code clien-side consisting of a few hun-

The major drawback was: writing a different game require an almost completely new server-side component (ok, desiging better the code would help in reusing the it but does not solve the problem, an almost new server component for any new game). Fortunately looking on code.google.com we found that someone did a great job for us: JBox2D has been GWT ported. We where so amused of this idea that we switched for our last day of game development to a new approach: a generic server controlling the logic of playgrounds (i.e. places where players can start a game: enter and create a playground, join an available playground) and just working as a hub (an old network hub) in each playground, i.e. for any given message received from a player send it to all the adversaries, nothing more. On the other side, on the client, we embedded gwtBox2d and let one of the playerss browser to work as a master: Figure 1: the result is at http://goo.gl/OzkLw

(there must be 2 players that connect simultaneously so you must wait for another visitor or ask a friend to connect). Unfortunately where we reached this point the weekend ended so we had no opportunity of developing other multi-user games other than pong (we will come back asap) but as a side effect of the new approach we where able to build also a single user, browser only (i.e. no need of network connection to play, at least if you leave the game in a browser tab) you can try at: http://goo.gl/IqpCU. Of course the next step is going to be to let the code on the client to fully take advantage of html5 using webworkets that may let us to better tune timing on the browser of the master player: maybe next weekend :P

dred of lines of java devoted to receive messages and to draw in a browsers canvas. Server-side the code was more chunky, because of the required threads to handle the physical simulation: nothing problematic but a bit more harder to code and to maintain that we would like.

Google Tools and Products in Armenia


Vardan Grigoryan, GTUG Armenia

Armenia is a small country in the Caucasus, and started its internet activity 5 years ago. Now, IT is one of the priority directions of economy in Armenia, thats why this area growths quickly. Today, Armenian IT community doesnt stay behind international events and news but also they take part of new technologies development process. So each member of our IT community is a Google technology user. During the last 2 years, social media was strongly highlighted for Armenian internet users and the number of Google technology users increased significantly. Google Documents users increased with the aid of Gmail users. The number of Google Translate and Google Maps users increased in parallel with Google search, Gmail and Google Docs users. While there was no problem with search, mail and docs services, some users face translation and maps problems. GTUG Armenia plays an important role in fixing bugs appear over time. A GTUG Armenia

plans to organize next GTUG meeting in the frames of Google Map Makertopic, targeting to solve the problem with the development of Armenian maps, showing the way of improving maps to the common users and having discussion for alternative solutions. Social Media and the new technologies lead Armenian youth to replace their mobile phones with more functional smart phones, which operate with Android OS. The number of such phones users increased involving Armenian programmers in theAndroid Apps Market. Therefore, Armenian users and programmers came across with some problems concerning these services. Many times, the owners of Android OS mobiles have pointed out lack hindering. It concerns the lack of Armenian characters in DroidSans font. Armenian users should have root access in their mobiles for replacing DroidSans with another font supporting Armenian characters. Then they should install a virtual keyboard to type Armenian letters. A beginning for solving the problem

was to develop Armenian virtual keyboard by Armenian programmers. Nevertheless, the initial part concerning Armenian characters which should be added in the DroidSans font hasnt been completed yet. This can be solved only by the Android manufacturer (Google). GTUG Armenia is ready to cooperate with Google, particularly we can provide with Armenian characters if needed. We hope that these characters will be added in the next versions of Android OS. Armenian programmers face obstacles in Android Apps Market regarding applications promotion in the Android Market. Unfortunately, Armenian programmers have to sell their apps to other markets or create apps for local client. Also, number of Google news users increase regularly. The other problem, already discussed during the meetings was the lack of Armenian websites in Google Newsservice. At this moment, the system has some Armenian websites with Russian

or English Languages Materials. Being a small country and, unfortunately, not having Google offices in our country postpone the solution of some problems. However, there are problems which can be solved with the aid of Google. Three most urgent problems which can be solved with the aid of Google: 1. Adding Armenian characters in Android OS mobile phones, 2. Adding news portals in Armenian language in the Google News, 3. Purchase permission for Armenian programmers to sell programs in Android Market. There are also many small problems that GTUG Armenia tries to solve by itself. This should be ended by our slogan: We love Google and make use of it!

Smart Login for Smart Applications


Antonella Blasetti, GTUG Lazio, Italy

Do you design Web Applications? Would you like to develop Sites that offer a personalized service to your customers? If your answer is yes...you have to step into the world of OAuth and OpenID, if you havent done it, yet. First thing to do is to make clear what you can achieve. Your application (called myApp), have to setup, for security and privacy reasons, a login page and you need to make sure that the user is really who claims to be.and not an information thief. On the other hand, users get bored if they have to enter every time User ID and Password and being forced to log in repeatedly they can sometimes make mistakes. To avoid all that: It is possibile to require, first time a user logs in, only the email address used for his Google account (or Facebook, LinkedIn, Twitter...). If the user is already logged: Google step in and ask: Dear user, you re-

ally want me to talk with my friend myApp and pass the data it needs? The user answers yes and youre done... everything is easy! If the user is not connected: He/she logs in directly to Google, without providing the password to myApp For you, a problem less; for users, extra Safety Moreover... Next time myApp (together with Google) may let the user in without (apparently) any preliminary operation...just ask...dear Mary...it is really you? Great Advantages: For Users: They save an annoying and error prone process and may access to personal information and applications. For you...it is an open door to a new world! You can offer your Users: a far easier access, if already connected to Google or Yahoo or Facebook

personalized services (you know who they are) greater functionality, integrating (for example) with Google Apps or Social Networks the capability to say to friends (by word of mouth) how good myApp is Behind the Scenes ..there are OpenId and OAuth

sumer) for getting data directly from Google or Facebook or nearly any other Service Provider. Service Providers give the Consumers the key to this information by means of anauthorization token (a cryptic string). Before starting the process, MyApp, has to be acquainted with the Service. For example Google requires: the Application URL the Callback URL that will be used by the service provider after the authorization process (like Ajax callback functions) the Application Scope, used by Google to decide which data has to supply to myApp The process Here is an example of a login screen:

OpenID let you identify the user, make certain (nearly) that he is not cheating... In technical terms it is called Identification or Authentication. But myApp needs also some other information: Name, Address, document list... And OAuth provides to myApp (the Con-

Antonella Blasetti, GTUG Lazio, Italy

User inserts his Google account email and choose the Google button. User will be redirected to a Google Page that says that myApp requires authorization within the declared scope. If the user denies, Google will return an error code to myApp and the process ends If the user accepts, Google will return an authorization code to myApp myApp will send in POST to Google the authorization code together with the appropriate Secret ID (Application ID from Google ) Google returns the access token myApp can use the Access token to get User resources Just a bit of code... Just few lines of code to implement what has been just described We are going to use the following Google libraries:
http://code.google.com/p/google-api-java-client/wiki/DeveloperGuide

JsonFactory JSON_FACTORY = new JacksonFactory(); String CLIENT_ID = mio_client_id; String CLIENT_SECRET = mio_client_secret; /* this is the redirect URL*/ String authorizeUrl = new GoogleAuthoriza tionRequestUrl(CLIENT_ID, CALLBACK_URL, SCOPE).build(); 2) After the user OK, Google will return to our callback URL the authorization token, which we can exchange with the access token in the following way: String authorizationCode = request. getParameter(code); GoogleAuthorizationCodeGrant authRequest = new GoogleAuthorizationCodeGra nt(TRANSPORT, JSON_FACTORY, CLIENT_ID, CLIENT_SECRET, authorizationCode, CALLBACK_URL); authRequest.useBasicAuthorization = false; AccessTokenResponse authResponse = authRequest.execute(); String accessToken = authResponse.accessToken; /* access token then we can use to access to the user resources */ What we are working at... We are building a Web Application Cluster opened to all GTUGers.

Not only demos but working applications. The authorization will be provided with the methods just described. (OpenId 2.0 and OAuth 2.0). References OAuth 2.0 Specification: http://tools.ietf.org/html/draft-ietf-oauthv2-16 OAuth Protocol in Google: http://code.google.com/intl/it-IT/apis/accounts/docs/OAuth2.html#SS Google SCOPE list: http://code.google.com/intl/it-IT/apis/gdata/faq.html#AuthScopes Libraries Download: http://code.google.com/p/google-api-javaclient/wiki/Setup OpenId : http://code.google.com/apis/accounts/ docs/OpenID.html Working Examples : http://www.puffypoodles.com/lso Federated Login: https://sites.google.com/site/oauthgoog/ UXFedLogin/emailonlylogin

1) To build the URL for user redirect: String SCOPE = https://www.google.com/ m8/feeds/; /* for asking more than one scope, list them with spaces among them */ String CALLBACK_URL = http://mia_callbackurl; HttpTransport TRANSPORT = new NetHttpTransport();

GTUG Mag Call for sponsors


Call for Sponsors

The Magazine is organized in some topics discussing business, technical and general issues with the aid of Google Technologies and covers Google APPs, APIs and Products. GTUGs covers 262 Chapters from 81 country with positive trend of opening new once.

The Magazine provides an international cooperation for Google Technology User Group Managers and Users from all over the world. Articles will cover subjects that targets beginners, advanced users and developers based on GTUGers and Googlers experiences for publishing educational, technical and business articles. On first edition of Magazine participation was taken from GTUGers from more than 10 different countries and they are going to share this magazine to more than 10000 GTUGers all over the world. Sponsorship present an opportunity for leading companies in the industry to contact with hundreds of international experts and to exhibit to a wide range of the industry, research centres and universities of all over the world offering long lasting benefits. COLLABORATION OPTIONS Level Platinum (3000 ) Benefits
The name and the logo of the company in the Magazine and in the Web page with indication of the level of sponsorship One page in the Magazine for advertising. The name and logo of the company in the Magazine and in the Web page with indication of the level of sponsorship Half page in the Magazine for advertising. The name and logo of the company in the Magazine and in the Web page with indication of the level of sponsorship

Gold (1500 )

Silver (500 )

*Prices are for 6 issues of GTUG Magazine Sponsors are requested to contact Duan Stranati clearly indicating their type and level of sponsorship. An acknowledgement of receipt will be sent by e-mail. Any offer of sponsorship will be considered on its own merits. The organizer reserve the right to refuse offers, judge the value offers and request further information. For additional information please contact Duan Stranati <ducha@gtugs.org>.

You might also like