Friday, February 27, 2009

[Gd] OpenSocial Weekend Apps

| More

OpenSocial API Blog: OpenSocial Weekend Apps

WeekendApps was like a codefest on overdrive organized by a grassroots team of 9 people - Sudha Jamthe, Shuchi Rana, Waleed Abdulla, Alexandros, Van Riper, Max Marmer, Carol Tran, Jason Cooper and David Doolin. Over the course of the weekend, more than 200 designers and developers came together at the Googleplex in Mountain View, CA last Friday to form teams, brainstorm new concepts for social applications, and then design and launch new social apps.

After three days, 30 pizzas, 200 sandwiches, 40 trays of Asian food, 20 boxes of junk food, 400 cups of coffee, and 10 sessions from Amazon, Sun, Google App Engine, orkut, MySpace, Yahoo!Open Strategy, we saw 14 OpenSocial apps launch on MySpace and orkut and awarded prizes to 15 developers.

The air was charged all weekend

Everyone in attendance was focused throughout the weekend, creating teams, thinking up app ideas, workout through app flow and tech hacks, deciding which containers to use, and rushing to launch by Sunday night for the grand prizes.

The event kicked off on Friday with a keynote by Kevin Marks, followed by a panel of top OpenSocial developers discussing how they monetize their apps with Offerpal. Then the fun began: teams formed, and top developers Dave Westwood, Nicholas Talarico, Ben Chow, and Randal Truong helped provide feedback on the app ideas. The process helped everyone understand what makes a successful social app, and teams bonded after learning more about the various skillsets needed to build great applications.

Saturday workshops

The next day, Shuchi loaded us with coffee and bagels (thanks to Sun and Offerpal), then Mike Culver of AWS, Fred Sauer of Google App Engine and Ravi Kota of Sun/Joyent gave workshops on hosting options.

To start building apps, there were some, like me, who translated from the Facebook world of FBML and FQL and learned OpenSocial. There were others who had to quickly decide which OpenSocial container worked best for them. Dave Westwood of BuddyPoke drove home the point that the audience on each network is different, so it is wise to plan an app with the differences between containers in mind. Max Newbould of MySpace, Jason Cooper of orkut, and Eric of Yahoo spoke about each of their OpenSocial containers, and Kevin from Offerpal helped people build virtual currency into their apps for monetization. Each workshop raised thoughtful questions on comparing platforms, containers, scalability, and many different application scenarios. We often came to consensus around tough issues and engaged everyone in the audience.

It was also great to see the community working together. Many app developers received personal guidance to overcome product hurdles with help from MySpace's Max Newbould and Google's Jason Cooper, and MySpace's team went the extra mile to make sure apps got approved by the Sunday deadline.

Photo story by Shirley X. Lin

Find more videos like this on OpenSocial.org



Awards:

At the end of the night, MySpace picked two apps, Playlist Power and Fluffy Puffy Cloud Pets, as editorial picks of a week each. Dave Westwood offered 500K free impressions to six apps that went live on orkut, including YummyDate, My SportRules, MyFacebook. Google also selected two winners, Buddy Quiz, for best product vision, and Bollywood Music, for best implementation using the Opensocial APIs. Both received two free Google I/O passes. Finally, Sun gave a lot of cool geek toys and restaurant cards to support the developers.

See all the launched apps at OpenSocial Weekend Apps.

Posted by Sudha Jamthe, WeekendApps co-organizer
URL: http://opensocialapis.blogspot.com/2009/02/opensocial-weekend-apps.html

Thursday, February 26, 2009

[Gd] Gmail Labs gadgets now support OpenSocial APIs

| More

OpenSocial API Blog: Gmail Labs gadgets now support OpenSocial APIs

A couple months back, the Gmail team added a few Labs experiments that let you add gadgets to Gmail's left nav. One of these experiments allows you to add any gadget by URL (i.e. pasting in the URL of its XML spec file). While the UI for adding gadgets is a bit klunky, people have already started building some interesting gadgets for Gmail.

Now Gmail supports OpenSocial APIs, so you can create social gadgets that make use of Gmail contacts. Gmail's contact manager has a few different groups (see screenshot below). The OpenSocial APIs use the 'Friends' group, the same list of of friends that the iGoogle sandbox uses.

Ready to try it out? To add a gadget to the left nav of your Gmail account, follow these steps:
  1. Go to the 'Labs' tab under Gmail Settings.
  2. Enable the 'Add any gadget by URL' experiment and click 'Save Changes.'
  3. Now you'll have a 'Gadgets' tab under Settings.
  4. Enter the URL of an OpenSocial gadget spec and click 'Add'.
Try adding the OpenSocial Dev app to take Gmail's OpenSocial support for a test drive. This gadget provides OpenSocial code samples that you can execute right in Gmail, as well as a 'Data Viewer' that will help you see what information you can access about people and friends.

