Microsoft Going to REST

ASP.NET No Comments »

MS is firing on all cylinders to copy emulate Ruby on Rails’ developer friendly features. Among the deluge of new stuff released upon developers over the past few months I hadn’t yet realized there was a MS project named Astoria.

Quote:

The goal of Microsoft Codename Astoria is to enable applications to expose data as a data service that can be consumed by web clients within a corporate network and across the Internet. The data service is reachable over HTTP, and URIs are used to identify the various pieces of information available through the service. Interactions with the data service happens in terms of HTTP verbs such as GET, POST, PUT and DELETE, and the data exchanged in those interactions is represented in simple formats such as XML and JSON.

Yes, not on the site but in the pertinent documents they admit it’s RESTful, overcoming the fear of having theirs mouths washed with SOAP.
 This puts REST firmly into the essential learning category for web developers together with JavaScript, CSS and HTML. Here’s a good introduction into REST. SubSonic, the hottest “catching up with Rails” project, will have it built in real soon now.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Moving to Wordpress from DasBlog/ThinkJot

ASP.NET, Blogging Software 1 Comment »

Those looking for ASP.NET-driven blog engines will have a similar experience as those seeking ASP.NET driven discussion boards or Wiki applications: The choices are few and far between, and newer projects are rather immature and buggy. Compare this to the offerings available on the LAMP/PHP stack (Wordpress), or even for CGI/Perl (Movable Type), the options are much more mature and varied.

The Problem with ASP.NET 2.0

What are the reasons for this dearth in the ASP.NET field? After almost two years after its release it has become clear that ASP.NET 2.0 was quite disruptive for developers, not only those moving from ASP.NET 1.1 but also those starting afresh with 2.0: The much anticipated new version more than ever emphasises configuration over convention, making it harder to get up to speed in development. It also offers more ways of doing things, causing developer anxiety about best practices, security issues, personalization, localization etc. Add to that the slowness and relative (compared to VS 2003) buggyness of Visual Studio 2005 and it’s conceivable that ASP.NET has hurt developer productivity. The platform is so feature rich (read: bloated) that more and more developers are looking to simplify things, with projects like SubSonic (whose approach would have violated three-tier best practices not long ago) and the like (Monorail, NHibernate etc.) or by moving to Ruby on Rails entirely. And as if the built-in bloat isn’t enough we recently had the platform extended with Web Application Projects, AJAX (RoR has it built in), and the whole ASP.NET 3.5/C# 3.0/LINQ/Silverlight/Orcas smorgasbord that is looming towards the end of the year. This again leads to a wait-and-see approach with developers who are frantically listening and learning the new technologies and new apps such as the Expression Studio Stuff, and yes, IronPython, IronRuby, CSS, AJAX, JavaScript, Flex etc. I’m sure quite a few projects out there are not proceeding as fast as they should because of the current maelstrom of new technologies released in the wake of the Web 2.0 hype.
All the while PHP developers have taken the move to PHP 5 in their stride (with a one year head start over ASP.NET 2.0) and they now have quite a mature platform which they can bring to bear against ASP.NET’s technological superiority and feature-richness. With The Ruby on Rails ”innovation” is also going more slowly, especially with fewer big announcements, which soothing for developers.

Right now ASP.NET looks more and more like the new J2EE. And not in a good way.

ASP.NET 2.0 Blog Engines

DasBlog is still the primary ASP.NET blog engine and is now under more active development than it had been in the past. An ASP.NET 2.0 Medium Trust compatible version should be available REAL SOON NOW. As for other choices, .TEXT was incorporated into Community Server and forked into SubText.

For want of Medium Trust in the best engine DasBlog I had been using ThinkJot (a controversial DasBlog fork) since the start of this blog and was quite content with it. I’m just missing the modularity, maturity and community support of the most most prominent blogging app on the market, which is Wordpress. Yep, and the prettiness of the themes didn’t make this choice any harder…

Wanting to stay with an ASP.NET offering at first I had a look at Blogengine.NET and found it promising but a little immature and spotty in support of Unicode. However, development of this project is going rapidly so you might wanna check it out. There is another project out there, an ASP.NET blog engine driven by Subsonic which sounds like a good match. However, the project is not nearing completion as of now.

Making the Move to WordPress

So, back to Wordpress. As my hosting provider Crystaltech supports MySQL and PHP even on the cheapest hosting plan, I foresaw few issues with the migration and indeed it all went quite smoothly.

