Les nouveautés et Tutoriels de Votre Codeur | SEO | Création de site web | Création de logiciel

seo WindowBuilder becomes new open source project with major code contribution to Eclipse Foundation 2013

Seo Master present to you:

When Google acquired Instantiations in August 2010, everyone knew about our Java Eclipse products. Shortly after we joined, we talked about how best to help developers now that we are part of Google. We have always wanted to get these tools in more developers’ hands. So, back in September we decided to give them away for free! The community response has been fantastic. With that done, we asked ourselves, how could we make a good thing even better? How about by open sourcing the code and creating two new Eclipse projects!

Today we are announcing Google’s donation of the source code and IP for two of these products to the open source community through the Eclipse Foundation. This donation includes WindowBuilder, the leading Eclipse Java GUI Designer, and CodePro Profiler, which identifies Java code performance issues. Specifically, the WindowBuilder Engine and designers for SWT and Swing. All in all, this is a value of more than $5 million dollars worth of code and IP.

The Eclipse Foundation’s Executive Director, Mike Milinkovich, states that, “this is clearly a significant new project announcement, and very good news for Java developers using Eclipse. It has been impressive to see the continued growth and popularity of WindowBuilder, as this product has always filled a much needed gap in the Eclipse offerings. We look forward to it appearing in an Eclipse release soon. We’re very pleased with Google’s generous support of Eclipse, and the Java developer community around the world.”

One of the exciting aspects of innovating in the open source arena is that customers benefit from a full community. We are very excited to see the diverse collection of companies and individuals that have already expressed an interest in contributing to these projects. Commercial level support is important to many customers. Genuitec, makers of MyEclipse, intends to offer commercial support for the various WindowBuilder based products including the SWT, Swing Designer and even the GWT Designer from Google. Please sign up on the Genuitec site for more information. Similarly, OnPositive intends to offer commercial support for CodePro Profiler, as well as lead as the committers on the Eclipse Community Project. Sign up on the OnPositive site for more information.

"Genuitec is pleased to offer commercial support for WindowBuilder-based products - Swing, SWT and GWT - in early 2011 for companies who wish to continue a paid support contract once their Google support expires. We've been involved with the Eclipse Foundation since the beginning, so we are very familiar with these products. Thus, providing commercial support for this product line is a natural fit for us," said Maher Masri, President of Genuitec.

“Over the years OnPositive has built up unique experience with the CodePro Profiler and we are excited to offer commercial support for it. Google’s donation ensures that Java developers can build faster applications,” said Pavel Petrochenko, President of OnPositive.

WindowBuilder
WindowBuilder is regarded as the leading GUI builder in the Java community (winning the award for Best Commercial Eclipse Tool in 2009). It includes powerful functionality for creating user interfaces based on the popular Swing, SWT (Standard Widget Toolkit), GWT (Google Web Toolkit), RCP and XWT UI frameworks.

CodePro Profiler
CodePro Profiler is an Eclipse-based Java application profiling tool that helps developers identify performance issues early in the development cycle and find CPU and algorithmic bottlenecks, memory leaks, threading issues, and other concurrency-related problems that can slow down an application or cause it to hang.

Both WindowBuilder and CodePro Profiler will become Eclipse projects in the first half of 2011. Once each one is set up as a project and available for download from the Eclipse site, the products will be accessible to use as open source code under the the standard Eclipse license. I am looking forward to leading the WindowBuilder project.

If you have any questions, you can learn more at this FAQ or we look forward to hearing from you on the forums.

2013, By: Seo Master

seo Google Visualization API Library now available for Google Web Toolkit 2013

Seo Master present to you:

We're happy to announce the Google Visualization API Library for Google Web Toolkit (GWT). This has been a requested addition to GWT for some time now on the developer forum and we are excited to make it available.

You can now utilize the visualization and reporting capabilities of the Google Visualization API while writing native Java code for your GWT applications and enjoy the best of both worlds. The library includes wrappers for many of Google's visualizations, such as Bar Chart, Annotated Time Line, Map, Motion Chart, Organizational Chart and many others. We have marked all the visualizations that are currently supported by this library in the Visualization Gallery.

The library also includes classes that enable you to easily wrap any existing Visualization API-compliant visualization in GWT so that you can access it from Java complied by the GWT compiler. So if you want to wrap your own visualization or the nifty Piles of Money visualization, you can easily do so.

Lastly, the library includes a class that makes it easy to write new visualizations in GWT-compiled Java and make it available as JS for general use in the Visualization API. This is cool if you've been itching to contribute new visualizations but prefer coding in Java.

Here is example code that draws the well known Annotated Time Line chart in Java using the new Visualization API Library:

