Thursday, April 30, 2009


XUpdate was supposed to be an XML language for updating arbitrary XML documents. It used XPath for selecting a set of nodes to modify or remove.

Unfortunately, there is not much development on either the specs or the implementations.


Merging XML with XUpdate (link), XUpdate update (link), Editing XML Data Using XUpdate and HTML Forms (link)

XML Diff and Patch GUI Tool

Here is the GUI for the previously mentioned XML Diff and Patch library. There’s not  much to it, comparing to the console version, but the link is there, just in case someone needs it.

The XML Diff and Patch GUI Tool

Wednesday, April 29, 2009

Using the XML Diff and Patch Tool in Your Applications

I found an excellent piece of code that compares two XML documents. The difference to the in-built comparer in Linq to XML is that XMLDiff uses comparison options. Hence it is possible to say that the comparison of the XML is to be done ignoring whitespaces, or ignoring the child sort order. This last option is what I was looking for.

At the same time, I prefer to use a common solution or a library than to write the same thing myself, assuming there is one out there.

The project files were created in .Net 1.1 but are easily upgradeable to .Net 3.5.

Usage is extremely easy and straightforward:

public void xmldiff_test()
XDocument doc1 = this.getDoc1();
XDocument doc2 = this.getDoc1Inverse();

// XMLDiff is using XMLDocument
XmlDocument docx1 = new XmlDocument();
XmlDocument docx2 = new XmlDocument();

XmlDiff diff = new XmlDiff();
diff.IgnoreChildOrder = true;
diff.IgnoreXmlDecl = true;
diff.IgnoreWhitespace = true;
bool result = diff.Compare(docx1.DocumentElement, docx2.DocumentElement);


And the two functions create two XML XDocuments with children in different order:

