Tag Archives: chrome

Chromebooks get more useful as Linux comes to Chrome OS

At Google’s IO conference under way in San Francisco, the company has announced the ability for a Chromebook to run Linux applications.

image

“Support for Linux will enable you to create, test and run Android and web app for phones, tablets and laptops all on one Chromebook. Run popular editors, code in your favourite language and launch projects to Google Cloud with the command-line. Everything works directly on a Chromebook,” says product manager Ton Buckley. “Linux runs inside a virtual machine that was designed from scratch for Chromebooks. That means it starts in seconds and integrates completely with Chromebook features. Linux apps can start with a click of an icon, windows can be moved around, and files can be opened directly from apps.”

Squinting at the screen in Google’s photo, above, it looks like the Linux VM runs Debian.

Coupled with the existing ability to run Android apps, the announcement makes Chromebooks more attractive for users (and I am one of them) who would previously have found the operating system too restrictive.

Buckley presents the new feature as primarily one for developers. You will be able to build and test Android applications directly on the Chromebook. Given the operating system’s native support for Android, this should be an excellent machine for Android development.

One of the first things I would install would be Visual Studio Code, presuming it runs OK. Thanks to .NET Core, ASP.NET development should work. The LAMP stack running locally would be great for  PHP development.

Personally I would not only use it for coding though. The ability to run LibreOffice would be great, for example. There are also a ton of handy Linux utilities for admins.

Top feature: security

The key attractions of Chromebooks (aside from low prices from OEM vendors) is security. They are popular in education for this reason. They require less management than PCs because the operating system is locked down and self-patching. The new feature should not compromise security too much, because Linux runs in a VM and in the worst case resetting the VM should clear any malware – though access to user documents could make malware running in the VM quite disruptive.

Apple’s iPad Pro is another capable device with a locked down OS, but does not run Linux applications.

What about Windows? Microsoft has tried and so far failed to lock down Windows in a manner acceptable to its customers. Windows RT was the first attempt, but users found it too restrictive, partly because the Windows 8 app ecosystem was so weak. Windows S is another attempt; but progress is slow. Microsoft has also weakened the security of its modern app platform to make it more capable, even to the extent of allowing desktop applications into the Windows Store. The approach taken by Apple and Google, to design a new secure operating system and make it gradually more capable, is more viable than Microsoft’s work in the opposite direction.

Android apps on Chrome: how it works and what it may become

Google announced at its I/O conference in June 2014 that Android apps are coming to its Chrome OS. Earlier this month product managers Ken Mixter and Josh Woodward announced that the first four Android apps are available in the Chromebook app store: Duolingo, Evernote, Sight Words and Vine.

I delayed posting about this until I found the time to investigate a little into how it works. I fired up an Acer C720 and installed Evernote from the Chrome web store (in addition to Evernote Web which was already installed).

image

When you install your first Android app, Chrome installs the App Runtime for Chrome (Beta) (ARC) automatically.

image

Incidentally, I found Evernote slightly odd on Chromebook since it is runs in a window although the app is designed to run full screen, as it would on a phone or tablet. This caught me out when I went to settings, which looks like a dialog, and closed it with the x at the top right of the window. Of course that closes the app entirely. If you want to navigate the app, you have to click the back arrow at top left of the window instead.

But what is the App Runtime for Chrome? This seems to be an implementation of the Android runtime for NaCl (Native Client), which lets you run compiled C and C++ code in the browser. If you browse the parts of ARC which are open source, you can see how it implements the Android Open Source Project (AOSP) for arch-nacl: a virtual processor running as a browser extension.

Not all of ARC is open source. The docs say:

Getting Started with ARC Open Source on Linux

=============================================

A small set of shared objects can be built which are part of ARC currently.

A fully running system cannot currently be built.

It is early days, with just four apps available, ARC in beta, and developers asked to contact Google if they are interested in having their Android apps run on Chrome OS. However, an independent developer has already ported ARC to desktop Chrome:

ARChon runtime lets you run unlimited number of Android APKs created with chromeos-apk on Chrome OS and across any desktop platform that supports Chrome.

The desktop version is unstable, and apps that need Google Play services run into problems. Still, think of it as a proof of concept.