UPDATE: Changed the code font size to fit on one line so you can copy & paste

package com.blogpost.client;

import com.google.gwt.core.client.EntryPoint;
import com.google.gwt.user.client.Window;
import com.google.gwt.user.client.ui.RootPanel;
import com.google.gwt.visualization.client.AjaxLoader;
import com.google.gwt.visualization.client.DataTable;
import com.google.gwt.visualization.client.Query;
import com.google.gwt.visualization.client.QueryResponse;
import com.google.gwt.visualization.client.Query.Callback;
import com.google.gwt.visualization.client.visualizations.AnnotatedTimeLine;


public class BlogPost implements EntryPoint {
public void onModuleLoad() {
AjaxLoader.loadVisualizationApi(new Runnable(){
public void run() {
Query query =
Query.create("http://spreadsheets.google.com/pub?key=pCQbetd-CptH5QNY89vLtAg");
query.send(new Callback(){

public void onResponse(QueryResponse response) {
if (response.isError()) {
Window.alert("An error occured: " + response.getDetailedMessage());
}

DataTable data = response.getDataTable();
AnnotatedTimeLine.Options options = AnnotatedTimeLine.Options.create();
options.setDisplayAnnotations(true);
RootPanel.get().add(new AnnotatedTimeLine(data, options, "800px", "400px"));
}
});
}}, AnnotatedTimeLine.PACKAGE);
}
}



This code draws the same visualization that can be seen in the example for Annotated Time Line in the Visualization Gadget Gallery. Both get their data from Google Spreadsheets, only this code does so in Java instead of Javascript or as a Gadget.

Enjoy!2013, By: Seo Master

seo Google APIs Client Library for Java: now with OAuth 2.0 2013

Seo Master present to you:
By Yaniv Inbar, Google APIs Client Team

During Google I/O 2011, we announced a major milestone by releasing the Beta version of the open source Google APIs Client Library for Java. This release included service-specific libraries and samples for Google APIs, built on our new client library generation infrastructure. Since that version 1.4 launch, we’ve been comfortable enough with the stability and features of the library that we want you to start building real production Java 5, Android, and Google App Engine applications and send us your feedback.

Today we are announcing a new milestone for the Java client library. With the version 1.5 release, we’re making available the open source Google OAuth Client Library for Java in Beta, with support for both OAuth 1.0a and OAuth 2.0. OAuth is an open standard for allowing a client application to securely gain access to a user’s private data stored on Google without ever asking for their password. Most Google APIs support OAuth 2.0, and we want to encourage adoption of OAuth 2.0 more widely on the web. That’s why we built this library to work with any API on the web -- not just Google APIs -- that comply with the OAuth specifications. Our current implementation of OAuth 2.0 is based on draft 10, but we will update it soon to the final draft, once it becomes an official standard. We encourage you to try it and send us your feedback.

Here is an example of how easy it is to use the OAuth 2.0 library to make a request using the library for the Google+ API (check out more samples):
// Set up the HTTP transport and JSON factory
HttpTransport httpTransport = new NetHttpTransport();
JsonFactory jsonFactory = new JacksonFactory();

// Set up OAuth 2.0 access of protected resources
// using the refresh and access tokens, automatically
// refreshing the access token when it expires

GoogleAccessProtectedResource requestInitializer =
new GoogleAccessProtectedResource(accessToken, httpTransport,
jsonFactory, clientId, clientSecret, refreshToken);

// Set up the main Google+ class
Plus plus = new Plus(httpTransport, requestInitializer, jsonFactory);

// Make a request to access your profile and display it to console
Person profile = plus.people().get("me").execute();
System.out.println("ID: " + profile.getId());
System.out.println("Name: " + profile.getDisplayName());
System.out.println("Image URL: " + profile.getImage().getUrl());
System.out.println("Profile URL: " + profile.getUrl());
Finally, we are making available a Beta version of the open source Google HTTP Client Library for Java. This is the common HTTP client library that the above two libraries are built on, and is built to work with any API on the web. It features a pluggable HTTP transport abstraction that allows it to work seamlessly on any of the supported Java platforms, support for efficient JSON and XML data models for parsing and serialization, and a pluggable JSON and XML parser so you can use whatever works best for you. Please try it and send us your feedback.

We are looking forward to finding out what you can build using these libraries on Google APIs. Please let us know how we can make the libraries easier to use and better suited for your needs.

As we announced at Google I/O 2010, we've been developing APIs that can provide descriptions of themselves via metadata. This new technique makes it easier to create and maintain client libraries that support more languages, work with more APIs, and are easier to use than ever before. This post announces one of several recent major milestones for our client libraries.


