More pictures from the DevReach Conference
Martin published pictures from the DevReach conference on his blog!
Software development is not a job. It is a style of living
Martin published pictures from the DevReach conference on his blog!
By Ruslan Trifonov on Sunday, October 29, 2006 0 comments
Having my Vista gadget from my previous posts(1,2), I decided to see if I'll be able to monitor the status of my Cruise Control.NET projects from my Pocket PC.
My Pocket PC is running WM2003 SE and hopefully it turns out to be possible.
PocketIE provides support for Ajax, however in order to run the javascript code from the CC.NET gadget some changes should take place:
xmlHttp = false;
try
{
xmlHttp = new ActiveXObject("Msxml2.XMLHTTP");
}
catch (error1)
{
try
{
xmlHttp = new ActiveXObject("Microsoft.XMLHTTP");
}
catch (error2)
{
}
}
By Ruslan Trifonov on Sunday, October 29, 2006 0 comments
Labels: Mobile
My previous post was about my Vista Sidebar Gadget for Cruise Control.NET. Today I'll drop few lines about the gadget source code.
As you see on the diagram in the previous post, the gadget is making http requests to a home made xml web service in order to get the status of the projects registered in the CC.NET service. The requests are performed with the help of the XmlHttpRequest object. The javascript code looks like this:
1 xmlHttp = new XMLHttpRequest();
2 var url = System.Gadget.Settings.read("url");
3 xmlHttp.open("POST",url,true);
4 xmlHttp.setRequestHeader("Content-Type","text/xml");
5 xmlHttp.setRequestHeader("SOAPAction","
http://tempuri.org/GetProjectStatuses");
6 xmlHttp.onreadystatechange=HandleResponse;
7 xmlHttp.send(soapEnvelop);
This sinpset creates a fresh XMLHttpRequest instance and performs the web service invocation.
One may ask the following questions:
This screen actually shows you what the 3,4 and 5th lines should contain. The first gray area shows what request should be sent. You just may copy the xml content provided and paste it in your source code. This is the content that should be placed in the soapEnvelop variable.
The second gray area shows what the response from the service looks like. It is obvious from the picture, that we will get a list of strings. So, we may use an Xml parser to navigate to the GetProjectsStatusesResult tag to extract its content.This is what the HandleResponse function does:
1 function HandleResponse()
...
2 var xmldoc = xmlHttp.responseXML;
3 var responseNode =
xmldoc.getElementsByTagName(
"GetProjectStatusesResult").item(0);
4 for (var iNode = 0;iNode <
responseNode.childNodes.length; iNode++){
5 var projectContent=
responseNode.childNodes.item(iNode).text;
6 var tokens = projectContent.split('|');
7
8 var imgTag=" ";
9 if(tokens[1]=="Success"){
10 imgTag=imgSuccess;
11 }else{
12 imgTag=imgFailure;
13 }
14 ...
15 }
...
By Ruslan Trifonov on Sunday, October 22, 2006 1 comments
Labels: Vista
I am a Cruise Control.NET fan. I'm also playing with Windows Vista for quite some time and decided to create a Sidebar Gadget for Windows Vista to monitor my Cruise Control.NET enabled projects Although I've played with Sidebar gadgets before (see this post) this time is even more challenging as I'm not a Javascript geek. In general my goal was to duplicate the functionality provided by the CCTry. The CCTry application is intended to give developers to monitor the status of the projects registered into CC.NET. It also provides additional functionality ,which is out of the scope of my gadget. Actually the main reason to create this gadget was to play a little with a stuff like async web services invocation and xml parsing in he Sidebar gadget environment. So, first of all I had to decide what kind of communication scheme to use between my gadget and CC.NET Service. The CC.NET Service is running on machine other than my Vista box. As far as I know there are 2 basic communication options within the Sidebar Gadgets:
1. Making HTTP requests via XmlHttpRequest object
2. Using ActiveX objects
I decided to use the 1st option and then google provided me with this useful post about using CCTry managed API to communicate with the CC.NET service through .NET Remoting. I then quickly came with the following scheme:
The white squares are the components that I had to implement:
1. CC.NET Sidebar Gadget
2. CC.NET Xml Web Service
I've opened VS2005 and quickly implemented the CC.NET Web Service. I've implemented one method with the following signature:
[WebMethod]
public string[] GetProjectStatuses()
This method gets all projects and their statuses from the CC.NET Service by using .NET Remoting. It returns a string array (a string per registered project) then. The string contains the name of the project , its status and the CC.NET Dashboard url - all delimited by the | symbol.
Example:
My Project 1|Success|http://ccnetserver/ccnet
My Project|Failure|http://ccnetserver/ccnet
That was not quite elegant solution, but it was the shorter dev path :)
I've power up my Vista box then and soon I had my gadget running: The gadget displays a list of projects registered in the CC.NET Service. Green light means that the project is in good health and red means that the projects build is bad:
The gadget provides a settings dialog where the user may provide the CC.NET Web Service Url and time interval to poll the web service.
The CC.NET Gadget(and CC.NET Web Service) source code may be download from here.
Next time I'll blog about the CC.NET Gadget source code...stay tuned
Sidebar Gadget Links:
Vista Sidebar and Gadgets
Windows Sidebar team's blog
Daniel Moth blog
By Ruslan Trifonov on Tuesday, October 17, 2006 7 comments
Labels: Vista
The first DevReach conference just finished and I'm back to my daily (and nightly activities :) )
I really enjoyed this 2 days . I liked the drinks, I liked the food - what more you may want from a dev conference :)
The content was pretty cool. Although, I could bear sessions that dig into deeper tech. matters , I may say the content was good enough. The interesting part was the Q&A panel first day, which turns out to be a live .NET Rocks!.
There was I great foreign speakers and few local guys as well. I really enjoyed all the sessions of Ted Neward - unfortunately he had 3 sessions only. I also liked the cool and easy session of Carl Franklin about RSS, Podcasting, and Syndication - I've learn some simple and valuable tips that I had no time to learn before. And hey , he had I great trick with playing cards at the end of the session and I'm really waiting to see if Carl will publish the code for it! :)
I liked the session of Hirsto Deshev about Atlas. I think the session was quite hard for most of the audience , but it was just what I needed.
Links:
Check out this interesting comments from Carl Franklin
See this pictures by Julie Lerman
Check out some comments and pictures by Sahil Malik
By Ruslan Trifonov on Thursday, October 12, 2006 0 comments
I decided to spent some time playing with Ruby On Rails on my Windows XP box. I've downloaded the InstantRails and found some good starting points to create my first app. I found this great webcast from Matt Griffith. Everything worked fine until I had to start WEBrck and got an error message saying:
...
WARN TCPServer Error: Bad file descriptor - bind(2)
D:/Ruby/lib/ruby/1.8/webrick/utils.rb:73:in `initialize': Bad file descriptor -
bind(2) (Errno::EBADF)
...
By Ruslan Trifonov on Sunday, October 01, 2006 0 comments