Here are some pointers as to the procedure I would recommend:

  1. DO NOT DELETE or modify your old blog, rather back it up with FTP to your local machine.
  2. Download Wordpress and unpack it into a directory on your local hard drive (such as C:\Wordpress).
  3. Create a MySQL database to host the app on your remote (hosting) server.
  4. Download SQLyog if you haven’t already done so do manage and monitor your remote MySQL database. The community edition is free.
  5. Edit the <Wordpress>/wp_config.php file to reflect the connection information of your remote database.
  6. Upload all files in the Wordpress directory to your remote web server. YOU DO NOT have to upload the files to the root directory, it might be more maintainable to create a directory on the remote server, name it /wordpress or sth. and upload the files to this directory.
  7. Run /<install dir>/wp_admin/install.php which will guide through the installation in just two steps. It is essential here that the e-mail address you enter exists and is registered with your mail server. If the address does not exist, the installation will abort without any verbose error message and you’ll have to start over, dropping the tables from the database (using SQLyog) etc.
    The table structure will look like this in SQLyog:
    image
  8. The installation will generate a password which will be displayed in the browser in step 2 of the installation. Note this password.
  9. You can now configure your application at <blog path>/wp-admin/, especially this process if you haven’t uploaded the Wordpress files to your root directory and still want the blog in your root.

Working with Windows Live Writer

Read this first, before you import your data! Aside from Blogjet, the blog editor with the most promise these days (for the Windows platform) is arguably Windows Live Writer. Since the Beta 2 version which is snappy and feature-rich at the same time, everybody should check out this app. It’s free too. Then again it’s still Microsoft software which causes problems as usual…
After a few trials importing my data I actually thought I had a Wordpress bug on my hand. Of course it wasn’t, the problems the problems were caused by a Microsoft app, Liver Writer. The usual suspects…
There are (at least) two issues with the Live Writer/Wordpress match that you should be aware of before importing your data.

Unicode Bug

The first is the Unicode support. Live Writer supports Unicode (UTF-8) as do PHP and MySQL, but Live Writer has an issue with needlessly prepending a byte-order mark:

Here is the workaround:

Non-ASCII characters render incorrectly on UTF-8 encoded blogs

Description: On WordPress 2.1+ and PHP versions older than 5.0.2, publishing posts using Writer results in non-ASCII characters showing up as either squares or question marks.

Reason and Solution: Writer erroneously prepends the UTF-8 Byte Order Mark to XML-RPC requests that are UTF-8 encoded. This prevents WordPress from correctly detecting the UTF-8 encoding declaration, so ISO-8859-1 is assumed instead.

Run regedit.exe and find the following key: HKEY_CURRENT_USER\Software\Windows Live Writer\Weblogs\<your-blog-id>

Verify that the subkey ManifestOptions contains a characterSet=”UTF-8″ value. If so, under the subkey UserOptionOverrides, add a new String Value named characterSet and leave its value empty.

ArgumentOutOfRangeException

The second issue is with Live Writer throwing an ArgumentOutOfRangeException when you try to load posts which contain <pre>,<script> or <style> tags that are not upper-cased. More information is here. So follow the steps I outlined below for importing from an RSS feed to avoid this issue.

Importing your Data 

With the above issues in mind, you can start importing your data.

Please note that this procedure is based on RSS export and therefore does not import comments. You might have to use BlogML to achieve this. The process is probably: Export from DasBlog and save as BlogML (XML) with the exe downloaded here, then convert to Wordpress WXR format with XSLT, and import.

