Showing posts with label Chrome. Show all posts
Showing posts with label Chrome. Show all posts

Friday, October 30, 2009

Why Chrome isn't a flop

There seems to be a good deal of belief that Google's Chrome browser is a flop and is likely to stay being a flop.  This afternoon I read Google Chrome: The Fast Browser With Slow Adoption on PCWorld.  The author goes through many reasons why Chrome is not in wide spread adoption, but ultimately misses the point of why Google developed Chrome.
Chrome is merely a means to an end.  Google's platform is the web.  The better the web platform is, the easier Google can make money.  Google doesn't care about web browsers or operating systems except for how they affect users getting online and using Google services.
Getting users online is their business model.  Any hindrance to this end is a hindrance to Google making money.
Web browsers have a lot of unrealized potential.  In fact, web browsers really don't do many of the things they should be doing.  This is why Google built Chrome.  They want to set the standard for which web browsers are judged, so they set out to build the best web browser there is.
There are key design features of Chrome that hint to Google's real intentions with Chrome.
First, Chrome is a child of a parent project named Chromium.  Chromium is an open source browser developed by Google.  Chromium can be modified by anyone and spun into their own browser.  Google spins Chromium into it's own Google branded browser named Chrome.  Anyone else could do the same, brand it with their logos and features and call it what they want.
Another key element of Chrome is its rendering engine.  In stead of writing a new rendering engine they plugged WebKit into their browser.  WebKit is an open source rendering engine, which is most notable for being used by Safari.  Chrome actively contributed to WebKit pushing forward new features of the latest web standards and optimizing it to be fast and flexible.  They then take these news improvements and push them into Chrome.  This way they are not only making Chrome a better browser that will push the web into the new age of online computing, but they are also pushing Safari, and every other browser or product that uses WebKit to display web pages, with them.  Despite a stable version of Chrome being available for the Mac, every Mac user benefits from Google's development of Chrome, which in turn helps push forward Google's business agenda.
Another key element to Google's release of Chromium is how it snaps into two other major projects of Google, namely Android and Chrome OS.  These are two Linux-based operating systems that Google is producing.
Android is currently available to T-Mobile customers and will soon be available to Verizon customers as well.  In the future more mobile carriers are set to join in carrying Android power mobile phones.  The Android mobile-phone operating system is designed with Internet connectivity in mind.  It presently uses Opera for its browser.  When the Linux version of Chrome goes live it is a sure bet that it will start shipping with Android, instantly making it a mainstream browser.
Chrome OS is a desktop operating system targeted for Netbooks.  Its key feature will be that all applications for it will be Internet applications.  Without a doubt Chrome OS will ship with the Chrome web browser.  The success of Chrome OS rides almost entirely on the ability to attract developers to build great applications for it that will entice consumers, the same way the wide availability of cool applications for the iPhone has made it an instant game changer in the mobile industry.
Last of all the open source nature of Chrome means that anyone else can freely and easily borrow any of the code and put it in their browser.  Google really doesn't care of anybody actually uses Chrome for their browser.  What they care about is pushing browsers forward.  If browsers move forward then better applications are built for the web.  If this happens people will be inclined to be on the web more, and people are more likely to use Google services or use the service of companies that utilize Google AdWords.  Essentially Google will do whatever it takes to get people online so they can make money.  And that is what Chrome is all about.
You simply cannot measure the success of Chrome by how many people are using it.  As long as Chrome keeps raising the bar for what a browser can do  and that entices other browser makers to keep up, Google is making good on their investment in Chrome.
That being said, I have been using the nightly Ubuntu builds of Chrome and it is in very very good shape.  It is fast, stable, secure and overall a pleasure to use.

Monday, August 10, 2009

SVG with webpages

At work we are developing a web-based framework that uses an API that support PHP, .NET and Java for developing application within it. As a general rule almost all of application within the framework are written in PHP and uses Zend for an MVC model.

While working on developing my first application I decided to extend our images API to supports SVGs. SVG is a type of image that is built on vector graphics. Vector graphics use mathematical equations to drop simple shapes that on a macro-scale define a larger image. This is very much how 3D-graphics works. Polygons are mixed together to build players, houses, vehicles, and everything else within the 3D world. SVGs usually build 2D images. The advantage to them is that you can scale them to any size you want without losing resolution.

Traditionally if you need an image at different sizes you will make a different image for each size that you need from the source. The primary problem with this is that if you try to scale an image larger than the source you get pixelation. You also might not always have access to the source, and so you are stuck with the largest version you can find.

Take for example this 32X32 image.

You could easily scale this image down to a 16X16 image, but if you wanted to make it larger it would look really ugly.