Yaniv Inbar is a Senior Software Engineer and Technical Lead of the Google APIs Client Libraries & Tools team. He is the lead developer of the open source Google APIs Client Library for Java. Yaniv has worked at Google for 5 years, and has a total of 12 years industry experience as a software engineer.

Posted by Scott Knaster, Editor
2013, By: Seo Master

seo Google Relaunches Instantiations Developer Tools - Now Available for Free 2013

Seo Master present to you:

(Cross-posted from the Google Web Toolkit blog)

In early August, Google acquired Instantiations, a company known for its focus on Eclipse Java developer tools, including GWT Designer. We're happy to announce today that we're relaunching the following former Instantiations products under the Google name and making them available to all developers at no charge:

  • GWT Designer
    Powerful Eclipse-based development tools that enable Java developers to quickly create Ajax user interfaces using Google Web Toolkit (GWT)

  • CodePro AnalytiX
    Comprehensive automated software code quality and security analysis tools to improve software quality, reliability, and maintainability

  • WindowBuilder Pro
    Java graphical user interface designer for Swing, SWT, GWT, RCP, and XWT UI frameworks

  • WindowTester Pro
    Test GUI interactions within Java client rich applications for the SWT and Swing UI frameworks

Now that these products are available again, we hope you’ll start using them within your GWT projects. Meanwhile, our next step is to more deeply unify them into the GWT family of tools by blending the fantastic Instantiations technology into the Google Plugin for Eclipse (GPE). So, there’s much more to come, including things we’re pretty sure you’ll like, such as UiBinder support in GWT Designer.

You can download any of the tools from the GWT download page. If you have questions or comments we’d love to hear from you. The best place to discuss the tools above is at http://forums.instantiations.com. As always, continue to discuss GWT and GPE at the main GWT Group.

We would love to stay in better touch with you as we have more news about how we are integrating the Instantiations products into the Google Web Toolkit suite. Sign up if you’d like to receive email updates on these products and other developer tools.

2013, By: Seo Master

seo Google Developer Podcast Episode Six: The Hibernate Shards Open Source Project 2013

Seo Master present to you:


Max Ross and Maulik Shah were part of a core group that worked on the recently open sourced Hibernate Shards project.

In the podcast you will learn:
  • What sharding is and what it means in the world of Hibernate
  • How the word "shards" is common at Google (the equivalent of "smurf" in The Smurfs)
  • Why you would want to shard your data to give you increased scalable performance
  • How the Hibernate Shards project doesn't mess with the core APIs, allowing you to add sharding unobtrusively
  • What you need to think about if you want to shard your data, and how you can design a schema that has a dimension that is easily sharded. This includes designing without complex relationships.
  • How you could create a crazy project that shards data across multiple databases (as in, one mysql, one Oracle), but that would be crazy
  • The various strategies to define how you retrieve your objects across the distributed data store
  • How this compares with horizontal partitioning at the database level itself (e.g. new features in MySQL, PostgreSQL, and others)
  • And much, much more.
For more information check out the Hibernate Shards homepage and the Google Group for discussion.

The new release that was mentioned in the podcast just went live. Congratulations to the team.

Start listening now


You can download the episode directly, or subscribe to the show (click here for iTunes one-click subscribe).2013, By: Seo Master

seo Google Singleton Detector released 2013

Seo Master present to you:

We take testing very seriously at Google. You may have seen our testing blog and how we even test on the toilet.

We also like to create automated tools to make our lives easier and in the testing world this can mean having code to watch your back.

We have released a new tool that we have been playing with, the Google Singleton Detector, as open source. Its job is to find singletons and global state in the Java code that we produce. But wait, why would I care to find out where singletons may be in my code? In some cases they can make testing difficult and hide problems with your design. There's a bit more to it than that, so check out the FAQ for more info.

Do you maintain Java code and need to keep it nice and clean? Give the singleton detector a try!

Many thanks to David Rubel and the team for creating this, and working to get it out into the open source world.2013, By: Seo Master

seo Open Source Developers @ Google Speaker Series: Raph Levien 2013

Seo Master present to you:

On Monday, June 25th, Raph Levien will join us to present Lessons from Advogato. Raph, Advogato's founder, will give us insights into attack-resistant trust metrics and the other mechanisms used to build the website's user community.

Like all sessions of the Open Source Developers @ Google Speaker Series, Raph's presentation will be open to the public. Doors open at 6:30 PM at our Mountain View campus; guests should plan to sign in at Building 43 reception upon arrival. Refreshments will be served and all are welcome and encouraged to attend. Raph's presentation will also be taped and published along with all of the public Google Tech Talks.

