March 2006 - Posts

.NET smart clients on... Linux?

According to this interview, the Mono project is getting out version 1.2 in April, the big news for me is that Miguel de Icaza states that it will support Windows Forms in Linux. Now, you know I'm a smart clients fan, so you can imagine how cool this sounds to me. On the other hand, it's only a beta, and it's not WinForms 2.0, and the Mono Project has been dragging for years, but I want so hard to believe...

Tiny C# shortcut

Reading about validation on Brian Noyes' Data Binding with Windows Forms 2.0, I found this funny way of checking for a string not being empty or null:

!string.IsNullOrEmpty(name)

Yours truly usually does it this way:

name != null && name != ""

This is the kind of small, almost useless details that intrigue me, so I immediately created a micro-benchmark (I know, I know, "beware of micro-benchmarks") and found out that Brian's method is almost twice as fast as mine. I used Lutz Roeder's Reflector to try to find out why but it didn't shed any light, then I checked the generated code with Ildasm and indeed the code for option 0 seems slightly simpler, so from now on I'll be using string.IsNullOrEmpty() because, as an aside, I'll impress some people with my "deep" knowledge of the BCL.

Posted by Edgar Sánchez with 10 comment(s)
Filed under:

And now Scrum for VSTS

Some people may think I have a carefully planned posting, mmmm, plan for this blog: first I talked about dynamic languages and almost at the same time projects on PHP, Ruby and Python make interesting steps ahead. Now, I start talking about RUP and how I don't like heavy methodologies and Scrum for VSTS is released... I like agile methodologies and I even have the Microsoft Scrum book but this coincidences are starting to get me nervous. No hidden agenda, I swear, but perhaps somebody is sending me brain waves from Redmond... The truth is out there.
Posted by Edgar Sánchez with 3 comment(s)
Filed under:

RUP anyone?

"... the most well-known variant of the Unified Process has grown its knowledge base beyond manageable limits. We need to go back to basics, find the essence of the Unified Process and then start to grow from there."1

Where "the most well-know variant" == RUP. It's a devastating statement if you ask me, even more so given that the author is Ivar Jacobson. Some may say it's very cynical from his part to say this *after* he sold Rational to IBM, personally all I can say is that, in my LOB development practice in Ecuador and several other countries in my region, I have yet to see a consistent use of RUP that had lead to measurable (let alone, spectacular) increases in productivity. I may be wrong of course, so I would like to hear your opinions...

Posted by Edgar Sánchez with 2 comment(s)

If you are new to Ajax and Atlas...

then you have to watch this video. I know, I know, old news, but I just watched it and I'm in awe with Atlas simplicity (something amazing, given that I'm actually a smart client fan). The first 12 minutes or so, it's pretty much your standard data-driven ASP.NET site demo, hang on because then it abruptly switches to *injecting* Atlas controls in the site, effectively Ajax-enabling it, and things get quickly interesting. As usual, Scott is generous and gives us the script for the demo complete with screen pics, so after watching the video you can repeat it at your own pace. Boy, I'm going to surprise the audience at tomorrow's Quito MSDN Tour!

Posted by Edgar Sánchez with no comments
Filed under:

Remoting vs. WCF becomes S/O vs. C/S

A few days ago I talked about my question on using Remoting or WCF. Well, I will now try to summarize the discussion on the RD list. First the arguments in favor of WCF:

  1. Web services are click-once friendlier as they require less permissions on client machines (Ingo Rammer)
  2. WCF binary messages are smaller and faster than Remoting’s (Clemens Vasters). This one surprised me, but as Clemens is an expert on the topic I tend to believe him (besides, nobody questioned it).
  3. Versioning (that is, services versioning) is better dealt with WCF than with Remoting (Ingo Rammer and Steve Swartz)

Now the arguments in favor of Remoting

  1. Sharing code between client and server is harder (Rockford Lhotka). Meaning you can't use the *same* assemblies in server and client (as opposed to generating proxies). This is especially relevant in frameworks like CSLA where you share business logic between client and server.

