Category Archives: development

Imagination at Mobile World Congress 2015: what is the strategy?

At MWC earlier this month I met with Imagination, best known for its PowerVR video design but also now the owner of the MIPS CPU. Apple is a shareholder and uses Imagination video technology in the iPhone and iPad. This market is highly competitive though, especially since ARM has its own Mali GPU. “You need complete platforms, you need a processor,” Tony King-Smith, executive VP of Technology Marketing, told me. “All the markets that matter to us are integrating towards a single chip. For a single chip you need some mix of central processing, communications, and multimedia.”

MIPS is a supported CPU for Android 2.3 or higher but most Android devices run ARM or Intel CPUs. Why no MIPS devices at MWC?

“There is one and a half to two years between a licensee picking up the IP, and delivering silicon based on it,” an Imagination’s spokesperson said. “We are engaged with customers but until something shows up we cannot disclose any names. Next year we are going to see some progress and potentially something I can show you.” Watch this space then.

What is Imagination’s strategy overall? King-Smith told me that the company is well placed to satisfy the need for optimisation and differentiation in an increasingly mature mobile market. It is also eyeing the IoT (Internet of things) space with interest. “Wearables need completely new architectures,” said King-Smith. “Not just tweaking a mobile chip. That’s where we’re going.”    

I was also interested to see a real demo of Vulkan, the successor to OpenGL, on the Imagination stand, based on the preliminary specification. “It will enable people to make more use of our platform”, said King-Smith, because of the lower level access it offers to the GPU.

image_thumb[10]

For more on Vulkan see this piece on the Reg.

What about the Creator board which Imagination has released, a low-priced starter kit along the lines of Raspberry Pi but of course with MIPS and more powerful graphics? It is an effort to build the ecosystem, said King-Smith. “It is a means for us to deliver our IP and make it easier for developers to engage with us. We also want to enable start-ups and new solutions.” It is primarily for developing and testing ideas, then, but if you want to go into production with it, that is fine too. “That board has been designed to ramp in volume,” King-Smith told me.

So that was 2014: Samsung stumbles, all change for Microsoft, Sony hack, more cloud, more mobile

What happened in 2014? One thing I did not predict is that Samsung lost its momentum. Here are Gartner’s figures for global smartphone sales by vendor, for the third quarter of 2014:

image

Samsung is still huge, of course. But in 2013, Samsung seemed to be in such control of its premium brand that it could shape Android as it wished, rather than being merely an OEM for Google’s operating system. In the enterprise, Samsung KNOX held promise as a way to bring security and manageability to Android, but only in Samsung’s flavour. Today, that seems less likely. Market share is declining, and much of KNOX has been rolled into Android Lollipop. What is going wrong? The difficulty for Samsung is how to differentiate its products sufficiently, to avoid bleeding market share to keenly priced competition from vendors such as Xiaomi and Huawei. This is difficult if you do not control the operating system.

What of the overall mobile OS wars? 2013 brought few surprises: the Apple/Android duopoly continued, Blackberry further diminished its share, and Windows Phone struggles on, though it was not looking good for Microsoft’s OS as 2013 closed; the Nokia acquisition may have been fumbled.

All change at Microsoft

That brings me to Microsoft, a company I watch closely. 2014 saw Satya Nadella appointed as CEO and several strategic changes, though the extent to which Nadella introduced those changes is uncertain. What changes?

Office is going truly cross-platform, with first-class support for iOS and Android. I covered this recently on the Register; the summary is that there will be mobile versions of Office for iOS, Android and Windows (this last a Store app) with similar features, and that more and more of the functionality of desktop Office will turn up in the mobile versions. I learned from my interview with Technical Product Manager Kaberi Chowdhury that ODF (Open Document) support is planned, as is some level of programmability.

The plans for Office are a clue to the company’s wider strategy, which is focused on cloud and server. Key products include Office 365, Windows Azure, Active Directory (and Azure Active Directory), SQL Server, SharePoint, and System Center as a management tool for hybrid cloud.

The Windows client strategy is to bring back users who disliked Windows 8 with a renewed focus on the desktop in the forthcoming Windows 10, while retaining the Store app model for apps that are secure, touch-friendly, and easily deployed. It is still not clear what Windows 10 phones and tablets will look like, but we can expect convergence; no more Windows RT, but perhaps tablets running Windows Phone OS that are in effect the next generation of Windows RT without a desktop personality.