For those of you who were unable to attend our last session, you can watch the video of Bob Lee's recent presentation Java on Guice: Dependency Injection the Java Way.2013, By: Seo Master

seo Open Source Developers @ Google Speaker Series: Bob Lee 2013

Seo Master present to you:

Bob Lee will be joining us on Tuesday, June 5th, to discuss Java on Guice: Dependency Injection, the Java Way. Guice, an open-source dependency-injection framework for Java 5, is already in use in several Google projects. Come listen to the framework's creator explain how Guice can help make your applications simpler and easier to test!

As with all sessions of the Open Source Developers @ Google Speaker Series, Bob's presentation will be open to the public. Doors open at 6:30 PM at our Mountain View campus; guests should plan to sign in at Building 43 reception upon arrival. Refreshments will be served and all are welcome and encouraged to attend. Bob's presentation will also be taped and published along with all of the public Google Tech Talks.

For those of you who were unable to attend our last session, you can watch the video of Amit Singh's recent presentation on MacFuse.2013, By: Seo Master

seo Announcing the orkut Java Client Library 2013

Seo Master present to you: Today, we’re pleased to announce our new orkut Java client library!

If you’ve ever wanted to write desktop or mobile apps for orkut, this open source Java library provides you with that opportunity. Using three-legged OAuth, you can get friends’ profile data, post and retrieve status and activity updates, read and write scraps, create and retrieve photo albums, and upload pictures. To get started, simply download the library, check out the included samples, and start coding.

With this library, it’s easy to have an application up and running with just a few lines of code. The snippet below shows how to create a photo album, share it with your friends, and upload photos:

CreateAlbumTx createAlbum = albumsFactory.createAlbum(
"College Days", "The best days of my life!");
Album album = createAlbum.getAlbum();
albumsFactory.shareAlbumWithFriends(album);

byte[] photo = captureImage();
photosFactory.uploadPhoto(album, photo, ImageType.JPG, "My Best Buddies");

And it’s just as simple to reply to scraps from friends and to make friends with new scrappers:

GetScrapsTx scraps = scrapFactory.getSelfScraps();
for(int i = 0; i < scraps.getScrapCount(); ++i) {
ScrapEntry scrap = scraps.getScrap(i);
if(myFriends.contains(scrap.getFromUserId())) {
scrapFactory.replyToScrap(scrap, "hey, thanks for remembering me!");
} else {
scrapFactory.replyToScrap(scrap, "wanna be friends? [:)]");
friendsFactory.sendFriendRequest(scrap.getFromUserId());
}
}

As you develop your application, we’d love if you’d let us know what you create. We’re excited to see how you use this library to integrate orkut with other exciting products and technologies... and in fact, we already started! Take a look at our orkut FotoScrapr app, which we built on Google App Engine using a slick Google Web Toolkit interface. If you like what you see, feel free to browse through the FotoScrapr source code.

And finally, if you’re not a Java developer, don’t worry. We’d be thrilled to work with you to port this library to other languages. Just reach out to us on the orkut developer forum.

So dive in and start coding – we can’t wait to see what you’re going to come up with!

2013, By: Seo Master

seo Guice Deuce 2013

Seo Master present to you: Two years ago, Bob Lee and Kevin Bourrillion open sourced Google Guice 1.0, a lightweight Java dependency injection framework. Guice takes the pain out of writing and maintaining Java applications big and small. Guice has gained a great deal of traction both inside and outside of Google. Almost every Java-based application at Google is also a Guice-based application; the list includes AdWords, Google Docs, Gmail, and even YouTube. Open source users run Guice in everything from file-sharing software to ATMs. They've even written two books about this Jolt-award-winning framework.

Today, we're releasing Guice 2. The minimally-sized API extensions introduced by Guice 2 will have a majorly positive impact on the size and maintainability of your code. We closely scrutinized each addition, carefully balancing maintainability and flexibility. Here are a few of my favorite new features:
  • Provider methods eliminate the boilerplate of manually-constructed dependencies.
  • Module overrides allow you to tweak a production module for a unit test or QA deployment.
  • Private modules enable compartmentalized configuration, simplifying module reuse.
Guice works with Java SE, Java EE, Google App Engine, Android, and even Google Web Toolkit (via GIN).

References
Guice 2.0 Release Notes
Downloads
User's Guide
Javadoc

2013, By: Seo Master

seo Java at Google 2013

Seo Master present to you:

As we mentioned in our post Gearing up for JavaOne 2007, Google is proud to be participating in JavaOne again this year!

In order to help JavaOne attendees get up to speed with what Google is doing with Java technology, we put together a Java developers guide to Google technology.

Also, feel free to stop by the Google booth and chat with our engineers!