To export/import via RSS proceed as follows:

  1. In your DasBlog/ThinkJot settings increase the number of items in your RSS feed to cover all the posts:
    Max. Days in Main RSS Feed**
    Max. Entries in Main RSS Feed
  2. Load the RSS into your browser by clicking on the RSS icon on your blog home page  or by entering navigating to http://<blog url>/SyndicationService.asmx/GetRss
    Save the XML displayed in your browser into a text file on your local drive, like c:\wordpress_export.xml
    You have to edit the file now For most users, Word is probably the most appropriate application, because now end-of-line characters have to be removed, otherwise they will be transformed into line breaks during import into Wordpress, messing up the layout.
  3. Take the following measures:
    • In MS Word>Edit>Replace>More>Special>Paragraph Mark  -> Replace with nothing (empty string). This leaves all HTML line breaks and paragraph markings intact but removes the invisible “\n” at the end of some lines.
    • Then replace two spaces with single spaces repeatedly to have only one space between words.
    • Then look for  <pre>,<script> or <style> tags and upper-case them, i.e. <pre> becomes <PRE> etc. If you’re using a code plug-in for Windows Live Writer, these might be the source of many of those tags. I’m using Steve Dunn’s Code Formatter Plugin which I like best. This plugin as most others use the <pre> tag. So upper-case it. Remember to save the edited file as plain text, not in doc or HTML format.
  4. Then you can import your file into Wordpress:
    In the Admin Dashboard of Worpress, go to Manage>Import or directly to <blog url>/wp-admin/import.php
    Click the RSS-link, browse to the file you edited above and click the “Import File and Upload Button”. This should import your old posts just fine. You can now load the posts into Live Writer with Recently Posted>More.. If it still bombs with an ArgumentOutOfRangeException you can edit the offending post in the Wordpress interface upper-casing the said tags and then try again.

To conclude, what took me a number of hours (as usual mostly due to Microsoft bugs [in one of their best products though]) should take you not more than an hour or so. Hope it helps.