The company will also hedge its bets with full app support for Office and its cloud services on iOS and Android, and in doing so will make its Windows mobile offerings less compelling.

Microsoft’s developer tools are changing in line with this strategy. The next generation of .NET is open source and cross-platform on the server side, for Windows, Mac and Linux. Xamarin plugs the gap for .NET on iOS and Android, while Microsoft is also adding native support (not .NET based) for cross-platform mobile in the next Visual Studio.

These are big changes to the developer stack, and Microsoft is forking .NET between the continuing Windows-only .NET Framework, and the new cross-platform .NET Core. Developers have many questions about this; see this interview on the Register for what I could glean about the current plans. Watch our for the Build conference at the end of April when the company will attempt to put it all together into a coherent whole for developers targeting either Windows 10, or cloud apps, or cloud services with cross-platform mobile clients.

This entire strategy is a logical progression from the company’s failure in mobile. Can it now succeed with client apps running on platforms controlled by its competitors? Alternatively, is there hope that Windows 10 can keep businesses hooked on Windows clients? Maybe 2015 will bring some answers, though with Windows 10 not expected until towards the end of the year there will be a long wait while iOS, Android and even Chrome OS (the operating system of Chromebook) continue to build.

A side effect is that C# now has a better chance of building a cross-platform user base, rather than being a Windows language. This has already happened in game development, thanks to the use of Mono and C# in the popular Unity game engine. Could it also happen with ASP.NET, deployed to Linux servers, now that this will be officially supported? Or is there little room for it alongside Java, PHP, Ruby, Node.js and the rest? 

The puzzle with Microsoft is that there is still too much mediocrity and complacency that damages the company’s offerings. How can it expect to succeed in the crowded wearable market with a band that is uncomfortable to wear? There is still an attitude in some parts of the company that the world will be happy to put up with problems that might be fixed in a future version after some long interval. Then again, the Azure team is doing great things and Windows server continues to impress. Win or lose, there will be plenty of Microsoft news this year.

A theme for 2015: cloud optimization

Late last year I attended Amazon’s re:Invent conference in Las Vegas; I wrote this up here. The key announcement for me was Amazon Aurora, a MySQL clone, not so much because of its merits as a cloud database server, but more because it represents a new breed of applications that are designed for the cloud. If you design database storage with the knowledge that it will only ever run on a huge cloud-scale infrastructure, you can make optimizations that cannot be replicated on smaller systems. I tried to summarize what this means in another Register piece here. The fact that this type of technology can be rented by any of us at commodity prices increases the advantage of public cloud, despite reservations that many still have concerning security and control. It also poses a challenge for companies like Oracle and Microsoft whose technology is designed for on-premises as well as cloud deployment; they cannot achieve the same advantage unless they fork their products, creating cloud variants that use different architecture.

The Sony hack

The cyber invasion of Sony Pictures in late November was not just another hack; it was a comprehensive takedown in which (as far as I can tell) the company’s entire IT systems were entirely compromised and significantly damaged.

According to this report:

Mountains of documents had been stolen, internal data centers had been wiped clean, and 75 percent of the servers had been destroyed.

Most IT admins worry about disaster recovery (what to do after catastrophic system failure such as a fire in your data center) as well as about security (what to do if hackers gain access to sensitive information). In this case, both seemed to happen simultaneously. Further, as producing movies is in effect a digital business, the business suffered loss of some of its actual products, such as the unreleased “Annie”.

The incident is fascinating in itself, especially as we do not know the identity of the hackers or their purpose, but what interests me more are the implications.

Specifically, how many companies are equally at risk? It seems clear that Sony’s security was towards the weak end of the scale, but there is plenty of weak security out there, especially but not exclusively in smaller businesses.

With the outcome of the Sony hack so spectacular, it is likely that there will be similar efforts in 2015, as well as many businesses looking nervously at their own practices and wondering what they can do to protect themselves.

Cloud may be part of the answer though even if the cloud provider does security right, that is no guarantee that their customers do the same.   

Looking back on looking back

Here is what I wrote a year or so ago, Reflecting on 2013- the year of not the PC, no privacy, and the Internet of Things. Most of it still applies. I have not achieved any of the three goals I set for myself though. Maybe this year…

Amazon Reinvent: new products announced including Aurora database with claimed performance 5 times that of MySQL