Like all Gmail Labs, OpenSocial support is experimental and may change, break or disappear. You can find more info about Gmail's implementation of OpenSocial on the Gmail page of the OpenSocial wiki. If you have questions, please post them in the OpenSocial Application Development forum.

Posted by Lane LiaBraaten, OpenSocial Team
URL: http://opensocialapis.blogspot.com/2009/02/gmail-labs-gadgets-now-support.html

[Gd] Android Layout Tricks #2: Reusing layouts

| More

Android Developers Blog: Android Layout Tricks #2: Reusing layouts

Android comes with a wide variety of widgets, small visual construction blocks you can glue together to present the users with complex and useful interfaces. However applications often need higher level visual components. A component can be seen as a complex widget made of several simple stock widgets. You could for instance reuse a panel containing a progress bar and a cancel button, a panel containing two buttons (positive and negative actions), a panel with an icon, a title and a description, etc. Creating new components can be done easily by writing a custom View but it can be done even more easily using only XML.

In Android XML layout files, each tag is mapped to an actual class instance (the class is always a subclass of View.) The UI toolkit lets you also use three special tags that are not mapped to a View instance: <requestFocus />, <merge /> and <include />. The latter, <include />, can be used to create pure XML visual components. (Note: I will present the <merge /> tag in the next installment of Android Layout Tricks.)

The <include /> does exactly what its name suggests; it includes another XML layout. Using this tag is straightforward as shown in the following example, taken straight from the source code of the Home application that currently ships with Android:

<com.android.launcher.Workspace
android:id="@+id/workspace"
android:layout_width="fill_parent"
android:layout_height="fill_parent"

launcher:defaultScreen="1">

<include android:id="@+id/cell1" layout="@layout/workspace_screen" />
<include android:id="@+id/cell2" layout="@layout/workspace_screen" />
<include android:id="@+id/cell3" layout="@layout/workspace_screen" />

</com.android.launcher.Workspace>

In the <include /> only the layout attribute is required. This attribute, without the android namespace prefix, is a reference to the layout file you wish to include. In this example, the same layout is included three times in a row. This tag also lets you override a few attributes of the included layout. The above example shows that you can use android:id to specify the id of the root view of the included layout; it will also override the id of the included layout if one is defined. Similarly, you can override all the layout parameters. This means that any android:layout_* attribute can be used with the <include /> tag. Here is an example:

<include android:layout_width="fill_parent" layout="@layout/image_holder" />
<include android:layout_width="256dip" layout="@layout/image_holder" />

This tag is particularly useful when you need to customize only part of your UI depending on the device's configuration. For instance, the main layout of your activity can be placed in the layout/ directory and can include another layout which exists in two flavors, in layout-land/ and layout-port/. This allows you to share most of the UI in portrait and landscape.

Like I mentioned earlier, my next post will explain the <merge />, which can be particularly powerful when combined with <include />.

URL: http://android-developers.blogspot.com/2009/02/android-layout-tricks-2-reusing-layouts.html

[Gd] Modeling for the Ocean layer in Google Earth

| More

Official Google SketchUp Blog: Modeling for the Ocean layer in Google Earth

If you've been following the blog, you saw the tour of 3D models under the ocean for the Google Earth 5.0 launch. With the SketchUp maintenance software that released yesterday, you too can model your very own underwater world! The first thing you'll have to do is to download the latest version of SketchUp here. Once installed, a few simple options in SketchUp enable you to select whether your model is above or below the water:
  1. Go to 'Window' then 'Preferences'
  2. Choose 'Extensions' in the left column
  3. Toggle on 'Google Earth Ocean Modeling'
  4. Hit OK

This will give you the option to place your model wherever you want it. Next import your desired terrain from Google Earth by finding the area you want and choosing 'Get Current View' in SketchUp. Underwater terrain will import just like above water terrain. It's easy to lose your sense of scale in the ocean, and if you get a warning that reads 'Camera altitude too high...' just move closer to the ocean floor. With your terrain imported into SketchUp, you can start your model.

Once complete, decide whether your model will be on the ocean floor or on the surface. You can find that option under the 'Plugins' menu. If you're modeling on the land, or wish to model on the surface of the water, toggle it off, like this:


If you're modeling under the surface of the water, toggle it on, like this:

If you want your model to be somewhere in-between the ocean floor and the surface of the water, simply choose 'Model on Ocean Floor' and place your model above the terrain:

Last, view your model in Google Earth by choosing 'Place model', and see how it looks. If you are satisfied, load your model onto the 3D Warehouse by selecting 'Share Model' and it may show up in the 3D Buildings layer. The same terms that apply to buildings on land also apply to underwater models. Your submissions must be real, accurate, and correctly located. There are lots of opportunities for geo-located models underwater; ship wrecks, diver destinations and offshore structures! Don't forget to fill out the appropriate information on the upload page, and to check 'Google Earth ready'. And that's it! Piece of cake. Sponge cake.