In particular, note that this is Android Runtime for Chrome, not Android Runtime for Chrome OS. Google is targeting the browser, not the operating system. This means that ARC can, if Google chooses, become an Android runtime for every operating system where Chrome runs – with the exception, I imagine, of Chrome for iOS, which is really a wrapper for Apple’s web browser engine and cannot support NaCl, and Chrome for Android which does not need it.

Imagine that Google gets ARC running well on Windows and Mac. What are the implications?

The answer is that Android will become a cross-platform runtime, alongside others such as Flash (the engine in Adobe AIR) and Java. There has to be some performance penalty for apps written in Java for Android running in an Android VM in the browser; but NaCl runs native code and I would expect performance to be good enough.

This would make Android an even more attractive target for developers, since apps will run on desktop computers as well as on Android itself.

Might this get to the point where developers drop dedicated Windows or Mac versions of their apps, arguing that users can just run the Android version? An ARC app will be compromised not only in performance, but also in the way it integrates with the OS, so you would not expect this to happen with major apps. However, it could happen with some apps, since it greatly simplifies development.

Review: Acer C720 Chromebook and reflections on Chrome OS

When I saw the first announcement of Chrome OS I was amazed and wrote a breathless post:

I’m watching Google’s press briefing on the forthcoming Chrome OS. It is amazing. What Google is developing is a computer that answers several of the problems that have troubled users since the advent of the personal computer.

That was in November 2009. Unfortunately it has taken me a while to try a Chromebook (the generic name for a computer running Chrome OS) for myself; but I have been trying out an Acer C720 and what follows is in part a review of this machine, and in part some wider reflections on the Chrome OS and Chromebook concept.

image

In terms of hardware, a Chromebook is another take on the netbook idea: a small, light laptop but running Linux rather than Windows. The earliest netbooks also ran Linux but the mass market could not cope with it; Google has done what is necessary to make it work for non-technical people, not least by hiding almost all of the operating system other than the browser.

I have given detailed specifications at the end of this post, but in summary this is an 11.6″ traditional clamshell laptop/netbook with 1.4Ghz Intel Haswell processor, 2GB RAM and 16GB SSD. It weighs just 1.2Kg

It’s cheap. You can pick one up for just under £200 at Amazon; it’s smart looking and does not feel as cheap as it is.

At left we have power input, HDMI out, USB 3.0 port and a standard headset socket.

image

On the right there is an SD card slot, USB 2.0, and a lock attachment point.

image

You can get a touchscreen version for an additional £80 or so but it does not seem worth it to me.

When you turn on for the first time, you have to accept the Google agreement. You won’t read it all, but here is something you should note:

You acknowledge and agree that Google may stop (permanently or temporarily) providing the Services (or any features within the Services) to you or to users generally at Google’s sole discretion, without prior notice to you…

You acknowledge and agree that if Google disables access to your account, you may be prevented from accessing the Services, your account details, or any files or other content which is contained in your account.

More on this later.

You can sign in as guest, and use the device to browse the web, or you can sign in with a Google account. If you sign in as guest, none of your activity (including any files you download) will be preserved when you sign out. This is a nice feature for, literally, guests for whom you want to give internet access while protecting both your privacy and to some extent theirs.

Normally you will sign in with a Google account. If you have used Google’s Chrome browser, much will be familiar. What you get is the browser, which you can run full screen or in a resizable window, and a taskbar along the bottom which shows running apps, date and time, network connection, battery status, and notifications.

Local storage is accessible via a file browser. This gives access to a Downloads folder, Google Drive which is cloud storage but includes offline files that are available locally, and USB storage devices that you attach.

I attached a drive full of media files and was able to play MP4 video and FLAC audio without any problems. Some file types, such as PDF and Microsoft Office, open in the browser. This aspect can be disorienting; there is no Quit option, but you just close the browser tab when you are done.

At the left of the taskbar is an Apps button which you might think of as a Start button since it has the same purpose. Click it, and app shortcuts appear in a window. You can also press the Search key, which sits where you would expect to see Caps Lock.

image

A Chrome OS app is a web app, though it can take advantage of Chrome features like access to local storage or NaCl (Native Client), which lets you run compiled native code in the browser. NaCl is enabled by default.

I actually have a web app in the Chrome Store – apologies it is not very good, but it was a demonstration to support this how-to; it is really not difficult to adapt a web site though as ever, excellence is more challenging.

