Recently I solved a strange bug in our CMS application. We load our domain at Init time – using some xml. So, the first time the app run, it run perfectly; but after recycle, some assemblies could not be found in the AppDomain. I did some googling and I found this link: http://www.chrisvandesteeg.nl/2006/06/15/appdomain-recycle-different-from-real-restart/
It seems that IIS does not load the assemblies that aren’t used in a previous session. This is an undocumented optimization “feature” that cannot be turned off. For the moment I’ll check it as a feature, but I guess, as more and more people start using dependency injection, this will become surely a bug. :)
Application Pool Recycle - Bug or Feature
Sunday, 20 December 2009 Posted by maimutza at 23:37 0 commentsThe domain
Saturday, 31 October 2009 Posted by maimutza at 01:22 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:
So this is my domain from now on. I have a simple enum and two entities in a one to many relationship. Simple enough!
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 Posted by maimutza at 02:37 0 commentsThis 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 < and > with >.
That's all.
My first programming blog
Friday, 16 October 2009 Posted by maimutza at 01:41 0 commentsThanks to Andrei Ignat, here goes my first attempt to have a programming blog.
Subscribe to:
Posts (Atom)