Amazon is holding its third Reinvent conference in Las Vegas – 13,500 attendees catching up on Amazon’s Web Services platform. In this morning’s keynote, Amazon’s Senior VP of cloud services Andy Jassy evangelised the platform and announced a number of new services which, in typical Amazon style, are now available in preview.

image

Amazon is well ahead of its competitors in cloud services, in terms of market share and mindshare, and Jassy had no problems reeling off impressive statistics and case studies. A slide showing that AWS is not only larger but also growing faster yea-on-year than its competition prompted a small protest. Microsoft claims that Amazon understated its rate of growth:

cloudwars

The refrain from those who spoke on behalf of companies such as Intuit (which intends to move 100% of its applications to AWS) was that no alternative cloud provider could offer a realistic alternative to AWS. With the progress being made by competitors I wonder for how long this will be true – and bear in mind that this is an Amazon conference – but it testifies to the dominance that Amazon has achieved.

Jassy made a key point about security and compliance. The relative security of public cloud versus private datacenters has long been debated, initially on the assumption that computing resources you own and guard yourself must be more secure than those hosted by third-parties. The counter is that few organisations can afford the level of security that big public cloud providers can achieve. Jassy’s point though was that the number of certifications now achieved by AWS is now such that security and compliance is now a driver towards cloud computing.

The main news though was a series of product announcements:

Aurora relational database: a MySQL compatible database as a service for which Jassy claims 5x the performance of MySQL. He says that businesses stick with commercial, proprietary database managers because open source solutions lack the performance, but that Aurora now provides a solution at a commodity price. Unfortunately Aurora is not going to help those with applications locked into Oracle, SQL Server or others. Still, 5x performance is always welcome.

CodeDeploy: apparently based on a service Amazon uses internally, this is a deployment tool for pushing out updated applications to EC2 (Elastic Compute Cloud) VMs without downtime.

CodeCommit: a source code management service for Git repositories.

CodePipeline: automate your software release by defining a workflow of tests and approvals.

Key Management Service: if you manage encrypted data you will be familiar with the hassles of managing and rotating encryption keys. Here is a service to manage that.

AWS Config: A discovery service for the AWS resources you are using.

Service Catalog: a custom portal for users to browse and use AWS resources offered by an organisation.

This was day one; there is another keynote tomorrow and there may be more announcements.

There is no doubting the momentum behind AWS, and according to Jassy, there is still a long way to grow. Towards the end of the keynote he talked about businesses moving entire datacenters to AWS, for example when leases expire, and in the press Q&A session later he expressed the belief that eventually few companies will operate their own datacentres; he does not see much future for private cloud – in the sense of self-managed clouds on your own infrastructure. That is of course what you would expect Amazon to say.

Partnerships are key in this industry and I was interested to note the Reinvent sponsors:

image

The Diamond sponsors (who I presume have paid the most) are Accenture, Cloudnexa (AWS consultants), CSC (also consultants), Intel (I guess Amazon buys a lot of CPUs), Trend Micro and twilio (who must me doing well to be on this list).

Microsoft takes its .NET runtime open source and cross-platform, announces new C++ compilers for iOS and Android: unpacking today’s news

Microsoft announced today that the .NET runtime will be open source and cross-platform for Linux and Mac. There are a several announcements and it is potentially confusing, so here is a quick summary.

The .NET runtime, also known as the CLR (Common Language Runtime) is the virtual machine that runs Microsoft’s C#, F# and Visual Basic .NET languages, performing just –in-time compilation to native code and providing interop between the application code and the operating system APIs. It is distinct from the .NET Framework, which is the library of mostly C# code that underlies application platforms like ASP.NET, Windows Presentation Foundation (WPF), Windows Forms, Windows Communication Foundation and more.

There is is already a cross-platform version of .NET, an open source project called Mono founded by Miguel de Icaza in 2001, not long after the first preview release of C# in 2000. Mono runs on Linux, Mac and Windows. In addition, de Icaza is co-founder of Xamarin, which uses Mono together with its own technology to compile C# for iOS, Android and Mac OS X.

Further, some of .NET is already open source. At Microsoft’s Build conference earlier this year, Anders Hejlsberg made the Roslyn project, the compiler for the next generation of the .NET Runtime, open source under the Apache 2.0 license. I spoke to Hejlsberg about the announcement and wrote it up on the Register here. Note the key point:

