Category Archives: professional

Adobe extends SVG, HTML 5 support in Illustrator

Adobe has released a preview of the Illustrator CSS5 HTML5 Pack. There is already an HTML 5 Pack for Dreamweaver.

Illustrator CS5 could already export in SVG (Scalable Vector Graphics) format, but the pack adds some interesting features.

One is the ability to specify strokes and fills as variables, so that you can modify them in JavaScript.

image

Exporting an image that uses this feature creates a JavaScript file as well as the SVG itself.

You can also mark an Illustrator object as Canvas. This will convert the object to a bitmap that is drawn to a Canvas element within SVG.

There is also increased support for CSS (Cascading Style Sheets). You can use CSS to define fills, strokes, opacity, gradient, position, and named character styles.

Other features in the Pack include the ability to detect the HTML window size and vary the SVG that is delivered accordingly – to support mobile browsers.

When Apple’s Steve Jobs posted his thoughts on Flash – still online despite the company’s change of heart on cross-platform development tools for iPhone and iPad – he remarked:

Perhaps Adobe should focus more on creating great HTML5 tools for the future, and less on criticizing Apple for leaving the past behind.

Of course Adobe was doing this anyway, but it is interesting to see HTML 5 support now being extended. Export more HTML 5 goodness at the forthcoming MAX conference next month.

If you try the new HTML5 Pack read the installation instructions carefully. You have to back up certain files, otherwise it may affect whether you can apply future official updates.

Apple iPad ascendant in business computing

Think Apple’s iPad is a consumer platform? Think again. I’m at the Cloudforce conference in London; and the level of iPad visibility has been striking. I’m not talking about attendees clutching the devices, though there are some. Rather, it’s the number of mentions and actual usage examples that are in the presentations. Before the keynote, Peter Coffee from Salesforce.com was using an iPad for interview notes, using it like a pad of paper. Next, we had demos of Salesforce.com’s new Chatter for mobile running on the iPad. Next, a representative from case study Bausch+Lomb mentioned that his company has just deployed 700 iPads to its sales force.

image

All business use cases, and all the more impressive given that they are incidental to the theme of the event.

Personally I have mixed feelings about this development. I’ve been a fan of the tablet format for years; here’s an article from 2003 (with apologies for the dated layout) in which I enthuse about an early Acer tablet. Some of the features for which the iPad is praised, like the ease of sharing what’s on the screen with others, are things I’ve long taken advantage of with Windows tablets.

The iPad is succeeding where Windows tablets mostly failed, thanks to its better design, lighter weight, longer battery life, and lower price. That’s welcome to me since I like the format, but the locked-in nature of the platform alarms me. Apple to be the single pipe for all public software deployments? No Flash, Silverlight, Java, or any runtime or other enabling software which Apple chooses not to approve?

This is merely an observation though – what counts is that users are adopting the device and enjoying what it offers them, in business as well as for personal use.

Now that Apple has shown how to make the tablet concept work, others are climbing on board, mostly with Android devices. The next point of interest is whether these also succeed; and even whether Microsoft can clamber back into the market either with a new wave of Windows devices, or more plausibly with the Windows Phone 7 OS (though the company claims not to be contemplating this).

For the moment though, broad reach deployment must include either an HTML version of your app, or native iOS.

Decompiling Silverlight

A Silverlight application is a .NET application. Most developers will be aware of this; but it is worth noting that whereas ASP.NET code executes on the server and is not normally available for download, Silverlight code is downloaded to the client and can easily be decompiled. It is almost as easy to view as JavaScript code in the browser.

If you want to investigate this, the first thing to do is to find the .xap file which contains the Silverlight application. You will likely find this in your browser cache, or you can download it directly from the web site hosting the application. If you have out-of-browser Silverlight apps, they are usually located at:

C:\Users\[username]\AppData\LocalLow\Microsoft\Silverlight\OutOfBrowser

