Browsers are like buses

You wait around for ages and then two come along, all at once! No sooner have I downloaded IE8 beta 2 than Google announce Chrome!

I’ve been using IE8 for a few days and I’m quite impressed. I’ve just downloaded Chrome and I have to say, it’s a darn good browser. The feature I most wanted from any tab-based browser and one I’ve mentioned before in the context of IE is present in Chrome – tabs you can drag between windows.

Anyway, I was planning to post in greater detail about IE8 and my take on the new beta 2. I think I might change tack a bit and play with Chrome as well. Don’t be fooled by some of the hype – some of the ‘cool features’ are not unique to Chrome, but more choice in the browser market can only ever be a good thing for the end user.

My one worry when the first rumours started was that they might have created yet another render engine. It’s interesting that Google chose webkit rather than Gecko, given their existing close relationship with Firefox. However, having more than one webkit implementation on Windows is a real benefit for testing.

Searching SharePoint through an IE8 Activity

IE8 Activities look cool. They’re almost like favlets from where I stand, but they offer a very simple way for users to access online services and pass simple parameters.

I decided I wanted to play, and we use SharePoint heavily here at Black Marble. The obvious thing to do was to create an activity which would allow the user to search for the selected text using SharePoint search.

Activities are defined through XML. Essentially, you give it a name, an icon and define the actions that can be performed. There are execute and preview actions, but the small preview window doesn’t really lend itself to SharePoint search (I tried!).

Here is the xml for our sharepoint search activity. Note that I’ve replaced our hostnames. I called this file SharePointSearch.xml

   1: <?xml version=“1.0” encoding=“UTF-8”?>
   2:   <openServiceDescription xmlns=“http://www.microsoft.com/schemas/openservicedescription/1.0”>
   3:   <homepageUrl>https://portal.blackmarble.co.uk</homepageUrl>
   4:   <display>
   5:     <name>Find in Black Marble Portal</name>
   6:  <icon>https://portal.blackmarble.co.uk/_layouts/images/favicon.ico</icon>   
   7:   </display>
   8:   <activity category=“find”>
   9:   <activityAction context=“selection”>
  10:       <execute action=“https://portal.blackmarble.co.uk/search/Pages/results.aspx”>
  11:         <parameter name=“k” value=“{selection}” type=“text” />
  12:       </execute>
  13:     </activityAction>
  14:   </activity>
  15: </openServiceDescription>

So what does that lot do? Well most of it seems pretty self explanatory. The key to the activitiy is in the section which defines the custom action. That has a url which IE8 will call and a list of parameters into which information is passed. A simple search in SharePoint uses the ‘k’ parameter to pass in the search term, so I have set that here.

So now we have our file, how do we get it into the browser. Well, I copied the xml file into the LAYOUTS folder in the SharePoint installation folder on the hard disk of the server, which is reference via _layouts in a url. I then added a Content Editor web part onto one of my pages and pasted the code to add the action into the source view:

   1: <p>Search Portal easily from IE8 with our custom activity.</p><button onclick=“BLOCKED SCRIPTwindow.external.addService(‘/_layouts/SharePointSearch.xml’)”>Add Portal Search Activity</button>

This simply shows a short paragraph and a button. When the user clicks the button, IE8 asks whether it should install the activity and hey presto, a new menu item appears under ‘More Activities’ on the context menu. When I highlight text in my browser I can now quickly search our SharePoint for any relevant content.

IE8 Rapid Fire Site Test

I can’t spend much longer playing with IE8 or my wife will skin me. However, from my cursory browsing experience I’m worried. Either the devs have a good deal of work to do or I’m going to be very busy with CSS rules for a while.

Here’s the University of Bradford site in IE8:

image

And to try to compare apples with oranges, here it is in Firefox 3 beta 3:

image

More surprisingly, here is the Web Standards Project site in IE8:

image

and again, in Firefox 3b3:

image

Apple.com, IE8:

image

and Apple.com, Firefox 3b3:

image

As you can see, there are issues with the placement of some elements on each of these pages. I have not yet started to investigate why, but I am honestly surprised. Given the much-touted, ‘vastly-improved’ web standards support I was not expecting the number of issues I have seen. Ironically, as usual, old style table layouts look great…

I’ll try to do more comprehensive testing tomorrow. Stay tuned.

Internet Explorer 8…

Well, as expected, the public beta of IE8 appeared on the web pretty much straight after the Mix08 keynote mentioned it. I managed to grab it within mere moments and I now have it installed on my trusty laptop.

As announced only a day or two ago, it defaults to the new rendering mode, with a big toolbar button to toggle back to IE7 mode. I haven’t had time to test the browser with any sites yet, but I’ll try to do that in the next few days and maybe post again.

What did strike me, though, was that there are developer tools right out of the box. Reminiscent of the Safari tools that let you view the page code, the IE dev tools are enabled with a simple icon on the toolbar. Once enabled, what you get is cool:

HTML developer window

A nice CSS/HTML view where you can see the elements and which style rules are being inherited by the element, along with the opportunity to enable/disable individual rules. Suddenly IE is no longer Firebug’s poor cousin.

Javascript debugging window

More on for my developer colleagues, script debugging is also available. This will also come in jolly handy.

The new Favorites Bar I can take or leave- I just don’t browser like that. Underneath, it feels like the old links toolbar to me. Nothing to see here, move along.

Activities look ike they may have legs, though, particularly in the corporate sector where they can guarantee the desktop browser. Being able to right click on the page, element or highlighted text and call functions from other web sites, such as searching for a term or cross-connecting business applications – I can see uses for that and I’ll be playing with this as soon as I can.