Sunday, February 22, 2004
« Are web services components or applicati... | Main | Of ship dates, realistic expectations an... »

The only reason I started this blog was so I'd have a forum for editorializing. I already have my web site (www.lhotka.net) for formal information about my books, speaking, CSLA .NET framework and so forth. But I didn't have a good place for editorial thoughts (otherwise known as ranting). Thus the blog, and thus this post.

For those who don't know, I'm in the process of writing a C# edition of my Expert One-on-One VB.NET Business Objects book. The C# edition is due out in May 2004. The planned title is Expert One-on-One C# Business Objects.

Before I agreed to write this C# edition, I gave a lot of thought to the project. While there's no doubt that both VB.NET and C# are first-class languages in .NET, the fact is that I've been a strong voice for VB over the past many years. What would people think if I went over to the 'dark side' and actually used C#?

I was worried that the VB community would consider that I'd turned my back on them and/or their chosen language. Heck, I was even a bit worried that I'd fall in love with C# - in which case I might actually abandon VB. I was also worried that the C# community wouldn't accept the book or the CSLA .NET framework because of my long-term association with VB (which presumably makes me and my work contemptible to some strange fringe of the C-style language community).

The process of writing the C# edition of the book starts with the code. I really can't go far in the prose until the code has been ported to C#, tested and so forth. So at this point I've spent a fair amount of time doing C#. Additionally, publicity about the C# edition of the book has started, so some people in both the VB and C# communities know it is coming. Due to this, I have some answers to my questions.

First off, I have not fallen in love with C#. It is an OK language, and I understand why people like it. It is the first C-style language that is nearly as easy to use and understand as VB. Using C# merely confirms my original belief that the .NET platform represents the victory of the VB mindset. In many ways, C# really is just VB with semi-colons.

By way of disclaimer, I've never been a C-style language person. I started with Basic, went to Pascal, wrote a VT100 terminal emulator in C++, did some FORTRAN, some Modula-2, then VAX Basic and finally VB (starting with version 1 on up to VB.NET).

That brief bit of C++ was more than enough to convince me that the C-style world view of the time (this was in 1988 or so) was simply wrong. Managing your own resources is silly, unless you are interacting directly with hardware. C/C++ is simply the wrong tool for business software development.

For the entire life of VB, it has existed in a managed environment, where memory and other resources were taken care of on our behalf. It has also existed in an environment where programmers didn't usually have to worry about the underlying OS, because there was a nice library of components to do the heavy lifting on our behalf.

This is exactly the way .NET works. All that has happened, is that the wonderful world of VB has been extended to the rest of the programming languages out there, so even C-style programmers don't have to deal with all that resource management crap. In many ways, the C-style world has finally been brought into the fold.

So, while I've found my experience with C# to be rewarding, from the perspective of learning a new language, my heart still belongs to VB. At the same time, I do see the attraction of C# for people who've spent their lives using C-style languages. It is a hard thing to switch paradigms, and I fully understand why most C-style developers wouldn't want to stretch themselves to learn a whole new linguistic style. It is the same reason most non-C developers don't want to learn C-style languages, but in reverse.

I'll certainly continue to use C# as well as VB. I anticipate writing a Whidbey edition of the Business Objects books - VB first, followed by C#. I also plan to see if I can get CSLA .NET running on mono at some point. Since the VB compiler is far behind the C# compiler in mono, obviously C# will be the choice for that little side project.

My other primary concern revolves around the publicity of the C# edition and what that would mean. Thus far I've only heard from the VB community. Some people have expressed concern, while most people have expressed strong support. This blog entry is intended partially to address the concerns I've heard from the VB community about me possibly giving up VB for C#... But I'm not going to abandon VB just when it is going to get really cool again (in Whidbey we get edit-and-continue, and the My namespace - very cool stuff!!).

I've also heard from a number of C# developers, and everyone has been supportive. I haven't heard anything from the hard-core fringe groups yet, but I imagine I will once the book is out. That should be entertaining!

But, to reinforce and/or clarify my stance:

  1. .NET really is language neutral. I can't see a serious advantage one would gain by using either VB or C# in a CSLA .NET app. It just doesn't matter from a functional perspective.
     
  2. I, personally, am not language neutral. I prefer VB. I think it is more readable and intuitive, and thus provides better self-documentation and long-term maintenance. It is also more accessible to new developers - imo.
     
  3. I fully understand that other people are likewise not language neutral. Some prefer C#. That's cool - see point #1 above.

The whole point behind writing the C# edition of the book is to provide people who choose (or are forced) to use C# the same level of access to the material as the VB community. Because there's a lot of both VB and C# developers out there, it only makes sense to have editions of the book in both languages. If some third language were to rise to equal dominance (in terms of market share), I'd probably write an edition in that language as well.