As an app platform, it would be wrong to think of a Chromebook as “crippled”, though it does require a change of mind-set if you are used to apps on Windows, OSX, iOS or Android. Apps are sandboxed, of course, and run in the browser, but native performance is possible and there are ways to access devices like the camera and local storage. Adobe Flash is also available. This is a physics demo using Native Client:

image

and this is an audio editor:

image

Can you get your work done? Probably, but if you are like me you will miss a few things like Microsoft Office or equivalent, or the Live Writer blog authoring tool (for which I have not found a good replacement on any platform). Of course you have full access to Google Docs, for browser-based document editing.

It also turns out that a Chromebook is a rather good Microsoft SkyDrive or Office 365 client. Perhaps it is just familiarity, but I prefer Office Web Apps to the Google Docs equivalents.

image

I did experience an oddity in Office 365. I clicked a link to a recently opened document, which was an URL to a .docx file. This should have opened the document in Word web app, but instead it opened in a beta of Quickoffice running as a Chrome extension. This is bad, since editing the document and hitting save opened a Save As dialog for the local drive, or Google Drive, not the SharePoint site, and when I tried a document including an image, it was reported as corrupt.

It is possible to do some coding on a Chromebook, for example using the rather good online scripting IDE at script.google.com. This is a debugging session using the example script, which creates a document in Google Apps and emails a link:

image

If you get stuck, there is always remote desktop to a Windows box as a fallback. There are several clients to choose from, of which I used 2X:

image

Although the Linux shell is hidden unless you enable developer mode, you can press Ctrl-Alt-T and open crosh (Chrome OS Shell), enabling simple network testing with ping as well as an ssh client. More features magically appear if you do enable developer mode.

image

Chromebook pros and cons

A Google Chromebook has several big advantages.

One, it’s safe; not entirely safe perhaps, but relatively immune from malware given that most users never get deeper into the operating system than the web browser, and therefore neither does anything else – though the machine is in fact hackable (in a good way) if you switch to Developer mode, and you can do things like getting shell access or installing Ubuntu if you want.

Second, it is good value. You are not paying for Windows or Office, and whatever deal Google makes with OEMs like Acer must be generous enough to allow for low prices.

It would actually make sense for Google to subsidise Chromebooks if it needed to, since they drive users to its services.

Third, a Chromebook is cloud-centric. If you lose it, or upgrade to a new machine, all your data will be there on Google’s cloud and you will hardly notice, with seamless sync of settings when you log in.

Fourth, Google and its hardware partners (in this case Acer) have done a good job. Sleep and resume works reliably – more so than any Windows machine I have known – and boot from cold takes seconds. Performance is fine, provided you have a strong internet connection.

There is no unwanted third-party software here unless you count Google’s own services; but if you did not want them you probably should not have bought a Chromebook. The out of box experience is good.

What are the annoyances? Here are a few.

The user interface is effective and not difficult to learn, though I do find that the screen fills with multiple tabs which is ugly and not that easy to navigate. You can float a browser window by dragging it down, in which case you get something that behaves as a new instance, and you can switch between instances with alt-tab.

Printing is awkward in that you have to set up Google Cloud Print and send your documents to Google and back even if the printer is right next to you.

Working offline is a problem but maybe not as bad as you have heard. The app store has a section devoted to apps that work offline, and you can create and edit documents offline other than spreadsheets, which are read-only. There is no problem with playing some videos or music from the built-in storage or from a USB drive when on the move and offline. If you are going to be offline a lot though, this is probably not the best choice.

Is this machine locked to Google? Maybe not as much as you would expect. There is no alternative web browser, but you can set your search engine to Bing, DuckDuckGo or anotehr if you prefer. Or you can enable developer mode and you install Linux, either in place of, or alongside Chrome OS. The two obvious choices are ChrUbuntu and Crouton, and setup is nicely explained here

http://www.kitware.com/blog/home/post/498

Does this machine breach your privacy? That is tough to answer; but it is worth noting that Chromebook offers, as far as I can tell, the same privacy settings that are in the Chrome browser. If you are happy using the Chrome browser in Windows or elsewhere, there is no reason not to be happy with a Chromebook from this perspective.

That said, this machine is committed to, on the one hand, cloud and web apps, and alongside that, the Google life. The two main objections to the Google life, it seems to me, are that Google’s business model depends on advertising and mining personal data for that purpose; and that it has been known for individuals to get locked out of their Google accounts for what might be arbitrary reasons whereupon comeback is difficult. It may be though that I worry too much, since this is uncommon, and trusting everything to Google is probably not high on the list of the most stupid things to do in IT.