Copy the .xap file somewhere convenient, and rename it to have a .zip extension. Then extract the files. The result looks something like this:

image

Next, you need a .NET decompiler such as Redgate .NET Reflector. Run Reflector and open a .dll file containing application code. Select a method, and Reflector does its best to show you the code. It does a good job too:

image

The purpose of this post is not to encourage decompiling other people’s code, but rather to make the point that even though Silverlight code is “compiled”, it is trivial to read it – just in case anyone thought it was a bright idea to store passwords or other authentication secrets there.

The solution is to never to put anything security-critical in client-side code. Second, you can use an obsfuscator such as dotfuscator to make the decompiled code harder to read.

Silverlight versus HTML, Flash – Microsoft defends its role

Microsoft’s Brad Becker, Director of Product Management for Developer Platforms, has defended the role of Silverlight in the HTML 5 era. Arguing that it is natural for HTML to acquire some of the features previously provided by plug-ins – “because some of these features are so pervasive on the web that they are seen by users as fundamentally expected capabilities” – he goes on to identify three areas where Silverlight remains necessary. These are “premium” multimedia which merges video with application elements such as conferencing, picture in picture, DRM, analytics; consumers apps and games; and finally business/enterprise apps.

It is the last of these which interests me most. Becker’s statements come soon after the preview of Visual Studio LightSwitch, which is solely designed for data-driven business applications. Taking the two together, and bearing in mind that apps may run on the desktop as well as in browser, Silverlight is now encroaching on the territory which used to belong to Windows applications. With LightSwitch in particular, Microsoft is encouraging developers who might previously have built an app in Access or Visual Basic to consider Silverlight instead.

Why? Isn’t Microsoft better off if developers stick to Windows-only applications?

In one sense it is, as it gets the Windows lock-in – and yes, this is effective. I’m aware of businesses who are tied to Windows because of apps that they use, who might otherwise consider Macs for all or some of their business desktops. On the other hand, even Microsoft can see the direction in which we are travelling – cloud, mobile, diverse clients – and that Silverlight fits better with this model than Windows-only desktop clients.

Another consideration is that setup and deployment issues remain a pain-point for Windows apps. One issue is when it goes wrong, and Windows requires skilled surgery to get some app installed and working. Another issue is the constant energy drain of getting new computers and having to provision them with the apps you need. Microsoft has improved this no end for larger organisations, with standard system images and centralised application deployment, but Silverlight is still a welcome simplification; provided that the runtime is installed, it is pretty much the web model – just navigate to the URL and the app is there, right-click if you want to run on the desktop.

If Microsoft can also establish Windows Phone 7, which uses Silverlight as the runtime for custom apps, the platform then extends to mobile as well as desktop and browser.

The downside is that Silverlight apps have fewer capabilities than native Windows apps. Printing is tricky, for example, though Becker refers to “Virtualized printing” and I am not sure what exactly he means. He also highlights COM automation and group policy management, features that only work on Windows and which undermine Silverlight’s cross-platform promise. That said, via COM automation Silverlight has full access to the local machine giving developers a way of overcoming any limitations if they are willing to abandon cross-platform and browser-hosted deployment.

A winning strategy? Well, at least it is one that makes sense in the cloud era. On the other hand, Microsoft faces substantial difficulties in establishing Silverlight as a mainstream development platform. One is that Adobe was there first with Flash, which has a more widely deployed runtime, works on Android and soon other mobile devices, and is supported by the advanced design tools in Creative Suite. Another is the Apple factor, the popular iPhone and iPad devices which are a spear through the heart of cross-platform runtimes like Silverlight and Flash.

Finally, even within the Microsoft development community Silverlight is a hard sell for many developers. Some us recall how hard the company had to work to persuade Visual Basic 6 developers to move to .NET. The reason was not just stubborn individuals who dislike change – though there was certainly some of that – but also existing investment in code that could not easily be migrated. Both factors also apply to Silverlight. Further, it is a constrained platform, which means developers have to live with certain limitations. It is also managed code only, whereas some of the best developers for both desktop and mobile apps work in C/C++.