Java™ is a trademark of Sun Microsystems.2013, By: Seo Master

seo @javax.inject.Inject 2013

Seo Master present to you: Five years ago, Spring 1.0 brought Java dependency injection into the mainstream. Three years later, Google Guice 1.0 introduced annotation-based dependency injection and made Java programming a little easier. Since then, developers have had to choose between a) writing external configuration or b) importing vendor-specific annotations.

Today, we hope to give developers the best of both worlds. Google Guice and SpringSource have partnered to standardize a proven, non-controversial set of annotations that make injectable classes portable across frameworks. At the moment, the set of specified annotations consists of:
  • @Inject - Identifies injectable constructors, methods, and fields
  • @Qualifier - Identifies qualifier annotations
  • @Scope - Identifies scope annotations
  • @Named - String-based qualifier
  • @Singleton - Identifies a type that the injector only instantiates once
One additional interface is specified for use in conjunction with these annotations:
  • Provider<T> - Provides instances of a type T. For any type T that can be injected, you can also inject Provider<T>.
You can check out an early draft of the specification. We deliberately left external dependency configuration out, so as not to quash ongoing innovation. We haven't formally submitted this standard to the JCP yet, but we plan to do so shortly. Standards wonks can read a draft of our JSR proposal.

The expert group will be inclusive and will work in the open. For example, our mailing list is publicly readable, and we host the specification at Google Code. Several industry players have already expressed interest in supporting this effort. Contact us if you'd like to help out.

Interested in learning more about dependency injection? Don't miss Jesse and Dhanji's Big Modular Java with Guice session at Google I/O!

2013, By: Seo Master

seo Google Plugin for Eclipse now provides richer tooling for Cloud SQL and Google APIs 2013

Seo Master present to you: Author PhotoBy Sriram Saroop, Product Manager

We are pleased to announce the latest release of Google Plugin for Eclipse (GPE 2.6) with improved tooling for Cloud SQL and Google APIs. GPE 2.6 introduces the following features:
Tooling for using Java Persistence API (JPA) to access Cloud SQL

Object-Relational Mapping (ORM) frameworks are very popular in the Java community for accessing relational databases. The Eclipse Web Tools Platform offers a robust set of tools to configure and use JPA with an implementation of your choice. With the new Google Plugin for Eclipse (GPE) 2.6, you can now take advantage of these tools with Cloud SQL and Google App Engine. In any GPE project, JPA can now be enabled and configured as a project facet. The screenshot below shows the JPA facet configuration for a GPE project.




Importing the latest Google APIs into your GPE project

With GPE 2.6, you now have access to all the latest Google APIs at the click of a button within Eclipse. You can now download the latest Google APIs Java client library with the required dependencies to access Google APIs right within your App Engine project using GPE. Update notifications for API version changes will appear in your App Engine project, so you can easily keep your client libraries updated all the time. The screenshot below shows the GPE UI for adding a Google API to a GPE project.




The next time we update the App Engine Engine SDK, you will be happy to see an update notification within Eclipse prompting you to update to the latest SDK.

Please go ahead and install GPE 2.6 by following the instructions here. You can start using the ORM tooling for Cloud SQL and the latest Google APIs for your App Engine projects. We always love to hear your feedback and the GPE group is a great place to share your thoughts.


Sriram Saroop is the Product Manager for the Google Plugin for Eclipse and the Google Admin APIs. He has been a software engineer in his previous life and he is now working toward creating an awesome developer experience for Google products.

Posted by Scott Knaster, Editor
2013, By: Seo Master

seo Gearing up for JavaOne 2007 2013

Seo Master present to you:

JavaOne is right around the corner, and we'll be there in full force: several Googlers will be on hand at our booth in the JavaOne Pavilion, including engineers from the Google Web Toolkit (GWT) team, who are flying in from our Atlanta office. In addition to GWT demos, we'll have several people there to chat about the Google Checkout API.

Beyond the booth, Googlers are speaking at 11 different sessions. A few that might interest you:
Of course, if you haven't seen GWT yet (launched just shy of a year ago at JavaOne 2006), I suggest you check it out.

We look forward to seeing you there!2013, By: Seo Master

seo ThoughtWorks' Paul Hammant talks about App Engine for Java 2013

Seo Master present to you: Last week we had a number of exciting announcements and we've received a lot of good feedback so far. We've heard from developers who were excited about cron support, intrigued by the Google Secure Data Connector and pleased with database import. However, most of the excitement has been reserved for the new integrated development environment which was created through the marriage of Google-Web-Toolkit (GWT), Google App Engine for Java and the Google Plugin for Eclipse. Now not only can web app developers write both client and server code using the familiar Java language, they can also share and reuse code between client and server.