Summing up

This is not a machine for every task. It is not a powerhouse, and in case you had not noticed, will not run apps other than browser apps. Either of those could be deal-breakers and might mean that you need a different device.

It is early days for laptops that run only browser apps, and there are areas of immaturity. Some file types are not supported or badly supported. The app store has limitations, and although there is a browser-based solution to most common tasks, it may not equal what can be done with a conventional app. The user interface is reasonable but utilitarian. Tastes vary, but personally I do not find Google Apps the equal of Microsoft Office yet, and I even miss Outlook, despite its many annoyances.

There are compromises then; but this is still a great little laptop, light and convenient, quick and responsive, and almost immune to PC-style problems and slowdowns.

In business or education, it is easy to see the attraction of a machine that is low maintenance and simple to replace if it breaks, provided that its capabilities match the tasks that are required.

The comparison with Windows RT is interesting and will be the subject of a separate post.

Watch this space. Chromebooks are already making inroads into the market for budget laptops, and in education, and I would expect this momentum to gather force as the platform matures.

Detailed specification:

  • Intel Celeron 2955U 1.4 GHz processor
  • 2GB RAM
  • SD card slot
  • 16GB SSD
  • 11.6″ 1366 x 768 TFT screen
  • Intel GMA HD Graphics
  • Webcam and Microphone
  • 3.5mm headset socket
  • HDMI out, 1USB 3.0, 1 USB 2.0
  • Wireless: 802.11a/b/g/n, Bluetooth 4.0 +HS (High Speed)
  • 3950 mAh battery, quoted 8.5 hr battery life
  • Weight: 1.25 Kg

Platform Wars: Google injects Chrome OS into Windows, never mind the poor users

Google announced its Chrome browser in September 2008. Its stated goal was to run web applications better:

What we really needed was not just a browser, but also a modern platform for web pages and applications, and that’s what we set out to build.

Chrome was a hit, thanks to easy install, fast performance, and Google’s ability to advertise it on its own search pages and web applications (as well as some deals with OEM Windows vendors). Today, Chrome is the most popular browser worldwide, according to figures from Statcounter covering desktop, tablet and console browsers:

image

That’s 43.64% versus 22.76% for Microsoft Internet Explorer in second place and 18.9% for Firefox in third.

Most of those users are on Windows. Statcounter also reports that Windows worldwide has a 79.1% market share worldwide – not quite dead – though Windows 8 has a measly 7.29% share, just behind OS X.

Note that these figures are for usage, not current sales, which is one reason why Google’s Chrome S is lost somewhere in “other”.

Today though we are seeing the force of Google’s intention to introduce a “modern platform for web pages and applications”. Chrome version 32, which comes as an automatic update for most users, no longer has the look and feel of Windows. It has thin scroll bars that lack the standard single-step arrows:

image

If you choose the new “Windows 8 mode” which you will find on the Chrome menu, you get something which is neither like desktop Windows, nor like Windows 8. Instead, it is ChromeOS, injected into Windows.

image

Chrome’s “Windows 8” mode only works if you set it as the default browser, and if you choose the Windows 8 mode you lose the desktop version until you select “Relaunch Chrome on the desktop” from its menu.

image

What is the effect of “Windows 8 mode”? It has several advantages for Google:

  • It serves as an introduction to Chrome OS, increasing the chance of selling a Chrome OS device (Chromebook) that does not run Windows at all
  • It hides the desktop, making it more likely that you will choose a Google web app rather than a desktop or Windows 8 app for your next task

However, considered as a “modern” style Windows 8 app, it is poor. It is not touch friendly, it is multi-window, and it ignores the conventions of Windows 8 apps – this is really Chrome OS, remember.

Users are not impressed. The thing they hate most is losing the paging arrows on the scroll bars. Check the long comment thread here. For example:

This is ridiculous, and the "just deal with it" from some developers is really grating. I am -terrified- of when my Chrome will update because even using this page now I’ve used the sidebar & steppers. I have vision problems and I fear this update will make Chrome unusable for me. I’m using Windows and should have my scrollbar harmonised with Windows instead of an operating system I do not use.

