Category Archives: software development

Visual Studio 2008 review, and the WPF business apps debate

Review just posted on RegDeveloper.

In it I quote Peter Lindsey of component vendor Infragistics, who says that:

Microsoft, in trying to capture credibility within the media market, has poorly represented the value of WPF to business application developers.

The problem is that Microsoft decided to tell its customers not to use WPF (Windows Presentation Foundation) for line-of-business applications, which is a strange way to launch your next-generation GUI API, and tough on vendors such as Infragistics who have been busy providing business-oriented components like xamDataGrid.

Not everyone agrees that WPF is a no-hoper for business apps. See this post from software architect Ivan Towlson:

For me, the killer application of WPF is not bouncing buttons with dancing elves trapped inside them.  The killer application is information visualisation, the kind of things you get from Tufte and the periodic table.  And that’s something that even forms-style, line-of-business applications will find worthwhile.

When Microsoft introduced .NET it made great efforts to get VB 6 developers to upgrade and migrate their projects, even though there were sound technical reasons for caution. Why is it that with WPF those reasons for caution, valid though they are, have been allowed to dominate the messaging to the extent that most developers probably have the impression that WPF is irrelevant?

Curious.

Amazon SimpleDB: a database server for the internet

Amazon has announced SimpleDB, the latest addition to what is becoming an extensive suite of web services aimed at developers. It is now in beta.

Why bother with SimpleDB, when seemingly every web server on the planet already has access to a free instance of MySQL? Perhaps the main reason is scalability. If demand spikes, Amazon handles the load. Second, SimpleDB is universally accessible, whereas your MySQL may well be configured for local access on the web server only. If you want an online database to use from a desktop application, this could be suitable. It should work well with Adobe AIR once someone figures out an ActionScript library. That said, MySQL and the like work fine for most web applications, this blog being one example. SimpleDB meets different needs.

This is utility computing, and prices look relatively modest to me, though you pay for three separate things:

Machine Utilization – $0.14 per Amazon SimpleDB Machine Hour consumed.

Data Transfer – $0.10 per GB – all data transfer in. From $0.18 per GB – data transfer out.

Structured Data Storage – $1.50 per GB-month.

In other words, a processing time fee, a data transfer fee, and a data storage fee. That’s reasonable, since each of these incurs a cost. The great thing about Amazon’s services is that there are no minimum costs or standing fees. I get billed pennies for my own usage of Amazon S3, which is for online backup.

There are both REST and SOAP APIs and there are example libraries for Java, Perl, PHP, C#, VB.NET (what, no Javascript or Python?).

Not relational

Unlike MySQL, Oracle, DB2 or SQL Server, SimpleDB is not a relational database server. It is based on the concept of items and attributes. Two things distinguish it from most relational database managers:

1. Attributes can have more than one value.

2. Each item can have different attributes.

While this may sound disorganized, it actually maps well to the real world. One of the use cases Amazon seems to have in mind is stock for an online store. Maybe every item has a price and a quantity. Garments have a Size attribute, but CDs do not. The Category attribute could have multiple values, for example Clothing and Gifts.

You can do such things relationally, but it requires multiple tables. Some relational database managers do support multiple values for a field (FileMaker for example), but it is not SQL-friendly.

This kind of semi-structured database is user-friendly for developers. You don’t have to plan a schema in advance. Just start adding items.

A disadvantage is that it is inherently undisciplined. There is nothing to stop you having an attribute called Color, another called Hue, and another called Shade, but it will probably complicate your queries later if you do.

All SimpleDB attribute values are strings. That highlights another disadvantage of SimpleDB – no server-side validation. If a glitch in your system gives an item a Price of “Red”, SimpleDB will happily store the value.

Not transactional or consistent

SimpleDB has a feature called “Eventual Consistency”. It is described thus:

Amazon SimpleDB keeps multiple copies of each domain. When data is written or updated (using PutAttributes, DeleteAttributes, CreateDomain or DeleteDomain) and Success is returned, all copies of the data updated. However, it takes time for the update to propogate to all storage locations. The data will eventually be consistent, but an immediate read might not show the change.