I wanted to capture some real world developer feedback, so as part of our Developer Profiles series I sat down with Paul Hammant of ThoughtWorks to discuss his first impressions with the platform. As Paul continues to tinker with the platform you can of course follow him on his blog.



If you have a compelling application that you've written with Google App Engine and GWT I'd like to hear about it.



Java is a trademark or registered trademark of Sun Microsystems, Inc. in the United States and other countries.2013, By: Seo Master

seo Standards-based Persistence For Java™ Apps On Google App Engine 2013

Seo Master present to you: When I sat down to write this post I decided to glance back at my last post on this blog. One sentence in particular jumped out at me: "...I would never again feel compelled to build an [Object-Relational] Mapping framework in Java." Well, friends, never say never. Now that we've unveiled an early look at Java support for Google App Engine, I'm thrilled to announce the availability of a JDO and JPA implementation for the App Engine datastore under the Apache 2 open source license.

The App Engine datastore is an incredible piece of technology. Based on Google's own Bigtable, it's one of the key reasons App Engine enables developers to write web applications that scale without infrastructure headaches. But, it isn't necessarily what most of us are accustomed to using for persistence. Wouldn't it be lovely if we could use an existing programming model on top of the datastore API? And wouldn't it be even lovelier if that existing programming model simplified the process of porting web applications on and off App Engine?

Fortunately for us Java developers we have not one, but two persistence standards at our disposal, JDO and JPA. And, to make adopting these persistence standards easier, we have the DataNucleus project (formerly JPOX), which provides plugins that connect these standards to various types of datasources. Andy Jefferson, founder of the DataNucleus project, was not only enthusiastic about our effort to add an App Engine plugin to his project, he was also incredibly helpful (thanks Andy!). I hope you're as excited about the results as I am: Standards-based persistence for the App Engine datastore!

Since App Engine for Python launched almost a year ago I've admired not just the applications that have been built by the developer community but the infrastructure as well. Even though the DataNucleus App Engine plugin was developed by Googlers, it uses the public App Engine APIs that are available to everyone. It uses no backdoors or special privileges. Rather, it is merely the first instance of what I hope will be a torrent of Java infrastructure developed for App Engine for Java. Feel free to peruse the code at http://code.google.com/p/datanucleus-appengine. If you find a bug, send us a patch. And if you think you can do better, do better! There's absolutely nothing stopping you.

2013, By: Seo Master

seo HTML5 and WebKit pave the way for mobile web applications 2013

Seo Master present to you: When I first started at Google, we were building a Java ME email client for the phones of the day. It's an excellent product - still the fastest, slickest way to get your Gmail on many devices because of Java ME's widespread penetration. Yet it always bothered us that this client didn't really leverage the core strength of the desktop Gmail platform: sheer ease of access from anywhere, and constant updates and improvements. To use the client, you have to figure out how to install it and possibly navigate confusing network permission pop-up dialogs, and improvements could only be rolled out a few times a year in upgrades that required every user to download and reinstall their software.

The mobile team started thinking about how we could bring the benefits of the server-side approach to these clients. We started thinking about a world where we could deliver a GUI specified in XML to a Java ME client, enabling us to iterate on the server side and deliver new features that could delight users when they were ready, rather than on a lengthy release cycle. I was especially struck by a friend who said "What I like about Gmail is that it just constantly keeps getting better. It's like waking up to a new little present from Google each month!" We wanted our mobile users to feel the same way, so we felt the logical thing to do would be to build a general client that could be controlled by the server.

Not too long after, the team first saw the new Android browser. Still in its early stages, the Android browser was built on the latest version of WebKit and could render desktop pages with ease. The XHTML, images, JavaScript, and CSS that could be rendered on this platform presented great potential for building very high-end web applications. However, this was ages before Android was due to ship and Android would only be one of many mobile platforms.

Those drawbacks aside, we couldn't help but think that new browsers in Android's league would eventually become a reality. These powerful browsers could have the kind of functionality we needed to build top-notch, offline user interfaces that didn't need to be "installed" by users or "upgraded". Gmail could be Gmail: a constantly evolving way to handle lots of email quickly and efficiently. The only fly in the ointment was the need for Gears: users would have to download a browser plug-in, and most web browsers on mobile devices don't even support that. What we really needed was for Gears to inspire innovation in HTML itself, so that the whole web could move forward.