Posted by Adam Hecht, 3D Data Specialist
URL: http://sketchupdate.blogspot.com/2009/02/modeling-for-ocean-layer-in-google.html

[Gd] Modeling for the Ocean layer in Google Earth

| More

Official Google SketchUp Blog: Modeling for the Ocean layer in Google Earth

If you've been following the blog, you saw the tour of 3D models under the ocean for the Google Earth 5.0 launch. With the SketchUp maintenance software that released yesterday, you too can model your very own underwater world! The first thing you'll have to do is to download the latest version of SketchUp here. Once installed, a few simple options in SketchUp enable you to select whether your model is above or below the water:
  1. Go to 'Window' then 'Preferences'
  2. Choose 'Extensions' in the left column
  3. Toggle on 'Google Earth Ocean Modeling'
  4. Hit OK

This will give you the option to place your model wherever you want it. Next import your desired terrain from Google Earth by finding the area you want and choosing 'Get Current View' in SketchUp. Underwater terrain will import just like above water terrain. It's easy to lose your sense of scale in the ocean, and if you get a warning that reads 'Camera altitude too high...' just move closer to the ocean floor. With your terrain imported into SketchUp, you can start your model.

Once complete, decide whether your model will be on the ocean floor or on the surface. You can find that option under the 'Plugins' menu. If you're modeling on the land, or wish to model on the surface of the water, toggle it off, like this:


If you're modeling under the surface of the water, toggle it on, like this:

If you want your model to be somewhere in-between the ocean floor and the surface of the water, simply choose 'Model on Ocean Floor' and place your model above the terrain:

Last, view your model in Google Earth by choosing 'Place model', and see how it looks. If you are satisfied, load your model onto the 3D Warehouse by selecting 'Share Model' and it may show up in the 3D Buildings layer. The same terms that apply to buildings on land also apply to underwater models. Your submissions must be real, accurate, and correctly located. There are lots of opportunities for geo-located models underwater; ship wrecks, diver destinations and offshore structures! Don't forget to fill out the appropriate information on the upload page, and to check 'Google Earth ready'. And that's it! Piece of cake. Sponge cake.

Posted by Adam Hecht, 3D Data Specialist
URL: http://sketchupdate.blogspot.com/2009/02/modeling-for-ocean-layer-in-google.html

Wednesday, February 25, 2009

[Gd] A Maintenance Release for Google SketchUp 7

| More

Official Google SketchUp Blog: A Maintenance Release for Google SketchUp 7

As you may recall, we launched Google SketchUp 7 last November. Today I'm happy to announce our first maintenance release for version 7 with fixes to many of the most commonly reported problems. The list of fixes in our release notes is pretty long, so I asked Tommy from our Support team what he thought would be good to highlight. Here's what he had to say:
  • Place models underwater in Google Earth: Google Earth 5.0 launched earlier this month and added ocean floor terrain, which made it possible to place models under the water. But SketchUp didn't have a way to support that...until now. Those of you working on secret plans for underwater hideouts (laser sharks) can now place those models in Google Earth.
  • More accurate model placement in Google Earth: Models placed from SketchUp into Google Earth sometimes came in with rotational errors, making it difficult to properly position a model. Likewise, edges that weren't part of a face were being dropped, which made kites, bridge cables, and some windmills look a little odd. We've fixed both of these issues.
  • Authorizing Pro is easier: On Windows Vista®, SketchUp Pro folks had to run as an "Administrator" to authorize. You don't have to do that any more.
Posted by John Bacus, Product Manager
URL: http://sketchupdate.blogspot.com/2009/02/maintenance-release-for-google-sketchup.html

[Gd] Distributed Reliability Testing

| More

Chromium Blog: Distributed Reliability Testing

We want Google Chrome to be as stable as possible. No matter what site you browse to or what you do, Chrome should never crash. A system we call "distributed reliability testing" is one of the main tools we use to help turn that goal into reality.

One of the advantages to being associated with Google is that we have access to a lot of information about the Web, and a lot of computers to test on. About once an hour, our distributed test infrastructure takes the very latest version of Google Chrome in development and uses it to automatically load a large number of the pages that Google has seen are most popular around the world. When it's done, it produces a report like this on the Buildbot waterfall that all our developers (and anyone else) can see:

Results for top 500 web sites:
success: 499; crashes: 0; crash dumps: 0; timeout: 1

Results for top 500 web sites without sandbox:
success: 463; crashes: 0; crash dumps: 0; timeout: 2

Results for extended list of web sites:
success: 99768; crashes: 3; crash dumps: 3; timeout: 463

Here the final test got through a bit over 100,000 pages before stopping to make way for the next build to be tested. And before each Dev, Beta, or Stable channel release, we run with a much larger number of URLs.