Since Roslyn is the compiler for the forthcoming C# 6.0, does that mean C# itself is now an open source language? “Yes, absolutely,” says Hejlsberg.

What then is today’s news? Blow by blow, here are what seems to me the main pieces:

  • The CLR itself will be open source. This is the C++ code from which the CLR is compiled.
  • Microsoft will provide a full open source server stack for Mac and Linux including the CLR. This will not include the frameworks for client applications; no Windows Forms or WPF. Rather, it is the “.NET Core Runtime” and “.NET Core Framework”. However Microsoft is working with the Mono team which does support client applications so there could be some interesting permutations (bear in mind that Mono also has its own runtime). However Microsoft is focused on the server stack.
  • Microsoft will release C++ frameworks and compilers for iOS and Android, using the open source Clang (C and C++ compiler front-end) and LVVM (code generation back end), but with Visual Studio as the IDE. If you are targeting iOS you will need a Mac with a build agent, or you can use a cloud build service (see below). The Android compiler is available now in preview, the iOS compiler is coming soon. “You can edit and debug a single set of C++ source code, and build it for iOS, Android and Windows,” says Microsoft’s Soma Somasegar, corporate VP of the developer division.
  • Microsoft has a new Android emulator for Windows based on Hyper-V. This will assist with Android development using Cordova (the HTML and JavaScript approach also used by PhoneGap) as well as the new C++ option.

    image

  • The next Visual Studio will be called Visual Studio 2015 and is now available in preview; download it here.
  • There will be a thing called Connected Services to make it easier to code against Office 365, Salesforce and Azure
  • A new edition of Visual Studio 2013, called the Community Edition, is now available for free, download it here. The big difference between this and the current Express editions is first that the Community Edition supports multiple target types, whereas you needed a different Express edition for Web applications, Windows Store and Phone apps, and Windows desktop apps.  Second, the Community Edition is extensible so that third parties can create plug-ins; today Xamarin was among the first to announce support. There may be some license restrictions; I am clarifying and will update later.
  • New Cloud Deployment Projects for Azure enable the cloud infrastructure associated with a project to be captured as code.
  • Release Management is being added to Visual Studio Online, Microsoft’s cloud-hosted Team Foundation Server.
  • Enhancements to the Visual Studio Online build service will support builds for iOS and OS X
  • Visual Studio 2013 Update 4 is complete. This is not a big update but adds fixes for TFS and Visual C++ as well as some new features in TFS and in GPU performance diagnostics.

The process by which these new .NET projects will interact with the open source community will be handled by the .NET Foundation.

What is Microsoft up to?

Today’s announcements are extensive, but with two overall themes.

The first is about open sourcing .NET,  a process that was already under way, and the second is about cross-platform.

It is the cross-platform announcements that are more notable, though they go hand in hand with the open source process, partly because of Microsoft’s increasingly close relationship with Mono and Xamarin. Note that Microsoft is doing its own C++ compilers for iOS and Android, but leaving the mobile C# and .NET space open for Xamarin.

By adding native code iOS and Android mobile into Visual Studio, Microsoft is signalling real commitment to these platforms. You could interpret this as an admission that Windows Phone and Windows tablets will never reach parity with their rivals, but it is more a consequence of the company’s focus on cloud, and in particular Office 365 and Azure. The company is prioritising the promotion of its cloud services by providing strong tooling for all major client platforms.

The provision of new Microsoft server-side .NET runtimes for Mac and Linux is a surprise to me. The Mac is not much used as a server but very widely used for development. Linux is an increasingly important operating system within the Azure cloud platform.

A side effect of all this is that the .NET Framework may finally fulfil its cross-platform promise, something Microsoft suppressed for years by only supporting it on Windows. That is good news for those who like programming in C#.

The .NET Framework is changing substantially in its next version. This is partly because of the Roslyn compiler, which is itself written in C# and opens up new possibilities for rich refactoring and code transformation; and partly because of .NET Core and major changes in the forthcoming version of ASP.NET.

Is Microsoft concerned that by supporting Linux it might reduce the usage of Windows Server? “In Azure, Windows and Linux are a core part of our platform,” Somesegar told me. “Helping developers by providing a good set of tools and letting them decide what server they run on, we feel is all goodness. If you want a complete open source platform, we have the tools for them.”