Right, so if you have one item in stock you might sell it twice to two different customers (though the docs say consistency is usually achieved in seconds). There is also no concept of transactions as far as I can see. This is where you want a sequence of actions to succeed or fail as a block. Well, it is called SimpleDB.

This doesn’t make SimpleDB useless. It does limit the number of applications for which it is suitable. In most web applications, read operations are more common than write operations. SimpleDB is fine for reading. Just don’t expect your online bank to be adopting SimpleDB any time soon.

Microsoft Volta: magic, but is it useful magic?

Microsoft has released an experimental preview of Volta, a new development product with some unusual characteristics:

1. You write your application for a single machine, then split it into multiple tiers with a few declarations:

Volta automatically creates communication, serialization, and remoting code. Developers simply write custom attributes on classes or methods to tell Volta the tier on which to run them.

2. Volta seamlessly translates .NET byte code (MSIL) to Javascript, on an as-needed basis, to achieve cross-platform capability:

When no version of the CLR is available on the client, Volta may translate MSIL into semantically-equivalent Javascript code that can be executed in the browser. In effect, Volta offers a best-effort experience in the browser without any changes to the application.

The reasoning behind this is that single-machine applications are easier to write. Therefore, if the compiler can handle the tough job of distributing an application over multiple tiers, it makes the developer’s job easier. Further, if you can move processing between tiers with just a few declarations, then you can easily explore different scenarios.

Since the input to Volta is MSIL, you can work in Visual Studio using any .NET language.

Visionary breakthrough, or madness? Personally I’m sceptical, though I have had a head start, since this sounds very like what I discussed with Eric Meijer earlier this year, when it was called LINQ 2.0:

Meijer’s idea is programmers should be able to code for the easiest case, which is an application running directly on the client, and be able to transmute it into a cross-platform, multi-tier application with very little change to the code.

What are my reservations? It seems hit-and-miss, not knowing whether your app will be executed by the CLR or as Javascript; while leaving it to a compiler to decide how to make an application multi-tier, bearing in mind issues like state management and optimising data flow, sounds like a recipe for inefficiency and strange bugs.

It seems Microsoft is not sure about it either:

Volta is an experiment that enables Microsoft to explore new ways of developing distributed applications and to continue to innovate in this new generation of software+services. It is not currently a goal to fit Volta into a larger product roadmap. Instead, we want feedback from the community of partners and customers to influence other Live Labs technologies and concepts.

CodeRage sessions available for download

You can now download the content from last week’s CodeRage, the virtual developer conference laid on by CodeGear. The downloads use Camtasia and Flash and work well.

A few that I recommend are Ravi Kumar’s session on JBuilder Application Factories from Day 5, and Joe McGlynn on 3rd Rail, an IDE for Ruby on Rails, from Day 3. For Delphi futures (64-bit, generics, concurrent programming, hints about cross-compilation to other operating systems) check out Nick Hodges’ session on Day 1. I’ve not viewed everything, so there are no doubt other excellent sessions.

Nevertheless, I have mixed feelings about this CodeRage. The keynotes were weak, with too much high level waffle about how CodeGear is committed to developers etc etc. The conferencing software was no more than adequate, did not work properly for me on Vista, and did not support Mac or Linux. That may explain why attendee numbers in some sessions were embarrassingly small.

I am struggling to make sense of this. CodeGear claims to have 7.5 million registered users; yet only 2100 registered to attend the free CodeRage, and some of those no doubt never turned up. If that is representative of the level of interest in new CodeGear products, as opposed to legacy users, then that is a worrying sign.

Extend SQLite with Delphi functions

I have a couple of open source projects on the go, one of which is a simple Delphi wrapper for SQLite. Lukas Gebauer has now added experimental support for user defined functions. This lets you in effect extend the SQL understood by SQLite to include your own custom functions, written in Delphi.

To try out the feature, download the wrapper and have a look at the file sqlite3udf.pas.

Technorati tags: ,

ParallelFX: concurrency library for .NET

A few links:

Announcement of CTP on Somasegar’s blog