private XDocument getDoc1()
XDocument doc = new XDocument(
new XElement("root",
new XElement("child1"),
new XElement("child2")

return doc;

private XDocument getDoc1Inverse()
XDocument doc = new XDocument(
new XElement("root",
new XElement("child2"),
new XElement("child1")

return doc;

The link to the text and the download are below:

Using the XML Diff and Patch Tool in Your Applications

Saturday, April 25, 2009

Add a Blogger Label to a Post in Windows Live Writer

Windows Live Writer now supports Blogger labels. I am using them to group related article because it gets difficult to find certain post over time.

To insert a Blogger ( label to a post use the field “Set categories”, which is located just below the text editor area. This will insert the categories/labels with the post. Use comma (,) to separate the labels.

Samsung OMNIA Review (Phone Arena Reviews)

Here is an excellent review of Samsung Omnia mobile phone. If other reviews are as good and thorough as this one, this web site is an excellent reference as a source of information for other mobile phones, too.

Updated on September 02, 2008 due to changes caused by a newer ROM version.

Samsung OMNIA Review (Phone Arena Reviews)

Samsung OMNIA Size Compare (Phone Arena)

I just found out about Samsung’s Omnia. Finally a phone I really like. Has just about all the features I may want and at a decent price.

Anyway, back to the topic. Here is a nice phone visual comparison tool. If you are concerned about the design or the dimension of a certain model of a mobile phone, you can compare it to its peers at the address below:

Samsung OMNIA Size Compare (Phone Arena)

Friday, April 24, 2009

Google Chrome Search

Now, this is a cool new feature for a web browser:


I have just visited and searching for the Samsung Omnia mobile phone/PDA. Chrome remembered both sites and added them to the search providers list. Now, whether I type in the address bar, or open a new tab, I have the ability to search these, previously visited, web sites.


This is excellent. Keep bringing on the new features! I'm already wondering how could I have lived without it...

Wednesday, April 22, 2009

My ToDo List Program

I am actively using AbstractSpoon’s ToDoList. It is the best software for todo lists I have seen. Probably because it shares the same concepts about todo items with me. It had the most important features years ago and lately only continued refining the abilities it offers. Here are a few additional pieces of software that work with ToDoList files (.tdl):

  • Gantt Viewer for ToDoList (link)
  • Calendar View for ToDoList (link)

Tuesday, April 21, 2009

JAVA Developer’s Guide

Here is a free book available online. Excellent guide for aspiring JAVA developers

JAVA Developer’s Guide

Friday, April 17, 2009

SpringSource Team Blog » Write your Google App Engine applications in Groovy

Here is a nice introductory article about Groovy on Google Apps. An example of Groovlet is here:

   html.html {    
head {
       title "Hello"     }    
body {
       p "Hello Groovy World!"     }

SpringSource Team Blog » Write your Google App Engine applications in Groovy

Thursday, April 16, 2009

WebChunks :: Firefox Add-ons

Webchunks is a Firefox3 implementation of Microsoft Webslices (feature appeared with IE8). It allows you to "follow" an area of a web page through a dedicated feed bookmarked in a new toolbar. Clicking on the toolbar entry shows the information related to your choice in a popup, without the need to open a complete web page. Should you follow information that can expire like eBay auctions, the style (bold or italic) of the toolbar's entry will reflect the status of your entry: new, expired, about to expire. With the help of an extra extension, Greasemonkey, you can insert webchunks/webslices markup into any web page so the Webchunks extension handles it. This is something the Microsoft implementation cannot do, it entirely relies on the server's markup. Please note Greasemonkey is not mandatory for Webchunks. A tutorial for Webchunks is available at

WebChunks :: Firefox Add-ons

After you install the extension, check it functionality at IE8 WebSlices site.

Wednesday, April 15, 2009

GWT Resources

Here is the reference in order to use GWT successfully…

GWT Project Basics

GWT projects consist of three elements:

  1. Module, module-name.gwt.xml
  2. Host, module-name.html
  3. Code,

Module defines the entry point, which is found inside the code file. After creating the code file, add line similar to:
<entry-point class="MyProject.client.MyCodeClass" />
to the module XML file.

The code file implements the EntryPoint interface. This file contains onModuleLoad() function, which is similar to main() in C or Java. Additional classes can be implemented as simple Java classes. They should import needed namespaces. This is done automatically by Eclipse. The resulting code for the application is very similar to C# or Java. The only thing missing is the designer support for UI classes. It would be extremely nice to have a designer to produce user interface and event linking automatically and/or visually.

HTML file contains a link to generated JavaScript file(s). This link is created automatically if you use Eclipse and GWT plugin. During the creation of HTML file in Eclipse there is an option to select the module(s) to be used. All the modules in the project get included in the HTML file by default. You should include only the modules that will be actually used on the host page. The other code files (.java) can be shared among different modules. HTML files can be left blank if the UI is to be manipulated completely in code, or it can contain some UI elements as well. These are usually only containers that will contain other elements which will be defined in code. One HTML host page can host multiple GWT applications. In that case, each application should have its separate container and not use the whole RootPanel (page body).

GWT Concepts – No Multiple Pages

Here is the first thing that is not obvious for newcomers to GWT: There are no multiple pages involved in development. I was wondering, just like many others I guess, how to add another page to my GWT application. The answer from is below. It will take some time to get used to it. And I still hope this changes in the near future.

I am new to GWT, though I have dabbled in C#/Java before so the language itself doesn't boggle me that much, but it seems some of the simpler concepts aren't sticking. Im pretty sure the answer to my question is so obvious, as I have not seen it answered in any of the tutorials on GWT on the web. What I wanted to know is, how do you do page navigation in GWT? For example I have my new class, with its onModuleLoad function, which is fine, but say I want to click a link and load a new page with a different onModuleLoad function?

As others have pointed out, the Right(TM) way to do this is using the History mechanism. There are many strategies for working this into your application's internal syntax and structure. However, there are a few other basic concepts I think you might want some clarification on.

First, you should think of your GWT app as a single HTML page, in which user and application events cause PORTIONS of the page (ie DOM elements) to change, be replaced, or loaded with content from the server or internal application logic. In general you will not be sending the user/browser to another "real" URL. Your initial HTML page is basically a canvas on which your GWT application spews up content in response to user or server events (the typical AJAX model).

In the example of your login function, when your app has successfully received authentication credentials from the user, its next job will be to kick the login widgets off the page, and replace them with "whatever is next".

Second, you will probably find that the majority (if not all) of your user navigation paths are not coded in raw HTML. The GWT ui classes provide all the event handling and navigational connectivity that you would find in a typical desktop application. Although it is possible use raw HTML links to navigate your application, the GWT widgets are much easier to work with, test, and maintain than raw HTML files. So instead of following an <a href="blah blah">blah</a> and "going somewhere else", you will create event listeners that respond to mouse or key clicks which cause your app to change what is already there.

Finally, you typically will only have one EntryPoint implementation with an onModuleLoad method in your application. That class will be responsible for initializing your application - probably by creating classes for the UI, classes for handling UI events, and classes for managing your applications internal state. In a lot of the samples, the class which implements EntryPoint also implements all of the UI, the event handlers, and the application logic, but that's only to reduce the amount of code you have to read. In any serious application you will want to factor those things out into different classes (as in MVC).

It might be helpful to think of your EntryPoint.onModuleLoad() as if it were simply the main() method of a more traditional application.

Tuesday, April 14, 2009

Ajax on Java

Since I’m working on a web application, using Java, I’m looking to enhance the functionality using Ajax on the client-side. So, the focus turns to a part of my development environment I wasn’t paying attention to – Google Web Toolkit.

It offers the developers to develop the AJAX front-end by developing it in Java. This allows for edit-refresh-view cycle we’re used to. It also allows for easy debugging by stepping through the code. Using GWT’s built-in web browser allows the developer to view the changes in code effective immediately, just by refreshing the edited page. GWT then compiles the code into client-side JavaScript. The compiled JavaScript is highly optimized and is supposedly better than hand-maintained code.

If you’re looking for more detailed list of features, check the GWT Overview.

Sunday, April 12, 2009

JavaServer Faces - My first encounter

Playing with Google Apps templates and Eclipse led me to usage of Java Server Pages instead of servlets for output. For the first time, in Eclipse, when I used a wizard for creation of JSP page, I saw a few more options, which included Java Server Faces (JSF) pages. Wondering what that might be, I read the article JavaServer Faces - Wikipedia, the free encyclopedia which was a bit mind-boggling, after working with Microsoft technologies.

JSF is a framework that should simplify development of user interfaces for Java EE applications. It uses UI components and saves their state after a user. The state is restored when a user activates the interface again. It can use JSP as a display technology but it can also use other technologies, like XUL. This combines into a powerful combination. JSP contain custom tag libraries which enable customization.

This technology is meant to compete with Microsoft ASP.Net, being a component-based framework.

Servlets and Java Server Pages

Moving on with Google Apps engine. After I've ported some logic into Java, now I'm looking on how to render some output.

There are nice introductory tutorials about Servlets and Java Server Pages but these are a bit outdated. Nonetheless, they represent an excellent introductory material. Then, there are intermediate and advanced tutorials, with material available in PDF. There is more than enough material to get you started.

I have found the level where I got stuck and am going to enjoy some reading about templating and scripting.

Photosynth is out!

Photosynth, Microsoft's software that creates a 3D scene from a bunch of photographs taken at the same location is finally out! I remember looking at the initial videos a couple of years back, where the team was demonstrating the features by displaying a 3D synth of Piazza San Marco in Venice.

The software package that allows you to create your own synths of places you've visited is available at the link below. There is also a short tutorial on how to prepare the pictures for a useful synth, like not photographing one-color areas, or shiny materials, etc. This could be exciting. The only drawback is that the initial version of Photosynth is implemented as a service so you have to upload all the photos to the site. If you have a high-speed Internet connection and are willing to try, enjoy it.



Saturday, April 11, 2009

Uninstalling Live Mesh Beta

Known Issues List contains instructions on how to fully uninstall Live Mesh even if the installation is damaged (which often happens to me). Also, there are instructions on how to install Mesh without UAC.

My installer is broken so I had to manually remove all traces of the client in order to be able to install it again.

Live Mesh Beta: Known Issues List

Issue: Live Mesh is not installed or is installed partially and the customer sees a dialogue stating that Live Mesh cannot install because it is already installed.  Customer is not able to uninstall Live Mesh.

Cause: This experience is typically caused by an interruption in the normal installation process leaving the Registry in a state where certain entries are not removed or added properly.

Possible Workarounds: The Live Mesh installer, LiveMesh.exe, can be used with switches from a command line to install, uninstall, or repair Live Mesh. Note: sometimes you may need to repair the Live Mesh installation before uninstalling it.

     Using LiveMesh.exe switches 
          1. Download the LiveMesh.exe installer
          2. Navigate to and log in using your Live ID
          3. Click on the Devices tab
          4. Select Add Device
          5. Select your platform choice then click Install
          6. Pick the option to Save (remember this location)
     If you are installing on Vista, you will need to run these switches from an Elevated Command Prompt.
          1Click on Start
          2. Select All Programs
          3. Select Accessories
          4. Click on Command Prompt (Please note: if you are installing on a Windows Vista computer, you will need to right-click and select Run
              as administrator)
          5. Once you are in your Command Window navigate to the location that you saved the LiveMesh.exe installer and type one of the following:
                  LiveMesh.exe /repair (assumes the product was already installed or needs to be repaired)
                  LiveMesh.exe /uninstall (removes the product)
                  LiveMesh.exe (no switch, installs the product)


If installing/uninstalling from a Command Prompt does not work, you may need to manually remove the Live Mesh Registry entries.

      Manually editing the Registry
           1. Click Start
. Click Run
           3. Type Regedit and hit Enter (if you are on Vista you will need to agree to a UAC prompt)
           4. In the Registry Editor remove the following Registry entries:
                 \9D1E4BCD781B45B479E1418784C5A935   (NOTE:  value will be unique to you.)

Friday, April 10, 2009

Getting Started with Java GoogleApps

I registered for Java with GoogleApps and I’m full on into setting up a development environment and getting my first “Hello Web” application onto the platform. The development, according to the documentation is extremely simple.

Some useful links are listed below. For setting up the development environment:

Some HTML parsing libraries:

Templating libraries may come in handy:

  • JTPL - simple template engine for Java servlet

Thursday, April 09, 2009

Groovy - Home

Groovy is a superset of Java programming language and should soon be available on Google Apps platform (appspot). Google Apps announced yesterday that they are supporting Java as a development language.

Looking forward to my invitation. Got JDK and Eclipse ready. I find this to be an excellent step forward in bringing forward both Web as a development platform and Java as a programming language. Finally some strongly-typed language gets more popular and available online.

Groovy goes a step further by adding meta-programming features. This includes dynamic typing so I'm interesting how that is going to work out.

Groovy is like a super version of Java. It can leverage Java's enterprise capabilities but also has cool productivity features like closures, builders and dynamic typing. If you are a developer, tester or script guru, you have to love Groovy.

Groovy - Home

AppJet Error

AppJet error in library global/printing.js

JavaScript Error: Cannot call method "write" of undefined (Line 214)

I had this error while I was working on an application at AppJet. It was weird because the code was breaking on a simple print() function.

This error is caused by the fact that “page” variable is used by Appspot as a global variable representing the page to be displayed to the visitor. Page contains Body element (page.body) and print is an alias for page.body.write.

In my case, I was using page in one of the functions to retrieve other page from the web and then parse it internally. This redefined the main page variable and then writing strings on the page would not work anymore.

So, if you happen to get the same error, rename your “page” variable into something else. :)

Ajaxload - Ajax loading gif generator

At Ajaxload you can select your own indicator for UpdateProgress indicator. This is quite convenient if using Ajax calls, to indicate that there is something going on in the background.

Simple usage in ASP.Net is to put one of the created images into UpdateProgress control, which is displayed when an Ajax call is made from UpdatePanel.

Ajaxload - Ajax loading gif generator

New Live Mesh Issue – Infinite Upload

As of couple a days ago my Live Mesh client at home is going nuts. It is constantly uploading something. The funny thing is that the tray icon does not indicate any activity. NetLimiter Monitor also does not show any activity per processes running but the wireless traffic indicator points that there is something being uploaded all the time. Looking at the logs does not reveal anything.

The issue has been raised on the Mesh Forum - link, and submitted on the Connect site - link.


I can not uninstall the Mesh client. I removed the client manually, according to the instructions in the Known Issues post but without any differences in behavior after the new installation (with UAC turned back on).

Also, since the only installation package available for download is build 14, I can not install it with UAC turned off.

Monday, April 06, 2009

Enabling Code Coverage in VSTS Test Runs

To Enable Code Coverage in VSTS Unit Test runs go to menu Test->Edit Test Run Configurations. Select the configuration you want to edit. By default this is Local Test Run. Configuration window will open, displaying options for the default test run. Selecting Code Coverage in the window on the left will present the Code Coverage options. On the right-hand side, elect the checkbox next to the DLL you want to run code coverage on. Now, every time the Unit Tests are run, the Code Coverage will also run for the selected DLL.
Just note that Debugging a unit test, as opposed to Running it, will not include Code Coverage.

Unit Tests with VSTS 2008 in a Context Menu

Unit testing in the .Net Framework 3.5 is quite usable and has so far managed to replace the dependency on NUnit libraries in most of my new unit tests. One of the issues I was having recently was that TestDriven.Net plugin would hang on different occasions so I started using default test runner for Microsoft’s unit test library.

In Visual Studio, you can display Test Tools toolbar and Run or Debug unit tests from there. There are also keyboard shortcuts that do the same thing, which is convenient if working on unit tests or code and then wanting to run the current test without moving a hand for the mouse. The shortcuts are as follows:

  • Ctrl+R, Ctrl+T = Debug tests in current context.
  • Ctrl+R, Ctrl+A = Debug all tests in solution.
  • Ctrl+R, T = Run tests in current context.
  • Ctrl+R, A = Run all tests in solution.

Running or debugging tests in current context means that, if the cursor is within a test method, only that test will be run/debug. If the cursor is outside the test method but within a test class then all the tests in the current test class will be run. Etc.

It is also convenient to see the Test Results window during debugging. One thing that is important, though, is that debugging unit tests in this way has not crashed Visual Studio 2008 once so far!

One thing that would make life even easier is to have the convenience of running and debugging unit tests through context menu, just like TestDriven.Net does.  This is fairly simple thing to do yourself:

1. Right-click toolbars and select Customize.


2. Display Context Menus


3. Now, in the toolbars, open the Editor Context Menus


4. In the Customize window, go to Commands tab, then click Test category.


5. All the available context-menu options will be displayed in the area to the right. Find whichever option you like (for example, “Debug Tests in Current Context”)


and drag it to the Editor Context menu to a position you like.

6. When you close Customize window everything will be set up. The final result will look like this:


One more thing that is extremely positive is that running tests with VSTS framework, as opposed to TestDriven.Net, allows you to edit code while debugging which was not the case with TestDriven!

Saturday, April 04, 2009

Online Databases

The next step in my web site creation is to use online databases. To use them I will need to have an online application at the same time. Below are the two I know of and that I need to play around and see if they satisfy my basic needs.

Free Online Database Application Creator: Zoho Creator


Friday, April 03, 2009

Microsoft Application Virtualization 4.5

Former SoftGrid is now Microsoft Application Virtualization (App-V). It is similar to other solutions offered by other providers, like (now) VMWare’s ThinApp or Citrix. Apparently, it will be possible to access an application remotely, similar to Citrix. It will also be possible to create portable applications that do not have to be installed, similar to ThinApp.

Microsoft Application Virtualization 4.5 will be available as part of the Microsoft Desktop Optimization Pack and Microsoft Application Virtualization for Terminal Services

What I would ultimately like to see in the application virtualization space is a solution that works in a manner similar to SandBoxie. The whole installation can be boxed and, once done, packaged in a portable version. This is what ThinApp does but I do not like having a separate, clean machine just for creating portable applications.

Microsoft Application Virtualization 4.5