How big are these announcements? “I would say huge,”  Somasegar told me, “What is shows is that we are not being constrained by any one platform. We are doing more open source, more cross-platform, delivering Visual Studio free to a broader set of people. It’s all about having a great developer offering irrespective of what platform they are targeting or what kind of app they are building.”

That’s Microsoft’s perspective then. In the end, whether you interpret these moves as a sign of strength or weakness for Microsoft, developers will gain from these enhancements to Visual Studio and the .NET platform.

Writing for The Register

Since the beginning of October I have been working two days a week for The Register. I am still freelance for the other three days so also available for other work.

Why the Register? I have been contributing for some years and there are several things I like about the publication. It is known of course for its attention-grabbing headlines but you will also find solid technical content there; it was one of the first sites to report the Linux Shellshock bug, for example, and did so in detail with strong follow-up posts, making the site a good one for admins to follow. There is also a strong developer readership which is good from my perspective. Editorially it is diverse and you will find plenty of different opinions expressed by the staff and contributors, which I consider a strength. Organisationally, The Register is refreshingly unbureaucratic. 

It reminds me in some ways of the best days of Personal Computer World, a famous print magazine which ceased publication in 2009. PCW was a delight because it was not shy about covering small niches as well as mainstream technology, in the days when it had plenty of editorial pages to fill.

The comments are worth reading too; not all of them, but there are plenty of smart readers. On any specific topic, logic suggests that some of the readers will know more about it than the journalist; you should always glance at the comments.

The Register is also a well-read site; number 513 in the UK according to Alexa, and 2204 in the USA. Judging by Alexa it is seems to be the most popular tech news site in the UK though I am not an expert on web stats.

I will continue to post here of course, as well as covering hardware, gadgets and audio on http://gadgets.itwriting.com/.

In case you missed it, this is what I came up with in October – it was a bit more than 2 days a week as it turned out, I am not superhuman:

Programming Office 365- Hands On with Microsoft’s new APIs

Microsoft unwraps new auto data-protection in Office 365 tools

Mozilla- Spidermonkey ATE Apple’s JavaScriptCore, THRASHED Google V8

Microsoft shows off spanking Win 10 PCs, compute-tastic Azure

Happy 2nd birthday, Windows 8 and Surface- Anatomy of a disaster

Entity Framework goes ‘code first’ as Microsoft pulls visual design tool

Lollipop unwrapped- Chromium WebView will update via Google Play

Microsoft and Dell’s cloud in a box- Instant Azure for the data centre

Migrate to the cloud and watch your business take flight

Docker’s app containers are coming to Windows Server, says Microsoft

Sway- Microsoft’s new Office app doesn’t have an Undo function

Influential scribe Charles Petzold- How I figured out the Windows API

Software gurus- Only developers can defeat mass surveillance

Xamarin, IBM lob cross-platform mobile app dev tools at Microsoft coders

Windows 10 feedback- ‘Microsoft, please do a deal with Google to use its browser’

No tiles, no NAP – next Windows for data centre looks promising

Vanished blog posts- Enterprise gaps- Welcome to Windows 10

One Windows- How does that work… and WTF is a Universal App-

Windows 10- One for the suits, right Microsoft- Or so one THOUGHT

Coding Office for cross platform: Microsoft explains its approach

At last month’s @Scale conference in San Francisco, developers from a number of well-known companies (Google, Facebook, Twitter, Dropbox and others) spoke about the challenge of scaling applications and services to millions or even billions of users.

Among the speakers was Igor Zaika, Distinguished Engineer in the Microsoft Office team, and the video (embedded below) is illuminating not only as an example of how to code across multiple platforms, but also as an insight into where the company is taking Office.

Zaika gives a brief résumé of the history of Office, mentioning how the team has experienced the highs and lows of cross-platform code. Word 6.0 (1993) was great on Windows but a disaster on the Mac. The team built an entire Win32 emulation layer for the Mac, enabling a high level of code reuse, but resulting in a poor user experience and lots of platform-specific bugs and performance issues in the Mac version.

Next came Word 98 for the Mac, which took the opposite approach, forking the code to create an optimized Mac-specific version. It was well received and great for user experience, but “it was only fun for the first couple of years,” says Zaika. As the Windows version evolved, merging code from the main trunk into the Mac version became increasingly difficult.

