Category Archives: web authoring

image

Mix Unmixed

Microsoft had a good Mix07. Let’s start with the provisos. Silverlight with .NET may have been announced, but it’s a long way from delivery, with alpha code just posted and no date set. Adobe already has a widely deployed cross-platform runtime with an embedded Javascript engine, complete with JIT compiler.

Next, Microsoft is miles behind its rival in the design world; it’s Expression tools are just now appearing, while products like Illustrator, Photoshop and Dreamweaver are de facto industry standards.

Third, Mix07 had its share of hiccups, not least the bizarre closing plenary. The theme seemed to be the future of advertising: XBox maestro Robbie Bach entertained us for a short time with clips of in-game advertising, following which came a lengthy and less than sparkling panel debate, only redeemed by pithy comments from Economist Publisher and Managing Director Andrew Rashbash who reminded us that editorial independence still matters, which is a relief.

That wasn’t enough for most delegates. A little way into the debate I became aware of a distracting bonging noise from somewhere behind me. It was the doors clanging as attendees headed for the exit.

I have never seen so many people leave a Microsoft plenary, and I can’t shake off the suspicion that something else was planned for this slot, but pulled at a late hour.

Never mind, this was nevertheless a good conference for Microsoft. It is all about a one-two Silverlight punch. Punch one is online video. You know the story: streaming internet video used to belong to Real, Apple and Microsoft until Adobe sneaked in with a marvellous “it just works” implementation in the Flash runtime. How can Microsoft now compete? Two ways: price and quality. On the price front, it is giving away space on its streaming servers, a more than generous offer that is likely to be widely taken up.

Another factor is codecs. Flash has two, H263+ and VP6. H263+ is cheap to implement, thanks to to support in FFMPEG, but the quality is poor. The newer VP6 codec, from 0n2, is equally high quality but according to Microsoft’s Forest Key, less efficient:

We are 20% better. At constrained data rates, or at HD data rates, because it’s computationally more effective, we can do a significantly better job . We can do HD on a significant number of machines. You will be able to do HD video with Silverlight. That is something that Flash can’t claim.

On2 may dispute this, judging from the claims on its site; but even if Microsoft is only on a par, that might be good enough, bearing in mind the low cost of encoding and delivering:

Expression Media Encoder is a batch processing tool for delivering media to Silverlight. It’s an enterprise scale product. We have a streaming server that is part of Windows server. It is very cost effective. By comparison Flash has a very expensive SKU.

says Key. Another plus for Silverlight video is ease of development. Program Manager Wayne Smith closed his demo with a jigsaw puzzle video, by which I mean a jigsaw image, pieces strewn everywhere, with each piece playing a segment of video. This is not useful in itself, but it nicely illustrates that in WPF video is just another graphics brush. This makes it easy to integrate video into an interactive application, with overlays, user configuration options, multiple simultaneous videos playing, and so on. Welcome to interactive broadcasting.

I am not personally a video person; I’m more interested in the programming side. The second Silverlight punch is the announcement of official cross-platform .NET, something I’ve speculated about for a long time, since before .NET 1.0 was released. Why is Microsoft doing it now? In one sense it’s an admission of failure: there will never be a Windows-only internet, thank goodness. For the rest of us it is good news.

Will Microsoft compromise Silverlight to keep the full WPF better? That must be a risk; but Key insists not:

That’s not our concern. We’re going to make Silverlight as good as possible. We shouldn’t artificially sabotage Silverlight to keep differentiation.

Overall it’s a good story, and accounts for the generally enthusiastic reception which Mix delegates gave to the opening keynote, which was as good as the closing plenary was bad. Pay special attention to what the guys from Major League Baseball talked about, as this is where it comes together into a compelling deliverable.

With Silverlight and Expression, I now think Microsoft will make real impact.

Technorati tags: , , , , , ,

Mono may implement Silverlight for Linux

Mono lead Miguel de Icaza likes Silverlight. He says:

It makes tons of sense for us to start looking at an implementation of Silverlight on Linux with Mono. There is already a XAML loader, it is the perfect excuse to use Antigrain for high-speed graphics and that only leaves the pesky media issue to be solved.

In fact, am kind of happy that Microsoft did not do the port themselves as implementing this sounds incredibly fun and interesting.

Microsoft should grab this offer, if it is serious about cross-platform. Although Linux currently only forms a small proportion of desktop operating systems, it is nevertheless significant; Ubuntu in particular is making a big impact. Mac/Windows only may be kind-of good enough for the USA, but that’s not the case worldwide.

 

Technorati tags: , ,

Times Reader and offline Silverlight at Mix07

