Thursday, June 12, 2008

While looking on Reggie's blog for news on MySQL support for the Entity Framework, I enjoyed reading this article.  I continue to be amazed at the performance of the CLR.  Some people are absolutely baffled that managed code could be faster than native code, and the low-level reasons why have been blogged by people far smarter than I in the past.  Since someone just asked, A couple of the better-known reasons:

1) The managed heap rules:  If I say "object* foo = new object();" in C++, the OS looks around to find some memory it can give me.  CLR programs use a managed heap, however.  Despite the fact that calling "new()" is always expensive, the managed heap gives a huge advantage.  Instead of searching for free memory, the next chunk on the managed heap is returned immediately.  C developers writing games have used similar tricks for years, using malloc to get a big chunk of memory and managing bits of it themselves as needed.

2) JIT rules: C# is always JITified before execution.  JIT compiling turns your C# into machine code.  So what, you say, my C/C++ code is pre-compiled for the platform and doesn't pay the JIT penalty on application startup.  The advantage of the JIT is that it can be compiled each time the program is ran, and potentially take advantage of different situations and things specific not just to a processor architecture, but on each individual machine.  (I need to find a link to cite this appropriately) 

Anyway, read the article on Reggie's site, and thank him for the work he's doing.  Hey Reggie, when is that preview of Connector 5.3 come out?

.NET | C++ | O/R Mapping
Thursday, June 12, 2008 12:20:58 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Wednesday, June 04, 2008

Saw some more sessions last night, including one on data access layer encapsulation with the entity framework.  I need to dig into this more, maybe a hands on lab if I can find one.  It’s not clear from the examples how parent-child relationships are loaded by the entity framework and if both eager load and lazy load situations are supported.  I have such high hopes for the entity framework that there’s almost no way I won’t be disappointed on some front.  The only reason why I haven’t spent a day looking seriously at the bits in SP1 is because I’m mostly working on MySQL right now and the MySQL/.NET team has yet to produce EDM support.

I got an email from The Clarkin on Friday asking if I’d like a “Nice dinner on Microsoft”.  He wasn’t kidding and he is in fact my bestest friend forever for thinking of me.  Dan and I met a lot of Central region nerds at Charley’s Steak House and it was excellent.  I’m no Richard Campbell but I do tend to tend to get loud in a group, and I ended up giving an impromptu rundown of the French red wines from the menu, and we did a fair bit of sampling too, all courtesy of our excellent Evangelists from the Midwest. 

As I write this Stephen Toub’s Parallel Extensions talk is about to start.  I’m 100% full up on sessions until late tonight, and after that is the MVP party at the House of Blues, but I’ll try to sneak some more comments in today.

Wednesday, June 04, 2008 8:06:47 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Monday, March 03, 2008

I have never been more ready for spring than I am this year.

It was a whopping 40degrees here yesterday and I took advantage of it.  I spent hours chopping ice out of my driveway, I can't type so well today due to the blisters on my fingertips.  The huge piles of snow on either side of my driveway make surprisingly good reach-level beer holding areas, and I pulled out the bbq pit and made some brats.

I also wrote a Mapping tool this weekend.  When you're first getting started it's interesting to note the similarities in flat file, XML, object-to-object, and SQL to Object mapping: at least in terms of the initial abstractions that present themselves.  I specifically wanted to solve a flat-file to complex object problem and write a tool that previews the mapping in real time and realized I couldd do quite a bit more if I weren't lazy.  The main place I could see using this in my own efforts are class-to-class mapping.  For example: if you are consuming a web service the proxy generated will return to you class instances using whatever naming conventions and object structure the designers of said service wanted to give you.  Even if another team in your organization is the maintainer of this service, Directly using these proxy types within your code is probably a mistake; mapping ProxyObject.PrimaryKey to MyDomainObject.Id quickly becomes tedious.  A mapping tool that does the annoying work for you and saves the mapping as an easy XML file or better yet generates transformation code might be helpful. 

Monday, March 03, 2008 9:50:15 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [1]  |  Trackback
 Thursday, December 27, 2007

Unlike every other database I've ever heard of, MySQL does not support expressions for column defaults, so for example 'DateTime Not Null Default now()' is not legal.

Lame.

Carry on.

Thursday, December 27, 2007 9:32:07 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [2]  |  Trackback
 Wednesday, December 26, 2007

I installed Beta3 of the ADO.Net Entity Framework today as well as the Visual Studio integration tool and started using it on a project that's not mission critical.  So far my only complaint is that it does not (seemingly) include the capability to apply a Regex to the Table Name-->Entity Name process.  For example, I've gotten into the habit of naming tables in the plural, so "select * from Questions" seems natural, however having an object of type Questions annoys me.  Once I think of (or see someone else's) a means of testing performance vs. raw SQL and decide to actually use this I suppose I can rename my tables, seems a shame though. 

Oh, and, I would like for it to be an actual "shipping" product.

Wednesday, December 26, 2007 3:48:09 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Wednesday, November 15, 2006

I spent a bit of time yesterday hacking Codus to work on .NET 2.0 and generate generic classes and collections for data access.  Talking to Sean from Adapdev a bit it looks like I'm going to try to clean this up and contribute the changes so they're available in future Codus and Adapdev.Net releases.  So, if you have been looking for .Net 2 support in these excellent tools, it seems its on the way.

Wednesday, November 15, 2006 11:11:13 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [1]  |  Trackback
 Tuesday, March 07, 2006

Clemens Vasters has posted an interesting article about O/R mapping.  I can admit that I am one of those people who is drawn to the beauty of an O/R abstraction, and have been since first experimenting with Jasmine and PostgreSQL years ago, and the ideas are obviously much older than that.

After exploring my own O/R implementation I must admit that there are problems with the "aesthetics of the abstraction" as well.  You are seldom working with a fully populated domain model, and lazy loading and the like carries with it its own trade offs.  I'm a bigger fan of Code Generation than pure OR mapping these days.  At any rate, read the article if you are interested in O/R mapping

Tuesday, March 07, 2006 9:42:05 PM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [2]  |  Trackback
 Saturday, March 12, 2005
Headphones
Saturday, March 12, 2005 12:00:00 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Tuesday, March 08, 2005
Designer Support
Tuesday, March 08, 2005 12:00:00 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Thursday, March 03, 2005
Choosing an OR mapper
Thursday, March 03, 2005 12:00:00 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Wednesday, March 02, 2005
Trap Codegen
Wednesday, March 02, 2005 12:00:00 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [0]  |  Trackback
 Sunday, February 27, 2005
TRAP progress
Sunday, February 27, 2005 12:00:00 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [4]  |  Trackback
 Wednesday, February 16, 2005
OR Mapping
Wednesday, February 16, 2005 12:00:00 AM (Central Standard Time, UTC-06:00)  #    Disclaimer  |  Comments [3]  |  Trackback