This is a strategic move though and unlikely to change. Here are the key official statements in that thread. Here:

This is because we’re switching to the chromeos style. Passing to review-ui to make sure they are ok with this.

and here:

There is no easy way to go back to the previous scrollbars. There was a big change in the graphics stack from chrome 31 to chrome 32 which meant to unify 3 platforms: windows, chromeos and linux and that includes a shared widget theme.

Chrome may lose a few users to IE or Firefox, but it takes lot to get people to switch browsers.

The purpose of this post is to highlight Google’s strategy, rather than to pass judgement on whether or not it is a bad thing. It is part of a strategy to kill the Windows ecosystem, oddly echoing Microsoft’s own strategy of “Embrace, Extend, Extinguish”:

"Embrace, extend, and extinguish", also known as "Embrace, extend, and exterminate", is a phrase that the U.S. Department of Justice found was used internally by Microsoft o describe its strategy for entering product categories involving widely used standards, extending those standards with proprietary capabilities, and then using those differences to disadvantage its competitors.

says Wikipedia.

Speaking personally though, if I am running Windows then I want to take full advantage of Windows, not to have it morph into another OS to suit the goals of a competitor.

Google forks WebKit into Blink: what are the implications?

Yesterday Google announced that it is forking WebKit to create Blink, a new rendering engine to be used in its Chrome browser:

Chromium uses a different multi-process architecture than other WebKit-based browsers, and supporting multiple architectures over the years has led to increasing complexity for both the WebKit and Chromium projects. This has slowed down the collective pace of innovation – so today, we are introducing Blink, a new open source rendering engine based on WebKit.

Odd that not long ago we were debating the likelihood and merits of WebKit becoming the de facto standard for HTML. Now Google itself is arguing against such a thing:

… we believe that having multiple rendering engines—similar to having multiple browsers—will spur innovation and over time improve the health of the entire open web ecosystem.

Together with the announcement from Mozilla and Samsung of a new Android browser which, one assumes, may become the default browser on Samsung Android phones, there is now significant diversity/competition/fragmentation in the browser market (if you can call it a market when everything is free).

The stated reason for the split concerns multi-process architecture, with claims that Google was unwilling to assist with integrating Chromium’s multi-process code into WebKit:

Before we wrote a single line of what would become WebKit2 we directly asked Google folks if they would be willing to contribute their multiprocess support back to WebKit, so that we could build on it. They said no.

At that point, our choices were to do a hostile fork of Chromium into the WebKit tree, write our own process model, or live with being single-process forever. (At the time, there wasn’t really an API-stable layer of the Chromium stack that packaged the process support.)

Writing our own seemed like the least bad approach.

Or maybe it was the other way around and Apple wanted to increase its control over WebKit and optimize it for the OSX and iOS rather than for multiple platforms (which would be the Apple way).

It matters little. Either way, it is unsurprising that Apple and Google find it difficult to cooperate when Android is the biggest threat to the iPhone and iPad.

The new reality is that WebKit, instead of being a de facto standard for the Web, will now be primarily an Apple rendering engine. Chrome/Chromium will be all Google, making it less attractive for others to adopt.

That said, several third parties have already adopted Chromium, thanks to the attractions of the Chromium Embedded Framework which makes it easy to use the engine in other projects. This includes Opera, which is now a Blink partner, and Adobe, which uses Chromium for its Brackets code editor and associated products in the Adobe Edge family.

The benefit of Blink is that diverse implementations promote the importance of standards. The risk of Blink is that if Google further increases the market share of Chrome, on desktop and mobile, to the point where it dominates, then it is in a strong position to dictate de-facto standards according to its own preferences, as suggested by this cynical take on the news.

The browser wars are back.

Adobe using Google Chromium Embedded Framework for Edge tools

Adobe has published a mission statement which is worth a read if only to demonstrate how far the company has moved away from Flash, once positioned at the heart of its ecosystem – remember the Flash Platform?

The mission statement essentially declares the web as the new heart of Adobe’s platform and it is working to bring HTML, CSS and JavaScript up to the level of richness and interactivity that is possible in Flash.

This even extends to apps and applications, and I was interested in this statement:

