Archive for the '.NET' Category

Webservice Interoperability

April 17, 2007

I’ve had the joy over the last few days of working with a developer to figure out why a Web-sphere web service won’t talk to a .NET web service. The Java team were saying it was a .NET issue, and the .NET team were saying it was a java issue. The culprit? The .NET web service didn’t like an XML declaration in the soap message from the Websphere service. Both the messages (with or without) conformed to the wsi.org specifications however. Was good to get it all working and I learn’t alot about web services. I’d like to work more with them and will be making one of my own for something I’m working on.

I managed to collect a few good links on the topic:

Platform Interoperability: Sun ONE and Microsoft .NET, Achieving Asynchronous Communications

Web services programming tips and tricks: Improve the interoperability between J2EE and .NET, Part 2

Improving Web Service Interoperability

IBM WebSphere Studio and Microsoft .NET Working Together — Part 1

Advertisements

Trace listeners

October 3, 2006

In my post Solutions for basic logging I gave a very brief look at some solutions for implementing basic logging in an application. One of the tools I forgot to add was Trace listeners. I decided this was by far the best solution for my particular need: I can specify if the application is to perform logging or not by changing an XML value, I can easily choose the medium of the output, and writing the trace is simple.

I’m currently outputting to a text file but this could easily be the windows event log or XML fragment for example, and writing the message is as simple as writing to the console. I will deploy the application with logging off; If any issues arise I can tell the client to change the value (or include a script that will do it) and have them send the output. Easy!

I’ve noticed my application would benefit rethinking my logic (order of events, processing methods). This is to be expected really as in my initial builds I just wanted to make it work. I now want to make it as efficient as I can.

Trace Listener resources:

Tracing in .NET and Implementing Your Own Trace Listeners

TraceListener Class

Trace Listeners

Debugging once you go live: Trace Listeners

Solutions for basic logging

September 25, 2006

The application I am creating for my project is a Windows Service, therefore I need to maintain a basic log of events in case there are technical issues. From the start I wanted to create an XML file that would hold this information, the reason for choosing XML being that it does not matter how the log file is to be used (it can be directly fed to a database, or viewed using a viewer). It’s just a simple, portable format.

The problem with maintaining an XML log is the overhead of appending a record to the file. Each time I need to append an entry the whole document must be loaded into memory and parsed. Quite alot of memory usage and processing to write a single line of text to a document!

The idea of using XML fragments seems to be the perfect balance as it allows valid XML to be appended to a file as you would with regular text. This example identifies this solution and provides an example.

Another solution, which I havn’t tried but looks very interesting is the technique identified in the post: Appending XML files and confusing disposables. This solution allows XML to be appended to an XML document without loading it into memory.

And finally, there is the log4net framework. At the moment I’m leaning more towards log4net due to the simplicity. Logging isn’t of key importance to my project so it’s important I don’t spend too much time on it 🙂 Appending to a plain text file is actually enough for me, but It’s good to evaluate the options.

My service has to read from an XML file.

Microsoft AJAX Library…

September 12, 2006

… Is the new name for the Atlas toolkit. I much prefer the singular ‘Atlas’ and don’t see why they needed to change it? Longhorn – Vista is a different story:).

In saying this until I found out about the name change I hadn’t even heard of Atlas! The discovery comes at the perfect time as I need to do some web GUI work very soon and the Atlas toolkit looks very useful. I’m interested to see how it compares to the Yahoo YUI toolkit. The particular application I’m working on is a .net environment so looks like ‘Microsoft AJAX Library’ may be the go. I wonder if developers familiar with Atlas will continue to say Atlas?

I have mentioned YUI before in my post: GUI toolkits for web apps?

Web-based development is my biggest interest at the moment so I’m really looking forward to trying these toolkits out.

My industry project meeting yesterday went great and they were impressed with my documentation so its all go!

I’ve been looking at my large category list and have been wondering what to do with it? I think I will group them into more generic categories such as programming, design, database, etc. Less clutter and should allow easier navigation by category. I’d like to be able to list all posts on a single page (by title) too. I think simply having a link to the categories will be the best option.