Today Microsoft is committed not only to Mac and Windows versions of Word, but to all the major platforms, by which Zaika means Apple (including iOS), Android, Windows (desktop and WinRT) and Web. “If we don’t, we are not going to have a sustainable business,” he says.

WinRT is short for the Windows Runtime, also known as Metro, or as the Store App platform. Zaika says that the relationship between WinRT and Win32 (desktop Windows) is similar to that between Apple’s OS X and iOS.

Time for a brief digression of my own: some observers have said that Microsoft should have made a dedicated version of Windows for touch/mobile rather than attempting to do both at once in Windows 8. The truth is that it did, but Microsoft chose to bundle both into one operating system in Windows 8. Windows RT (the ARM version used in Surface RT) is a close parallel to the iPad, since only WinRT apps can be installed. What seems to be happening now is that Windows Phone and Windows RT will be merged, so that the equivalence of WinRT and iOS will be closer and more obvious.

Microsoft’s goal with Office is to achieve high content fidelity and consistency of functionality across all platforms, but to use native UX/UI frameworks so that each version integrates properly with the operating system on which it runs. The company also wants to achieve a faster shipping cycle; the traditional two-year cycle is not fast enough, says Zaika.

What then is Microsoft’s technical strategy for cross-platform Office now? The starting point, Zaika explains, is a shared core of C++ code. Office has always been written in C/C++, and “that has worked out well for us,” he says, since it is the only language that compiles to native code across all the platforms (web is an exception, and one that Zaika did not talk much about, except to note the importance of “shared service code,” cloud-based code that is used for features that do not need to work offline).

In order for the shared non-visual code to work correctly cross-platform, Microsoft has a number of platform abstraction layers (PALs). No #ifdefs (to handle platform differences) are allowed in the shared code itself. However, rather than a monolithic Win32 emulation as used in Word 6.0 for the Mac, Microsoft now has numerous mini-PALs. There is also a willingness to compromise, abandoning shared code if it is necessary for a good platform experience.

image

How do you ensure cross-platform fidelity in places where you cannot share code? The alternative is unit testing, says Zaika, and there is a strong reliance on this in Office development.

There is also an abstraction layer for document rendering. Office requires composition, animation and touch APIs on each platform. Microsoft uses DirectX on Win32, a thin layer over Apple’s CoreAnimation API on Mac and iOS, a thin layer over XAML on WinRT, and a thinnish layer over Java on Android.

The outcome of Microsoft’s architectural work is a high level of code sharing, despite the commitment to native frameworks for UX. Zaika showed a slide revealing code sharing of over 95% for PowerPoint on WinRT and Android.

image

What can Microsoft-watchers infer from this about the future of Office? While there are no revelations here, it does seem that work on Office for WinRT and for Android is well advanced.

Office for WinRT has implications for future Windows tablets. If a version of Office with at least the functionality of Office for iPad runs on WinRT, there is no longer any need to include the Windows desktop on future Windows tablets – by which I mean not laptop replacements like Surface 3.0, but smaller tablets. That will make such devices less perplexing for users than Surface RT, though with equivalent versions of Office on both Android and iOS tablets, the unique advantages of Windows tablets will be harder to identify.

Thanks to WalkingCat on Twitter for alerting me to this video.

VLC is coming to Windows Phone

The popular media playback app VLC is coming to Windows Phone as well as Windows tablets, according to an email sent to supporters of its Kickstarter project for VLC for WinRT (Windows Runtime).

A new preview release has been made available on the Windows Store, with the following changes:

  • using libVLC 2.2.0 core,
  • redesign of the interface,
  • huge performance improvements,
  • use of Winsock for networking instead of WinRTsock,
  • use of Windows 8.1 widgets,
  • move the interface code to Universal to prepare Windows Phone 8.1 port.

The app is currently x86 only, and this will have to change before a Windows Phone version is possible, since Windows Phone currently runs only on ARM chipsets. The VLC developers say:

While this release is still x86-only, we’ve made great advances on the ARM port. More news soon.

The progress of apps like VLC will be interesting to watch following the release of Windows 10 next year, which (from the user’s perspective) blurs the distinction between desktop apps (like the old version of VLC) and Store apps (like this new one). Can the Store app be good enough that users will not feel the need to have the desktop version installed? Even if it is, of course, the desktop version will remain the only choice for those on Windows 7 and earlier. In fact, make that Windows 8.0 and earlier, since the new version requires Windows 8.1.

image

