Tag Archives: php

Microsoft WebMatrix released: a simple editor for ASP.NET Razor and more, but who is the target user?

Microsoft has released WebMatrix, a free tool for creating web sites for Microsoft’s web server. It uses the Web Platform Installer and installed smoothly on my Windows 7 64-bit box. What you get is a cleanly-designed tool which lets you start web sites from templates or from standard installs of popular applications including WordPress, Drupal and Moodle.

image

Yes, you can use PHP and MySQL as well as .NET web applications, though the common factor is that all are configured for IIS, Microsoft’s web server.

With many ISPs already offering instant installs of apps like WordPress, it is more interesting to look at the site templates in WebMatrix, though the selection is smaller.

image

What is interesting about these is that they create sites based on Razor, an alternative view engine for ASP.NET. Microsoft VP Scott Guthrie describes Razor here. It is odd though: Razor is a feature of ASP.NET MVC 3, currently in release candidate phase, but you cannot create ASP.NET MVC sites in Web Matrix.

Once a site is created, you can modify it in the WebMatrix editor.

image

You can run the site on IIS Express with one click. WebMatrix will show you all the requests as you run, which could be handy for tracing problems. There is also a database management workspace which uses SQL Server Compact Edition, a reporting workspace which will analyse your site for problems, and the ability to publish a site using  FTP or Microsoft’s Web Deploy.

I like the clean look of WebMatrix, and that it is lightweight and fast; but who is the target user? It appears to be aimed at non-professionals; but this is a techie product that will not appeal to users looking for an easy to use web site builder. There is no visual editor; users are just chucked in at the deep end editing raw HTML and C#. There is not even any intellisense code completion. Clicking Online Help just brings up a Microsoft search form. There is no debugger to speak of; you are expected to upgrade to Visual Studio. Which raises the question, why not just get Visual Web Developer 2010 Express, which is also free, and has a better editor and debugging features? Of course you could use the two together; but Web Matrix is not adding much value. Features like the SEO analysis seem to be be based on the existing Search Engine Optimization Toolkit, which you can install without Web Matrix.

WebMatrix has been available in beta for six months, but its forum is relatively quiet.

Still, if nothing else Web Matrix is a handy way to take a look at Razor, which deserves attention. Shay Friedman has a technical introduction here.

Guthrie has a detailed look at the WebMatrix beta here.

PyCharm: JetBRAINS IDE for Python and Django

JetBRAINS has released PyCharm, an IDE for Python and the Django web development framework.

The company is best known for the IntelliJ IDEA Java IDE, and indeed PyCharm is mostly written in Java, but now has other tools for languages including PHP and Ruby and Rails. It also does add-ins for .NET developrs working in Visual Studio.

PyCharm

PyCharm has a small number of refactorings, lots of code search and assistance features,  integrated support for CVS, Git, Mercurial and Subversion version control, unit testing with a graphical test runner, graphical debugger, built-in deployment to Google App Engine as well as error highlighting for GQL queries, and editing support for HTML, CSS and JavaScript as well as Python.

BBC iPlayer goes a little social – but what can it learn from YouTube?

BBC’s iPlayer, which offers but live TV and radio and an on demand catch-up service, has gone live with a new version that adds personalisation as well as links to Facebook and Twitter for limited interaction with your social media contacts.

Presenting a personalised iPlayer web page is more demanding, as every visitor sees a slightly different page. Technical Architect Simon Frost explains that the BBC adopted PHP and the Zend framework in order to enable sharing of components and modules – previously the site was built with Perl and server side includes.

It has been interesting to see the reaction in user comments to the announcement by James Hewines, which are more negative than positive. The gist of the complaints is that many users want the site to get out of the way rather than be a more interactive web destination, and find that the new version adds clutter rather than speeding navigation:

This site should not be fun to use. It should be … a very brief stop between powering the computer up and watching or listening a programme.

This does not necessarily mean the BBC is getting it wrong. It is not really hard to find items, and linking BBC content to social networks does have a certain inevitability. It is a shame though that the most interesting feature described by Anthony Rose back in May seems to be missing – integration with Live Messenger so that you can see your contacts comment on the live content. This is what it was meant to look like:

image 

That said, does it make sense to hook into Live Messenger when Facebook is more at the centre of today’s social networks on the Web? Still, this may appear at some future date.

As it is, we get only limited social interaction through recommendations. No ratings, no public comments or reviews attached to items, nothing that might add real interest to the site.

