Powered by Twitter Tools.

September 2008
M T W T F S S
« Aug    
1234567
891011121314
15161718192021
22232425262728
2930  

Chris Donnan : Programming - Brooklyn Style

software, trading, family, fun

Just some interesting posts…

I finally got to reading through many folks blogs this evening. Here are several interesting posts that I eventually drilled through to:

Is Static Typing a Form of Bad Coupling? - More static/ dynamic language stuff

Finlabs - REAL COOL Algorithmic Trading
The 48 Laws of Power

Development Abstraction - go Joel - this is a great article. As Jeremy put it - I had almost given up on Joel - but this IS a great article - I particularly like this:

Management, in a software company, is primarily responsible for creating abstractions for programmers. We build the yacht, we service the yacht, we are the yacht, but we don’t steer the yacht. Everything we do comes down to providing a non-leaky abstraction for the programmers so that they can create great code and that code can get into the hands of customers who benefit from it.

That is just great. I call this idea “Building Boxes”. We try to - in essence, build boxes for the development teams. We build non-leaky abstractions - and they fill up the boxes. I talk about this all the time - well said Joel!

Go Obie - A web-based IDE for Ruby on Rails

Oh yes - SharpRobo - I am a FIT fan - so this ROCKS -

SharpRobo is a Functional Testing and Recording tool for WinForm applications written in .NET supported language. It supports all the standard WinForm controls. SharpRobo records the tests in FIT format which can be played back using Fit (File or Directory Runner).

More cool stuff via Obie - ActiveMessaging - for Ruby.

Lots of interesting stuff in the world as always :)

-Chris


Deep Integration of Ruby with Semantic Web Ontologies

A great article (*warning* PDF) chatting about the match that could/would exist between Ruby and the Semantic web technologies.

I agree that the match between the way of ontoloties and and the way of languages like Java and C# may be off.

I will be curious to see if any supporting frameworks come about in this space.

-Chris

read more | digg story


Atlas for ASP.net 2.0 CTP released

Atlas is microsoft’s framework for developing Ajax applications for ASP.Net 2.0. The latest is now the march CTP -moving up from ‘beta’ status to ‘community technology preview’. As much as I loathe the ‘ajax’ name and all of the hype around this old stuff - It is still as cool as it was when we did it 3 years ago (or longer).

-Chris

read more | digg story


Rich Internet Application - akin to my prior post…

Rich Internet Application post

Someone else talking about post-browser apps. He is more focused on talking about ’social networks’, ‘FOAF’, ‘Tagging’ and (_so_called_) Web 2.0-ish stuff. My point in refereing this is - the post-browser era is coming….

-CD


Serialization of Interfaces and/ or abstract classes via web services….. Objects vs data elements !
So - working on the latest and greatest solution. Great stuff - win forms app - lots (for us) of developers, I have had proper development practice/ time to plan etc so far.. I feel great about the current architecture. One thing is getting my goat and it seems to be something that i have a specific example of -but many have griped about in general. Objects vs data elements - We are basically using a rich domain model along with an MVC pattern - business tier lies behind a web service - so the web service facade is basically the business tier. In essence -we are passing around these ‘model types’ or ‘entity types’ between our client tier and our business tier -  which again I mentioned is a web service. This pattern is great and enables the application in just about every way.The 1st hurdle to overcome - I found very little written about. So — we have some assmblies that contain (amoungst other things) some ‘model types’. The client tier uses these model types - the business tier does. We XML serialize these model types to communicate between the two. This 1st issues was how to declare our model types on the client side using references NOT WEB REFERENCES. We want to add a reference to the library and then use the class - then just pass it across the wire to the business tier (web services). The web services use the SAME library, deserialize the class and KNOW it is the same type as ITS locally referenced class.

Every example out there - you declare any ‘model types’ as though they belong to the web service- and this is fine for the trivial example, BUT in an application where you are using shared libraries - you WANT the behaviour I am describing. References to assemblies - use your classes - send them to the web service and they stars align.

The answer is dumb. Make your ‘model types’ in your library assembly XML serializable. You can add some simple attributes like:


[System.Xml.Serialization.XmlTypeAttribute(Namespace=http://tempuri.org/FooConcreteA.xsd)]

[System.Xml.Serialization.XmlRootAttribute(Namespace="http://tempuri.org/FooConcreteA.xsd", IsNullable=false)]

public class FooConcreteA : AbstractFooBase


You can also get deeper (you will want to) and assign more granular XML serialization attributes. You can add references to this library assembly to your client project as well as to your web service project. This is the dumb part. Now - make a method that returns a model type and build. Now add a web reference to your client project and build. You get - under the ‘web service’ reference node in your project a ‘Reference.map’ - under that is a ‘Reference.cs’ file. See how your web service proxy is created and a new serializable class with the same name as your original class is created (somewhere near the bottom)? - Comment out that class and add a using your library statement on the top of this class. Now - you are apples to apples - you are referencing the SAME class that is from your library - not this new ghost class that was created for you. So - you can simply use your locally referenced class and hand it to the web service :) (PS - remember that each time you update your web reference the Reference.cs file is destroyed)

Problem 2 - Now we have our nice - rich domain mode. We have objects that contain other objects etc. The issue now is…Objects vs data elements. We have some interfaces and/ or abstract classes. When you make a local reference to a class - you ‘have’ all of it’s methods/ properties - you just need to cast to get pointers to the interface/ class members. When you serialize an abstract class - you get the serialized base information only. For example:


WindowsApplication1.WebService1.Service1 svs = new WindowsApplication1.WebService1.Service1();

//HelloWorld() returns AbstractFooBase - like a factory

AbstractTest.FooConcreteA fooConcreteA = (FooConcreteA)svs.HelloWorld();


This type of thing just does not work. You cannot use any object inheritence (as I can see it) via web service. So - when you have a class that contains a collection of abstract types - you need to manage them EACH BY THEIR INDIVIDUAL CONCRETE TYPE - thereby killing the usefullness of objects.

Still workin’ on our incarnation of an answer ….