Sunday, January 16, 2005

NTrans ramblings

So I'm writing this O/R Mapper called NTrans. (The letter N seems very "in" and I couldn't think of anything). It's hosted at http://projectdistributor.com under the Eronel group. It's a prototype right now, but I hope to build it into something useful rather quickly (hopefully the basics will all be there by the end of this month).

Curious? Ok, go check it out. I'll wait.

You didn't did you? Ok, well none of this is going to mean much to you probably then. :)

I'm having a problem with the ObjectScope and Context classes. I'm not even sure they should be seperate classes really, but I like how the Context factory works. I think basically I need to move more of the IDbCommand stuff into the Context I suppose.

I also need to add more granular tracking of objects I think. Specifically wether individual properties are Clean, Dirty, or Unloaded. Once I have that, Lazy Loading should be a snap. Right now it's not because I can't differentiate between nulls that are just not loaded, or nulls that are really null.

I also need to create a FillProperty(object obj, string propertyName) method for lazy loading. I think it should be internal since lazy loading is the only situation it should be used, and that should be transparent.

I really need to get around to creating some UnitTests. I've created a Test Project full of stubs, but haven't filled it in with anything usefull. I wish I could say it's because I write perfect code, but the truth is I just haven't gotten motivated about it. :)

So what now? Well, I have a hunch the property state I mentioned above for lazy loading will fit into a QueryAPI somehow. Plus it'll help me update just the EmbeddedValue properties that are actually dirty.

Actually, can you modify Attributes at runtime? I mean, if I added a LazyLoadedAttribute to the project, could I expose an IsLoaded property, and after loading the property, the LazyLoader would set the IsLoaded property to true so the property wouldn't be loaded multiple times. Definitely something to test. Actually, if I can do this, then there probably isn't even a need for the PersistentObject class. I could just expose internal properties of the PersistentAttribute instead.

VS2005 Likes/Dislikes

So since I've been using VS2005 pretty steadily for all my personal projects, I've run into a few cool things, and not so cool things.

First up, the cool stuff: Intellisense is better. The Office2003 layout is nicer. Project Diagrams are cool (if not all that useful). Project Properties are spiffy (even if it's hard to figure out how to get "Settings" values to stick sometimes).

Now the bad: The refactoring support is next to useless. The expansions are cumbersome (so much so that I just don't use them). Intellisense sometimes gets in the way of typing what you want (though not as much as CodeRush). I can't figure out how to turn off the Using Directives auto-regioning. If the "Add Using" support was as clean as Resharpers this would actually be a cool feature (the using regions), but since it's slow, and usually requires mousing around, it actually ends up a big nuiscance.

The long and short of it is I can't wait until Resharper has a port for VS2005. If I could go back to VS2003 + Resharper and still use c#2.0, I would (I can't can I?).

This page is powered by Blogger. Isn't yours?