LibreOffice is four years old, plans Android version

Four years ago, on 28th September 2010, the open source LibreOffice productivity suite was created by forking OpenOffice. This Microsoft Office alternative offers a word processor, spreadsheet, presentation graphics, vector drawing package, and database manager. Its origins are in a German suite called Star Office, which was acquired by Sun Microsystems in 1999. In an effort to disrupt Microsoft, Sun made Star Office free and open source, creating OpenOffice.org. However Sun itself was acquired by Oracle Corporation in 2010, and LibreOffice was created by a breakaway group of OpenOffice contributors who were wary of what might happen to the project under Oracle’s stewardship.

image

They probably need not have worried, since Oracle donated OpenOffice to the Apache foundation in 2011. It is still performing its intended function as a Microsoft disruptor; see for example this report of the Italian city of Udine moving from Microsoft Windows and Office to Linux and OpenOffice.

A key motivation is that it is easier to keep free software up to date, and organisations like having all their users on the same version:

"Some of our PCs are stuck with pretty old software like Office 2000, which is no longer supported, as we haven’t had the resources to upgrade," Gabriele Giacomini, the innovation and economic development councillor for the municipality of Udine, told ZDNet.

"By switching to open source, we will have the chance to allow our employees to work with the latest version of the suite”

Microsoft, of course, wants to address this by persuading users to subscribe to Office rather than buying it outright; though this does not solve the problem of out of date Windows versions (but watch this space).

But what about LibreOffice? What is the point of having two major open source productivity suites based on essentially the same products?

Good question; but one possible differentiator is that LibreOffice is working on an Android port. The Document Foundation, which runs the LibreOffice project, is inviting tenders for implementation of the suite on Android, complete with a basic interface for integrating with the user’s “preferred cloud storage”.

Another point of interest is that the Foundation is asking for commercial tenders rather than hiring its own coders to work with the open source community.

That said, there is already an Android port of OpenOffice, called AndrOpen Office, though this is a fork and not an official Apache OpenOffice project.

Are these multiple forks healthy proliferation, or open source confusion? That depends on your point of view, though it does show the ability of the open source community to respond to obvious needs.

It seems to me though that the suite would be more attractive to businesses if LibreOffice and OpenOffice could merge, and develop an official Android version of the suite.

My guess is that productivity software on tablets (and phablets) will be a key battleground as users do an increasing proportion of their work on mobile devices rather than PCs or laptops. Microsoft already has an iOS version of Office, and one for Android in preparation. There is also a version of Office for the Windows 8 “Metro” personality in preparation.

Open source advocate Glyn Moody has posted about the LibreOffice project here.

Microsoft releases WinJS cross-browser JavaScript library but why?

Microsoft has announced WinJS 3.0:

The Windows Library for JavaScript (WinJS) project is pleased to announce the general availability of its first release – WinJS 3.0 – since the open source project began at //BUILD 2014.

Much of WinJS will run on any modern browser but the browser support matrix has a number of gaps:

image

You can also see what runs where from this status table.

But what is WinJS? Note that it comes from the Windows apps team, not the web development team at Microsoft. WinJS was designed to enable app development for Windows 8 “Metro” (also known as the Windows Runtime) using JavaScript, CSS and HTML. Back in 2010, when Microsoft signalled the end of Silverlight and the rise of HTML 5 for browser-based applications, early versions of WinJS would already have been in preparation. Using WinJS you can share code across a Windows 8 app, web apps, and via an app packager like Apache Cordova, in apps for Android and iOS as well.

Note that Cordova is now integrated into Visual Studio, using the catchy name Multi-Device Hybrid App:

image

If you want to know what kind of controls and components are on offer in WinJS, you can find out using the excellent demo site here. This is Firefox:

image

Quick summary then: WinJS lets you build apps that look like Windows 8 Store apps, but which run cross-browser and cross-platform. But who wants to do that?

Maybe Microsoft does. The messaging from the company, especially since CEO Satya Nadella took over from Windows guy Steve Ballmer, is “any device”, provided of course that they hook up to Microsoft’s services. That messaging is intended for developers outside the company too. Check out the current campaign for Microsoft Azure, which says “consume on any device”.

image

This could be a web application, or it could be a client app using Azure Mobile Services or an ASP.NET Web API application to connect to cloud data.