I’m attending a panel discussion on the WPF-based Times Reader, with Tom Bodkin, Assistant Managing Editor and Design Director at the New York Times, and media designers Roger Black, and Filipe Fortes.

Bodkin is talking about the Times Reader, which is sees as offering the best of both worlds – print and web. He is an enthusiast for the tablet PC, but prefers the smaller ones like the Fujitsu P1610 [I agree 100%, I’m on a Toshiba Portege M400 now, but still miss my old, smaller Acer C110]. He thinks that multi-purpose tablets have more future than dedicated devices like Sony’s reader.

He likes the fact that Times Reader publications feel like a publication – “it’s not webby”, he says. He’s showing off some of the features of Reader, including newer features like “news in pictures”, which is a slideshow of images, and the ability to add ink notes to stories when using a Tablet PC. “It’s a print publication plus”, he says. He demonstrates the intelligent reformatting that Reader provides. There’s also a great new search feature, which includes word search and a graphical topic map that shows related stories.

I asked about the cross-platform issue. According to Bodkin a Silverlight implementation is on the way, which includes most of the features in the full version, in “a matter of months.”

This intrigues me, as I had been told by some Microsoft people that Reader would be difficult to implement in Silverlight. Two obvious issues are the limited text features, and the lack of offline storage. There is isolated storage coming in Silverlight 1.1 (far more than a matter of months away), but this will be inadequate for Reader.

It turns out that Nick Thuesen is here, the lead developer for Times Reader. I spoke to him afterwards. He has a neat solution for Silverlight’s limitations. The plan is to use an embedded browser (Safari web kit) and to host Silverlight within that. This way, the native desktop app can handle offline storage; Silverlight becomes more like Adobe’s Apollo, a desktop rich internet application.     

Why not Adobe PDF? “There’s no reflowing, PDFs are really limited,” says Bodkin. “We had an electronic New York Times in PDF, but to read anything… it’s just impractical.” “And this can update,” adds Roger Black, “But the big thing to me is the type. How this will work in Silverlight is not completely worked out.”

Fortes talks about magazine publishing through a WPF Reader, with a more intensively visual appearance, embedded video, and community features like most popular articles, most popular ads. He is also saying that typical web content still lacks the sophistication that print provides (think fashion images, carefully designed text). I find this thought-provoking: is the Web really so bad for this? Clearly this is impossible for naked HTML, but when supplemented by Flash and/or clever CSS?

There’s discussion about the continuing bias towards metaphors that work in the print world but not in the web world. The suggestion is that we still have a lot to learn about how to present content electronically.

Bodkin says that the NY Times writes two sets of headlines; web headlines are more literal than print in order to work well for search engines. This reminds me of a post I made three years ago called Google edits the internet:

…how much of what we read on the Web is influenced by Google’s search and advertising algorithms?

Black talks about a problem with the Reader, which is its dependence on templates into which XML content is poured. Good though they are, this is restrictive in design terms, compared to the complete flexibility of print.

What’s coming in Times Reader? Bodkin mentions plans for video, downloaded on demand, and the possibility of interactive features such as those Fortes has described.

Finally the panel considers some of the business issues. Income from web sites such as nytimes.com remains only a tiny fraction of what is needed to run a newsroom with a global network of reporters; armies bloggers do not remove the need for professional journalists. If print is slowly declining (and I think it is – Thuessen mentions that he has never bought a newspaper), then the question of “who pays” is important and largely unanswered.

Sadly, I stopped using the Times Reader when it went pay-only.

 

Silverlight on the Mac: picture

Here at Mix07 we’ve seen some impressive demos of Silverlight running on the Mac. All the demos worked; the applications looked the same on the Mac as on Windows. Scott Guthrie showed “Silverlight Airlines”, which uses .NET code to call an ASP.NET web service. You draw a line between cities to show where you want to travel, select a date, and a grid populates with the available flights. Here’s my fuzzy picture, though I imagine the demo itself may be put online soon:

 

Technorati tags: , , ,

Using WordPress pages

Yesterday I posted an article on Office Open XML which is too long for a blog entry. Rather than creating a separate HTML file I used a WordPress page entry. WordPress pages are authored in the same way as blog posts, but are not part of the blog itself; they “live outside of the normal blog chronology.” You can organize them into a hierarchy of pages and sub-pages; they are important because they make it possible to build an entire web site in WordPress, using it as a simple content management system.

Curiously the page template in many WordPress themes omits comments. This caught me out: I marked the page as enabled for comments, but no comment form appeared. I fixed this by adding the following line to page.php:

<?php comments_template(); ?>

I’m now happy with the result and will probably use WordPress for further longer articles. In fact, I’ve already added a further page, this being my blog archive. When I migrated from bBlog to WordPress, I left the old blog engine in place so as not to break existing incoming links. However, although the old entries were still in place, most were left with no index link; they were effectively invisible. The new archive page fixes this; you can see all the posts since I started blogging in 2003: errors, insights and all.

 