I suspect there is division even within Microsoft with regard to Silverlight. Clearly it has wide support and is considered a strategic area of development. At the same time, it is not helpful to the Windows team who will want to see apps that take advantage of new features in Windows 7 and beyond.

Yesterday Windows Phone 7 was released to manufacturing, which means the software is done. Another piece of the Silverlight platform is in place; and I guess over the next year or two we will see the extent to which Microsoft can make it a success.

Develop for Adobe Flash/Flex in Amethyst for Visual Studio

SapphireSteel Software is poised to release Amethyst, which lets you develop Flash and Flex applications with Microsoft’s Visual Studio 2008 or 2010.

Why bother? There’s two aspects to this. One is simply the comfort factor: if you are a .NET developer used to Visual Studio, but now working on Flash or Flex, this could be an easier way in than the Eclipse-based Flash Builder. There is a visual designer, a full-featured debugger, a property inspector with sections for properties, events, effects and styles, for example, and double-clicking an event generates an event handler as you would expect.

The other factor is areas where Amethyst can improve on what Flash Builder offers. One example is ActionScript refactoring, disappointing in Adobe’s product. Amethyst is not brilliant, but does have a few extras including Extract Method, Encapsulate Field and Extract Interface.

image

Another useful feature is that Amethyst can share projects with Flash or Flash Builder. Before you get excited, it does not do the magic you might want, Visual Studio editing of .fla files with embedded ActionScript. It does work reasonably seamlessly though: you can open .fla file in the Flash IDE by clicking within Amethyst.

This would have been even more interesting if Adobe had not added a measure of Flash Builder integration in Flash Professional CS5; and that is the challenge facing SapphireSteel – how to keep up with Adobe’s official development tools.

I’ve only played briefly with Amethyst but although I’ve been impressed with it in some ways, I also found myself missing features in Flash Builder, such as the Connect to Data wizards, and the view state management.

It is early days though; and I would be interested to hear from others who have tried Amethyst on what they do or do not like about it.

Price is not yet stated, but SapphireSteel also offer a Ruby product which is priced at $49 for a basic edition, or $199 for a professional version. Amethyst also comes in two editions so perhaps we will see something similar.

Visual Studio LightSwitch – model-driven architecture for the mainstream?

I had a chat with Jay Schmelzer and  Doug Seven from the Visual Studio LightSwitch team. I asked about the release date – no news yet.

What else? Well, Schmelzer and Seven had read my earlier blog post so we discussed some of the things I speculated about. Windows Phone 7? Won’t be in the first release, they said, but maybe later.

What about generating other application types from the same model? Doug Seven comments:

The way we’ve architected LightSwitch does not preclude us from making changes .. it’s not currently on the plan to have different output formats, but if demand were high it’s feasible in the future.

I find this interesting, particularly given that the future of the business client is not clear right now. The popularity of Apple’s iPad and iPhone is a real and increasing deployment problem, for example. No Flash, no Silverlight, no Java, only HTML or native apps. The idea of simply selecting a different output format is compelling, especially when you put it together with the fast JIT-compiled JavaScript in modern web browsers. Of course support for multiple targets has long been the goal of model-driven architecture (remember PIM,PSM and PDM?) ; but in practice the concept of a cross-platform runtime has proved more workable.

There’s no sign of this in the product yet though, so it is idle speculation. There is another possible approach though, which is to build a LightSwitch application, and then build an alternative client, say in ASP.NET, that uses the same WCF RIA Services. Since Visual Studio is extensible, it will be fun to see if add-ins appear that exploit these possibilities.

I also asked about Mac support. It was as I expected – the team is firmly Windows-centric, despite Silverlight’s cross-platform capability. Schmelzer was under the impression that Silverlight on a Mac only works within the browser, though he added “I could be wrong”.