In addition, we "fuzz-test" the user interface, automatically performing arbitrary sequences of actions (opening a new tab, pressing the spacebar, opening various dialogs, etc. — a total of more than 30 possible actions). These are also run in our distributed testing architecture, so we can exercise thousands of combinations for each new version of Google Chrome in progress. The same report that shows the page-load results above collects these UI test results too:

Results for automated UI test:
success: 64643; crashes: 0; crash dumps: 0; timeout: 0

This sort of large-scale testing is great for finding crashes that happen only rarely, or that only affect pages that developers wouldn't have visited as part of their haphazard manual testing. By catching a problem right away even if it's very rare, it's easier for developers to figure out what change caused the error and fix it before it ever gets close to showing up in Google Chrome itself.

Posted by Pamela Greene and Patrick Johnson, Software Engineers
URL: http://blog.chromium.org/2009/02/distributed-reliability-testing.html

[Gd] Dev Channel - Bug Fixes, WebKit Merges, and Full Screen Mode

| More

Google Chrome Releases: Dev Channel - Bug Fixes, WebKit Merges, and Full Screen Mode

Google Chrome's Dev channel has been updated to 2.0.166.1. The highlights for this week:

New
  • Preliminary full screen support has been added (UI still in progress).
  • Turkish and Estonian spell checkers are available.
  • Additional malware data collection for users opted-in to sending usage statistics and crash reports.
  • We now perform HTTP authentication over a keep-alive connection.
Fixes
  • Fixed a regression where it was not possible to drag a tab between two windows.
  • Fixed issue related to the input method editor (IME) and the distance/ location to the current text area after scrolling.
  • Double clicking no longer maximizes the window.
  • Fixed everything listed as Known Issues last week.
  • The complete list of changes is available in the release notes.
Known Issues
  • Download shelf will *not* warn about dangerous .exe files (Issue: 7971).
  • Windows 7 users will experience issues importing favorites from IE and setting Chrome as the default browser.
  • Repaint issues on reloaded page after a crash (Issue: 8065).
  • Javascript debugger doesn't come up for constrained windows (Issue: 8071).
  • Sad face not displayed after a plugin crash (Issue: 7673).

Find about the Dev channel and how to subscribe at http://dev.chromium.org/getting-involved/dev-channel.


Anthony Laforge, PMP
Chrome Program Manager
URL: http://googlechromereleases.blogspot.com/2009/02/dev-channel-bug-fixes-webkit-merges-and.html

[Gd] Dev Channel - Bug Fixes, WebKit Merges, and Full Screen Mode

| More

Google Chrome Releases: Dev Channel - Bug Fixes, WebKit Merges, and Full Screen Mode

Google Chrome's Dev channel has been updated to 2.0.166.1. The highlights for this week:

New
  • Preliminary full screen support has been added (UI still in progress).
  • Turkish and Estonian spell checkers are available.
  • Additional malware data collection for users opted-in to sending usage statistics and crash reports.
  • We now perform HTTP authentication over a keep-alive connection.
Fixes
  • Fixed a regression where it was not possible to drag a tab between two windows.
  • Fixed issue related to the input method editor (IME) and the distance/ location to the current text area after scrolling.
  • Double clicking no longer maximizes the window.
  • Fixed everything listed as Known Issues last week.
  • The complete list of changes is available in the release notes.
Known Issues
  • Download shelf will *not* warn about dangerous .exe files (Issue: 7971).
  • Windows 7 users will experience issues importing favorites from IE and setting Chrome as the default browser.
  • Repaint issues on reloaded page after a crash (Issue: 8065).
  • Javascript debugger doesn't come up for constrained windows (Issue: 8071).
  • Sad face not displayed after a plugin crash (Issue: 7673).

Find about the Dev channel and how to subscribe at http://dev.chromium.org/getting-involved/dev-channel.


Anthony Laforge, PMP
Chrome Program Manager
URL: http://googlechromereleases.blogspot.com/2009/02/dev-channel-bug-fixes-webkit-merges-and.html

[Gd] Dev Channel - Bug Fixes, WebKit Merges, and Full Screen Mode

| More

Google Chrome Releases: Dev Channel - Bug Fixes, WebKit Merges, and Full Screen Mode

Google Chrome's Dev channel has been updated to 2.0.166.1. The highlights for this week:

New
  • Preliminary full screen support has been added (UI still in progress).
  • Turkish and Estonian spell checkers are available.
  • Additional malware data collection for users opted-in to sending usage statistics and crash reports.
  • We now perform HTTP authentication over a keep-alive connection.
Fixes
  • Fixed a regression where it was not possible to drag a tab between two windows.
  • Fixed issue related to the input method editor (IME) and the distance/ location to the current text area after scrolling.
  • Double clicking no longer maximizes the window.
  • Fixed everything listed as Known Issues last week.
  • The complete list of changes is available in the release notes.
