Friday, January 13, 2006

I'll do some more real blogging at some point too - probably once I get the new Expert VB/C# Business Objects books off to the printer in just a few more weeks.

In the meantime, Billy's history of programming languages left me in stitches!

Friday, January 13, 2006 12:47:37 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [1]  | 

 Friday, January 06, 2006

First, my good friend and colleague Billy Hollis is blogging. Second, he's got a great analogy about the .NET Framework.

Friday, January 06, 2006 4:19:28 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [1]  | 

As I’m working on the next edition of my Expert VB/C# Business Objects books I’m building both a Web Forms and Web Services interface. And I’m running into issues with the ASP.NET Development Server provided with Visual Studio 2005. This web server is often referred to as the VS Host.

 

The issue is with assembly loading. Apparently the VS Host has difficulties loading assemblies at times, which causes issues.

 

For instance, you can’t test a custom membership provider if it is in a separate assembly that is referenced by your web site – that causes an assembly load exception.

 

In my particular case the problem I’m having is that I put a custom IPrincipal object on the thread and HttpContext. That works great, but at some point VS Host apparently switches to some other internal AppDomain – triggering an attempt to serialize and deserialize that principal object. The result? BOOM!

 

Again, an assembly load exception – this time because the attempt to deserialize the principal object into that other mysterious AppDomain fails…

 

All my usual tricks have failed. I’ve tried clearing the principal from the thread and HttpContext before the page processing is complete. No dice. I’ve tried handling the AppDomain event that is raised when an assembly can’t be found. No dice (which isn’t a surprise, since it isn’t MY AppDomain that’s having the problem).

 

In the end, the VS Host appears to be useless for any work where you are using custom principal or custom membership provider classes. In a casual conversation on this topic a friend of mine suggested that perhaps VS Host was for prototypes and hobbyists; and I think he was right. Real web development still must be done with IIS only...

Friday, January 06, 2006 11:43:45 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [8]  | 

 Wednesday, January 04, 2006

Brant Estes, a fellow Magenic consultant, wrote a very interesting blog entry showing how you can embed those pesky extra DLLs into your EXE, and yet have .NET find them when needed. He even tried it with CSLA .NET, creating a single EXE that embeds the CSLA assembly as a resource - very cool!

Wednesday, January 04, 2006 12:47:44 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [3]  | 

 Tuesday, January 03, 2006

In the January 2, 2006 edition of InfoWorld there’s a short article about the recent release of MySQL 5.0. I’ve used MySQL, and there are even people building CSLA .NET based applications with MySQL backend databases. Kudos!

 

But the article makes this comment about the new stored procedure support in MySQL:

 

“The stored procedures were generally stable in my tests, but this being MySQL’s first implementation, there were a few bugs. For example, I had some trouble with the server freezing up when I tried to open some of my larger procedures. Although not a show-stopper, this behavior could be a problem if you have a busy database.”

 

I had to read this several times to be sure I had it right. The “server freezing up” is “not a show-stopper”?!?

 

Suppose Oracle or SQL Server would “freeze up” when you opened a large stored procedure? On a busy database or not I’m guessing no sane person would say that this was “not a show-stopper”.

 

It is not a show-stopper because the expectations of a released open source (OSS) product just aren’t in the same league with “real” software? If so, then OSS really is just a joke. But I don’t buy this argument, because MySQL is used as “real” software by many companies, and thus it should be held to the same standard as any other database engine out there.

 

Or is it not a show-stopper because of media bias? Because the media tends to cut OSS slack they’d never dream of cutting proprietary software? Because if they scrutinized OSS software at the same level they do proprietary software everyone would see just how little difference “open” really makes in terms of quality or security?

 

I think this latter argument holds a lot more water. Americans like the underdog, and OSS is the underdog compared to any proprietary system out there. So the media throws objectivity out the window and cuts them a break. OSS is held to a lower standard, even so far as that having your database server freeze up is a trivial concern.

 

What a shame, since this sort of reporting will ultimately be a lead weight around the ankles of OSS. OSS will never get real respect unless it is treated as being in the same league with the rest of the software in the world. And that starts with the media…

Tuesday, January 03, 2006 5:04:24 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [10]  | 

 Wednesday, December 28, 2005

I apologize for the shameless plug, but I thought this was rather cool:

 

I see that my Expert C# Business Objects book has been nominated for the .NET Developer's Journal (.NETDJ) Magazine 2005 Readers Choice Award in the

category of Best .NET Book/Training Software.

           

I would appreciate your vote so that the book can win this highly prestigious award.  You can also cast a vote for various other favorites you might have in other categories. As part of the voting process, you can also get a free subscription to the Digital Edition of .NETDJ.

 

Cast your vote at:  http://dndj.sys-con.com/general/readerschoice.htm 