Contrast this with YouTube. It is a different kind of broadcasting of course, much of it amateur, quantity not quality, no live broadcasts as such, and content that persists (whereas BBC content disappears after a few days). Perhaps because it was born as a social media site, rather than being a traditional broadcaster trying to grok the Web, YouTube does community to a far greater extent than the BBC. Individuals can even create their own “channels” of content, becoming a destination within a destination that appeals to friends or those with the same niche interests.

The BBC’s exploration of social media is just too timid to make an impact. I interviewed Rose back in 2008 and he made a telling comment about how the BBC would remain a place safe from the unpleasantness of one-star ratings and nasty comments:

Rose says that upcoming iPlayer features, such as ratings and discussions, will be restricted to networks of friends, rather than made public. "Rating works really well in YouTube where you’ve got a million videos. In iPlayer, if you rate Parliament channel as zero stars, are you saying that Parliament is rubbish, or that you just don’t want to watch Parliament? Rating in the context of the BBC is very useful, but only when you’ve got a friends network."

Unfortunately safe also means dull, and I doubt the social aspect of iPlayer will make much impact as currently implemented.

I still love iPlayer. I have less time to watch than I would like; but I clicked the HD channel and was soon watching a stunning programme about scaling ancient buildings, in this case Durham Cathedral. Played full-screen, the photography was beautiful and the content both entertaining and educational, the BBC at its best.

image

image

Note that there was no need to involve the desktop player to enjoy this; it worked fine from the web; and I suspect that the download player gets relatively little use compared to the iPlayer site – the BBC won’t discuss this, saying “We cannot report on playback of downloads due to technical and data privacy restrictions”, which makes little sense to me.

Perhaps the comments are right – the BBC should concentrate on its content, and leave the social stuff to others who do it better.

New Delphi, RAD Studio XE announced

Embarcadero has announced RAD Studio XE and will be showing a number of “sneak peaks” during August prior to release in “early September”. You can see the previews and further information here.

The suite includes Delphi XE, C++Builder XE, Delphi Prism XE (Delphi for Visual Studio and .NET) and RadPHP XE.

The first preview focuses on integrated Subversion support, a nice feature but hardly a game changer – most IDEs have had this for years, though this looks comprehensive with differencing, file history and so on within the IDE.

image

There’s also a look at RadPHP, which is a new version of Delphi for PHP. It is reminiscent of ASP.NET Web Forms, in that it gives a drag-and-drop visual designer and lets you quickly hook up code to event handlers such as a button click. There’s also a component model and the ability to set breakpoints for debugging. We even get the old listbox and editbox demo which I recall from Delphi 1 days.

image

Embarcadero’s Mike Rozlog blogs about the new product here.

I am a big fan of Delphi and C++ Builder, but my initial reaction is that developers are going to say, where is cross-platform for Mac and Linux that was talked about last year, where is 64-bit Delphi? None of this looks remotely cutting-edge.

The published Roadmap is short on dates, but I’m guessing some of this may come next year.

XML literals come to PHP via Facebook: XHP

Facebook engineer Marcel Laverdet has written up the XHP project on which he has been working at Facebook, and which he says is “quickly becoming a cornerstone of front-end PHP development at Facebook”. XHP enables XML fragments to be valid PHP expressions. In addition, most HTML elements have been pre-defined as variables. The project is hosted on github and you can read a quick summary here. PHP inventor Rasmus Lerdorf has had a quick look and says:

The main interest, at least to me, is that because PHP now understands the XML it is outputting, filtering can be done in a context-sensitive manner. The input filtering built into PHP can not know which context a string is going to be used in. If you use a string inside an on-handler or a style attribute, for example, you need radically different filtering from it being used as regular XML PCDATA in the html body. Some will say this form is more readable as well, but that isn’t something that concerns me very much.

Lerdorf goes on to express concern about performance, but says that in combination with APC caching it is much better, and with HipHop compilation to native code becomes “a viable approach”.

One of the benefits here is that getting XML markup out of quoted strings means that it can be checked as it is parsed, so that errors are caught earlier. There are parallels with Microsoft’s work on Linq (Language Integrated Query) which pulls database queries into the language, and XML literals in Visual Basic 9.0. Ideally, developers should not have to hide code such as SQL, XML or Javascript within strings that are not checked for valid syntax until runtime.

This might also re-ignite the debate about whether XML literals should be in C#, now also gaining more attention because of the popularity of ASP.NET MVC.