Known Issues
  • Download shelf will *not* warn about dangerous .exe files (Issue: 7971).
  • Windows 7 users will experience issues importing favorites from IE and setting Chrome as the default browser.
  • Repaint issues on reloaded page after a crash (Issue: 8065).
  • Javascript debugger doesn't come up for constrained windows (Issue: 8071).
  • Sad face not displayed after a plugin crash (Issue: 7673).

Find about the Dev channel and how to subscribe at http://dev.chromium.org/getting-involved/dev-channel.


Anthony Laforge, PMP
Chrome Program Manager
URL: http://googlechromereleases.blogspot.com/2009/02/dev-channel-bug-fixes-webkit-merges-and.html

[Gd] Announcing the Native Client Security Contest

| More

Google Code Blog: Announcing the Native Client Security Contest

By Henry Bridge, Native Client Team

Exploits, bugs, vulnerabilities, security holes -- for most programmers these terms are synonymous with fire drills and coding all-nighters. However, for the next 10 weeks, the Native Client team is inviting you to bring them on! We're challenging you to find security exploits in Native Client. Sign up today for the Native Client Security Contest, you could win up to $ 213 , as well as recognition from renowned security researchers.

Before getting started, you must complete the registration process for yourself or your team. Then, you can grab the latest build of Native Client, attack it to find security holes, and submit the ones you discover. You get credit for bugs that your team reports first. If another contestant submits a vulnerability before you, or we publish a fix before you report it, well then... you'll have to keep looking!

At the end of the contest, all entries will be reviewed by a panel of academic experts, chaired by Edward Felten of Princeton University. They will select the five eligible entries with the most high-impact bugs, and these winners will receive cash prizes, as well as earn bragging rights. For more details, please review the contest's terms and conditions.

Registration is now open and the contest will run until May 5th. Sign up today to start reporting exploits as soon as possible.

Happy bug hunting!
URL: http://google-code-updates.blogspot.com/2009/02/announcing-native-client-security.html

[Gd] Canonical Link Element: presentation from SMX West

| More

Official Google Webmaster Central Blog: Canonical Link Element: presentation from SMX West

A little while ago, Google and other search engines announced support for a canonical link element that can help site owners with duplicate content issues. I recreated my presentation from SMX West and you can watch it below:



You can access the slides directly or follow along here:



By the way, Ask just announced that they will support the canonical link element. Read all about it in the Ask.com blog entry.

Thanks again to Wysz for turning this into a great video.

In fact, you might not have seen it, but we recently created a webmaster videos channel on YouTube. If you're interested, you can watch the new webmaster channel. If you subscribe to that channel, you'll always find out about new webmaster-related videos from Google.

Posted by Matt Cutts, Search Quality Team
URL: http://googlewebmastercentral.blogspot.com/2009/02/canonical-link-element-presentation.html

[Gd] Canonical Link Element: presentation from SMX West

| More

Official Google Webmaster Central Blog: Canonical Link Element: presentation from SMX West

A little while ago, Google and other search engines announced support for a canonical link element that can help site owners with duplicate content issues. I recreated my presentation from SMX West and you can watch it below:



You can access the slides directly or follow along here:



By the way, Ask just announced that they will support the canonical link element. Read all about it in the Ask.com blog entry.

Thanks again to Wysz for turning this into a great video.

In fact, you might not have seen it, but we recently created a webmaster videos channel on YouTube. If you're interested, you can watch the new webmaster channel. If you subscribe to that channel, you'll always find out about new webmaster-related videos from Google.

Posted by Matt Cutts, Search Quality Team
URL: http://googlewebmastercentral.blogspot.com/2009/02/canonical-link-element-presentation.html

Tuesday, February 24, 2009

[Gd] YouTube API Outgrows Shy Adolescence, Now Social

| More

YouTube API Blog: YouTube API Outgrows Shy Adolescence, Now Social

Posted by Stephanie Liu, YouTube APIs and Tools Team

YouTube has been getting more social lately, using activity feeds to make it easier to find cool videos and channels that your YouTube friends are favoriting, rating, subscribing to, etc. But what if all your friends aren't on YouTube, but rather on social network / site XYZ?

Well, my friends, the API has come out of its awkward teenage years, and now has more sophisticated social skills to help. Activities like favoriting, uploading, commenting, and more can now be integrated into the social context of your choice. Check out the docs for the new user activity feed and friend activity feed.

Before you ask, the user activity feed is fully customizable by the user, and the corresponding feed through the API respects all privacy settings. So users still have full control over what they make available in their recent activity feed.

We think some cool apps can be made with these feeds -- like the obvious social network / feed aggregator integrations, to notification apps, to novel data views. We can't wait to see what you guys make!