To begin voting, click on the "Click Here to Vote Now!" link.

 

Voting Ends Midnight, December 31, 2005

 

Thank you!

Wednesday, December 28, 2005 10:56:47 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [8]  | 

 Tuesday, December 13, 2005
I am at the point now where I think the resource.resx file for CSLA .NET 2.0 is stable. Of course it is only in English at this point, and so I am putting out a call to anyone willing to translate the file to other languages.
 
Thanks to volunteer efforts, CSLA .NET 1.x has resources in a total of 11 languages, which is simply wonderful!
 
If you are willing to translate the resources to your language, many people would appreciate your help.
 
The English resource.resx file can be downloaded here: www.lhotka.net/files/csla20-resources.zip
 
If you are able to translate the file, please email me the resulting translation and I'll incorporate it into the solution so it is available when the book comes out (anticipated for the end of March 2006).
 
I'll keep a log of the languages as part of the CSLA .NET 2.0 Change Log, so you can check there to see if your language already has a translation.
 
Thank you!
 
Rocky
Tuesday, December 13, 2005 4:55:14 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [5]  | 

 Wednesday, December 07, 2005

Slashdot has some funny ones from time to time. Like this one, where the author contends that AJAX is a new Microsoft technology.

(note: the article he links to about AJAX is worth the read!)

But AJAX isn't new. It is old - many years old, for all that it didn't become popular until recently.

And it was the tech darling Google that made it popular, not Microsoft.

Sure it is based on technology Microsoft put in the browser many years ago, but until Firefox added support and Google used it broadly it was a sleeper...

But on slashdot everything negative must be associated with Microsoft - it's a rule I guess...

 

Wednesday, December 07, 2005 7:42:46 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [5]  | 

It is the debate that never ends (though it does change shape): is the current C-style language infinitely superior to the current most widely used language.

 

Years ago COBOL and FORTRAN were all the rage. Then this upstart C language showed up claiming to be better. Which was laughable, but the fanatics in the C world wouldn’t give in.

 

Eventually, seeing that C wasn’t going anywhere, they added ++ to the end, claiming that extra non-alphanumeric characters improved the language so now it was better than FORTRAN. (and it was better actually - and no one compared anything to COBOL because that would be just silly - almost as silly as acknowledging that RPG was a programming language at all)

 

But then the age-old and much maligned BASIC language grabbed headlines by offering a level of productivity for GUI programming (on Windows at least) that no one else could touch. All of a sudden the semi-colon lovers of the world had a new enemy: Visual Basic.

 

And while C++ was much faster and provided access to the deep, dark, smelly bowels of Windows (16 and then 32 bit), the fact is that it took many times more code to do anything in C++ as compared to VB. So while the VB devs were at the bar drinking, or at home with their families, the “superior” C++ devs were slaving away trying to find that missing semi-colon or mis-matched close bracket (or worse, that null pointer reference).

 

That’s why Java was invented: to try and create a version of VB that had semi-colons. Get rid of all the low-level machine issues like null pointers and memory deallocation so programming is more VB-like, yet keep the elegant (cryptic?) syntax of the C-style language family. Unfortunately Sun just didn't get it (and still doesn't...), so Java missed the mark for the GUI developer.

 

But Microsoft has always understood. They created VB after all. So naturally that’s where C# comes from: VB with semi-colons. As Billy Hollis has said numerous times, the VB community kindly allowed the rest of the world to use the VB runtime. Sure, it was modified to be useful from other languages, but .NET brought to the C-style world what VB had been providing for over a decade: productivity.

 

(btw, if you didn’t catch some of the sarcasm and hyperbole in the above you really need to lighten up…)

 

So what brought on this post? Tom Archer explained why there are so many VB samples on MSDN, stirring the debate yet again.

 

By the way, the reason there are so many VB samples boils down to two things:

 

First there’s the fact that there are more VB developers out there than C# developers. A lot more, pure and simple.

 

Second, Basic was designed specifically to cater to the way people think. C-style languages were designed specifically to cater to the way machines work. It is incredibly obvious then, that Basic is a better teaching/learning tool, because it is based on cognitive concepts for humans.

 

(note that I’m not saying one language is inherently better for actual programming – just for learning)

 

Either way though, I’ve said it before and I’ll say it again: if you only know one language family you are crippling yourself. If you’ve only ever use Basic (VB or otherwise), or a C-style language you really need to broaden your horizons.

 

If you can’t stomach learning the “enemy” language (VB or C# depending), then go find another .NET language like FORTRAN, Eiffel, F# or something. For that matter, IL itself is a great choice.

 

Branch out! Learning other languages only helps you understand and use your preferred language better.

Wednesday, December 07, 2005 11:04:57 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [19]  |