April 2003 - Posts

Enterprise Solutions Patterns released
27 April 03 06:21 PM | madsn | with no comments

The document I referred to here are now availible from MSDN filled to the rim with good design suggestions, and with contributions by a whole bunch of smart people (Fowler, Cunningham and more..) Read up! :

http://msdn.microsoft.com/architecture/patterns

I can't seem to find the pdf I got my hands on a while back, but the links and printable editions are there with the same good content. They should really have a pdf availible.

Futhermore they have extended the workspaces at GotDotNet to include even more archtectural & design topics. Lets hope this will boost activity! The links can be found here:

http://msdn.microsoft.com/architecture/community

 

Delegates in VB.NET
23 April 03 06:55 PM | madsn | 4 comment(s)

Today I had use VB.NET to alter a gui component, and got curious about the usage of delegates for events.

When inheriting a class and wanting to "pass along" this class events it seems as one have to use something called shadows.

Public MyClass Inherits SomeClassThatImplementsTheClickEvent

     Public Shadows Event Click(ByVal sender As Object, ByVal e as EventArgs)

End Class

I would assume that the delegate type would be the same as for the base class, but it's not. When inspecting the resulting dll with the Object browser I found that it was created a "MyClass.EventNameEventHandler", aka "MyClass.ClickEventHandler" delegate for this event.

Is it correct that compiling VB.NET code generates a custom delegate, and if so why? 

J2EE vs .NET : rest of the worlds perspective
23 April 03 02:32 PM | madsn | with no comments

Sometimes we forget how the rest of the world (read: non-softwaredevelopers) view our industry. I've been searching for sound platform comparisons related to a paper I'm writing on Software Reengineering with J2EE (and want to show how .NET would be the better alternative).

Sean Jackson wrote this in his article in Banking Technology Magazine:

"For some, the .Net v J2EE web services fight is like Ali v Fraser, for others it's more like McBeal v Crane. Personally, I think it's like trying to work out who would win a game of Gaelic football between the New England Patriots and the New Zealand All Blacks."

Get Tiers, Layers, Services, Contracts, and Aspects sorted out with Clemens & Steve
22 April 03 08:55 PM | madsn | 1 comment(s)

Clemens Vasters and Steve Swartz sorts things out in their upcoming/ongoing Scalable Applications tour.

Get a taste from the ppt's availible here.

I really enjoyed the first presentation in the list, which has a further elaboration on the architectural topics that were presented at the Architects Tour. Just enlisted for the talks aswell. Really looking forward to it.

Norwegians can register for the event on Monday (28/4)  here (the enlistment page is a bit difficult to find).

Others should check out their Microsoft sites for these dates:

2003-04-22 Scalable Architectures Tour Swartz/Vasters Warsaw, Poland
2003-04-24 Scalable Architectures Tour Swartz/Vasters Bucarest, Romania
2003-04-25 Scalable Architectures Tour Swartz/Vasters Moscow, Russia
2003-04-29 Scalable Architectures Tour Swartz/Vasters Copenhagen, Denmark
2003-04-30 Scalable Architectures Tour Swartz/Vasters Paris, France
2003-05-02 Scalable Architectures Tour Swartz/Vasters Lisbon, Portugal

Debugging Web Services over HTTPS
21 April 03 05:18 PM | madsn | with no comments

dneimke wrote in this post:
"[..]the *crap* I went through today trying to consume a WebService over Https."

Consuming Webservices over https is a real pain in the right shoulder. I know. I did a .NET -> J2EE webservice consumer a while ago (and the other way around aswell actually), where everything went over HTTPS.

One thing you can do here is to use the MSSoapTrace utility from Microsoft and route your Proxy to this tool with regular HTTP. Then make MSSoapTrace forward the SOAP message to the service via https.

This lets you see the soapmessage you actually send.

Furthermore it's a great help if you can get the provider of the service you are consuming to send you an example SOAP message of the service so you can see what it expects and returns.

If this isn't possible you'll have to do soaptracing directly on the webserver that does the https communication, which will require significant permissions..

CodeProject got even better
18 April 03 12:37 PM | madsn | 3 comment(s)

I've written an article describing how i did this and was happy to see that CodeProject has implemented a rather nice article submission function. Earlier they just had a article HTML template and a submissions@codeproject email thing. Really nice. Now it's even easier to contribute.

So, for those of you that still are afraid of .NET Remoting I've written a walkthrough here:

Remoting from IIS Hosted component to ASP.NET Client application

Please let me know if anything is unclear, then I'll refine it (CodeProject got a nice "Modify Article" aswell:)

Remote Happiness
17 April 03 08:44 PM | madsn | 4 comment(s)

For a long time I've been really really scared of those old guys talking about COM. Fortunately, a while ago, I realized that I probably never had to learn this stuff because I am a pure .NET developer, and I could just simply learn .NET Remoting (an excuse good enough for me). Not that I actually knew how it worked.

After a couple of sessions listening to Clemens Vasters talking Enterprise Services I managed to get afraid of .Net Remoting aswell (that guy simply knows too much).

Knowing the painful process of setting up EJB's on the Java platform I've postponed digging into .NET remoting for a long while until...

..yesterday: I was trying to make Webservices do more than it's intended to when I realized that I had to remote something. Today, after 6 hours work I'm happy to announce that I've made my first Enterprise Component, deployed it on IIS and consumed the whole thing from another ASP.NET application. Oh Joy!

Once again the simplicity of the framework amazes me. This stuff is really not that hard. What was really confusing though was that the books I've got here are written by real COM-jockeys, and they do make it seem harder than it is.

Thanks to Ingo Rammer for his excellent RemotingHelper class that simplyfies the use of interfaces on the client and server. A whole new world just opened:)

Other articles and howtos that helped me:
.NET Remoting Basics
MSDN: Hosting remote objects in IIS
Deepak Sharmas blogentry with some links

They have to be joking
13 April 03 05:33 PM | madsn | with no comments

In an interessant article on .NET Security in multi tier applications, which is part of the new Patterns & Practices effort from ms, a new feature of Windows 2003 Server is introduced in a note:

[snip]
The Authorization Manager API, also known as AzMan, provides a ...
[snip]

They've got to be kidding:)

Annoying parameters and exceptions
04 April 03 10:01 AM | madsn | with no comments

There are some small annoying discrepancies in the .net framework. Some are real, and some are just due to my lack of understanding of the genious of the designers who made it this way.

Today my annoyance was created by the IDbCommand object's Parameters collection. Whilst both the OleDbCommand.Parameters.Add() and SqlCommand.Parameters.Add() returns the parameter added the IDbCommand.Parameters.Add() doesn't return an IDbParameter but an int indicating the index. Why is this annoying? Simply because it makes it impossible to write a parameter addition on one line like this:

IDbCommandObject.Paremeters.Add(new IDbParameter("@param", DbType.Int64)).Value = myLong;

Another question mark is why SqlException and OleDbException have no common baseclass or interface other than System.SystemException. One might think that System.Data.DataException catches these but that one is just for plain ADO.NET exceptions, not providerexceptions.

If there is a good reason for these things I'll be glad to add this to the pile of genious .net framework design choices. 

More Posts

This Blog

<a name="MyWork">!My work!</a>

Funstuff

Goodies

MSCRM Blogs

Sharepoint

Useful reading

Weblogs

Syndication