My JavaScript book is out! Don't miss the opportunity to upgrade your beginner or average dev skills.
Showing posts with label impression. Show all posts
Showing posts with label impression. Show all posts

Wednesday, September 23, 2009

Google Chrome Frame - A First Look

In one single day the news about Google Chrome Frame has reached, I suppose, every web related company or developer. As posted before, I hope this plug-in will be adopted soon throwing away every other plug-in "record", thanks to its target: the most used, discussed, slow, and not standard, casa Microsoft default browser, Internet Explorer.
I have spent part of my precedent night sleeping testing this little revolution from Big G. and here there are first suggestions, impressions, results.

The Correct Way To Set Chrome Frame

The Google Getting Started guide is a good lecture, but it is not enough.
The Making Your Pages Work with Google Chrome Frame is incomplete, and I will tell you why.
First of all, we need to understand that Chrome is a Runtime Embedded Browser plug-in, not a tag related one then, as Adobe Flash Player is.
Writing something like:
Just add this tag to the top of the page: That's it!
is confusing and not that detailed info.
A meta tag is normally placed in the header one, top of the page, but as soon as developers read about "that's it" most of them tried to add via JavaScript this meta tag to switch engine: this is wrong.
We cannot mess up IE default Trident engine with a completely different one as WebKit via Chrome Frame is. Different are also variables, if any, globals, if any, render itself, and the best case scenario is that everything will break up!
As summary, runtime browser switch is not truly a good practice, for both main page, or iframes, since the Chrome Frame nature is to change the entire browsed content and since it does not make sense to have such hybrid, non-sense, configuration between JScript and V8, Trident and WebKit.
Accordingly, the best way to activate Chrome Frame is to put in the head tag, top of the page, and before whatever JavaScript action, the meta.

<!DOCTYPE html>
<html>
<head>
<title>Google Chrome Frame</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="chrome=1" />
... the rest of the page, scripts, css, whatever

That is still not it!

Detecting Google Chrome Frame and Prompting to Install

One more time, we need to thanks Google for all this effort but suggested solution is not ideal! (quick update: Alex Russel agrees, so the page is hpefully gonna change soon).
Chrome Frame is, so far, an Internet Explorer related plug-in which means that the external script will not do anything interesting with every other browser such Firefox, Opera, Safari, or Chrome.
Google truncates web pages (body tag) to make things as fast as possible but it is suggesting us a "slowdown without reasons" practice.
The best way to suggest Chrome Frame is to put that external script in a conditional comment:

<!DOCTYPE html>
<html>
<head>
<title>Google Chrome Frame</title>
<meta http-equiv="content-type" content="text/html; charset=utf-8" />
<meta http-equiv="X-UA-Compatible" content="chrome=1" />
<!--[if IE]><script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/chrome-frame/1/CFInstall.min.js"></script><![endif]-->
</head>
<body>
</body>
<script type="text/javascript">
document.body.appendChild(
document.createTextNode(navigator.userAgent)
);
</script>
</html>

If for some reason we are worried about how to know if IE supports the plug-in, all we need to do is this:

var cf = (function(i,ua){
return i<ua.indexOf("chromeframe")||i<ua.indexOf("x-clock")
})(-1,navigator.userAgent.toLowerCase());
// cf is true when plug-in is installed


Do We Truly Need To Know?

I think IE support cannot disappear today, I wish it would, but that's not gonna happen. If we develop a cross-browser Web application/site is quite useless to understand if we are using the plug in or not, 'cause if Google Chrome will be supported, special features detections a part, the website will simply looks exactly as it looks in Chrome.
I cannot spot a single valid reason, except the Install Prompt for IE, to include that file but my crystal ball says that Chrome Frame is planning to be installed as plug-in in other browsers as well in a not that far future ... so one day maybe it will make sense to remove that script from conditional comments.

Server Side Chrome Activation ?

Not yet, apparently an header in the server with chrome=1 value is useless. I hope this is a temporary issue 'cause to avoid switch delay once Trident has been already started, the server side header could be the best solution. On the other hand, being Chrome a Trident plug-in, I think Trident needs to start before the plug-in can be activated ... uhm, hell problem!

// this won't have effect so far ...
header('X-UA-Compatible: Chrome=1', true);

Update
To understand if the browser will be render the page via Chrome Frame we can use this snippet as example:

<?php
$userAgent = $_SERVER['HTTP_USER_AGENT'];
if(
strpos($userAgent, 'chromeframe') !== false
) {
// your cool standard layout for Chrome
} else {
// your crappy IE dedicated one
}
?>


