WinFX

Today’s topic is on WinFX, the “core” managed API in the to-be-released Windows Vista. WinFX consists of 3 frameworks [1]:

* Windows Presentation Foundation (WPF/Avalon) – GUI APIs
* Windows Communication Foundation (WCF/Indigo) – Messaging API for inter-process / inter-machine
* Windows Workflow Foundation (WF)

WPF is straightfoward that it encompasses all the Windows Forms and drawing API. WCF is more interesting because the new API uses an SOA to locate both local or remote processes in the same way and communicate using SOAP. From [2] inter-WCF communcations will be performed using an optimized binary SOAP format, while non WCF will be standard SOAP. Hopefully the non-WCF protocol will be well-documented so that other technologies can communicate with WCF processes easily. I can forsee projects starting to build non-Microsoft adapters to communicate in WCF SOAP formats.

[3] shows some seasoned Windows Developers arguing that WinFX will never take over Win32, since all managed calls have to end up calling some Win32 functions. However the author explains that although WinFX functions are expected to be just wrappers to Win32 DLLs, the situation may be reversed in the future. Core Win32 DLLs now do little but to call pentium instructions to perform their task. The situation may later be reversed such that Win32 dlls become wrappers to WinFX functions as Win32 reduce in favour of WinFX. The same situation has happened to Win32 and Win16, where Win32 now takes over Win16 as the core API for the OS.

From what happened between Win32 and Win16, I believe that the same will happen to WinFX and Win32, as Win32 gets phased out. In the end, does that mean that future Java bytecode will be interpreted into WinFX calls by the Java interpreter and then interpreted into CIL by WinFX and then interpreted by the CLR before becoming machine code? Hmm…

[1] http://en.wikipedia.org/wiki/WinFX
[2] http://en.wikipedia.org/wiki/Windows_Co … Foundation
[3] http://www.ondotnet.com/pub/a/dotnet/20 … orn_01.htm

RSS – Really Simple Syndication

Just to fill in the “missing” entry on 9 May, I’m gonna talk about RSS. Many sites offer RSS, but I’ve been slow to catch up on whats that. It simply stands for Really Simple Syndication, which is a way of staying updated with the new stuff on a web site.

The best use is on News and Blogs websites, where the headlines of the updated news are published on RSS. RSS clients then regularly check for updates and the user is informed of any new things on the site (either manually or automatically).

Basically, the server-side (news/blog website) publishes a RSS feed, which is a small XML file containing a list of the updated items. Each item contains a title, a URL link, date and a text description. RSS clients, known as aggregators, regularly poll the XML file to download any updates for the user. The updates may be in a link form where the user can click back to access the website. This greatly increases the traffic for the news site, and allows users to stay updated with site content.

Aggregators come in a few forms:
* standalone applications – which a user must keep running in the background;
* plug-ins – such as a Mozilla or email client plug-in that shows as an icon in the host program;
* websites – a web application that does aggregation
* scripts – PHP, ASP or other web-based scripts, dedicates a small space on the site to display the updated content.

Each type has its advantages – standalone apps usually support notification such as a sound or popup when news arrive; plug-ins reduce the number of running applications you have; websites allow you to see what news you’ve already seen irregardless of the machine you use; scripts allow you integrate RSS into any of your website.

I have tried RSS and installed one custom PHP/AJAX RSS script into the starbean forum. I modified the script to do a nicer fade in/out to swap the news from CNA.

Competing technologies to RSS include Atom and RDF, which are also XML formats for online syndication.

RCP – Rich Client Platform

Thats the new kid on the block… RCP is a framework that allows developers to quickly assemble rich client components like menus, toolbars, drag/drop functionality, etc into a client application. Currently the most popular RCP platforms are Eclipse and Netbeans.

Basically the IDEs allow developers to build application much like the same way in the old VB4/VB6 days. They still lose to VS.Net when it comes to ease of development. However, consider that a step forward for the Java community.

The idea sounds good as a big picture, but it’s going to be a big headache for those implementing it. These real developers are stepping into the same (dung) as Microsoft programmers. For one, performing tasks are not so straightforward. To get a button on the screen to display a tab becomes a wild-goose chase in the API for which is the correct function to call. More spaghetti code. Second, debugging becomes just like Microsoft: developers don’t know what’s going on behind the scenes and those chain of method calls. Only one in a thousand will have the curiousity (and TIME) to really figure out how things run behind. That leaves the other 999 using trial and error to fix bugs, ugly workarounds as long it works… pastamania code.

Rich clients are not to be confused with thin/thick clients. Before 2003 [1], rich clients meant a thick or fat client. But now a client may be thin AND rich at the same time — having the interactive features of a rich client, yet processing and business logic are handled in a remote server.

[1] http://en.wikipedia.org/wiki/Rich_client

JACOB – Call COM objects from Java

backdating this to when i spoke to KK. He was trying to call an obsolete COM component from Java, and was using JACOB [1]. I’ve not used it myself, but it sounds like a good way if you REALLY REALLY REALLY need to call COM. I hate it, cos once you have JNI with COM, you can’t really run it on non-Windows platform without a change.

If REALLY necessary, eg. interacting with a hardware device, I recommend building an adapter interface (pattern) for the component, so that another adapter implementation can be written when you port it to another OS, and a driver for that OS exists.

[1] http://danadler.com/jacob/