MSDN article on PLINQ

MSDN article on Task Parallel Library

Joe Duffy – concurrent programming blog

Interesting note in Duffy’s blog about PDC 07 (the one that never was):

Note: some might wonder why we released the articles before the CTP was actually online.  When we originally put the articles in the magazine’s pipeline, our intent was that they would in fact line up.  And both were meant to align with PDC’07.  But when PDC was canceled, we also delayed our CTP so that we had more time to make progress on things that would have otherwise been cut.

Concurrency is a big deal; it’s good to see more library support.

Technorati tags: , , ,

Mobile data taking off at last

Excellent article from ARC on mobile data trends, mentioning that Vodafone has just reported a 50% jump in data traffic:

It is the culmination of attractive data pricing, improved usability and mobile demand for Web 2.0 services which is brewing to form the prefect data storm. As data pricing erodes along the same path travelled by voice, operators must now identify ways to tap into revenues from web services or else be left exposed when the data hurricane arrives.

Personally I don’t need convincing; I’ve been a heavy mobile data user for years; I can’t wait for the data price erosion mentioned. Now we are seeing great little apps from Google (Maps, GMail) and others, better mobile web browsers (iPhone etc) and faster data speeds, and the mass market is waking up to the potential for mobile Internet access. It is taking longer than anyone thought it would, but the trend is unmistakable.

Postscript: see Mobile Web- So Close Yet So Far for a more enigmatic view from Michael Fitzgerald at the New York Times:

For now, widespread use of the mobile Web remains both far off and inevitable.

Note that the piece criticizes the iPhone for not supporting Flash.

The dynamics of this are interesting. Flash is sufficiently entrenched that you can say iPhone is bad for not rendering Flash, not that Flash is bad because it does not work on an iPhone. 

Technorati tags: , , ,

.NET Framework for Symbian

Red Five Labs has announced its implementation of the .NET Compact Framework for Symbian, the operating system used (most of the time) by Nokia.

It is currently in beta, and implements only version 1.0 of the Compact Framework, but nevertheless it is an intriguing development.

With this, Mono, Moonlight, and Microsoft’s own implementation of Silverlight 1.1 for Mac OS, .NET is getting more interesting for cross-platform development.

.NET history: Smack as well as Cool

Microsoft’s Jason Zander comments on my piece on the early history of ASP.NET:

  • The CLR was actually built out of the COM+ team as an incubation starting in late 1996.  At first we called it the “Component Object Runtime” or COR.  That’s why several of the unmanaged DLL methods and environment variables in the CLR start with the Cor prefix.
  • There were several language projects underway at the start.  The C++ and languages teams both had ideas (Cool was one of them), and in the CLR we wrote Simple Managed C or SMC (pronounced ‘smack’).  We actually wrote the original BCL in SMC.

He says these are corrections though they seem more like supplementary information to me. I don’t have any inside knowledge of this history other than what people who should know say to me (though I do also have my own recollections of what was said publicly). He may be reacting to the idea that the CLR came out of the VB team, which Mark Anders kind-of implied.

One of the reasons I love blogging is that multiple authors can have a crack at getting the facts right. A great personal example is when I asked the question Who invented the wizard; and a good candidate came forward over a year later. If you see something inaccurate or misleadingly incomplete on this site, please do comment or let me know by email.

Technorati tags: , , ,

Microsoft vs Mozilla Javascript wars

My comment is here.

Note this debate is not only about the merits of different versions of Javascript/ECMAScript. It is also about power and responsibility. However you spin it, and however far Adobe and/or Microsoft succeed with Flash/Silverlight/AIR, I think we can agree that the browser has an important role for the foreseeable future. It is also likely (though less certain, I guess) that Internet Explorer will continue to have a large market share. The company does have a responsibility not to hold back the Web, and that surely includes not obstructing the evolution of a high-performance Javascript runtime.

It is disappointing that Microsoft says so little about IE8, presuming it exists. If the company sticks by its undertaking to leave no more than two years between IE releases, we should expect it no later than October 2008, less than one year away. It would help web developers to know more about what will be in it.