The domain

Saturday, 31 October 2009 0 comments
So I've set the environment. It's time to set the work model. Because I like monkeys and monkeys love bananas, I will start from the banana entity. Bananas are fruits and usually fruits stay in trees. So here's my model. Of course, I have to keep my data in a db, so all my entities must have Ids:


public enum FruitType {
Banana,
Mango,
Orange
}

public class Fruit {
public int Id { get; set; }

public FruitType Type { get; set; }

public int TreeId { get; set; }

public Tree Tree { get; set; }
}

public class Tree {
public int Id { get; set; }

public IList<Fruit> Fruits { get; set; }

public string Name { get; set; }
}


So this is my domain from now on. I have a simple enum and two entities in a one to many relationship. Simple enough!

Monkey ingredients - how to create a programming blog

Sunday, 18 October 2009 0 comments

This should be a programming post but I know how hard is to set up the blog enviroment even for a programmer. So I choose to present the steps I took to create this blog.

After creating the blog and choosing a nice template for it, I had to add the syntax highlighting javascript. I usually use the one by Alex Gorbatchev. It's really simple, here you can find a sample how to configure and use it with Blogger: http://mlawire.blogspot.com/2009/07/blogger-syntax-highlighting.html


Make sure put the script in the <pre class="brush:js"> tag. And make sure that the <pre> tag has the correct class. Here is a list of the corresponding classes for each programming language. Olso make sure that you chage the < with &lt; and > with &gt;.



That's all.

My first programming blog

Friday, 16 October 2009 0 comments

Thanks to Andrei Ignat, here goes my first attempt to have a programming blog.