My First Impression

Enabling runtime Chrome Frame via url, cf: as url prefix, I have tested Taskspeed and many others benchmarks realizing that if I had used Google Chrome the result would have been exactly the same.
The only difference is the little delay, not that little with extremely old hardware, when the meta tag is interpreted and the switch activated runtime, specially the first time.
Chrome Frame is in any case 100% WebKit and Chrome. IE features, included conditional comments, for both layout or script, attachEvent and friends or CSS expressions, are not supported.
While features such V8 multi tab threading is supported ... again, 100% Chrome.

What's Next ?

I am prety much sure the reason this plug-in is not stable is the native OS integration nature of Internet Exploer.
Talking about IE8 we have Accelerators and other specific stuff that will probably not work with this plug-in, but personally I have never used them.
In the Jurassic IE6 case the Operating System dependency is more than hard, and so far it is the most problematic browser but right now I have never encountered a single problem with this plug-in and to make it stable as soon as possible we all need to install it and test it in every single page. This procedure will help Chromium team to better and faster understand possible troubles, if any, so let's contribute: in the worst case scenario we'll have a better Web experience thanks to Chrome overall stunning performances, standards and HTML5 support.

P.S. the Developer console in IE8 should be activatd before the switch, and not after, otherwise with this version it won't work!

Saturday, July 04, 2009

UK Bing Roundtable - Just My Opinion

It is probably too late and I did not check other guys blogs, but I would like to bring here my impressions about this Bing event I have been invited few days ago.

How Did It Start


Hi Andrea,
I'm writing on behalf of Microsoft to invite you to a discussion about Bing, the new search engine that recently launched in beta in the UK.

...

Colin Mercer, a member of Microsoft Life Without Walls initiative group, is a truly nice guy. Spontaneous, friendly, exactly that kind of guy that could let a group of foreigners feel comfortable since first meet up minutes. Being glad to have been invited without asking, and without being a Microsoft fun as well, of course I was there: to understand what this initiative was about and why they called me, raising my doubts from this high geek technical blog.

Bing Round Table, The Good Part


To be honest, I am not going to be that nice about this event, but I have to admit that seeing Microsoft trying to be closer than before with people that make Web live, any topic blogger in this case, was a nice surprise. The organization, the choose place, and the catering was excellent, even if there were only about 10 guests and there was no time to eat and drink. It is a good start point from a company famous to be closed for its selling purpose only. Good Stuff, please keep doing it, it can only brings benefits from different points of view.


Special Moronic Guests, That Is What We Are


The presentation started with a lovely woman and a sort of jingle: "Bing"! OK, that was to make us comfortable, that was to have a quick laugh, that was to break the ice, that was ... only the begin!
The entire presentation showed us stats, those stats were retrieved from God Knows which tool bar present only in Internet Explorer, and those stats, even if from IE world, put Microsoft search engines in third position, I can't imagine what could come from Mozilla or Google, if they present stats based on their own products ... I guess Bing would not even exists ...
Since those stats were not that pro-bing, they stopped into a slide with classical promises a la "it's simple, it's friendly, it's new, it's brand, it's something you should use, it makes your life better" ... no comment.
Fortunately, some guy started instantly to ask what was new, what was interesting, what was the missing piece that other well known search engines do not have ... and every question had behind a though like: why are we here and what are you showing us? We are not dummies and we know what we want, what other offer, and what we are looking for.
Were we interested about TV ad like presentation? NO
Were we interested about promises other search engines maintain since ages? NO
Were we interested about U.S.A. verion, being in London, where Bing is still beta and smells like Live from miles without bringing a single new feature and positioning bing itself in the second place when you search for bing in the uk version? NO
So what were they showing us? Did they think we do not know what is a search engine? Probably

Missed Expectations


At least that what I think,everybody was looking for that genius thing that nobody else have ... it did not happen! Apparently, the most innovative thing is the live video preview for video results ... OK, I want to be honest, I think everybody over 18 has seen some xxx search engine and everybody knows that a quick preview in a video link is not a Bing idea ... isn't it?
The second most important innovation is a vertical focused lateral bar, something that simply remove spaces fr mobile devices, something useful because with that kind of layout and images behind white links people could even not notice top links so here they are with an innovative lateral menu ... is this wow?

Bing UK, I Want Developers Name!


