Battle of the Web browsers

This is a pretty good article on InfoWorld. I find it amazing that this field is still so competitive but in the end its great for the consumer. I have been using FireFox 4 lately and I have to say I prefer Chrome 10.

Battle of the Web browsers | Applications – InfoWorld.

From the article:
A good place to begin comparing the browsers is to look at a checklist test like The HTML5 Test, a slick piece of JavaScript that grades your browser as it loads the page. The HTML5 Test gives out points for the availability of a long list of features, then totals up the score.
The HTML5 Test
Raw score Extra points
Chrome 10.0 290 13
Opera 11.10 258 7
Firefox 4.0 255 9
Safari 5.0 228 7
Internet Explorer 9.0 130 5

Soon everything will be just a browser

After reading Google advances Native Client Web browser technology and seeing the amazing capabilities of CSS3 and HTML 5 the entire concept of only a web browser in the future is getting closer and closer.

Google had released a “sneak peek” of the SDK last year. In coming months, Google plans to add APIs for 3D graphics, local file storage and peer-to-peer networking. An ABI (application binary interface) is planned as well. – link

Prediction: Chrome will be #1 by end of 2011

As Neil predicted last year about Chrome, I will make one myself – the Chrome web browser will be the number one browser in the world by the end of 2011.  That is probably a crazy prediction considering its only at about 15% of market share today.

My blog is by far not a complete census but it clearly shows Chrome way ahead of every other browser besides FireFox.  Interestingly, I still use FireFox most of the time but I do find myself going over to Chrome every now and then.  Chrome was about 15% of browsers hitting my site just a month ago and IE 8.0 was close behind, the gap is getting larger.

Here is a chart of the browsers that hit my site in a single day:

Poll: Does anyone use the embedded browser in Lotus Notes 8.+?

[poll id=”15″]

What browser are you using???

Check out the browsers that are accessing my site.  I am actually amazed Chrome is so high.  I am using FireFox pretty much exclusively as of late.

Why BrowserFunction is so cool

If you are familiar with the embedded browser in the Lotus products you may or may not have heard of BrowserFunction, most likely not!  The problem is this class is not very well documented and was part of E4 and is scheduled for Eclipse 3.6.  Notes 8.5.2 does however support this SWT class so you can begin to play with it once 8.5.2 is available.

Why is this so important?  Well, just imagine, now you can completely communicate between Java and JavaScript using this.  You can use the SWT Browsers execute() or evaluate() methods to execute JavaScript from Java and now you can execute Java from JavaScript using BrowserFunction.

This implies you could potentially write all of your UI using HTML/CSS/JavaScript technologies!

The Attachment viewer is such an application, you can check out the code on OpenNTF.  I don’t use the BrowserFunction in the OpenNTF version but I have already begun to make an Lotus Notes 8.5.2 version of the plugin that has much better integration with the Notes client.  If you are writing side bar plugins and want to standardize on writing in a single technology you should check out the SWT Browser and the BrowserFunction support.

A powerful function…

Many have downloaded, looked at, and have commented on the source code for the attachment viewer project but some may not be aware of a powerful function the SWT Browser brings to the table.  As described in a past post about the architecture, the line where the browser is connected with the embedded browser process (its actually a dotted line) is where this call happens.  The function, or method, is the execute method on the SWT browser.  This allows you to run essentially any JavaScript on a given web page or DOM.  The attachment viewer uses this method to call a JavaScript function named “showAttachments()”.  The Eclipse Java code takes the current selection – which in this case it looks for IAttachment – and then passes a set of URL’s and JSON to that JavaScript function.   This is how easy it is to “connect” the web world with the Eclipse world.

