gtug magazine august 2011

15
 google tehnology user groups GTU Ge rs and Googl ers exper ie nces f or publ is hi ng ed ucati on al , tec hn ic al an d bus in ess art ic le s. Aug us t 2011. GTUG magazine

Upload: dusan-stranatic

Post on 07-Jul-2015

501 views

Category:

Documents


0 download

DESCRIPTION

GTUGers and Googlers experiences for publishing educational, technical and business articles.GTUG magazineAugust 2011.google tehnology user groupsDear Readers,Let me introduce you to the the first- August issue of GTUG magazine. This month’s 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

TRANSCRIPT

Page 1: GTUG Magazine August 2011

5/9/2018 GTUG Magazine August 2011 - slidepdf.com

http://slidepdf.com/reader/full/gtug-magazine-august-2011 1/15

 

google tehnology user groups

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

GTUG magazine

Page 2: GTUG Magazine August 2011

5/9/2018 GTUG Magazine August 2011 - slidepdf.com

http://slidepdf.com/reader/full/gtug-magazine-august-2011 2/15

 

Let me introduce you to the the rst- August issue of GTUG magazine.This month’s cover story is focused on Introductory topics aboutGoogle Apps, APIs and Products.Different topics discussing business, technical and general issueswith 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)

ear Readers,

Page 3: GTUG Magazine August 2011

5/9/2018 GTUG Magazine August 2011 - slidepdf.com

http://slidepdf.com/reader/full/gtug-magazine-august-2011 3/15

 

Google Technology User Groups

Google Talks Section

Google Business Section

Google Game Development

Google Services

Country Specic

1. Google Plus. Today and Tomorrow -> Vardan Grigoryan, GTUG Armenia

1. Manage Your Business with Google APPs and Google APIs -> Mohammed Farrag, Shibin Al-Kawm GTUG

1. HTML5 Gaming Frameworks -> Nils Hitze, GTUG Munich

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

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

2. Who’s Afraid of Google? -> Antonella Blasetti, GTUG Lazio

2. Google and Schools -> Antonella Blasetti, GTUG Lazio

2. HTML5 Websockets for fun -> Alberto Mancini (Firenze-gtug [email protected]) & Francesca Tosi(Firenze-gtug [email protected]), Firenze-GTUG

Page 4: GTUG Magazine August 2011

5/9/2018 GTUG Magazine August 2011 - slidepdf.com

http://slidepdf.com/reader/full/gtug-magazine-august-2011 4/15

 

On June 28, 2011 I received an unexpectedletter by gmail. Here are the rst lines of the letter from Stephanie Liu.

“Hi,

I’d like to invite you to an early Field Trialof the Google+ project, a new way to sharewith the people that matter the most.”

It was impossible to describe my feelingswhen I realized that I was one of those rarepeople who can explore the initial versionof the system. I fell in love with it at rstsight...Everything was so clear, well organized andso easy to manage that even beginner us-ers of the Internet would not need help.And I realized that Google-Plus is what weexpected for a long time.

To be honest, we were expecting a systemlike this, but it was planned to called GoogleMe.

I’d like to express my opinion about thename of this project. Google Me is a bet-ter name for a social network. But let’s notforget that it is not a simple social network.I am sure that as the network develops, itwill have all the Google services and tools.

Google Plus. Todayand Tomorrow

Vardan Grigoryan,GTUG Armenia

Thus Plus is the best name for such a sys-tem.I don’t want to write about the inner struc-ture of the network, because it is alreadywritten inside the system.

I’ll try to mention what we have today, andwhat we will have in future.

Google Plus Today

Based on Paul Allen’s post and the note thatI received the invitation on 4th of July, therewere already more than 1.7 million peopleregistered on the network only a week afterI received the invitation. And also I mustmention that the system was turned on foronly 3 days.

We must agree that in one week 1.7 million