Enter HTML5. We're very excited about the evolving HTML5 standard because it enables mobile and desktop website designers to deliver the advantages of client-side and server side development to their users simultaneously! New APIs let web applications start offline and store data on the client. The canvas API lets you draw complex user interfaces, or you can use advanced CSS tricks to get the browser to render a rich UI. In addition, the W3C Geolocation API is being adopted and implemented by browser developers, enabling entire new categories of web applications to be built. The benefits are clear: you can develop fantastic new applications, benefit from server-side analytics and iteration to deliver features that your users want, and know that offline functionality keeps things running as the user moves in and out of coverage. Your users can enjoy fast, capable web apps that they can access from any device, without the need to copy their data from place to place or worry about installing software or being online.

We decided to build new versions of mobile Gmail and mobile Calendar on top of this functionality. First, we built a small javascript wrapper around the database functionality in HTML5 and Gears. This wrapper abstracts away the differences between the two APIs, so that our applications are supported on the broadest set of browsers possible while older browsers get updated with implementations of the new offline APIs. We noticed that we weren't the only ones thinking about this: a quick search shows that other developers saw the similarities too. The main difference between the Gears database API and the HTML5 database API is that the Gears API is synchronous, requiring separate worker threads to do the database calls, while the HTML5 database API uses callbacks and is asynchronous. With the wrapper built, we knew our code would run on all high-end mobile browsers today, and look forward to even more distribution as everybody implements HTML5.

We knew we could apply various approaches to building better experiences for Gmail and Calendar. The key principle we kept in mind is an age-old one: KISS. Simply caching responses in the database for re-use is surprisingly effective: you can get a lot of improvement with just a read-only environment. This approach worked well for Calendar, where usage is predominantly read-only and we can rely on the user being online to make edits.

For Gmail, more complexity was needed. A queue of user actions needs to be maintained in the database (in case the user runs out of battery or powers down for their flight). Later, when the device is back online, it can execute that queue of mails to send, archive or delete, and so on.

Having the ability to store your data and actions offline isn't much good if you can't start the application while offline. So besides making use of the database API, we needed a way to get the application itself loaded without an internet connection. The HTML5 specification comes to the rescue here, with an application cache that is capable of storing all resources in your web app so that the browser can load them while offline. This API has just one small drawback: once you've decided you're going to override how HTTP GET works to fetch resources from the application cache, you also commit to never issuing a GET for a resource the cache doesn't know about. The specification contains methods for extending what URIs the cache knows exist, but these entry points are not widely implemented in production browsers. Instead, it's important to use HTTP POST requests for all dynamic data, since POST requests are never cached and therefore do reach the network.

The end result is an incredible thing: a web app that loads offline, and lets you read your Gmail or view your events provided the data have previously been cached. The experience is seamless as you ride the subway or the bus through terrible coverage: your data are ready, quickly, all the time. To see the new Gmail for mobile web app, go to gmail.com from an Android-powered device or iPhone (OS 2.2.1 or above).

Of course we didn't get there without a few hard knocks. As an evolving standard, HTML5 has been fast-changing target and we've skinned our knees and bruised ourselves along the way. So rather than just deliver the fruit of all those bumps and scratches to end users in our own products, we decided we wanted to write a few blog posts to share what we've learned so that others can take advantage of HTML5 as well. In addition, we look forward to opportunities like our upcoming developer conference, Google I/O (May 27-28 in San Francisco, CA) where we'll be hosting a few sessions, to meet you in person and share demos and know-how.

Whether or not you can make it out to Google I/O, stay tuned to the blog for upcoming posts with examples such as how to avoid making your databases too large, handle upgrades gracefully, and tune performance.

2013, By: Seo Master

seo Ode to Hibernate 2013

Seo Master present to you:

At each of my first two jobs I wrote an object-relational mapping framework in Java. The first was an abomination, the second merely rotten. I'm not the only engineer to have traveled this road. You write some code to generate SQL for your simple CRUD operations, you get one-to-many relationships working, and then you (and probably the rest of your team) spend a couple of months piling on hacks to support outer joins, many-to-many relationships, and all the other "extras" that are of course not "extras" at all. So imagine my mood the day a coworker introduced me to Hibernate (thanks Toby!). Just a few days of prototyping made it clear that Hibernate was an elegant solution to a hard problem, and that I would never again feel compelled to build an OR Mapping framework in Java. Joy.

As a fan of Hibernate it gives me great pleasure to announce the open-source availability of Hibernate Shards, a framework that adds support for horizontal partitioning (or in Google parlance, "sharding") to Hibernate Core. There are a number of reasons you might not keep all your data in a single relational database. Maybe you have too much data. Maybe a potential customer won't sign up for your service unless her company's data lives in its own database. Whatever your reasons, dealing with a sharded dataset adds complexity to the development and management of your application. Hibernate Shards is designed to encapsulate and reduce the complexity of building applications that work with sharded datasets.