The web platform also lives outside of browsers. It’s used by apps, particularly on mobile devices, where the richness of the web platform makes it possible to deliver great user experiences. Adobe will continue to invest in the Apache Cordova project, and Adobe’s distribution of it, Adobe PhoneGap™. When appropriate, Adobe is using the web platform to build tools and services. For example, Brackets, Edge Code and Edge Reflow are built using HTML, CSS and JavaScript using the CEF open source project, to which Adobe is contributing.

CEF is the Chromium Embedded Framework, which is a web browser control based on the open source version of Google’s Chrome browser. It is a C/C++ project but third parties have created wrappers for .NET, Delphi, Java and Python.

It is not long ago that Adobe would be looked to AIR, based on Flash, for a project like this. Incidentally, AIR is also able to host a WebKit-based browser control so would have been viable. Using CEF means getting to use Google’s V8 JavaScript engine rather than ActionScript.

Mozilla CEO fearful of closed mobile platforms. So what next for Mozilla and Firefox?

What next for Mozilla? Tristan Nitot, president of Mozilla Europe, posts about some of the issues facing the open source browser project and Foundation. His list is not meant to be a list of problems for Mozilla exactly, but it does read a bit like that, especially the third point:

Google marketing budgets for Chrome are much larger than Mozilla’s annual revenue.

though he does not mention how much of Mozilla’s income actually comes from Google. The Foundation’s last published figures are from 2009, and show that most of Mozilla’s income is from deals with search providers, and while it is not specified, both common sense and evidence from previous years tells us that most of that is from Google.

Chrome is a mighty competitor on the PC, but here at least Mozilla has a large and established base of users. That is not so on mobile, and this is even more challenging, as Nitot notes:

In the mobile space, not all platforms enable the user to choose what Web browser to use. This trend may also be coming to the PC world with Chrome OS, which only runs Chrome.

He also refers to a recent interview in which CEO Ben Kovacs talks about why there is no Firefox for Apple iOS:

The biggest challenge is to get access to the lowest level of the device, these open platforms are not quite open, which is why we are worried about it, you don’t have the true open web.

He adds:

It frightens me, it frightens me from a user point of view, I am not allowed to choose.

It is hard to see how Safari will not always be the browser for iOS, and while Mozilla has better chances on Android, it is hard to see how Google’s stock browser will not always dominate there.

At a browser engine level, Mozilla has lost out to WebKit, which is used by Apple Safari, Google Chrome, RIM Playbook and HP WebOS. Microsoft’s Windows Phone 7 uses Internet Explorer.

What can Mozilla do? Well, it seems that Mozilla executives have in mind to go beyond the browser into the world of apps. Kovacs hints at this in the interview above. In another post, the Chair of the Foundation Mitchell Baker says:

… the browser is no longer the only way people access the Internet. People also use more focused “apps” to do discrete tasks, and often feel a strong sense of attachment to the apps and the app model. This is an exciting addition. Mozilla should embrace some aspects of the current app model in addition to the browser model.

Therefore we find Firefox Home in Apple’s App Store:

image

That said, it is not clear to me what sort of major contribution Mozilla can make in the app world, and the transition from browser company to app company would be a difficult one to pull off.

I cannot escape the thought that Mozilla’s time is passing. Its success was built not only on an excellent browser, but also on widespread dissatisfaction with Microsoft’s Internet Explorer and the stifling effect it was having on the progress of web standards. Firefox was a better browser, and gained disruptive momentum. In Germany Firefox currently has a 55% market share, according to Statcounter.

However, while Firefox is still a great desktop browser, Google and WebKit between them are now strongly advancing web standards, and even Microsoft is now talking up HTML 5. Mozilla has largely achieved its goal, leaving it now with an uncertain purpose.

It is good for web standards to have a powerful independent non-profit foundation, rather than having commercial giants like Google and Apple dominate, but in the end this has to be paid for either by a business model, or by sponsors. In this latter respect, IBM’s withdrawal of funding for Firebug author John Barton is not a good sign.

In retrospect, Mozilla was too slow to embrace mobile; but most of the developments which are now impacting the Foundation are outside its control. On a day when Apple has announced breathtaking profits, it is worth noting Kovacs remarks about the chilling effects of closed platforms on Mozilla’s work.

Hands on debugging an Azure application – what to do when it works locally but not in the cloud

I have been writing a Facebook application hosted on Microsoft Azure. I hit a problem where my application worked fine on the local development fabric, but failed when deployed to Azure. The application was not actually crashing; it just did not work as expected. Specifically, either the Facebook authentication or the ASP.NET Forms Authentication was failing; when I tried to log on, the log on failed.

