Ninject (Part 2): Customizing your infrastructure for logging
Yesterday we had a little introduction to Ninject. Today I'd like to examine what's involved in getting some AOP style logging going for your application. I find that there are only very few places where I'm logging something that steps out of the bounds of being called at the end of the method when things succeed. I'm generally more interested in what happens when things go wrong and that's when I log the exception. In some cases I'll be interested in the actual parameters. The code I'm ...
Ninject: Getting all the stuff you’ll need
I have a new project I started and I could reevaluate my toolset :) I decided to take a closer look at Ninject, Moq and NSpecify. Moq has been talked about enough I think, a really nice way of mocking and I will definitely be using more of it. My original plan was to write one big blog post.. but it is going to be far too long, so I'm breaking it up in smaller bite size pieces. What I did was download the code, have it rest on my pc for about a week, updated again when I really got round ...
Updated my lightspeed model generator
This week I could start a project that has a database that goes somewhat beyond a blog. This seemed to me like the best way to improve my model generator that I built earlier And as expected I needed to tweak it a little so that it would work properly, and I added a feature. Seen as there are 2 files generated for an entity if you add a private field that exists in the database there then the generator will skip it so that you can add more attributes than the ones this script generates for you...
Using Ruby to Generate LightSpeed Models – Part 4

by
admin
Posted February 9th, 2008 at 5:27 am
UPDATE: I have an update here with a new version and the location on google code where the project is hosted now. In the previous 3 parts (part 1, part 2, part 3) we talked about getting the meta data out of the database and generating the lightspeed entities in memory. I won't put the code listings up in this blog post but instead will give you a link to the complete code :) You can download the express edition of LightSpeed and try it for yourself if you want. Instead I'll talk abou...
Using Ruby to Generate LightSpeed Models – Part 3

by
admin
Posted February 5th, 2008 at 8:51 pm
First off I'm writing with windows live writer again, ecto wasn't up to the job. It tried to "clean" my html, granted it was messy but it should leave my text untouched. The whole editing experience wasn't satisfying enough. And Ecto already seemed like the best blog editor for mac, slim pickings indeed. From my tools I expect foremost that they stay out of my way and it didn't. I just talked with Simone about looking at making a .NET based client that runs on mono, we'll see where that plan goe...
Using Ruby to Generate LightSpeed models – Part 2

by
admin
Posted February 5th, 2008 at 9:16 am
This is the second post in the series on generating LightSpeed entities with the help from ruby.
In the previous post we connected successfully to the database and were able to execute some sql.
At the end of the series I'll make the code downloadable.
Today I'd like to talk about the metadata we'll be needing from the database. We're going to need a list of tables, we're going to need to know about the columns of each table. Furthermore we want to exclude the primary keys in the case of Ligh...
Using Ruby to Generate LightSpeed Models – Part 1

by
admin
Posted February 4th, 2008 at 11:00 am
This is the first in a multi-part post on a little ruby application I wrote to generate models for LightSpeed.
The ultimate goal is to consume the entities we generate in this series with IronRuby and perform some data access.
Today I'll post the code I wrote for creating the database connection. At this moment there is only code there to connect tho sql server. But I may want to add providers later if I decide to keep using this code. That's why some bits are in a separate module.
This are...