Technorati Tags: , ,
[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Is the Pocket PC dead?

Pocket PC and Windows Mobile No Comments »

Three years ago I pondered what was missing from my collection of devices, and I thought that it would be great to have a GPS receiver that was a fully featured PDA, preferably a Pocket PC (PPC, as Palm was already on its death bed at the time). And from Mitac came along the mighty Mio 168 which I was very lucky to find at a department store in central Frankfurt, just before flying back to Thailand where I would have had trouble to find it at the time.

Over the past few years this had been my greatest gadget. I have read numerous books and articles in PDF format (Adobe Acrobat to convert anything into PDF is one of my busiest apps). You can read when the lights are out so you don’t wake wife and child. And besides the killer app Acrobat Reader anything that comes to mind will have the fitting mobile app.
GPS programs are almost to numerous to mention, most being freeware and merging geographic data nicely with desktop apps, with OziExplorer being my program of choice for years. Even before Google Earth you could take a scan or digital photo of maps and calibrate them with your OziExplorer, then upload the maps to the Pocket PC and navigate in places you have never been before and where there’s no traffic navigation systems. I also use the Pocket Office apps (especially Excel), guitar tuners and metronome freeware, Intelligolf for golf scores and statistics, Pocket Stars to navigate the night sky with the help of GPS, the incomparable Concise Oxford Dictionary, the Britannica Pocket Edition for quick reference and the Duden for German language reference. I hardly ever play games but there is excellent freeware chess, skat (German card game), even Monopoly. And then there’s the fantastic media player TCPMP for movies and MP3s. Anything you can think of, it’s out there somewhere, at good prices, much of it even freeware. 

From the developer standpoint, developer support for the Pocket PC (Windows Mobile) platform from Microsoft has been very good indeed, with the latest Compact Framework 2.0 making development of rich mobile applications very easy.

After having bought my second Pocket PC an HP iPAQ rx1950 for very little money about six month ago I was planning to use this second Pocket PC as a mobile MP3 player around the house, receiving the stream via Wi-Fi and playing it with the aforementioned TCPMP player.

Searching around the mall here in Chiang Mai the dearth of Pocket PC devices was truly surprising. I was at first discounting this as the a local phenomenon as Thais really don’t fancy bulky and complicated devices but prefer nimble and sleek phones and things that game. Looking further it became clearer that the classic large screen PPC has given way almost entirely to specialized and integrated devices. There are the dumb navigation units, some of which don’t even have the Windows Mobile 5 apps installed. Don’t even dream of installing OziEplorer or any other feature rich GIS app on these dunces. Then there are the integrated devices, the Pocket PC Phones and the so-called Smart Phones. With some notable exceptions, they tend to have much smaller screen than the “classic” Pocket PC (at most 2.8″ instead of 3.5″+ for the classic Pocket PC) making reading text difficult, and are clearly geared towards the mobile phone function. Per definition the Smart Phone also does not a touch screen.

Coming back home I my mood sank as I found that there are indeed hardly any new Pocket PC devices. Hell, even the wikipedia article is outdated! Then I googled ” Is the Pocket PC dead?” and found this discussion, with most posters confirming my fears even since about a year ago.

How can the most versatile gadget be dying? Is it the user’s yearning for “integration”. Or is it a business decision by the (former) PPC makers to move out of the market into increasingly dumb and specialized devices? With the Pocket PC Phones and Smart Phones it’s probably the former. Many users demand the integration of the mobile phone into the PDA. Especially business users have their address list at hand and can do all their communication with just one device.

With the navigation stuff and the overloading of the devices with doubtful features like cameras and keyboards, it’s clearly a business issue with obvious parallels to the mobile phone market. Navigation is the catchphrase of the past few years and with the map bundles the makers they can demand much higher prices than for classic PPC. Bundling the maps with a PPC would also make the maps more hackable. As for cameras and other doubtful features, it’s also the faint hope of the industry to be able to demand more money for doubtful extensions of the core feature set.

So the classic Pocket PC is being squeezed. But why are the devices discontinued at the current rate? What’s wrong with selling basic PPCs cheap and make them into commodity items? Right now it would probably be feasible to sell a basic Pocket PC for around 150 bucks and still make a profit. It might be that the extensibility and programmability of the PPC is coming back to haunt it. Why buy an expensive navigation unit if I can get the bits and pieces from the Internet?

This development must hurt the countless Windows Mobile developers who have trusted in a growing market for years to come. Will Microsoft come to their rescue and issue a PPC-based killer device? Will it have a chance against the iPhone or will it fare like the Zune? Or will there be a backlash as is brewing against “can do all” mobile phones which are good at everything except making calls? The PDA is defined by it’s versatility as a Personal Digital Assistant, a helper for all kinds of tasks that may come up. And their configuration is ultimately for the user to decide and not for the suits who have a vested interest in dumbing down the devices or overloading them in a frenzy of featuritis.

The Pocket PC isn’t dead yet, but it doesn’t look very healthy. Here’s hoping that user and developer demand will help this most useful of gadgets survive.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Berlin Wall (Berliner Mauer) in HD View

Panoramas;HD View No Comments »

HD View is a technology from Microsoft Research, merging pyramidic/pyramidal (mutiple layers with different pixel counts) viewing technology introduced by the likes of Zoomify with panoramic viewing today offered by viewers implemented in QTVR, Java and Flash. Microsoft have also addressed the issues arising from the perspective projection used by current panoramic viewers, which are especially obvious with wide-angle QTVR cubic panoramas. These problems make the viewing experience sometimes feel like a drunken stagger or LSD trip rather than a virtual reality experience. The HD View team implemented a smooth interpolation between perspective and curved (spherical) projections with the center of the view as an anchor. The speed and smoothness of the viewing is truly impressive even in the Beta version of the viewer, mainly because only the pixels being viewed are being pulled from the server.


Video:Creating and Viewing Gigapixel Images

This image of the Berlin Wall (Berliner Mauer) shows how revolutionary the “gigapixel” technology is. It lets you explore large objects on your computer screen (and later possibly from your armchair on a high definition television screen) as has never been possible before. It’s hard to image how this viewing experience could be achieved with any other medium. Having lived in Berlin when the wall came down I must confessed I have never experienced the graffiti on the wall with this ease and completeness.

Speaking of walls, shouldn’t it be possible to extend the technology to look through walls? This could be interesting for hotels where you can zoom into the lobby and the rooms from the outside.

Currently the HD View plug-in works only with IE on Windows XP, Server 2003 and Vista. Here’s hoping we’ll have the it working with different browsers and platforms soon.

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]

Health Care Quality and Costs in Thailand

Thailand No Comments »

The quality of healthcare in Thailand is truly amazing. Hospitals in larger cities are not only clean, well organized and staffed with friendly nurses and doctors, they also have all the latest technology and equipment. Add to that the dexterity and craftsmanship Thais have built over centuries, which today comes to the fore in high quality surgery. Having lived in Thailand for ten years I have yet to come across a foreigner being the “victim” of a botched surgery. Rather, everyone seems to be thrilled by the care they received at Thai hospitals and even the most difficult surgery being performed to the highest standards. And look at these prices:

image 
Source: Bangkok Post

[Slashdot] [Digg] [Reddit] [del.icio.us] [Facebook] [Technorati] [Google] [StumbleUpon]
WP Theme & Icons by N.Design Studio
Entries RSS Comments RSS Log in