First of all, for a company that sell enterprise software a la Visual Studio Team System, I wonder how it can be possible that whatever country version is different from every other ... merge projects and use one big development team? Naaaaaaaaa, they prefer to delegate search engine development in each country ... what a waist of money! The UK version is a new graphical version of the Live.co.uk search engine, same weird results (Bing itself in second position after a link called News about Bing ...), not a single lateral bar, nothing useful in the home page ... and about this, 110Kb of home page because of course if a user needs to search something he has to wait the castle, the building, the big sized image in home page. Moreover, with 13 inline JavaScript files, when you chose a different search type switching from Web to Image, the entre page is reloaded and the only difference is the form action, using /images/ rather than the main path ... I mean: Are You Serious?
Design wise, as I said in some other post I am partially color blind. I perfectly recognize red and green, but slight gradients make my life truly difficult.
Google, in its simplicity, studied a lot color contrasts to make everything clear, now try to read the disclaimer, or links bottom right ... oh really? You did not even know there were links there? I am not a designer, but you do not need a PHD to understand that bright text over a bit brighter background does not make sense ... now put white text over images loads of details ... and now tell me how long you spent to read that text, and how much all these problems do not exists in both Yahoo and Google. Is it all about design? Does it make sense to create a 100Kb home page just to add noise and confusion? Did they truly need 13 inline JavaScript for a page that has no functionality rather than a field? Where is the simplicity they are talking about?
Google, 25Kb, you write, you press enter, that's it, that's why they are the number one search engine ... no confusion, not a single waist of time or bandwidth, optimized for mobile devices and even if Microsoft has more than one HTC device, they do not care ... try to surf Bing with iPhone or Android ... are we still in 2000 or in the netbook/small screen devices era? A splash in the past, and still nothing new!

Bing U.S.A. You Click Rather Than Scroll!


Again, I did not get this "feature", the vertical oriented menu on the left suppose to make everything simple because in Gogle you have to scroll ... What?
The scrolling operation with a mouse is extremely natural and it can be performed everywhere in the page while it is still natural with mobile devices where with a finger or a dedicated button you just ... scroll! The search, point, and click is a boring, slow, tedious, operation, even more difficult with mobile devices and whatever "finger-pad" panel we all have in our mobile devices. In few words, in UK Bing presentation they showed us how simple is to find Washington map ... you search for Washington, the engine is so clever to understand that you are looking for a city ( again, moronic stuff, we all know that this is the abc for a top ten search engine ) and if you click Map in the left side menu, you will find the map. In Google, you have to scroll ( weird, I always found maps in the top of the page ) to find information, so they organized everything, with a response page which average is again about 70Kb VS 30 to 35 for Google, where in the latter one you can find everything you need in one page, quick, simple, that is simple!
I do not want to comment the fact they proposed U.S.A. related searches, and non UK images in the home page for the UK Bing version ...

There Will Be Time For Technical Question?


After any sort of question and hundreds of good points about missed interesting news for this new Microsoft search engine, I simply called time to ask technical question. THey said yes but thre was no time, and you know what? I got time blowing out loudly and quickly my points producing non-sense sentences cause I lost number of things to ask or say ... but one thing I will never forget: I asked about 13 inline scripts and the reason if in the UK version I click images I have to reload the page just to change a form target ... the answer was: I do not know what you are talking about ... OK, probably misunderstanding, probably not DB related, but at the end of the day, the only though in my mind was this one: Why on earth they called me? Did they think I was a web troll? Did they think I was a teenager with a lot of time to waist behind the PC? Did they ever consider me as a 10 years experienced web developer with deep JavaScript knowledge, server side certifications, and studies that not a single young Phd person have unless he/she has not my same passion?
Disappointed, partially humiliated, and still load of doubts about how the presentation supposed to be and the reason they called us.

Is Everything That Bad?

One thing I truly appreciated, which does not come from this meeting, is the Bing API, in my opinion well done and flexible enough to let us create interesting applications or web gadgets. If you'll stay tuned, I am planning to create a bookmarkable script that will make searches nice, simple, and friendly, exactly how Bing should, in Microsoft mind, be.

Finally, this post is only my impression, my opinions, and nothing else. I may have misunderstood a lot of words/questions, specially after a couple of fresh beers, but I still wonder why I was there ... and if I would like to be there again. Let's see how things will be.

Post Scriptum

All my opinions come from 30 minutes analysis in place, during the meeting, I've never had time these days to investigate the search engine itself so I may have missed something ... again, take carefully what I said about Bing, thanks.