Wortzel's blog

.Net (2.0, 3.0, 3.5), C#, Asp.net, Com+, GIS(ESRI Software), Management, Analysis & Design, Life, Trips, And more...

October 2007 - Posts

My reading list for the next year
Two weeks ago, I asked Elad (one of the company founder) to order some technical books for our technical library. He told me to send him a list of books and he’ll order it. I wrote a list of technical book in vary subject in the development world (In .Net new technology oriented), the books were ordered by priorities. The next day, I sent him a list I made, and I told him that he can choose some books according to the list priorities. Then he told me “I count on your decision, the time I’ll spend on choosing the books costs me more than the books values”. Yesterday when I entered my office I had a pleasant surprise you can see it I the picture above. 

Conclusion: The cost of the books is nothing compares to the knowledge your developers achieve from reading them.

Posted Thursday, October 25, 2007 10:24 PM by Avi Wortzel | 4 comment(s)

תגים:,

How to add a custom configuration section

It's a best practice to work with strong types instead of typing the name of the class/properties by our own hands. One of the common places that we are usually typing a string is when we're retrieving data from configuration file. In this post I will show you how to declare a custom configuration section with a strongly typed class.

1.     Declare the configuration section in configuration file:
<configSections>
   <section name="serviceSettings" type="ServiceSettingsHandler"></section>
</configSections>
2.     Add the configuration section with its data:
<serviceSettings>   
   
<
service Assembly="asm1" Class="class1"/>   
   
<
service Assembly="asm2" Class="class2"/>   
   
<
service Assembly="asm3" Class="class3"/>
</serviceSettings>
3.     Add a new class that will represent the service definition (assembly & class name):
public class ServiceSetting
{   
   
public ServiceSetting(string className, string assembly)
   
   
{       
       
_Class = className;
       
       
_Assembly = assembly;
   
   
}
   
   
private string _Class;
   
   
public string Class
   
   
{
       
       
get { return _Class; }
   
   
}
   
   
private string _Assembly;
   
   
public string Assembly
   
   
{
        
       
get { return _Assembly; }
   
   
}
}
4.     Add a handler class. This class must implement the IConfigurationSectionHandler interface. This interface includes only one method that calls "Create", which creates a configuration section handler. The handler class look like this:
public class ServiceSettingsHandler : IConfigurationSectionHandler
{   
   
#region
IConfigurationSectionHandler Members   
   
public object Create(object parent, object configContext,
       
System.Xml.XmlNode section)   
   
{
       
       
List<ServiceSetting> list = new List<ServiceSetting>();
        
       
foreach (XmlNode service in section.ChildNodes)
       
       
{
            
            
list.Add(new ServiceSetting(
service.Attributes     
                ["Class"].Value ,
 service.Attributes
                ["Assembly"].Value));
       
        }
        
       
return list ;
   
    
}
   
    
#endregion
}
5.     The last thing we should do is to create a wrapper class to work with strongly types. The class should looks like this:
public class ServiceConfigurationManager
{   
    private ServiceConfigurationManager()
    { }    
   
public static List<ServiceSetting> GetServices()
   
   
{
       
       
return (List<ServiceSetting>)ConfigurationManager.
           
GetSection("serviceSettings");   
    }
} 
And now let's write some code that will use this custom configuration handler:
protected void GetCustomConfigSectionDate_Click(object sender, EventArgs e)  
{
   
List<ServiceSetting> list =
       
ServiceConfigurationManager.GetServices();      
    Services.DataSource = list;
     
   
Services.DataBind();
}
And the result is:

Posted Tuesday, October 23, 2007 8:34 AM by Avi Wortzel | 6 comment(s)

The Scrum Clan

A new Scrum clan was open and Shani invited me into it. It was a nice idea of Oren and Moti (the founder of this clan) to start a new group of Scrum lovers.


But I wonder what the clan purposes are? Is it really going to be like the MS user group with monthly meeting or is it just a virtual group where people share some thoughts and ideas over the net?  
As Shani already wrote, on my last job we started to use the Scrum methodology. We used it in a new project with short deadlines. It really helped us to achieve our goals, but furthermore it helped us to create a better workplace (In professional and enjoyment terms).In that period, I wrote some posts about Scrum and Agile methodologies and I even lecture about these methodologies in my former workplace.These are my posts about Agile/Scrum:
1.      A lecture about Agile Methodologies XP & Scrum

2.       Scrum methodology improvements – Part #1

3.       End of the first sprint!

4.       Daily Scrum meeting

5.       Working with Scrum methodology is starting…

And now it's time to choose the man that I want to invited to this great group.The guy I'll choose is the Scrum master in my current job. He brings this methodology and assimilates it in our organization. His name is Gilad Jacobson, the team leader of the R&D team in my workplace.

 Gilad Jacobson

Gilad it's an honor to tag you as a Scrum lover and including you in this clan. I hope you will share us with your special experience in the Scrum life from your perspective.

 

Posted Wednesday, October 17, 2007 11:36 PM by Avi Wortzel | 2 comment(s)