Get started by perusing the docs and playing with the sample. Besides the protocol guide, we've also updated the Java and PHP guides with helpful snippets. An activity viewer sample written in PHP and its source code is also available for you to play with.

As always, let us know if you have any questions or feedback in the forum.

PS. If you want to socialize with the team in person, come to Google I/O, where we'll be giving a session on "Going social with the YouTube APIs"!
URL: http://apiblog.youtube.com/2009/02/youtube-api-outgrows-shy-adolescence.html

[Gd] Are you in the sandbox? Here's a quick way to check

| More

iGoogle Developer Blog: Are you in the sandbox? Here's a quick way to check

Can't figure out if your account is in the developer sandbox or not? Sometimes the "Welcome to the iGoogle Developer sandbox" message is obscured. Sometimes developers are confused about the behavior of the http://google.com/ig/sandbox page (which acts as a toggle, not just a redirect). And sometimes sandbox features aren't working properly, so that even if you are in the sandbox, it looks like you aren't.

Here's a small gadget to provide a little heads up on the sandbox status. If you're in the sandbox, it lets you know and gives you a quick way to leave. If you're not, it gives you a quick way to enter. And, finally, if it thinks you are in the sandbox, but features don't seem to be working, it tells you that, too. Think of it as your personal sandbox valet.

The exact behavior relies on the current rollout of features (and using the .com TLD), so it will likely need an update down the road as launches occur. Please test it, add it to your pages, and check the status message if things aren't working properly.

For questions and comments, feel free to add to this thread in the forum.

Posted by Dan Holevoet, Developer Programs
URL: http://igoogledeveloper.blogspot.com/2009/02/are-you-in-sandbox-heres-quick-way-to.html

[Gd] Android Layout Tricks #1

| More

Android Developers Blog: Android Layout Tricks #1

The Android UI toolkit offers several layout managers that are rather easy to use and, most of the time, you only need the basic features of these layout managers to implement a user interface. Sticking to the basic features is unfortunately not the most efficient way to create user interfaces. A common example is the abuse of LinearLayout, which leads to a proliferation of views in the view hierarchy. Every view, or worse every layout manager, you add to your application comes at a cost: initialization, layout and drawing become slower. The layout pass can be especially expensive when you nest several LinearLayout that use the weight parameter, which requires the child to be measured twice.

Let's consider a very simple and common example of a layout: a list item with an icon on the left, a title at the top and an optional description underneath the title. Here is what such an item looks like:

Simple list item

To clearly understand how the views, one ImageView and two TexView, are positioned with respect to each other, here is the wireframe of the layout as captured by HierarchyViewer:

Wireframe of the simple list item

Implementing this layout is straightforward with LinearLayout. The item itself is a horizontal LinearLayout with an ImageView and a vertical LinearLayout, which contains the two TextViews. The source code of this layout is the following:

<LinearLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="?android:attr/listPreferredItemHeight"

android:padding="6dip">

<ImageView
android:id="@+id/icon"

android:layout_width="wrap_content"
android:layout_height="fill_parent"
android:layout_marginRight="6dip"

android:src="@drawable/icon" />

<LinearLayout
android:orientation="vertical"

android:layout_width="0dip"
android:layout_weight="1"
android:layout_height="fill_parent">

<TextView
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="1"

android:gravity="center_vertical"
android:text="My Application" />

<TextView
android:layout_width="fill_parent"
android:layout_height="0dip"
android:layout_weight="1"

android:singleLine="true"
android:ellipsize="marquee"
android:text="Simple application that shows how to use RelativeLayout" />

</LinearLayout>

</LinearLayout>

This layout works but can be wasteful if you instantiate it for every list item of a ListView. The same layout can be rewritten using a single RelativeLayout, thus saving one view, and even better one level in view hierarchy, per list item. The implementation of the layout with a RelativeLayout remains simple:

<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
android:layout_width="fill_parent"
android:layout_height="?android:attr/listPreferredItemHeight"

android:padding="6dip">

<ImageView
android:id="@+id/icon"

android:layout_width="wrap_content"
android:layout_height="fill_parent"

android:layout_alignParentTop="true"
android:layout_alignParentBottom="true"
android:layout_marginRight="6dip"

android:src="@drawable/icon" />

<TextView
android:id="@+id/secondLine"

android:layout_width="fill_parent"
android:layout_height="26dip"

android:layout_toRightOf="@id/icon"
android:layout_alignParentBottom="true"
android:layout_alignParentRight="true"

android:singleLine="true"
android:ellipsize="marquee"
android:text="Simple application that shows how to use RelativeLayout" />

<TextView
android:layout_width="fill_parent"
android:layout_height="wrap_content"

android:layout_toRightOf="@id/icon"
android:layout_alignParentRight="true"
android:layout_alignParentTop="true"
android:layout_above="@id/secondLine"
android:layout_alignWithParentIfMissing="true"