In fact, Silverlight out of browser already works on a Mac; the piece that doesn’t work is COM interop, which is not essential to LightSwitch other than for export to Excel. It should not be difficult to run a LightSwitch app out-of-browser on a Mac, just right-click a browser-hosted app and choose Install onto this computer, but Microsoft is marketing it as a tool for Windows desktop apps, or Web apps for any other client where Silverlight runs.

Finally I asked whether the making of LightSwitch had influenced the features of Silverlight or WCF RIA Services themselves. Apparently it did:

There are quite a few aspects of both Silveright 4 and RIA services that are in those products because we were building on them. We uncovered things that we needed to make it easier to build a business application with those technologies. We put quite a few changes into the Silverlight data grid.

said Schmelzer, who also mentioned performance optimizations for WCF RIA Services, especially with larger data sets, some of which will come in a future service pack. I think this is encouraging for those intending to use Silverlight for business applications.

There are many facets to LightSwitch. As a new low-end edition of Visual Studio it is not that interesting. As an effort to establish Silverlight as a business application platform, it may be significant. As an attempt to bring model-driven architecture to the mainstream, it is fascinating.

The caveat (and it is a big one) is that Microsoft’s track-record on modelling in Visual Studio is to embrace in one release and extinguish in the next. The company’s track-record on cross-platform is even worse. On balance it is unlikely that LightSwitch will fulfil its potential; but you never know.

Ten things you need to know about Microsoft’s Visual Studio LightSwitch

Microsoft has announced a new edition of Visual Studio called LightSwitch, now available in beta, and it is among the most interesting development tools I’ve seen. That does not mean it will succeed; if anything it is too radical and might fail for that reason, though it deserves better. Here’s some of the things you need to know.

1. LightSwitch builds Silverlight apps. In typical Microsoft style, it does not make the best of Silverlight’s cross-platform potential, at least in the beta. Publish a LightSwitch app, and by default you get a Windows click-once installation file for an out-of-browser Silverlight app. Still, there is also an option for a browser-hosted deployment, and in principle I should think the apps will run on the Mac (this is stated in one of the introductory videos) and maybe on Linux via Moonlight. Microsoft does include an “Export to Excel” button on out-of-browser deployments that only appears on Windows, thanks to the lack of COM support on other platforms.

I still find this interesting, particularly since LightSwitch is presented as a tool for business applications without a hint of bling – in fact, adding bling is challenging. You have to create a custom control in Silverlight and add it to a screen.

Microsoft should highlight the cross-platform capability of LightSwitch and make sure that Mac deployment is easy. What’s the betting it hardly gets a mention? Of course, there is also the iPhone/iPad problem to think about. Maybe ASP.NET and clever JavaScript would have been a better idea after all.

2. There is no visual form designer – at least, not in the traditional Microsoft style we have become used to. Here’s a screen in the designer:

image

Now, on one level this is ugly compared to a nice visual designer that looks roughly like what you will get at runtime. I can imagine some VB or Access developers will find this a difficult adjustment.

On the positive side though, it does relieve the developer of the most tedious part of building this type of forms application – designing the form. LightSwitch does it all for you, including validation, and you can write little snippets of code on top as needed.

I think this is a bold decision – it may harm LightSwitch adoption but it does make sense.

3. LightSwitch has runtime form customization. Actually it is not quite “runtime”, but only works when running in the debugger. When you run a screen, you get a “Customize Screen” button at top right:

image

which opens the current screen in Customization Mode, with the field list, property editor, and a preview of the screen.

image

It is still not a visual form designer, but mitigates its absence a little.

4. LightSwitch is model driven. When you create a LightSwitch application you are writing out XAML, not the XAML you know that defines a WPF layout, but XAML to define an application. The key file seems to be ApplicationDefinition.lsml, which starts like this:

image

Microsoft has invested hugely in modelling over the years with not that much to show for it. The great thing about modelling in LightSwitch is that you do not know you are doing it. It might just catch on.