Technorati tags: , ,

WPF/E is now Silverlight

Microsoft’s Flash alternative has a new name: Silverlight. Undoubtedly a radical shift in naming conventions. Back in 2005, Microsoft renamed Avalon to Windows Presentation Foundation, and I noted that:

These new names seem to be deliberately chosen to be forgettable.

Now we have memorable back. Interesting.

The name may be there, but the product is still in preview; the latest release remains the February CTP, with full release promised before July 2007. The emphasis is on video and vector graphics; there’ s no common language runtime implementation yet. You can write Silverlight code in JavaScript. It’s cross-platform, but currently only supports Windows and Mac; no device support yet. See the faq here for more information; and a useful summary from Tim Sneath who says there is big Silverlight news to come at Mix07.

 

Technorati tags: , , ,

HTML5 vs XHTML2 vs DoNothing

Simon Willison points to David “liorean” Andersson’s article on HTML5 vs XHTML2. This debate about the evolution of HTML has gotten confusing. In a nutshell, the W3C wanted to fix HTML by making it proper grown-up XML, hence XHTML which was meant to succede HTML 4.0. Unfortunately XHTML never really caught on. One of its inherent problems is nicely put by Andersson:

Among the reasons for this is the draconian error handling of XML. XML parsing will stop at the first error in the document, and that means that any errors will render a page totally unreachable. A document with an XML well formedness error will only display details of the error, but no content. On pages where some of the content is out of the control of XML tools with well-designed handling of different character encodings—where users may comment or post, or where content may come from the outside in the form of trackbacks, ad services, or widgets, for example—there’s always a risk of a well-formedness error. Tag-soup parsing browsers will do their best to display a page, in spite of any errors, but when XML parsing any error, no matter how small, may render your page completely useless.

So nobody took much notice of XHTML; the W3C’s influence declined; and a rival anything-but-Microsoft group called WHATWG commenced work on its own evolution of HTML which it called HTML 5.

In the meantime the W3C eventually realised that XHTML was never going to catch on and announced that it would revive work on HTML. Actually it is still working on XHTML2 in parallel. I suppose the idea, to the extent it has been thought through, is that XHTML will be the correct format for the well-formed Web, and HTML for the ill-formed or tag-soup Web. The new W3C group has its charter here. In contrast to WHATWG, this group includes Microsoft; in fact, Chris Wilson from the IE team is co-chair with Dan Connolly. However, convergence with WHATWG is part of the charter:

The HTML Working Group will actively pursue convergence with WHATWG, encouraging open participation within the bounds of the W3C patent policy and available resources.

In theory then, WHATWG HTML 5 and W3C HTML 5 will be the same thing. Don’t hold your breath though, since according to the FAQ:

When will HTML 5 be finished? Around 15 years or more to reach a W3C recommendation (include estimated schedule).

I suppose the thing will move along and we will see bits of HTML 5 being implemented by the main browsers. But will it make much difference? Although HTML is a broken specification, it is proving sufficient to support AJAX and to host other interesting stuff like Flash/Apollo, WPF and WPF/E, and so on. Do we need HTML 5? It remains an open question. Maybe the existence of a working group where all the browser vendors are talking is reward in itself: it may help to fix the most pressing real-world problem, which is browser inconsistency.

 

Technorati tags: , , ,

Delphi for PHP first impressions

I tried out Delphi for PHP for the first time this weekend.

Install on Vista was smooth. The setup installs its own copy of Apache 2 and PHP 5. A few minutes later and I was up and running.

The IDE is Delphi-like. Here is a scrunched-up image to give you a flavour:

 

I have a standard application I build when trying out a new development tool. It is a to-do list with a listbox, a textbox, and buttons to add and remove items from the list. I started well, and soon had the controls placed, though they are tricky to line-up nicely. I resorted to setting the Left property as the snap-to-grid did not work for me.

Then I double-clicked the Add button. As expected, I was greeted with an empty Click handler. What to type? After a little experimentation I came up with this:

$this->lstItems->AddItem($this->ebItem->Text,null,null);

When you type ->, the editor pops up autocomplete choices. Nice. I clicked the run button and the application opened in my web browser. I set a breakpoint on the line; that worked nicely, especially after I displayed the Locals window so I could see the value of variables.

The next step is to implement removing an item. This is fractionally more challenging (I realise this is little more than Hello World), since I need to retrieve the index of the selected item and then work out how to remove it.