android:gravity="center_vertical"
android:text="My Application" />

</RelativeLayout>

This new implementation behaves exactly the same way as the previous implementation, except in one case. The list item we want to display has two lines of text: the title and an optional description. When a description is not available for a given list item, the application would simply set the visibility of the second TextView to GONE. This works perfectly with the LinearLayout implementation but not with the RelativeLayout version:

RelativeLayout and description GONE

RelativeLayout and description GONE

In a RelativeLayout, views are aligned either with their parent, the RelativeLayout itself, or other views. For instance, we declared that the description is aligned with the bottom of the RelativeLayout and that the title is positioned above the description and anchored to the parent's top. With the description GONE, RelativeLayout doesn't know where to position the title's bottom edge. To solve this problem, you can use a very special layout parameter called alignWithParentIfMissing.

This boolean parameter simply tells RelativeLayout to use its own edges as anchors when a constraint target is missing. For instance, if you position a view to the right of a GONE view and set alignWithParentIfMissing to true, RelativeLayout will instead anchor the view to its left edge. In our case, using alignWithParentIfMissing will cause RelativeLayout to align the title's bottom with its own bottom. The result is the following:

RelativeLayout, description GONE and alignWithParentIfMissing
RelativeLayout, description GONE and alignWithParentIfMissing

The behavior of our layout is now perfect, even when the description is GONE. Even better, the hierarchy is simpler and because we are not using LinearLayout's weights it's also more efficient. The difference between the two implementations becomes obvious when comparing the view hierarchies in HierarchyViewer:

LinearLayout vs RelativeLayout

Again, the difference will be much more important when you use such a layout for every item in a ListView for instance. Hopefully this simple example showed you that getting to know your layouts is the best way to learn how to optimize your UI.

URL: http://android-developers.blogspot.com/2009/02/android-layout-tricks-1.html

[Gd] Go beyond the free limits on Google App Engine

| More

Google Code Blog: Go beyond the free limits on Google App Engine

By Pete Koomen, Google App Engine Team

We just announced that developers can now grow their applications beyond App Engine's free limits that have been in place since it launched last year.

The pricing for resources beyond those free quotas is:
  • $0.10 per CPU core hour.
  • $0.10 per GB of incoming traffic and $0.12 per GB of outgoing traffic
  • $0.15 per GB of data stored by the application per month.
  • $0.0001 per email recipient for emails sent by the application
For more detail, check out the post in the App Engine Blog.
URL: http://google-code-updates.blogspot.com/2009/02/go-beyond-free-limits-on-google-app.html

[Gd] New! Grow your app beyond the free quotas!

| More

Google App Engine Blog: New! Grow your app beyond the free quotas!

Posted by Brett Slatkin, App Engine Team



We're psyched to announce that developers can now purchase additional computing resources on App Engine, enabling apps to scale beyond our free quotas. This has been our most requested improvement to App Engine and we're thrilled to deliver it, as promised.



When we released App Engine last April, it was completely free to use, but each application was limited to a set of fixed resource usage quotas. The free quotas are still there, but now you can grow beyond them.



You can now set a daily budget for your app that represents the maximum amount you're willing to pay for computing resources each day. You allocate this budget across CPU, bandwidth, storage, and email, and you pay for only what your app consumes beyond the free thresholds -- prorated up to the nearest penny.



App Engine remains free to get started. However, along with many performance improvements over the past ten months, we've learned that we overestimated our initial free quota values. Therefore, in 90 days we will be reducing the free quota resources. We believe these new levels will continue to support a reasonably efficient application serving around 5 million page views per month, completely free.



The pricing for resources beyond those free quotas is:




  • $0.10 per CPU core hour. This covers the actual CPU time an application uses to process a given request, as well as the CPU used for any Datastore usage.

  • $0.10 per GB bandwidth incoming, $0.12 per GB bandwidth outgoing. This covers traffic directly to/from users, traffic between the app and any external servers accessed using the URLFetch API, and data sent via the Email API.

  • $0.15 per GB of data stored by the application per month.

  • $0.0001 per email recipient for emails sent by the application



Data stored in the datastore incurs additional overhead, depending on the number of indexes, as well as the number (and size) of associated properties. This overhead can be significant in some cases, and it's something that we have been underreporting up until now. Thus, you may notice an increase in the amount of data stored by your application that is listed in the Admin Console.



To decrease the impact of this change in the way we calculate storage usage, we've doubled the free storage quota to 1GB. To learn more about how our quotas work, upcoming changes to our quota levels, how they relate to billing, and overall resource consumption limitations, see the Quotas section of the docs. The Purchasing Additional Quota section has more detail about how to purchase additional computational resources for your app, and there's also a Billing FAQ. We've also made some changes to our terms of service to include language around payments, fees, and disallowing the use of multiple applications to avoid incurring fees.