This scenario, where the app works locally but not on Azure, is potentially a bad one because you do not have the luxury of breakpoints and variable inspection. There are several approaches. You can have the application write a log, which you could download or view by using Remote Desktop to the Azure instance. You can have the application output debug messages to HTML. Or you can use IntelliTrace.

I tried IntelliTrace. It is easy to set up, just check the box when deploying.

image

Once deployed, I tried the application. Clicked the Log On button, after which the screen flashed but still asked me to Log On. The log on had failed.

image

I closed the app, opened Server Explorer in Visual Studio, drilled down into the Windows Azure Compute node and selected View IntelliTrace Logs.

image

The logs took a few minutes to download. Then you can view is the IntelliTrace log summary, which includes a list of exceptions. You can double-click an exception to start an IntelliTrace debug session.

image

Useful, but I still could not figure out what was wrong. I also found that IntelliTrace did not show the values for local variables in its debug sessions, though it does show exceptions in detail.

Now, if you really want to debug and trace an Azure application you had better read this MSDN article which explains how to create custom debugging and trace agents and write logs to Azure storage. That seems like a lot of work, so I resorted to the old technique of writing messages to HTML.

At this point I should mention something you must do in order to debug on Azure and remain sane.  This is to enable WebDeploy:

image

It is not that hard to set up, though you do need to enable Remote Desktop which means a trip to the Azure management portal. In my case I am behind a firewall so I needed to configure Web Deploy to use the standard SSL port. All is explained here.

Why use Web Deploy? Well, normally when you deploy to Azure the service actually builds, copies and spins up a new virtual machine image for your app. That process is fundamental to Azure’s design and means there are always at least two copies of the VM in existence. It is also slow, so if you are making changes to an app, deploying, and then testing, you will spend most of your time waiting for Azure.

Web Deploy, by contrast, writes to your existing instance, so it is many times quicker. Note that once you have your app working, it is essential to deploy it properly, since Azure might revert your app to the last VM you created.

With Web Deploy enabled I got back to work. I discovered that FormsAuthentication.SetAuthCookie was not working. The odd thing being, it worked locally, and it had worked in a previous version deployed to Azure.

Then I began to figure it out. My app runs in a Facebook canvas. Since the app is served from a different site than Facebook, cookies may be rejected. When I ran the app locally, the app was in a different IE security zone, so different rules applied.

But why had it worked before? I realised that when it worked before I had used Google Chrome. That was it. IE worked locally; but only Chrome worked when deployed.

I have given up trying to fix the specific problem for the moment. I have dug into it a little, and discovered that cookie handling in a Facebook canvas with IE is a long-standing problem, and that the Facebook C# SDK may have bugs in this area. It is not essential for my sample; I have found I can get by with the Facebook session. To get the user ID, for example:

FacebookWebContext.Current.Session.UserId

The time has not been wasted though as I have learned a bit about Azure debugging. I was also amused to discover that my Azure VM has activation problems:

image

Chromebook: web applications put to the test, and by the way no Java

Yesterday Google announced the availability of the first commercial Chromebook, a Linux computer running the Chrome browser and not much else. There are machines from Acer and Samsung which are traditional laptop/netbook clamshell designs, with an Intel Atom dual core processor, 16GB solid state storage, and a 12.1” screen. Price will be a bit less than $400, or organisations can subscribe from $28 or €21 per month in which case they get full support and hardware replacement. There are wi-fi and 3G options. Nobody is going to be excited about the hardware.

image

The Chromebook may be the most secure computer available, if Google has got it right. The OS is inaccessible to the user and protected from the browser, and system patching is automatic.

The strength and weakness of the Chromebook is that is only runs web applications – the only exception being utilities that Google itself supplies. Are we ready for a computer that is little use offline? I am not sure; but this will be an interesting experiment.

The Chromebook is a compelling alternative to a traditional PC with its susceptibility to malware and dependence on locally installed applications and data. If you lose your PC, getting a new one up and running can be a considerable hassle, though large businesses have almost cracked the problem with system images and standard builds. Lose a Chromebook, and you just get another one and sign in.

You sign into Google of course, and that is a worry if you would rather not be dependent on a single corporation for your digital identity and a large chunk of your data.