You do not have to use WinJS to consume Microsoft’s services of course. Why would developers want to use the look and feel of a rather unloved app platform, rather than the native look and feel of Android or iOS? That is an excellent question, and in most cases they will not. There could be cases though, for example for internal business apps where users care most about functionality. What is the current stock? What is the lead time? Show me this customer’s order history. A WinJS app might not look right for the platform, but the UI will be touch-friendly, and ease of rollout across the major mobile platforms could trump Apple’s design guidelines.

If you are writing a pure web application, users expectations concerning native look and feel are not so high. The touch-oriented design of WinJS is its main appeal, though other web frameworks like JQuery Mobile also offer this. The “Metro” design language is distinctive, and Microsoft will be making a renewed push for Windows Store apps, or Universal Apps, as part of the new wave of Windows called Windows 9 or “Threshold”. WinJS is the way to build apps for that platform using JavaScript and HTML, with the added bonus of easy porting to a broad range of devices.

This is a hard sell though. I am impressed by the effort Microsoft has put into making WinJS work cross-platform, but will be surprised to see much usage outside Windows Store apps (including Windows Phone). On the other hand, it does help to keep the code honest: this really is HTML and JavaScript, not just a wrapper for Windows Runtime APIs.

Should you use Entity Framework for .NET applications?

I have been working on a project which I thought would be simpler than it turned out to be – nothing new there, most software projects are like that.

The project involves upload and download of large files from Azure storage. There is a database as part of the application, nothing too demanding, but requiring some typical CRUD (Create, Retrieve, Update, Delete) functionality. I had to decide how to implement this.

First, a confession. I am comfortable using SQL and my normal approach to a database application is to use ADO.NET DataReaders to read data. They are brilliant; you just send some SQL to the database and back comes the data in a format that is easy to read back in C# code.

When I need to update the data, I use SqlCommand.ExecuteNonQuery which executes arbitrary SQL. It is easy to use parameters and transactions, and I get full control over how many connections are open and so on.

This approach has always worked well for me and I get excellent performance and complete flexibility.

However, when coding in ASP.NET MVC and Visual Studio you are now steered firmly towards Entity Framework (EF), Microsoft’s object-relational mapping library. You can use a code-first approach. Simply create a C# class for the object you want to store, and EF handles all the drudgery of creating tables and building SQL queries, letting you concentrate on the unique features of your application.

In addition, you can right-click in the Solution Explorer, choose Add Controller, and a wizard will generate all the code for listing, creating, editing and deleting those objects.

image

Well, that is the idea, and it does work, but I soon ran into issues that made me wonder if I had made the right decision.

One of the issues is what happens when you change your mind. Maybe that field should be an Int rather than a String. Maybe you need a second phone number field. Maybe you need to create new tables. How do you keep the database in synch with your classes?

This is called Code First Migrations and involves running commands that work out how the database needs to change and generates code to update it. It’s clever stuff, but the downside is that I now have a bunch of generated classes and a generated _MigrationHistory table which I did not need before. In addition, something when slightly wrong in my case and I ended up having to comment out some of the generated code in order to make the migration work.

At this point EF is creating work for me, rather than saving it.

Another issue I encountered was puzzling out how to do stuff beyond the most trivial. How do you replace an HTML edit box with a dropdown list? How do you exclude fields from being saved when you call dbContext.SaveChanges? What is the correct way to retrieve and modify data in pure code, without data binding?

I am not the first to have questions. I came across this documentation: an article promisingly entitled How to: Add, Modify, and Delete Objects which tells you nothing of value. Spot how many found it helpful:

image

You should probably start here instead. Still, be aware that EF is by no means straightforward. Instead of having to know SQL and the basics of ADO.NET commands and DataReaders, you now have to know EF, and I am not sure it is any less intricate. You also need to be comfortable with data binding and LINQ (Language Integrated Query) to make sense of it all, though I will add that strong data binding support is one reason whey EF is a good fit for ASP.NET MVC.

Should you use Entity Framework? It remains, as far as I can tell, the strategic direction for data access on Microsoft’s platform, and once you have worked out the basics you should be able to put together simple database applications more quickly and more naturally than with manually coded SQL.

I am not sure it makes sense for heavy-duty data access, since it is harder to fine-tune performance and if you hit subtle bugs, you may end up in the depths of EF rather than debugging your own code.

I would be interested in hearing from other developers. Do you love EF, avoid it, or is it just about OK?