This single point became a whole discussion by itself with several interesting ramifications:

  1. The serialization mechanism of web services makes that two pointers to the *same* object in a message becomes two pointers to *two different* objects at the other side. This is relevant for generic frameworks like CSLA.
  2. Clemens argued that creating logic bottlenecks like CSLA (and other frameworks) proposes steps on what WCF already do
  3. Rocky said that this is done on purpose as the whole idea is to *isolate* the business app from the underlying *ever-changing* technologies (COM+, Remoting, WSE, WCF, ...) Paul Sheriff strongly agreed with this point.
  4. Clemens pointed that you can override the default serialization behavior of WCF.
  5. After several coming and going messages, and with some help from Christian Weyer and Ingo the mechanism proposed by Clemens became clear, alas it’s not that simple.

In this second part of the discussion, one underlying theme was the fact that WCF default serialization mechanism better serves serviced-oriented scenarios, and there were complains about the fact that *many people want distributed mechanism not for S/O but for client-server scenarios*. It was mentioned that S/O is the way to go, but there were resistance (some of it reasonable, IMHO) as S/O is mostly for *integration* while C/S is still a good solution for intranet situations (as the one I've got in the first place), and here the default WCF serialization doesn't help.

So, how about you? Do you use distributed architectures for S/O, C/S, or both?

Posted by Edgar Sánchez with 1 comment(s)

And now a .NET Ruby implementation (may be)

After blogging about dynamic languages here and here, I had every intention of *not* talking about it for a while (I wouldn't wan't to be confused with an alternative languages junkie -something actually I am- as most of the time I do LOB applications), but then here I find a reference to this blog which finally takes me to this page (don't you just love the Web redundance?): a project to implement a managed version of Ruby nothing less! Although it is in very early stages, if it comes through it will prove wrong what many Java developers said to me about the .NET Framework CLR: that it was anything but "common language", that C# and Visual Basic .NET were just "skins" on pretty much the same thing (well, may be they've got a point here), and that every other .NET language implementation was doomed to be pretty much the same. Well, if IronPython was not enough proof, the Ruby.NET project -when and if it flies- would prove all that naysayers wrong.

Posted by Edgar Sánchez with no comments
Filed under:

Whither remoting?

You already know I'm a new toy junkie early adopter, so when a project that is just starting needed a light smart client talking back to a business logic server I immediately suggested using WCF. To my surprise, another architect and *my* lead developer preferred remoting, their reason? They've had very good experiences with remoting, my reason? If this system is going to live 5 years, it better uses the most looking forward technology. As I am an RD, I naively asked in the RD list for reasons to use WCF over remoting, and I got a few good responses but then the remoting camp reacted and gave good reasons for *not* using WCF. So it seems like the question is more interesting than what I thought and, before summarizing the answers I got, I would like to ask you what you think: if you were to create a client-server like application in your *intranet* would you use web services or remoting? Why?

Posted by Edgar Sánchez with 5 comment(s)

Dynamic season at the CLR!

Talk about coincidences: as I was blogging about dynamic languages, Microsoft was holding a small nice event, the Annual Compiler Lab. Now for the freaky part: yesterday I was talking about Ruby, Python, PHP, and other dynamic languages, meanwhile at the event that very same day was the Dynamic Languages and Scripting on the CLR day! Devhawk has a fairly complete report on the event. For me, aside the good news on dynamic languages performance on the CLR, the interesting factoid was Phalanger, a managed implementation of PHP. It's definitively dynamic season at the CLR!

Posted by Edgar Sánchez with 2 comment(s)
Filed under:

The language flavor of the decade?

Dynamic languages seem to be enjoying a steady increase in popularity. Perhaps it's just that the developer community needs something different every few years or perhaps weakly typed languages actually fill a real need, I still don't know. In any event, it appears that 3 languages are getting most of the traction:

  1. Ruby, the one that is getting more press, and the one that seems to be the new darling of several Java gurus (supposedly tired of Java stagnation).
  2. Python, an alternative closer to the C heritage, has lost some of the limelight to Ruby, but Microsoft seems to prefer it, as shown by IronPython.
  3. PHP, the older, more specialized (it declares itself as especially suited for Web development)  and less "academic" of all (it's been derided as a "better Perl"), but undisputedly the one with the highest market credentials, after all thousands and thousands of web sites run on PHP.

Overall, it looks like it's a good time to start trying one of these as IBM, Oracle, and Microsoft are showing interest in this kind of languages (as usual, Sun is lagging behind). If you, like me, are a fan of .NET Framework then IronPython is the way to go. Or if you, not like me, are a conservative then you can try VS.Php. Now if somebody would please write Haskell.net…

Posted by Edgar Sánchez with 3 comment(s)
Filed under:
More Posts Next page »