I am embarrassed to admit that it took me some time. Yes, I tried the documentation, but it is terrible. Unbelievably bad. Someone ran a thing called Doc-O-Matic over the code. Here’s the entire description of the ListBox control:

A class to encapsulate a listbox control 

There’s also a reference which lists methods, again with a one-line description if you are lucky. Here’s the one for ListBox.getItems:

This is getItems, a member of class ListBox.

I gave up on the docs. I had figured out AddItem; I had discovered that the itemindex property has the index of the selected item; but there is no RemoveItem or DeleteItem. I went back to basics. The ListBox has an _items member field which is an array. In PHP you remove an item from an array with unset. I resorted to editing the VCL for PHP by adding a RemoveAt method to CustomListBox:

function RemoveAt($index)
{
unset($this->_items[$index]);
}

Note that I am not proposing you do the same. There must be a better way to do this. I just couldn’t work it out quickly from the docs; and I was determined to get this up and running.

Here’s my code for removing an item:

$selindex = $this->lstItems->itemindex;

if ( $selindex > -1)
{
$this->lstItems->RemoveAt($selindex);
}

Now my app worked fine. What about deployment? I used the deployment wizard, which essentially copies a bunch of files into a directory, ready for upload. There are a lot. 44 files to be precise, mostly of course the VCL for PHP. Still, it was painless, and you can configure a web server to share these files between different applications.

All I needed to test it was a web server running PHP 5.x (it will not work with PHP 4). Fortunately I had one available, so I uploaded my first Delphi for PHP application. It looked good, but although it worked on my local machine, the deployed app throws an error when you click a button:

Application raised an exception class Exception with message ‘The Input Filter PHP extension is not setup on this PHP installation, so the contents returned by Input is *not* filtered’

I note that this user has the same problem. My hunch is that Delphi for PHP requires PHP 5.2 – I only have 5.1 at the moment.*

In addition, I don’t like the way the default deployment handles errors, by publishing my callstack to the world, complete with the location of the files on my web server.

How secure are all these VCL for PHP files anyway? What assurance do I have about this? Will they be patched promptly if security issues are discovered?

Important questions.

There will be plenty more to say about Delphi for PHP. For the moment I’m reserving judgment. I will say that the release looks rushed, which is a shame.

Update: I’ve now seen a fix posted to the Borland newsgroups for the input filter exception, showing how to remove the code which raises it. However I suggest you do not apply this fix, for security reasons, unless you are deploying on a trusted intranet. It is vital to sanitize PHP input on the internet.

*PHP 5.2 is not the answer. It could even be a problem. Delphi for PHP ships with PHP 5.1. There is an input filter extension which you can add for PHP 5.x; see http://pecl.php.net/package/filter. However these are built into PHP 5.2; but the version used by VCL for PHP is old and seems to be incompatible. What a mess.

Technorati tags: , , ,

Try Delphi for PHP for one day

Codegear is offering a free trial of Delphi for PHP … for a single day:

Long enough to evaluate a developer product? To my mind this is taking RAD a step too far. Just as well, since, this is what I got when I tried to download it:

This means one of two things. It either demonstrates the huge interest in Delphi for PHP, or the unfortunate lack of scalability in CodeGear’s server applications. Which, it appears, are not coded in PHP.

To be fair, the product has just been slashdotted. The thread is not especially illuminating so far, though I thought this was a telling comment:

For a reference, this is how this looks in plain PHP (granted no MVC and so on, but for the sake of example..):
<?php echo “Hello World” ?>
What does Delphi do?

  1. Loads several thousand lines VCL code
  2. Loads all the menu, form, container and “external” controls, although they’re not used (thousands of lines of code)
  3. The Hello World is a label (no simpler way) which has around 50 properties (color, bg color and what not) defined in an XML file. I left all at defaults, but never mind. The file is loaded, parsed.
  4. The Label class inherits from CustomLabel, which inherits from Components which inherits from other stuff I didn’t even bother check, it goes through all properties, and figures out after a lot of thinking that it should print the words “Hello World”.

Yes, that’s the trade-off with frameworks, though some are better than others. Now we need some counter-examples. Anyone?

 

Technorati tags: , , ,

Delphi for PHP is done

Hot on the heels of Delphi 2007, CodeGear has announced the completion of Delphi for PHP. Apparently download purchasers can buy immediately.

The name is controversial: this product uses neither the Delphi IDE, nor the Delphi language. Rather, it is inspired by Delphi; maybe it was created with it too. I guess it would have used the Delphi IDE had it not been a third-party buy-in; perhaps it will in future.

The associated library, called VCL for PHP, is meant to be open source; but its home page on SourceForge remains empty at the time of writing.

More when I’ve had a chance to try it out; again, I’d be interested in hearing from early adopters.

 

Technorati tags: , , ,