As always, we welcome feedback in our discussion group, and don't forget to check out the App Engine sessions at our upcoming developer conference, Google I/O!

URL: http://googleappengine.blogspot.com/2009/02/new-grow-your-app-beyond-free-quotas.html

Monday, February 23, 2009

[Gd] Introducing the Google Webmaster Central YouTube Channel

| More

Official Google Webmaster Central Blog: Introducing the Google Webmaster Central YouTube Channel

In his State of the Index presentation, Matt Cutts said that one of the things to look for from Google in 2009 is continued communication with webmasters. On the Webmaster Central team, we've found that using video is a great way to reach people. We've shown step-by-step instructions on how to use features of Webmaster Tools, shared our presentations with folks who were unable to make it to conferences, and even taken you through a day in the life of our very own Maile Ohye as she meets with many Googlers involved in webmaster support.

We plan on releasing more videos like these in the future, so we've opened up our own channel on YouTube to host webmaster-related videos. Our first video is already up, and we'll have more to share with you soon. If you want to be the first to know when we release something new, you can subscribe to us using your YouTube account, or grab this RSS feed if you'd like to keep track in your feed reader. Please let us know how you like the channel, and use the comments in this post to share your ideas for future videos.

And while we'll all do our best to make sure Matt Cutts understands that Rick Rolling is so last year, be careful where you click on April 1st.

Posted by Michael Wyszomierski, Search Quality Team
URL: http://googlewebmastercentral.blogspot.com/2009/02/introducing-google-webmaster-central.html

[Gd] [Libraries][Update] - YUI 2.7.0

| More

Google AJAX API Alerts: [Libraries][Update] - YUI 2.7.0

YUI was updated to version 2.7.0
URL: http://ajax-api-alerts.blogspot.com/2009/02/librariesupdate-yui-270.html

[Gd] [Libraries][Update] - YUI 2.7.0

| More

Google AJAX API Alerts: [Libraries][Update] - YUI 2.7.0

YUI was updated to version 2.7.0
URL: http://ajax-api-alerts.blogspot.com/2009/02/librariesupdate-yui-270.html

[Gd] [Libraries][Update] - jQuery 1.3.2

| More

Google AJAX API Alerts: [Libraries][Update] - jQuery 1.3.2

jQuery was updated to version 1.3.2
URL: http://ajax-api-alerts.blogspot.com/2009/02/librariesupdate-jquery-132.html

[Gd] jQuery, YUI updates

| More

Google AJAX APIs Blog: jQuery, YUI updates

We have updated versions of jQuery and YUI on our CDN. jQuery is now at version 1.3.2 which will be what version 1 and 1.3 aliases point to.

YUI's new version, 2.7.0, includes a new stylesheet utility to do dynamic CSS without looping through DOM nodes as well as some enhancements to existing functionality such as charts, DOM collection, and tree view. Furthermore, YUI is maintaining their image as a library for professionals by beginning to add IE8 support in preparation for Microsoft's upcoming launch.

I'd also like to remind you that all public updates to our APIs can be followed on our Google AJAX API Alerts blog. That blog is meant for minor API additions/updates/fixes, and in the future these alerts will only be posted there.
URL: http://googleajaxsearchapi.blogspot.com/2009/02/jquery-yui-updates.html

[Gd] Tip: Use keyboard shortcuts in the Gadget Designer

| More

Google Desktop APIs: Tip: Use keyboard shortcuts in the Gadget Designer

When writing code in the Google Desktop Gadget Designer, you most likely have used the Ctrl+C and Ctrl+V keyboard shortcuts to copy and paste text.

Here are some other shortcuts to work faster in the Gadget Designer. They work only while editing text such as JavaScript and XML files.

Ctrl+DInserts a copy of the current line below the current line
Ctrl+L Deletes the current line
Ctrl+T Swaps the current line and the line above it
Ctrl+[0-9] Switches the current tab. For example, if the Preview window is positioned in the second tab, Ctrl+2 switches to that tab.

Posted by Stefan Van Damme, Gadget Developer
URL: http://googledesktopapis.blogspot.com/2009/02/tip-use-keyboard-shortcuts-in-gadget.html

[Gd] Google Data On Rails

| More

Official Google Data APIs Blog: Google Data On Rails

Posted by Eric Bidelman, Google Data APIs Team

"Where's Ruby on the list of client libraries?"

My colleague Jeff Fisher recently open sourced a Ruby utility library for the Google Data APIs. Mind you, it's not a full-blown client library, but it does handle the fundamentals like authentication and basic XML manipulation using the REXML module.

We've got a comprehensive article and sample application, the DocList Manager (full source), to demonstrate the basics.

Please visit us in the Google Data APIs forum to ask questions or submit feedback.
URL: http://googledataapis.blogspot.com/2009/02/google-data-on-rails.html