Let’s say everyone loves LightSwitch, but nobody wants Silverlight apps. Could you add an option to generate HTML and JavaScript instead? I don’t see why not.

5. LightSwitch uses business data types, not just programmer data types. I mean types like EmailAddress, Image, Money and PhoneNumber:

image

I like this. Arguably Microsoft should have gone further. Do we really need Int16, Int32 and Int64? Why not “Whole number” and “Floating point number”? Or hide the techie choices in an “Advanced” list?

6. LightSwitch is another go at an intractable problem: how to get non-professional developers to write properly designed relational database applications. I think Microsoft has done a great job here. Partly there are the data types as mentioned above. Beyond that though, there is a relationship builder that is genuinely easy to use, but which still handles tricky things like many-to-many relationships and cascading deletes. I like the plain English explanations in the too, like “When a Patient is deleted, remove all related Appointment instances” when you select Cascade delete.

image

Now, does this mean that a capable professional in a non-IT field – such as a dentist, shopkeeper, small business owner, departmental worker – can now pick up LightSwitch and and write a well-designed application to handle their customers, or inventory, or appointments? That is an open question. Real-world databases soon get complex and it is easy to mess up. Still, I reckon LightSwitch is the best effort I’ve seen – more disciplined than FileMaker, for example, (though I admit I’ve not looked at FileMaker for a while), and well ahead of Access.

This does raise the question of who is really the target developer for LightSwitch? It is being presented as a low-end tool, but in reality it is a different approach to application building that could be used at almost any level. Some features of LightSwitch will only make sense to IT specialists – in fact, as soon as you step into the code editor, it is a daunting tool.

7. LightSwitch is a database application builder that does not use SQL. The query designer is entirely visual, and behind the scenes Linq (Language Integrated Query) is everywhere. Like the absence of a visual designer, this is a somewhat risky move; SQL is familiar to everyone. Linq has advantages, but it is not so easy to use that a beginner can express a complex query in moments. When using the Query designer I would personally like a “View and edit SQL” or even a “View and edit Linq” option.

8. LightSwitch will be released as the cheapest member of the paid-for Visual Studio range. In other words, it will not be free (like Express), but will be cheaper than Visual Studio Professional.

9. LightSwitch applications are cloud-ready. In the final release (but not the beta) you will be able to publish to Windows Azure. Even in the beta, LightSwitch apps always use WCF RIA Services, which means they are web-oriented applications. Data sources supported in the beta are SQL Server, SharePoint and generic WCF RIA Services. Apparently in the final release Access will be added.

10. Speculation – LightSwitch will one day target Windows Phone 7. I don’t know this for sure yet. But why else would Microsoft make this a Silverlight tool? This makes so much sense: an application builder using the web services model for authentication and data access, firmly aimed at business users. The first release of Windows Phone 7 targets consumers, but if Microsoft has any sense, it will have LightSwitch for Windows Phone Professional (or whatever) lined up for the release of the business-oriented Windows Phone.

Measuring start-up time for .NET, Java, C++

A comment here points me to this comparison by Decebal Mihailescu of start-up times for processes on Windows using different runtimes: .NET in several versions, Java 1.6, Mono 2.6.4, and Visual C++ 2010 (native code).

image

It is notable that native code is much faster than the runtimes, and that .NET is ahead of Java – to be expected, perhaps, since Windows is its native environment.

The test application is tiny and when we are talking about a time of less than a tenth of a second, users are unlikely to care much. I would like to see tests based on a larger application; on the other hand it becomes increasingly difficult to make a fair comparison.

It’s a shame Embarcadero Delphi was not included, though I’d expect similar figures to those for Visual C++.

Start-up time is critical to perceived performance. One reason I use an ancient version of Paint Shop Pro for simple image manipulation is that I can double-click an image and be editing it instantly, whereas alternatives like Adobe PhotoShop or the free paint.net make me wait. Unless I need the extra features these provide, I stick with fast and simple.