This is what happens if I try to scale the image up to 150X150:

If you always have access to the source image this shouldn't be a problem, but I see regularly enough images that have been scaled up on web page and they look horrible.

With an SVG you only need the one file and you can then dynamically scale it as you please to as small or large as you want.

Another great advantage of SVGs is that the file is plain text file that holds the formulas that draw the image, so they tend to be relatively small.

The image I am using in this example is 18.2 KB. If I convert it to a 200X200 image it is 18.3KB. If I where to convert it to a larger image then the image would take up more space as a PNG than it does as an SVG. For small files, which are small enough to download almost instantaneously, this doesn't provide any benefit, but it allows developers to provide high-quality large images and use only a very small amount of bandwidth.

IE is the only major browser that does not provide support for SVGs. Firefox, Safari, Opera, Chrome and most other even lesser-known browsers all provide support for SVGs. My plan was to have a folder named SVG in our icon directory, and then have fall back PNGs files for IE.

All of my research on the web indicated that the following code would allow me to provide SVGs with PNG fallback for IE:
<object data="foo.svg" type="image/svg+xml" height="32px" width="32px">
<img src="foo.png" style="height: 32px; width: 32px">
</object>

No matter what I tried this didn't work. Instead of resizing the SVG to 32X32, it clipped the image instead.

Clipped image:

I Googled and searched around and came up dry until I happened upon a response on someone's blog a little over a year ago that said that Firefox was planning on supporting SVGs inside the img tag. I tried <img src="foo.svg" style="height: 32px; width: 32px"> and it worked, dynamically resizing and all, in all non-IE browsers except Firefox.

I then found another trick. SVGs are plain text files that use a standard known as XML. These XML files could be modified to be PHP files that output the XML that defines the SVG iamge, and that too could be placed inside the object tag. This unfortunately gave me the same clipping results.

My final conclusion is that the web is just not ready yet for SVGs until Firefox begins providing some sort of sane support for SVG that allows developers to define the width and height to render the SVG image. We really need Microsoft and Mozilla to get on board so that we can stop using JPGs, GIFs, and PNGs wherever possible.

Tuesday, June 23, 2009

chromium extensions

Once I'm done with this semester, aside from some work-related learning, my personal learning will revolve around making Chromium extensions. There is a preliminary guide at http://dev.chromium.org/developers/design-documents/extensions.

For those who don't know Chromium is a new open-source browser developed heavily by Google. Chrome is Google's rebranded version of Chromium that Google actively promotes and distributes.

I now use Chrome about 50/50 with Firefox. It is much faster and stable than Firefox. One of my favorite features is that one tab can crash, and it doesn't bring down the whole browser. That one tab closes, and the rest of the browser keeps going. Also, if I close a tab all of the resources it was using are gone, unlike in Firefox where you can close all of your tabs and still have a large memory footprint from the tabs that you closed.

At work we have an application that crashes quite frequently. It is especially bad about crashing when you have it open twice in the same browser. Now that I run it in Chrome it crashes less, and when it does crash it doesn't disrupt every tab I have open.

The largest setback to Chromium/Chrome is the lack of extensions. Extension support is in development, but has not made it to the release version of Chromium yet. I am very spoiled with Firefox's AdBlock+ and Customize Google extensions. I used to not see any ads. Now that I'm using Chrome a lot I see them again.

Another setback is that their Linux version is still in heavy development. In Linux it is just Chromium.

It actually runs very well in Linux for browsing, but it doesn't yet support addons (no Flash, Java, etc.) It also doesn't have any preferences yet. Aside from that viewing pages is fast and reliable. With my hopes to learn extension development comes another problem. Even though extension support is in the development builds for Windows, it is not in the development builds for Linux. This means I will need to use my Windows virtual machine to learn development. Hopefully in four weeks when school is over this will have changed.

One of my favorite things about extensions in Chromium is that they are written in HTML, Javascript and CSS. The work learning that I mentioned above is the need to become much more familiar with using these three technologies as I plan on using them full time for my job. I am hoping to become an interface developer for our web applications. So this ties in real nice with Chromium extension development.

One great thing about Chromium on Linux is that the nightly trunk builds have been setup in a repository on Launchpad. So I simply put added the following to my software sources:
http://ppa.launchpad.net/chromium-daily/ppa/ubuntu jaunty main
And then run the following from a console:
sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xfbef0d696de1c72ba5a835fe5a9bf3bb4e5e17b5
sudo aptitude update
sudo aptitude install chromium-browser chromium-browser-dbg


Now every day I get the latest version of Chromium for Linux. I have slowly watched it grow over time. It is exciting to slowly watch the features get implemented.