I worked with Tomislav Nad and Maulik Shah (fellow Googlers who share my enthusiasm for Hibernate and Java infrastructure) to build Hibernate Shards as a 20 percent project. We think what we have now will be useful to the Java community, but this is most certainly not a polished release. There are functionality gaps to be filled, design warts to be smoothed, and bugs to be shaken out. We look forward to working with you as we address these issues and make Hibernate Shards even more powerful in the months to come. If you'd like to read more please visit the official Hibernate Shards website.

Happy Sharding!2013, By: Seo Master

seo Guice, Google's internal Java dependency injection framework, released as open source 2013

Seo Master present to you:

Google has been using a blazingly fast, innovative, Java 5-based dependency injection framework in mission critical applications for quite some time.

The project is lead by Bob Lee, and we are pleased to say that we have released it to the community as open source software.

Guice wholly embraces annotations and generics, thereby enabling you to wire together and test objects with less effort than ever before. Annotations finally free you from error-prone, refactoring-adverse string identifiers.

Guice injects constructors, fields and methods (any methods with any number of arguments, not just setters). Guice includes advanced features such as custom scopes, circular dependencies, static member injection, Spring integration, and AOP Alliance method interception, most of which you can ignore until you need it.

Guice already has a community around it, and already powers Struts 2's plugin architecture.

We asked Bob Lee a few questions about the project:

Why was Guice created?

We created Guice hoping to write less code and break up a multi-million line app. We looked at existing solutions, but we saw a lot of doors opened by the new Java 5 features. When I started from scratch I followed a use case driven approach and built a real application. As I wrote I was constantly asking myself "how do I really want to be writing this?".

I value pragmatism and followed Josh Bloch's API design advice, especially, "when in doubt, leave it out."

Finally, we strove most of all for maintainability. Can a new programmer sit down at a million line code base and maintain it? We think type safety is a huge factor here.

Who should use Guice?

Anyone writing Java code. We see Guice as a lighter weight alternative to the factory pattern.

More information:
2013, By: Seo Master

seo Improve your App Engine skills with Google Developers Academy 2013

Seo Master present to you: Author PhotoBy Wesley Chun, Developer Relations Team

Cross-posted with the Google App Engine Blog

Are you developing on App Engine today or interested in learning how to use it? If you've gone through all the great App Engine docs and Getting Started tutorials (Python, Java, or Go) but want to take your App Engine skills a step further, then Google Developers Academy (GDA) is the place to go! We launched GDA this past summer at Google I/O 2012, with content for beginners as well as seasoned developers. What can you find on App Engine in GDA today?


computers in a classroom

If you’re interested in getting more background on what cloud computing is and where App Engine fits into that ecosystem, then this intro class (Introduction to Google App Engine) is for you. Once you’re done with this class, you’ll be ready to tackle the Getting Started tutorial, and after that, move on to the App Engine 101 in Python class.

While some of the material found in App Engine 101 is similar to what's in the Getting Started tutorial, the 101 class targets developers who skipped the tutorial or completed it at some point in the past but don't want to repeat the exact same thing. The main differences include the following changes to the tutorial's content:
  • Use of the Python NDB API
  • Jinja2 templates
  • Discussion of data consistency and datastore indexes
You can use the relational MySQL-compatible Google Cloud SQL service as an alternative to App Engine's native non-relational datastore. Some applications do require a relational database, especially if you’re porting an existing app that relies on one. In this case, you want to learn about Cloud SQL and how to use it with App Engine. That’s why we have the Using Python App Engine with Google Cloud SQL class.

Of course, Google is best known for search. With App Engine's powerful Search API, you can index not only plain text, but also HTML, atoms, numbers, dates, and locations (lat/long). Getting Started with the Python Search API is a two-part class that will indeed get you started: in the first part of the class, you’ll create an application using a variety of data and learn how to index such data (using "documents"). In Part 2, you’ll learn how to execute queries as well as how to update your indexes when you modify your data.

If variety is what you're after, then look no further than the newest class in GDA: Getting Started with Go, App Engine and Google+ API. You will not only learn how to create an App Engine app using the Go programming language, but also learn how to connect to the Google+ API with the Google APIs Client Library for Go.

These are just a few examples of the types of classes you'll find in GDA. We also have content that features many other Google technologies, including Android, Chrome, YouTube, Maps, Drive, and Wallet. We invite you to swing by for a visit soon.


+Wesley Chun (@wescpy) is author of the bestselling Core Python books and a Developer Advocate at Google, specializing in cloud computing and academia. He loves traveling worldwide to meet Google users everywhere, whether at a developers conference, user group meeting, or on a university campus!

Posted by Scott Knaster, Editor
2013, By: Seo Master
Powered by Blogger.