In the end, the book is not about language. It is about distributed architecture and how object-oriented concepts can fit into that distributed world. It is about using the really cool features of the .NET framework like serialization and remoting to do things that used to be really hard in a much easier way.

Ultimately it is about having fun architecting, designing and developing .NET applications. Certainly that's what drives me, and I hope it is what drives anyone who reads and uses the book and the CSLA .NET framework.

Code well, have fun!

Sunday, February 22, 2004 2:53:56 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [15]  | 

Monday, February 23, 2004 2:33:27 AM (Central Standard Time, UTC-06:00)
Glad to hear that you are not planning on giving up on VB! Though i've never been a C programmer myself I know plenty of them and agree whole heartedly with your comments about the difficulties of having to manage resources yourself.

With C# being managed it is probably far easier to use than standard C++ but i can't see myself ever touching it - my brain doesn't work that way, it seesm to be hardwired to VB!

One question - does Whidbey address the problem with the Field target that caused you to have to write BindableBase and BindableCollectionBase in C#? Not important i know but i'm genuinely interested.

Thanks for everything :)
Chris Denslow
Monday, February 23, 2004 10:12:37 PM (Central Standard Time, UTC-06:00)
I'm a 20 year COBOL, VB5, VB6, and newbie VB.NET programmer. I've always maintained that if someone can program in ANY language, then they can program in ANY language. I have never understood the hatred that COBOL and VB seems to generate. I don't care for C and C++ myself, but I never minded people who did.

I applaud your willingness to give C# a chance and hope your fans understand your reasons!
Chuck McGavern
Monday, March 01, 2004 7:52:53 PM (Central Standard Time, UTC-06:00)
I am so excited for this version of book/CSLA to come out. My main reason is to spend more time getting into the framework and less time understanding the VB syntax etc. Another one of my challenges is the autocorrection/completion in the VB editor (grew up on emacs and unix with C/C++).

I have written C, C++ on and off since the early 90s and my mind just reads the code better. (I should admit that I have failed learning VB on the side several times!-).

However, I would like to say that Rockford's work is the best I have seen so far. This is simply because it solves a problem as opposed to explaining how microsoft has implemented it. Instead of just how-tos and tricks it provides a complete solution.

You cannot fail with this new book! And I am sure many of us will own both versions (C# and VB). The sheer thought process of reading your book, articles, approaches, etc. is extremely valuable learning - agreeing or not.

Finally, is there a way to see early drafts of text and perhaps a version of the framework available? I do have a month to spare if I can be of assistance. I.e. your dummy test!-)

Cheers,
Knut Vonheim

Monday, March 01, 2004 8:38:23 PM (Central Standard Time, UTC-06:00)
I am glad that you are looking forward to the book coming out! I am nearly half-way through the chapters at this point, and am a bit further than that with the code.

You can see the code in progress at http://www.lhotka.net/cslacvs. I'll probably put up a zip file with the framework code later this week on my web site. Any input/feedback/bugs you note in the code would be much appreciated, as it will improve the quality of the final product.

Rocky
Thursday, March 04, 2004 9:06:22 AM (Central Standard Time, UTC-06:00)
Rocky,

if you have the time, a big addition to the book would be an appendix with recipies for using each of the objects. Sort of like the standard .Net books but instead describing how to use CSLA. I know you have chapters 6 through 10 with the example, but this could be more like a recipe and reference section. A great addition for companies using CSLA but don't need all developers understanding the framework or go through a lot of examples.

Just a wishful thought!

Cheers,
Knut
Tuesday, March 09, 2004 6:38:44 AM (Central Standard Time, UTC-06:00)
Hi Knut,

I'm working on something like that at home right now. If I can get it to a stage where I am happy with it i'll forward it to you.

Will that help at all or be of interest?

Chris :)
Chris D
Thursday, March 11, 2004 9:54:49 AM (Central Standard Time, UTC-06:00)
I have really appreciated Rocky's VB book even though I used the C# code from the CSLA.NET forum. .NET is the key and I had no problem reading the book in VB and looking at / using the C# code. I learned a lot about .NET and distributed architecture by reading the book.

I'll probably also buy the C# version when it ships and donate my VB copy to my local Users Group.

I hope both the VB and C# programmers rally around the CSLA - I think it's great and don't see any reason for language preferences to get in the way.
Ray Klaassen
Sunday, April 04, 2004 7:02:13 AM (Central Standard Time, UTC-06:00)
Dear Rocky,