registered proles are a serious challengeto all other social networks, particularly toFacebook. So the struggle is just beginning.Only after a few days we could see manyinteresting extensions and sites on the In-ternet, created by third parties.Especially I would like to mention gplus.to ,which allows users to create their short urladdresses for their proles (http://gplus.to/USERNAME), because G+ still doesn’t pro-

vide their users with their preferred urlsand nicknames.

I also want to mention socialstatistics.comand I consider it as an important resource

because it also took advantage of the factthat G + doesn’t have API, and created a rat-ing system for the proles.

I am not going to tell more about the men-tioned extensions. I will be glad to helpwith advice people who are interested, andif there are suck people, they may followthis link and read more about the sources.In short, today we have 1.7 million usersand a system that is growing minute byminute.

Google Plus tomorrow

And here, perhaps, I should report my sub- jective opinion. So, what do I expect to seein G +

1. I think the most important and urgenttask is the API-creation.Personally, being a programmer, I’m al-ready looking forward to the API. It will al-low a sudden increase of the users. But I

also realize that for creating an API for sucha system a lot of time and human resourcesare required. So all we can do is wait.

2. It is also important that other Google ser-

vices will be integrated into Plus. Especiallythe upper toolbar notication number, as itis done with the help of Google + Enhancer

3. I look forward to the integration of Google Sites into user’s prole. This will al-low users to create their site or their orga-nization’s website within Google Plus. It is astep, which not a single social network cando better than Google Plus.

4. I also have great expectations for theGoogle Groups integration into GooglePlus. It will allow lling in the gap of the

groups in G+.

5. And with the last point, of course, I can-not forget the awaited integration of GoogleMusic which is in experimental mode now.

Maybe I forgot to mention some facts orexpectations; in any case, I hope GooglePlus will surprise us with a lot more thingthan a mentioned.

Page 5: GTUG Magazine August 2011

5/9/2018 GTUG Magazine August 2011 - slidepdf.com

http://slidepdf.com/reader/full/gtug-magazine-august-2011 5/15

 

Google is different...Let us try to explain why:

Largest global IT companies (Oracle IBMMicrosoft)

• Corporate Clients• Very high license fees• Proprietary software• Dicult to use Technology, sometimesout 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 seriousFun, Research and fast Communication• Suitable for people of any age and socialenvironment• and above all ... not just software ... butall you can do better with technology andthe Internet

Well, it is enough to be scared of...(from

Who’s Afraid ofGoogle?

Antonella Blasetti,GTUG Lazio

the point of view of the Big Companies, of course)

But: why didn’t they realize all that before?

What will it happen?

My personal opinion

Why didn’t they realize all that before?They didn’t so far realized this becauseGoogle was related to the Search EnginesBusiness and to the distribution of experi-mental software for nal users.In others words, they did not considerGoogle a dangerous competitor...Maybe Google did its best to make themthink so, too.

What will happen?From the perspective of the business war,I am sure that Google will win. it’s too farahead.But we have to consider that the strugglewill cover the advertising and publishingelds too... not only Information Technol-ogy. ..Competitors will play the card of privacy

and security: they will try to scare us withthe menace that our secrets will be discov-ered and we will publicly stripped nakedand 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 ex-pensive (paid by us at the supermarket andelsewhere) advertising, affordable only forthe biggest companiesor

• to be informed only about what we careabout or we are interested in, maybe at thebest 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 reallychange our life:• expanding and improving software qual-ity and exploitation

• facilitating transparency in governmentand making control an easier task• breaking down barriers and boundaries

We hope that Google, the Cloud ComputingGiant, 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 (expe-cially the younger ones) is really important.

The possibility of a better future will be intheir hands.In their Hands and in their Mind.

References

Google philosophy:http://www.google.com/corporate/tenth-ings.html

Page 6: GTUG Magazine August 2011

5/9/2018 GTUG Magazine August 2011 - slidepdf.com

http://slidepdf.com/reader/full/gtug-magazine-august-2011 6/15

 

Lately, Google has become the leader inComputer Software Marketing. This leader-ship is a result of sacrices with the aid of organized and structured work. In additionto Google Software, Google offers OpenSource Organization for supporting opensource projects.

Due to the fact that Google has the largestnumber of followers from all over the world,Google didn’t stop its work to pay “Others”attention. Supporting Google free servicesfor targeting new developers and self orga-nizations was one of the milestones Googleworking to achieve. In this article, we willtalk about some Google Apps and APIs formaking your own business and manage it.First of all is the Google AdWords which

is Google’s main advertising product andmain source of revenue.

AdWords offers pay-per-click (PPC) adver-tising, cost-per-thousand (CPM) advertis-ing, and site-targeted advertising for text,banner, and rich-media ads. The AdWordsprogram includes local, national, and in-ternational distribution. Google’s text ad-vertisements are short, consisting of one

Manage Your Business withGoogle APPs and Google APIs

Mohammed Farrag,GTUG Shibin Al-Kawm

headline consisting of 25 characters andtwo additional text lines consisting of 35characters each. Image ads can be one of several different Interactive Advertising Bu-reau (IAB) standard sizes. Google Also caresabout programmers so it provides APIs forthose interesting in their own programs tointeract with AdWords.

AdWords APIs are SOAP/WSDL web-basedservices APIs which Let you write softwarethat interacts programmatically with theAdWords service with the aid of Bid man-agement, Account Management, CompainManagement, Trac Estimation, Report-ing/Analytics and Keyword generation.Other common one for Google businessbeginners is Google AdSense.

Google AdSense is a free, simple way forwebsite publishers of all sizes to earn mon-ey by displaying targeted Google ads ontheir websites. AdSense also lets you pro-vide Google search to your site users, whileearning money by displaying Google adson the search results pages. In addition,Google has noticed that online marketingtakes part in the real life shopping so it

provided us with Google Checkout. GoogleCheckout is an alternative checkout pro-cess that provides a fast, secure way to buyand sell online.

No worry about cheating with shoppers us-ing Google Checkout badges provided ontheir websites. Google Shoppers has manyadvantages over other shoppers with moresales and lower costs with free transactions.Simple Business Scenario with Google ser-vices can be achieved with promoting yourbusiness with AdWords, getting more traf-c with the Google Checkout badge, get-ting higher sales conversions by offering astreamlined checkout process and offeringlower costs with free transaction process-ing.

Google didn’t forget to provide Web Admin-istrators who use Google Services and APIswith Web Analytic Tool for giving advan-tages to them over other Administrators.Google Analytics Web Interface has 4 com-ponents. Those components are Data col-lection, Data Management, Core Processingwith about 100 metrics for evaluation andData Exporting. This gives the opportunity

for Googler Web Administrators to achievewhat others can’t. Finally, Life becomes eas-ier with Google because that’s what Googleaims to.

Page 7: GTUG Magazine August 2011

5/9/2018 GTUG Magazine August 2011 - slidepdf.com

http://slidepdf.com/reader/full/gtug-magazine-august-2011 7/15

Why school sucks?

Why kids have so much fun doing very tire-some activities but are bored to death atschool?

Exploiting our natural intellectual talent isone of the most challenging activities in ourlife.When we realize to have learned some-thing new we feel more alive and stronglymotivated.

And again ... ..Why students are not allowed to copy? Inreal life it is the rst thing to do, being therst step for innovation and intellectualevolution.

Why all school information is so stiff, crys-tallized, stolen of all the emotions thatthese strong life experiences aroused?

Why students should be ashamed whendon’t understand something, to the pointthat it is more fashionable to aunt indif-ference and disinterest?

Google andSchools

Antonella Blasetti,GTUG Lazio

Young people that enjoy studying and play-ing with their minds are, most of the times,treated as careerists with a servile behaviorwith teachers.

It is totally wrong.

You would say ... what has to do all this withGoogle?

Internet and Google may represent power-ful tools of freedom and individual expres-sion.They can help make learning a game, a cre-ative fun.

Take for example the books.Study of monolithic textbooks no longer

makes any sense: besides all, are unneces-sarily expensive.

I remember sad images of experiments inphysics ... All that is now outdated, since wecan access videos and simulations.

Why don’t let and help students composethemselves virtual books?Picking up material on the Internet (yes,

copying) and working together with otherpeople, of any age..capable of evolving,generation by generation.

Moreover: it is well known that the bestway to learn is to teach.Isn’t it better to prepare and give lessonsthan to be interviewed?And getting rated and supported by school-mates, too.

In other words, the Internet and Google(Apps, Google +) can be tools by which stu-dents can express their ideas and personal-ities. Together, learning how to collaborate.Despite the rules, often inadequate, of the“adult world”.

This is the rst in a series of articles inwhich, starting from the opinions and be-haviour of young students, ideas and tech-niques will be collected, proposed and ex-plained.

Each article will cover a subject (history,literature, other arts, mathematics, natu-ral sciences, geography, ancient/modern

foreign languages...), trying to highlight theinterdisciplinary and social aspects.

Any ideas, suggestions and contributionsare welcome.

 

Page 8: GTUG Magazine August 2011

5/9/2018 GTUG Magazine August 2011 - slidepdf.com

http://slidepdf.com/reader/full/gtug-magazine-august-2011 8/15

So, everybody is talking about HTML5 rightnow.Especially those who call themselves casu-al gamers, but have no time for long startscreens, initializing maps and all the Non-

sense, Schmonsens that “real games” bringalong, will come to enjoy HTML5 sooner orlater.HTML5 offers new functionality such as,among other things, audio, video or localstorage and dynamic 2D and 3D graphics,which were not supported in their originalform in the past and required special pl-ugins like Adobe Flash or Silverlight.But the name HTML5 is a bit misleading,because it does not just describe a newversion of HTML, or HyperTextMark- up-Language. It is much more a catch phrase

for everything new and shiny in the worldof Web Development.There is a pretty nice graphic about the dif-ferences on focus.comhttp://www.focus.com/images/view/11905/

Anyone who developed games for browsersin the past, had to do with either so-calledbrowser games or Flash-based games.Browser games are (most often) MMOGgames based on taking turns or strategy

HTML5 Gaming Frameworks

Nils Hitze,GTUG Munich, Germanyhttp://munich.gtugs.org

games in which one builds up planets/vil-lages/[insert name here] and then, eitherwith an alliance or alone, one must goto war over other plants/villages/[insertname here] (Travian is a popular example

in Germany). There are countless moreFlash games and it feels like there is nextto no possible game that has not alreadybeen done with Flash. Anyone interestedcan nd a number of really good games athttp://kongregate.com.I know from painful personal experiencethat one can spend hours there.

The advantages of Flash were/are the sim-ple implementation of graphic elementsand a low entry threshold. The advantagesof browser games were the lack of hard-ware limitations and the low cost of avail-

ability. All one needed was a Web server.

That brings us right to the point - the factthat one can get into game developmentvery quickly with the new “HTML5” GameEngines. Things like hardware, the avail-ability of licenses or distribution channelsaren’t that important anymore. The only

thing needed is a server to makethe content available and a bitof basic knowledge about HTML,CSS and JavaScript, and thereyou go.

I will list three examples of popular gaming frameworksand/or the implementation of games using the new elementsof HTML5.

www.kesiev.com/akihabara on

www.kesiev.comAkihabara is not only a game store mile inTokyo and a Mecca for retro videogamersbut also the name of a powerful libraries,tools and templates that Kesiev put togeth-er on the basis of JavaScript and some of 

the new HTML5 features.

Akihabara manages completely withoutFlash, plays music, offers routines for gameworlds and is, just by the way, available onmany mobile units. The drawing element“Canvas” is the most important element atthis point.

 

Page 9: GTUG Magazine August 2011

5/9/2018 GTUG Magazine August 2011 - slidepdf.com

http://slidepdf.com/reader/full/gtug-magazine-august-2011 9/15

A short example for two overlappingsquares in Canvas:

<html><head><script type = ”application/javascript”>function draw() {var canvas = document.getElementById(“canvas”);var ctx = canvas.getContext(“2d”);ctx.llStyle = “rgb(200,0,0)”; ctx.llRect (10, 10, 55, 50);ctx.llStyle = “rgba(0, 0, 200, 0.5)”; ctx.llRect (30, 30, 55, 50);}

</script></head>

<body onload=”draw()”><canvas id=”canvas” width=”300” height=”300”></ canvas></body></html>

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

Quake 2 GWT Port is an implementation of Quake 2 developed using GWT (Google WebToolkit), which utilizes, among other things,the <audio>-Tag, Websockets und WebGL.

WebGL is one of the most interesting fea-tures because it allows access to the 3Daccelerator of the computer’s graphic hard-

ware directly from the browser without hav-ing to install additional plugins. The libraryis still partially in the early stages of devel-opment, but has been in Chrome since the

last update and is always activated in thestable version.

An overview of possibilities of WebGL in thefollowing GoogleCode Repository:http://code.google.com/p/webglsamples

Andrew Woolridge, alias Tryptych blogsabout various JS Engines and other fero-cious things on the Web under: http://an-drewwooldridge.com/blog - you should

also have a look at his TwitterAccount andhis Favorites.You can nd a list of currently availableHTML5 Game Engines athttps://gist.github.com/768272

http://playbiolab.com

Biolab is based on the ImpactJS Engine andis really WOW. With the help of the Impac-tJS Engine, you can, at least according tothe developers and also according to whatI have seen in the source code up to now,implement your own game ideas relativelyquickly. The only disadvantage of ImpactJSis the price tag of 99 US- Dollars. In relationto its performance, however, that is still abargain.

 

Page 10: GTUG Magazine August 2011

5/9/2018 GTUG Magazine August 2011 - slidepdf.com

http://slidepdf.com/reader/full/gtug-magazine-august-2011 10/15

During the development of our product joo-ink.com (the web platform that names ourcompany and that is going to be released;if you’re interested you can ask for an inviteat http://www.jooink.com) we faced the

problem of letting users to interact smootlyand to exchange information in real time.For the actual purposes of jooink long poll-ing and a few tricks to let aggregation of messages in single responses is enough butwe were interested and courious to experi-ment how the recently introduced html5’swebsockets behave.Preliminary experiments on the platformappeared to be really promising but mea-suring interactivity on jooink is hard be-cause of the large codebase and because ithas been optimized for long-polling, so we

started a tiny pet-project just to “measure”websockets behaviour.

The code has been presented at the GTUGsession during Google Country Day that Fi-renze GTUG organized with Google Italia(goo.gl/sXpqb).Being just a test we posed some rules toourselves: weekend-app, no more than acouple of days of development (reads, ugly

HTML5 Websockets for fun

Alberto Mancini ,Francesca TosiGTUG [email protected]

code), trivial graphics, an easy to under-stand application, interactive, GWT based.

Being unable to gure out a better applica-tion we ended developing a game, a classi-

cal game: pong

Interactivity in this game is vital and also itis quite obvious how to implement the pro-gram: we must share between the browsersthe ball position and the players positions;somewhere we must have the code to letthe ball bounce on borders and on playersand to acknowledge the eventual winner.

Wrapping the javascript native object Web-socket in GWT is quite trivial and we donot spend time here to describe the wrap-

per (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 importantis to know that after opening the connec-tion to the server (the uri is somethinglike ws://hostname/...) we get an objectable to send text messages, through a“send(String msg)” method, and to receiveasynchronous messages through an han-

dler (onMessage(String msg)) that is calledby the browser.

Server-side we chosen to use jetty 8 (actu-ally because jetty is the container we use

in production so we feel comfortable withit). Even if we found that the online docu-mentation is not so exhaustive, it is quitestraightforward to write a serverside-web-socket with jetty; the following is the echoresponder websocket you can nd search-ing google for “jetty websocket sample”,slightly modied to be jetty 8 ready.

EchoResponder:

public class EchoResponder extends Web-

SocketServlet {private static nal long serialVersionUID =1L;public EchoResponder() {super();}

protected void doGet(HttpServletRequestrequest, HttpServletResponse response)throwsServletException, IOException {

response.getWriter().println(“EchoResponder”);}

protected void doPost(HttpServletRequestrequest, HttpServletResponse response)

throwsServletException, IOException {getServletContext().getNamedDispatcher(“default”).forward(request, response);}

public WebSocket doWebSocketConnect(HttpServletRequest request, String protocol){return new TheWebSocket();}

class TheWebSocket implements WebSock-et, WebSocket.OnTextMessage {

Connection outbound;@Overridepublic void onClose(int arg0, String arg1) {System.out.println(“CLOSE”);}

@Overridepublic void onOpen(Connection connec-tion) {System.out.println(“OPEN”);outbound = connection;

 

Page 11: GTUG Magazine August 2011

5/9/2018 GTUG Magazine August 2011 - slidepdf.com

http://slidepdf.com/reader/full/gtug-magazine-august-2011 11/15

}

@Overridepublic void onMessage(String msg) {try {this.outbound.sendMessage(msg);

} catch (IOException e) {e.printStackTrace();}

}

}

}

On the other hand a snippet of the clientcode using the websocket in gwt looks asthe following:

private TinyHandler h = new TinyHandler(){

@Overridepublic void onOpen(JavaScriptObject o) {...}

@Overridepublic void onClose(JavaScriptObject o) {...}

@Overridepublic void onMessage(JavaScriptObject

o,String data) {Window.alert(“message:” + data);}

public void onError(JavaScriptObject o) {…

}

};

Websocket ws = Websocket(uri, onOpenHandlers,onCloseHandler,onMessageHandl

Alberto Mancini, Francesca [email protected]

er);ws.send(“Hello world”);…

The “game logic” of pong is trivial and elas-

tic collisions are really easy to code in 2Dbut we chosen to be lazy so we decided tobase the game on a physics engine (actu-ally, it is more fun because we can laterdevelop different games): Jbox2d. JBox2Dis the java porting of Box2D an impres-sive C++ library that handles very well r igidbody interactions (aka collisions) and physi-cal simulations.

So, at the end of the rst day of our twodays project we ended with a code workingas in fugure:The code clien-side consisting of a few hun-

dred of lines of java devoted to receive mes-sages and to draw in a browser’s canvas.Server-side the code was more chunky, be-cause of the required threads to handle thephysical simulation: nothing problematicbut a bit more harder to code and to main-tain that we would like.

The major drawback was: writing a differ-ent game require an almost completelynew server-side component (ok, desigingbetter the code would help in reusing the itbut does not solve the problem, an almost

new server component for any new game).Fortunately looking on code.google.com wefound that someone did a great job for us:

  JBox2D has been GWT ported. We whereso amused of this idea that we switchedfor our last day of game development to anew approach: a generic server controllingthe logic of playgrounds (i.e. places whereplayers can start a game: enter and createa playground, join an available playground)and just working as a hub (an old networkhub) in each playground, i.e. for any givenmessage received from a player send it toall the adversaries, nothing more.

On the other side, onthe client, we embeddedgwtBox2d and let one of the players’s browser towork as a master:Figure 1: the result isat http://goo.gl/OzkLw

(there must be 2 players that connect si-multaneously so you must wait for anothervisitor or … ask a friend to connect).

Unfortunately where we reached this point

the weekend ended so we had no opportu-nity of developing other multi-user gamesother than pong (we will come back asap)but as a side effect of the new approachwe where able to build also a single user,browser only (i.e. no need of network con-nection to play, at least if you leave thegame in a browser tab) you can try at:http://goo.gl/IqpCU.

Of course the next step is going to be to letthe code on the client to fully take advan-tage of html5 using webworkets that maylet us to better tune timing on the browser

of the ‘master’ player: maybe next weekend:P

 

Page 12: GTUG Magazine August 2011

5/9/2018 GTUG Magazine August 2011 - slidepdf.com

http://slidepdf.com/reader/full/gtug-magazine-august-2011 12/15

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, that’s why this areagrowths quickly. Today, Armenian IT com-

munity doesn’t stay behind internationalevents and news but also they take part of new technologies development process.So each member of our IT community is aGoogle technology user.

During the last 2 years, social media wasstrongly highlighted for Armenian internetusers and the number of Google technol-ogy users increased signicantly. GoogleDocuments users increased with the aid of Gmail users.

The number of Google Translate andGoogle Maps users increased in parallelwith Google search, Gmail and Google Docsusers. While there was no problem withsearch, mail and docs services, some usersface translation and maps problems. GTUGArmenia plays an important role in xingbugs appear over time. A GTUG Armenia

Google Tools and Products inArmenia

Vardan Grigoryan,GTUG Armenia

plans to organize next GTUG meeting in theframes of Google Map Makertopic, target-ing to solve the problem with the develop-ment of Armenian maps, showing the wayof improving maps to the common users

and having discussion for alternative solu-tions.

Social Media and the new technologies leadArmenian youth to replace their mobilephones with more functional smart phones,which operate with Android OS. The num-ber of such phones users increased involv-ing Armenian programmers in theAndroidApps Market. Therefore, Armenian usersand programmers came across with someproblems concerning these services. Manytimes, the owners of Android OS mobiles

have pointed out lack hindering. It con-cerns the lack of Armenian characters inDroidSans font. Armenian users shouldhave root access in their mobiles for replac-ing DroidSans with another font supportingArmenian characters. Then they should in-stall a virtual keyboard to type Armenianletters. A beginning for solving the problem

was to develop Armenian virtual keyboardby Armenian programmers. Nevertheless,the initial part concerning Armenian char-acters which should be added in the Droid-Sans font hasn’t been completed yet. This

can be solved only by the Android manu-facturer (Google). GTUG Armenia is readyto cooperate with Google, particularly wecan provide with Armenian characters if needed. We hope that these characters willbe added in the next versions of AndroidOS.

Armenian programmers face obstacles inAndroid Apps Market regarding applica-tions promotion in the Android Market. Un-fortunately, Armenian programmers haveto sell their apps to other markets or create

apps for local client.

Also, number of Google news users in-crease regularly. The other problem, al-ready discussed during the meetings wasthe lack of Armenian websites in GoogleNewsservice. At this moment, the systemhas some Armenian websites with Russian

or English Languages Materials.

Being a small country and, unfortunately,not having Google oces in our countrypostpone the solution of some problems.

However, there are problems which can besolved with the aid of Google.

Three most urgent problems which can besolved with the aid of Google:

1. Adding Armenian characters in AndroidOS mobile phones,2. Adding news portals in Armenian lan-guage in the Google News,3. Purchase permission for Armenian pro-grammers to sell programs in Android Mar-ket.

There are also many small problems thatGTUG Armenia tries to solve by itself. Thisshould be ended by our slogan: “We loveGoogle and make use of it!”

 

Page 13: GTUG Magazine August 2011

5/9/2018 GTUG Magazine August 2011 - slidepdf.com

http://slidepdf.com/reader/full/gtug-magazine-august-2011 13/15

Do you design Web Applications?

Would you like to develop Sites that offera personalized service to your customers?If your answer is yes...you have to step

into the world of OAuth and OpenID, if youhaven’t done it, yet.

First thing to do is to make clear what youcan achieve.Your application (called myApp), have tosetup, for security and privacy reasons, alogin page and you need to make sure thatthe user is really who claims to be.and notan information thief.On the other hand, users get bored if theyhave to enter every time User ID and Pass-word and being forced to log in repeatedly

they can sometimes make mistakes.

To avoid all that:It is possibile to require, rst time a userlogs in, only the email address used for hisGoogle account (or Facebook, LinkedIn,Twitter...).If the user is already logged:

• Google step in and ask: Dear user, you re-

Smart Login for SmartApplications

Antonella Blasetti,GTUG Lazio, Italy

ally want me to talk with my friend myAppand pass the data it needs?• The user answers yes and you’re done...everything is easy!

If the user is not connected:

• He/she logs in directly to Google, withoutproviding the password to myApp• For you, a problem less; for users, extraSafetyMoreover...Next time myApp (together with Google)may let the user in without (apparently)any preliminary operation...just ask...dearMary...it is really you?

Great Advantages:

For Users:

• They save an annoying and error proneprocess and may access to personal infor-mation and applications.

For you...it is an open door to a new world!You can offer your Users:• a far easier access, if already connectedto Google or Yahoo or Facebook

• personalized services (you know whothey are)• greater functionality, integrating (forexample) with Google Apps or Social Net-works

• the capability to say to friends (by wordof mouth) how good myApp is

Behind the Scenes..there are OpenId and OAuth

OpenID let you identify the user, make cer-tain (nearly) that he is not cheating...In technical terms it is called Identicationor Authentication.

But myApp needs also some other informa-tion: Name, Address, document list...And OAuth provides to myApp (the Con-

sumer) for getting data directly fromGoogle or Facebook or nearly any otherService Provider.Service Providers give the Consumers thekey to this information by means of anau-

thorization token (a cryptic string).

Before starting the process, MyApp, has tobe acquainted with the Service. For exam-ple Google requires:

• the Application URL• the Callback URL that will be used by theservice provider after the authorizationprocess (like Ajax callback functions)• the Application Scope, used by Google todecide which data has to supply to myApp

The processHere is an example of a login screen:

 

Page 14: GTUG Magazine August 2011

5/9/2018 GTUG Magazine August 2011 - slidepdf.com

http://slidepdf.com/reader/full/gtug-magazine-august-2011 14/15

• User inserts his Google account emailand choose the Google button.• User will be redirected to a Google Pagethat says that myApp requires authoriza-tion within the declared scope.• If the user denies, Google will return anerror code to myApp and the process ends• If the user accepts, Google will return anauthorization code to myApp• myApp will send in POST to Google theauthorization code together with the ap-propriate Secret ID (Application ID fromGoogle )

• Google returns the access token myAppcan use the Access token to get User re-sources

 Just a bit of code...

  Just few lines of code to implement whathas been just describedWe are going to use the following Googlelibraries:

http://code.google.com/p/google-api-java-cli-

ent/wiki/DeveloperGuide

1) To build the URL for user redirect:

String SCOPE = “https://www.google.com/m8/feeds/”; /* for asking more than onescope, list them with spaces among them*/String CALLBACK_URL = “http://mia_call-backurl”;HttpTransport TRANSPORT = new NetHttp-Transport();

Antonella Blasetti,GTUG Lazio, Italy

 JsonFactory JSON_FACTORY = new Jackson-Factory();

String CLIENT_ID = “mio_client_id”;String CLIENT_SECRET = “mio_client_se-cret”;

/* this is the redirect URL*/String authorizeUrl = new GoogleAuthorizationRequestUrl(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 to-ken in the following way:

String authorizationCode = request.getParameter(“code”);GoogleAuthorizationCodeGrant authRe-quest = new GoogleAuthorizationCodeGrant(TRANSPORT,

 JSON_FACTORY, CLIENT_ID, CLIENT_SECRET,authorizationCode, CALLBACK_URL);authRequest.useBasicAuthorization = false;AccessTokenResponse authResponse = au-thRequest.execute();

String accessToken = authResponse.access-Token;/* access token then we can use to accessto the user resources */

What we are working at...

We are building a Web Application Clusteropened to all GTUGers.

Not only demos but working applications.The authorization will be provided with themethods just described. (OpenId 2.0 andOAuth 2.0).

References

OAuth 2.0 Specication:http://tools.ietf.org/html/draft-ietf-oauth-v2-16

OAuth Protocol in Google:http://code.google.com/intl/it-IT/apis/ac-

counts/docs/OAuth2.html#SS

Google SCOPE list:http://code.google.com/intl/it-IT/apis/gda-ta/faq.html#AuthScopes

Libraries Download:http://code.google.com/p/google-api-java-client/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 

 

Page 15: GTUG Magazine August 2011

5/9/2018 GTUG Magazine August 2011 - slidepdf.com

http://slidepdf.com/reader/full/gtug-magazine-august-2011 15/15

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

Call for Sponsors

The Magazine provides an international cooperation for Google Technology User Group Managers and Users from all over theworld. Articles will cover subjects that targets beginners, advanced users and developers based on GTUGers and Googlers ex-periences for publishing educational, technical and business articles. On rst edition of Magazine participation was taken fromGTUGers from more than 10 different countries and they are going to share this magazine to more than 10000 GTUGers all overthe world.

Sponsorship present an opportunity for leading companies in the industry to contact with hundreds of international experts andto exhibit to a wide range of the industry, research centres and universities of all over the world offering long lasting benets.

COLLABORATION OPTIONS

Level Benets

Platinum (3000 €) The name and the logo of the company in the Magazine and inthe Web page with indication of the level of sponsorshipOne page in the Magazine for advertising.

Gold (1500 €) The name and logo of the company in the Magazine and in theWeb page with indication of the level of sponsorshipHalf page in the Magazine for advertising.

Silver (500 €) The name and logo of the company in the Magazine and in theWeb page with indication of the level of sponsorship

*Prices are for 6 issues of GTUG Magazine

Sponsors are requested to contact Dušan 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 of-fers and request further information.

For additional information please contact Dušan Stranatić <[email protected]>.

GTUG Mag Callfor sponsors