The problem for the Chromebook is that Apple’s iPad and numerous Google Android tablets and netbooks offer security that is nearly as good, and local applications as well as web applications, for a not dissimilar cost. These devices are also easy to restore if they break or go missing, slightly less so than a Chromebook but not much.

The choice looks a bit like this:

  1. Chromebook: Web applications only
  2. iPad/Android: Web applications and local apps

Put like that, it is difficult to see the advantage of the Chromebook. The subscription scheme is interesting though; it is a new business computing model that brings the cloud computing principle of operating expenditure instead of capital expenditure to the desktop.

The offline issue may be the worst thing about a Chromebook. When I travel, I frequently find myself without a good internet connection. The word “offline” does not feature in either the consumer or business frequently asked questions – a question Google would rather you did not ask?

Yet there is 16GB storage on board. That is a lot. In theory, HTML 5 local storage should solve the offline problem, but few web apps, including Google’s own, make this seamless yet.

A few other observations. While there are no user-installable client apps, Google is adding some utilities.

VPN is coming:

We’ve heard from our pilot customers that VPN is an important feature for businesses and schools, and we’re working very hard to bake this into Chromebooks soon. Support for some VPN implementation is already in the product and we’ll both extend support for more VPNs and get these features to stable soon.

Remote desktop access is coming:

we are developing a free service called Chromoting that will enable Chrome notebook users to remotely access their existing PCs and Macs.

Apparently this is based on Citrix Receiver.

There is a bias towards Adobe Flash:

Chromebooks have Flash support built-in, but they do not support Java or Silverlight.

Another blow for Java on the client.

Browser wars heat up as Firefox 4 arrives

Just one week after the final release of Microsoft’s Internet Explorer 9, and here comes another major browser, Mozilla Firefox 4.

What’s new in Firefox? Performance, for one thing. There is a new JavaScript engine called JägerMonkey which is more effective than the old TraceMonkey – though TraceMonkey is still there – and there is hardware-accelerated graphics on Windows Vista and Windows 7 using Direct2D, and on Windows and Mac Direct3D or OpenGL are used to speed page composition.

On the appearance side, Mozilla has streamlined the user interface with tabs above the address bar, sorry Awesome Bar, and reduced the number of buttons. By default there are no menus visible, and you are meant to use the Firefox button at top left:

image

I was disconcerted not to find the Tools menu here and one of the first things I did was to show the menu bar, though it does spoil the new UI design.

Firefox is also coming to Android and Maemo devices, and a great feature called Sync will synchronize bookmarks, tabs, passwords and history across all the devices you use.

There is also a new privacy feature called Do not track. This is a way of telling websites that you do not wish to be tracked. Tracking is used by web advertisers to send ads based on your browsing history as seen by that advertiser. Since many websites have scripts served by the same ad agency, this can be considerable. The feature does not block tracking, but only requests not to be tracked. It is off by default and buried in Advanced options, so will probably not be very effective.

image

Firefox is an excellent browser, with many more features than I have mentioned above. A few observations though.

The new features in Firefox 4 echo many of the few features in Internet Explorer 9, which in turn echoes some of the themes in Chrome. However on my system IE9 seems to be a little faster than Firefox 4, the user interface is more polished in my opinion, and the tracking protection in IE9 is more effective since it does actually block tracking.

Then again, there are Firefox add-ons that also block tracking; and in general Firefox seems to have the best range of available add-ons, which could well be the deciding factor for many users.

Firefox 4 still has a separate search box, and in principle I like this. I find it annoying that IE9 and Chrome intermingle searches and URLs in one box. I suspect though that I am in a minority of users. If you switch between browsers, you can find yourself typing searches in the Awesome Bar anyway, though habit, so I am guessing Mozilla will cave in and combine them eventually.

Mozilla is a non-profit organisation with a strong open source and community ethos and that also may be enough reason to use Firefox.

It does face intense competition now though, and it must be a concern that its income comes largely from:

search functionality included in our Firefox product through all major search partners including Google, Yahoo, Yandex, Amazon, Ebay and others.

which in practice is mostly from Google, which has a competing browser.

Personally I think Mozilla will struggle to maintain market share for Firefox; though version 4 is having a good launch complete with a delightful Twitter party

image

and a pretty download stats counter which is currently on 2.75 million and climbing fast.

image