String cmd = "showAttachments(" + jObj.toString() + ");";
 if (browser.execute(cmd) == false){

Demo: Attachment viewer for Notes 8

So I was challenged a couple of days ago by Art Thomas to give him an attachment viewer for when he receives images, movies, etc in mail and he just wants to immediately view them without launching them individually.  I started thinking about how I would implement it and I came to the conclusion that we kind of have the ultimate viewer right at our disposable – the SWT Browser!  So in short, watch the video and let me know what you think.

I gave this out internally for now as a Widget and also showed some people how to change their mail application to have the viewer embedded into Memo and Reply forms (as I demonstrate in the video).  I think this project will be good for OpenNTF and a couple of tutorial videos on how I did it….more to come.

For video click more.

Continue reading

Managed Browser, Landmarks, and XPath

In a recent article posted by Chuck, article here, he writes about how the DataChange events happen in the Managed Browser container.  The event is very powerful and allows for actions to be called when a DOM node changes.  I described similar use cases in an article where we constructed a web browser component using XPath.  In that article we show how the managed browser component can use XPath’s to DOM elements so we can extract data out of the current web page at a given URL (the landmark).  In the end, we took the information from one web page and inserted (wired) it into another web page that hosts a basic form.  This uses the dynamic wiring and the property broker message queue to transport the data from one browser to another.  With the combination of XPath’s and Landmarks (regular expression based URL’s), you can create some pretty complex components for large web applications.  Also remember, you can define landmarks that can overlap.  So in short, if your landmark expression (regular expression) is viable for the current page the events and actions will execute – so having many landmark expressions that overlap is actually common.

All of the containers that ship with the product support these landmark concepts and you can even create your own containers based on the public API’s.  Mike Cooper outlines the steps for creating your own container in a wiki article – Creating a Composite Application Container.  He focuses on using Eclipse/SWT for the UI but as you can see from the other container types you can pretty much use any kind of UI technology with this generic framework.

Introducing jDojo!

Ok, I don’t really have any authority or any involvement whatsoever with jDojo but I figured I would introduce it on my site.  I am going to be checking it out more closely going forward and seeing what benefit it really gives us.

You will need to register to get into the jDojo site so go ahead – I think it is well worth it.  The latest version now has support for Dojo 1.4 – which tells me these guys are making sure the community has the ability to support very current API’s.  I didn’t get to see the EclipseCon session Michael gave but it looked very interesting and also gives a great summary of what jDojo is.

“The programmer does not program against the Java JDK classes, but against Dojo and JavaScript stubs that JDojo provides.”

I would really like to see a good comparison to how jDojo compares to GWT and the advantages and disadvantages of both – I have some high level ideas but it is clear these two projects are attempting to do something similar (make web 2.0 development easier).   It is very clear that large enterprise JavaScript applications are a bear to manage and tools like these kinds of tools make it very easy to quickly create cross browser applications based on HTML, CSS and JavaScript.  The thing I love best about jDojo is the code you write looks almost exactly like JavaScript so you aren’t really “compiling” per say.  The benefits you get are typed programming and error checking right within Eclipse.  From the main page of the jDojo site here is a summary of the key benefits:

The benefits in summary..

  • The JDojo programmer can now write its Web UI code using the features of the Eclipse Java tooling.
  • The JDojo compiler ensure that correct Dojo and JavaScript code is generated (no missing/unnecessary commas, brackets etc) but also automatically handles things like the list of ‘required’ statements.
  • Type information is now part of the code, and not of the documentation anymore.
  • The programmer still deals with the DOM, browser environment etc, having the full control over all the details.
  • Existing code can be easily integrated by writing a JDojo stub for it.
  • The generated JavaScript code matches the style of the existing code and can co-exist easily in the same project.

Two new tutorials for web based components

Integrating web based components into Lotus Notes is becoming more and more popular. Whether they are Widgets in the side bar, Xpage components or full blown web sites as components  you can now do some pretty interesting integration with not a lot of effort.  These two articles below show how you can take ordinary web based applications and integrate them in with your Lotus Notes databases in the rich client.  The first article is somewhat of a primer for web based components so start there.  The second one shows how you can write a custom action to execute JavaScript on any web page and have that action wired to another components property.

Articles on the CA Wiki:

Creating a basic web component

Create a custom container action that executes JavaScript.