Not logged in. · Lost password · Register
Forum: agsXMPP RSS
Avatar
sdether #1
Member since Jun 2008 · 3 posts
Group memberships: Members
Show profile · Link to this post
Subject: Interfacing XmppClientConnection
I have some code that uses XmppClientConnection that is part of an Inversion of Control system and that i want to wrap unit tests around. However, since XmppClientConnection doesn't have an interface I currently have to build an adapter to it that I can mock. If I were to wrap XmppClientConnection and the classes its depends on in interfaces and contribute those changes back, what the chance of it making it into the SDK?

cheers,
arne
Avatar
sdether #2
Member since Jun 2008 · 3 posts
Group memberships: Members
Show profile · Link to this post
No opinion or interest in this contribution? I'll gladly assign copyrights, whatever, if there is a concern about contributions affecting the status of the commercial licensing. I just would prefer something that's easier to mock for testing and use in Dependency Injection.
Avatar
Alex #3
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
hi arne,

sorry that I did not respond earlier. The thread was marked as read and I forgot to answer it.
Is it possible that you attach some of your code? Then I can take a look at it.
The problem I see is that XmppClientConnection depends on many other classes, not sure if its possible to create interfaces for all of them. As long as the interfaces don't break compatibility I am open to suggestions.

We are currently working on a complete rewrite of agsXMPP with is also the base for the Silverlight version. Maybe it makes more sense to design the upcoming version with interfaces.

Alex
Avatar
sdether #4
Member since Jun 2008 · 3 posts
Group memberships: Members
Show profile · Link to this post
Alex,

I'm basically working my way in from XmppClientConnection and also interfacing those classes that are used in method signatures that contain significant logic (i.e. not data containers like Jid or event args). I am trying to keep 100% compatibility and using explicit interface implementations where a method signature in the interface doesn't match the original. I'll post a zip of the changed files once i make my first pass through, unless you want me to send it directly to you.

Is your rewrite in svn yet or still in early planning? Unless it's at a testing stage, I'm going to continue with the 1.0 for the interface work, since i have active testing needs, I'll use that version internally and let you decide whether a public release is worthwhile or to concentrate on the rewrite instead.

arne
Avatar
Alex #5
Member since Feb 2003 · 4317 posts · Location: Germany
Group memberships: Administrators, Members
Show profile · Link to this post
Quote by sdether:
I'll post a zip of the changed files once i make my first pass through, unless you want me to send it directly to you.

you can attach it here in the thread.

Quote by sdether:
Is your rewrite in svn yet or still in early planning? Unless it's at a testing stage, I'm going to continue with the 1.0 for the interface work, since i have active testing needs, I'll use that version internally and let you decide whether a public release is worthwhile or to concentrate on the rewrite instead.

its working and I wrote lots of code yet. But its not in SVN yet, because it currently only supports the xmpp core and none of the extensions. We make use of all new features from .NET 2..0 - 3.5, eg. LINQ and generics. So we can reuse only about 5-10% of the code in agsXMPP 1.0 and must rewrite all extensions and xmpp classes which is quite a lot of work.

If you are interested at a binary version you can send me an email.

Alex
Close Smaller – Larger + Reply to this post:
Verification code: VeriCode Please enter the word from the image into the text field below. (Type the letters only, lower case is okay.)
Smileys: :-) ;-) :-D :-p :blush: :cool: :rolleyes: :huh: :-/ <_< :-( :'( :#: :scared: 8-( :nuts: :-O
Special characters:
Forum: agsXMPP RSS