REST with JAX-RS and silverlight clients

Posted on December 5th, by Arnon Rotem-Gal-Oz in Blog. No Comments

I am Working on a RESTful  service using Jersey (not my first choice, but a reasonable compromise). It is hosted inside FuseESBand all is well. Here’s an overly simplified version of the resource that reports status:

public class StatusResource {
public String getStatus() {
if (checkStatus())
return "Ok";
return "Not so good";

Then we tried to connect a silverlight client to this server (don’t ask me why).  The first hurdle was a security one. Silverlight doesn’t like to communicate with a server it didn’t launch from. To resolve … Read More »

Mixins in .NET

Posted on December 14th, by Arnon Rotem-Gal-Oz in Blog. 4 comments

Mixins are a good way to weave functionality into a class. Wikipedia defines Mixin as follows

“In object-oriented programming languages, a mixin is a class that provides a certain functionality to be inherited by a subclass, while not meant for instantiation (the generation of objects of that class). Inheriting from a mixin is not a form of specialization but is rather a means of collecting functionality. A class may inherit most or all of its functionality from one or more mixins through multiple inheritance.”

Nice languages have mixins as part of the language spec. Ruby, for example, supports mixins through the notion of Modules , a way to group in related methods (and classes and constants) which is not a class in itself . You can program a bit of logic that interacts with the class it is hosted in, effectively letting … Read More »

Having fun with LINQ expressions

Posted on November 2nd, by Arnon Rotem-Gal-Oz in Blog. 2 comments

I don’t know how many of you need to analyze LINQ queries – but since this took me a few hours to get right I thought I’d save you some of the trouble in case you do.

I am working on this pet project of mine (I’ll blog about that soon in a separate post) where I have the need to take LINQ queries and among other things verify that that the sources are from a specific types. The usual way to go about it is to write a LINQ provider (see for example Bart De Smet’sseries of posts on building a Linq provider for LDAP) – but that’s not my case since I want to use the regular LINQ for object (I don’t want to build my own LINQ) and I don’t want to directly run the queries, rather I want to … Read More »