I am pretty excited about the C# version of your book. I was a VB6 programmer sometime back. I was very nervous with the limitations of VB6 when it came to writing some multi-threaded stuff or few simple NT services.

I started with C# out of curiosity and liked the language very much cos it says lot in least amount of words. VB is more verbose and I am not good at typing. Being a person of multi-lingual capability, I could easily use your book in my coding and is gained a lot from the thought process which you have put in the book. I personally dont care more about the ability to write good code than the language in which it is written. Ultimately what runs is the compiled code.

I am working on desktop applications which might scale to distributed environment but with limited number of users. In such case I see some of the part in CSLA as overhead and potential performance issue. This prohibits me from using CSLA as is. Also the database to be used is MS Access and not MSDE. There could be alternatives to your framework, but I think using it would help me to scale-up the application later and even if I dont the application will be more maintainable by using CSLA.

Will it be possible to include a variant of the frame-work for desktops as well? OR can you suggest where can we tweak the framework to make it faster on desktops?

Thanks

Hemant
Hemant Sathe
Sunday, April 04, 2004 7:36:14 AM (Central Standard Time, UTC-06:00)
Errata:

I personally care more about the ability to write good code than the language in which it is written. Ultimately what runs is the compiled code.

Hemant Sathe
Hemant Sathe
Wednesday, April 14, 2004 1:59:34 PM (Central Standard Time, UTC-06:00)
There are some things in the CLR that have been done for the convience of C programmers at the expense of VB. Forcing arrays to be 0 based is one of them. It's possible to have non-zero based arrays in the CLR, but for compatibility with C/C++ it isn't allowed in VB.
MilesArcher
Wednesday, April 28, 2004 11:18:09 AM (Central Standard Time, UTC-06:00)
I'm really excited about this upcoming book. I confess I was going to buy the VB version but now I think I'll wait.

I was a VB6 programmer for a long time but then had to switch to Java so after that I decided to switch to C# as well to facilitate moving code back and forth between the 2 platforms (something you have to do if you're in the ISV business targeting the 2 major platforms simultaneously).

3 years ago I decided to 'decouple' myself a little bit from the programming language and focused on the OO representation. I began -off course- with UML and then generated code in VB6 or Java accordingly. Then I began to experiment with patters. I think it was at that time that I began to notice more and more the VB6 limitations (most of which have gone away with VB.NET). It is because of this, because of my UML-centric approach that I prefer to use C# as it offers a cleaner mapping between UML models and code. I'm pretty sure off course that if the opportunity arises, I won't mind switching to VB.NET again.

Independently from the language, I'm a firm believer that the real value of your books lies in the architectural principles it encompasses and since everybody seems to tag the word 'pattern' to every piece of code/article, I should say that you're patterns offer a clear, real-world advice and have been largely consistent since the 'BO using VB6' days.

Anyway, to conclude, I think your books are more than excellent. Starting with BO in VB6 (the only way I could start to really understand and think in objects) and continuing with BO in VB.NET where the .NET advances where applied to solve not only old problems ('Serialization' with UDTs) but to introduce new design possibilities. I'm pretty sure the C# book will present the same level of quality.

BTW, probably, it's a little bit late in the game for some suggestions on your new book, but have you thought about using some Sequence diagrams to illustrate some key interactions?. It'd be a time-saver when later coming back to the book in order to refresh your memory in a one-page shot.

Thanks a lot and keep up the excellent work,
MV
MV
Thursday, April 29, 2004 1:17:20 PM (Central Standard Time, UTC-06:00)
Interesting post, but just why is this important? A language is syntax. It's the ideas espoused in your books, articles, and speaking engagements that architects and engineers are interested in and respect. I am a C# programmer, and I bought your book in VB, simply as I did not want to wait. Will I purchase the C# edition? Absolutely. But who has time to hold it against you that you like VB? Do you what you like, and what's easier. It's the "real stuff" that real developers are interested in!
Mike Clark
Tuesday, May 25, 2004 11:02:39 AM (Central Standard Time, UTC-06:00)
I am looking forward to your C# book and have already ordered it from Amazon.com. I am looking to use CLSA in C# that was my original intension. Has anything been added to the book from the original or has the framework changed from VB to C#?
Tuesday, June 29, 2004 2:03:17 PM (Central Standard Time, UTC-06:00)
end of june ! c# edition still eludes us :)
Srinath Vasireddy
Sunday, August 20, 2006 12:45:30 PM (Central Standard Time, UTC-06:00)
The whole point behind writing the C# edition of the book is to provide people who choose (or are forced) to use C# the same level of access to the material as the VB community. Because there's a lot of both VB and C# developers out there, it only makes sense to have editions of the book in both languages.
Comments are closed.