What users want in Windows 8

A number of blogs are running a coordinated poll on what users would most like to see in the next version of Windows. The results so far are unsurprising but still worth repeating, since there is a good chance that they differ from Microsoft’s priorities.

image

Note that users are less concerned about new features, more concerned about an OS that works better and faster.

Less bloat, currently number five in the list, will be hard to achieve while PC vendors still insist in bundling poor quality add-ons with their systems.

If you want to vote you can do so at any of various blogs including 4sysops – which has some notes expanding on what each category might mean – markwilson.it and Within Windows.

Apple not Android is killing client-side Java – so why is Oracle suing Google?

Oracle is suing Google over Java in Android; the Register has a link to the complaint itself which lists seven patents which Oracle claims Google has infringed. There is also a further clause which says Google has infringed copyright in the:

code, specifications, documentation and other materials) that is copyrightable subject matter

and that it is not possible for a device manufacturer to create an Android device without infringing Oracle’s copyrights. Oracle is demanding stern penalties including destruction of all infringing copies – I presume this might mean destruction of all Android devices, though as we all know lawyers routinely demand more than they expect to win, as a negotiating position.

But isn’t Java open source? It is; but licensing is not simple, and “open source” does not mean “non-copyright”. You can read the Java open source licensing statements here. I am not a licensing expert; but one of the key issues with Google’s use of Java in Android is that it is not quite Java. Oracle’s complaint says:

Google’s Android competes with Oracle America’s Java as an operating system software platform for cellular telephones and other mobile devices. The Android operating system software “stack” consists of Java applications running on a Java-based object-oriented application framework, and core libraries running on a “Dalvik” virtual machine (VM) that features just-in-time (JIT) compilation.

Note that Oracle says “Java-based”. Binaries compiled for Android will not run on other JVM implementations. I am no expert on open source licensing; but if Google is using Java in ways that fall outside what is covered by the open source license, then that license does not apply.

Despite the above, I have no idea whether Oracle’s case has legal merit. It is interesting though that Oracle is choosing to pursue Google; and I have some sympathy given that Java’s unique feature has always been interoperability and cross-platform, which Android seems to break to some extent.

James Gosling’s post on the subject is relevant:

When Google came to us with their thoughts on cellphones, one of their core principles was making the platform free to handset providers. They had very weak notions of interoperability, which, given our history, we strongly objected to. Android has pretty much played out the way that we feared: there is enough fragmentation among Android handsets to significantly restrict the freedom of software developers.

though he adds:

Don’t interpret any of my comments as support for Oracle’s suit. There are no guiltless parties with white hats in this little drama. This skirmish isn’t much about patents or principles or programming languages. The suit is far more about ego, money and power.

The official approach to Java on devices is Java ME; and Java ME guys like Hinkmond Wong hate Android accordingly:

Heck, forget taking the top 10,000 apps, take the top Android 10 apps and try running all of them on every single Android device out there. Have you learned nothing at all from Java ME technology, Android? Even in our current state in Java ME, we are nowhere as fragmented as the last 5 Android releases in 12 months (1.5, 1.6, 2.0, 2.1 and recently 2.2).

Fair enough; but it is also obvious that Android has revived interest in client-side Java in a way that Sun failed to do despite years of trying. The enemy of client-side Java is not Android, but rather Apple: there’s no sign of Java on iPhone or iPad. Apple’s efforts have killed the notion of Java everywhere, given the importance of Apple’s mobile platform. Java needs Android, which makes this lawsuit a surprising one.

But what does Oracle want? Just the money? Or to force Google into a more interoperable implementation, for the benefit of the wider Java platform? Or to disrupt Android as a favour to Apple?

Anyone’s guess at the moment. I wonder if Google wishes it had acquired Sun when it had the chance?

Note: along with the links above, I like the posts on this subject from Redmonk’s Stephen O’Grady and Mono guy Miguel de Icaza.