Sunday, June 11, 2006
Thursday, June 08, 2006
Agile Transition
Saturday, June 03, 2006
Random Thoughts
Managers tend to jump on the process ban wagon before looking at the team. Ultimately a well defined process will not write the software, your developers will. Team chemistry is very important, in my opinion, because you could have all-star players, but if no one can work together, it is very hard to ship a product. I think it is very important to have a variable skill level team. In that type of environment, people will tend to explorer other possibilities. Modern software is too complicated to make text book assumptions. On top of that, as the saying goes, a team does not need too many chefs in the kitchen.
Many companies are obsessed with assembling the ultimate dream team based on skill set, but having great skills does not equal a great team player. A very important ingredient in the recipe to create a dream team is to find people who love doing what they do, but this tends to be over looked. When everyone on the team is working as one, the variable skill levels tends to disappear.
Sunday, May 28, 2006
Indigo Security with AzMan
Saturday, May 27, 2006
Declarative Security with AzMan and CAB
public class YourShell : FormShellApplication {
protected override void AddBuilderStrategies(Builder builder) {
base.AddBuilderStrategies(builder);
builder.Strategies.AddNew(BuilderStage.Initialization);
}
}
- Dynamically created controls cannot be applied.
- Literal strings are used in the declaration of attributes, so if anything changes with the security or Control, it will result in runtime rather than compile time.
- The declaration of Controls cannot be in the designer file because the designer file will get overwritten.
- Performance penalty during startup of the application.
- Explicit logic already exists to enable or disable the UI based on the state of the system will override the attribute.
Client side security is for eye candy, but the real security comes when you secure your service layer. Service layer can be secured using declarative approach too, but that is for another time.
Friday, May 26, 2006
Invisible Leadership
I have been trying to write this article for weeks now, and I cannot seem to fix the article to the point where I would like. I am going to post it anyways, just as a caution some thoughts might not be well formulated.
For the past week we have been talking a lot about leadership at work. We bounced around ideas on what leadership means to us. We decided that in order for leadership to exist, there must be a leader. So the next natural question for us is what is a leader?
Fundamentally there are two types of leaders: institutionally defined or defined by your peers. Often this can be the same person, but it does not have to be. In this post I will talk more about non-institutionally defined leaders because it seems more interesting and unconventional. From this point on, I will just refer to a non-institutionally defined leader just as leader.
This type of leader can exist in any profession where people have to work together, not exclusively in software development. What are some characteristics of this type of leader? Since he or she is pretty much invisible from the corporate point of view, below I list some common attributes of a leader:
- Enjoys and cares about the type of work being produced.
- Strong problem solver.
- Approachable personality.
- Shares ideas with others.
- Assumes good faith of others.
- Shares a common goal with other members on the team.
- Exhibits patience with others.
- Works well with others.
- Strong Communication skills.
In order for one to be a leader, he or she must have followers right? How can an "invisible" person lead? I believe this person is only invisible to outsiders, but in reality, other members of the team know who this person is. This person leads by examples, and will set the bar high (I know this is a cliche, but it is true).
So far I have been talking about this magical person called the leader in a singular form. I believe there could be multiple leaders on a team, and a leader usuahlly emerges when he is able to provide insights to the problem.
So far I have described what a leader is, but why would anyone want to follow a leader instead of leading themselves? I think the most important attribute of a leader is the ability to solve a problem and convey the idea to the team. It is unlikely that everyone on the team can solve all the problems, assuming the problem is non-trivial. The person that is able to solve the problem with the best solution would be the leader in this case. Others would want to follow because we are all working towards a common goal, and would like to learn how the problem is being solved.
Having a leader is important to any team situation. Sometimes leaders inspire their team members to work harder so that they may too lead in some areas. Ultimately, this is beneficial
Tuesday, May 16, 2006
CoolCommands
- Open Explorer browser by right clicking on a file.
- Automatically resolves missing references.
- Locate item in Solution Explorer on demand when active tracking is turned off.
- Copy and paste references from one project to another.
- Add multiple projects at once.
- Collapse all projects.
- Visual Studio Command prompt here.
The latest version can be found here.
Sunday, May 14, 2006
Refactoring from Active Record to Repository
Active Record pattern made testing harder because static methods can not be polymorphic. Recently, we are leaning more towards repository pattern again, but we want to design it right this time. Repository will definitely alleviate testing. On top that, it will also allow us to cache data in a simple and centralized manner.
One thing that is not clear to us is which entity object receives a repository. Ideally, we do not want to create a repository for every entity in our system. In Domain-Driven Design by Eric Evan, he talks about using Aggregate to eliminate the need for creating a repository for each entity object. Aggregate is a group of associated objects that will be treated as a single unit. The root aggregate is an object that will encapsulate all associated objects. The client will have to retrieve the root in order to communicate with any objects inside of the root. Only entity objects will receive a repository is the root.
I think we are on the right path, but more disscusion is required to fully understand the implication of moving toward a full blown repository pattern.
Popup Advertisement
Saturday, May 06, 2006
Dynamically Disable Controls on the Fly
Irena Kennedy has a great article on how role based security can be accomplished at the control level using attributes. The article can be found here. The article assumes that you are using CAB and AzMan, but the concept is not exclusive to these technologies (It is worth to note that AzMan requires COM interop, so the performance hit has to be considered). It works by decorating the control you want to behavor differently based on user's role. For example, if you want only the manager to have the ability to delete users, you would declare the following attribute on the button:
[Authorization("DeleteUser", "Enabled", False)]
DeleteUser is the operation that is defined in AzMan, and in this case the operation will be associted with the manager role. If the user is not in the role, the button will appear disabled. The code that is acutally doing all the work lives inside of CAB in the RootWorkItemInitializationStrategy.cs. The good thing about this is the logic is isolated in one place, but the down side is we will have to remember to modify CAB code whenever a new version is released.
Friday, May 05, 2006
Databinding is EVIL
We have been feeling the pain on databinding for a while now. I even wrote databinding on our house of pain white board, when I thought I understood databinding. We decided to stick with it because datatbinding makes things "look" so easy. It is like magic. The problem with databinding is it makes something that is very comoplex under the covers to appear stupid simple. Almost every example found in any book or on the Internet uses databinding. It seems databinding is the way to go. Databinding works fine if you have very simple UI that does nothing but display data in a primitive way. Soon as you introduce complex and rich UI, databinding makes things much harder. If databinding is so easy to use, why is Brian Noyes' book "Data Binding with Windows Forms 2.0" 696 pages? There is a lot more to databinding than what meets the eye, which can lead to some serious disconnect between team members. This can often lead to dangerous situations when the wrong assumptions are made. Before you know it, you are adding hacks, so databinding would work correctly as you would expect.
The predictibility of databinding is very low because not all controls behave the same way when databinding is used. Duplication is one of the worst things you can do in any program. The concept of what value the control is displaying is duplicated. For example, if you want to retrieve data in a combo box, do you get it from the binding source or from the control it's self? The worst part of all is the value displayed in the control can be out of sync with the underlying binding source.
I hope this does not sound like I am ranting, because I am not. Maybe I am old fashioned, but manually populating the controls will be much easier and more understandable. On top of that, the code will be more testable. Less magic is a good thing.
Thursday, May 04, 2006
Role Based Command Authentication With CAB
CAB - Adding Command-level security to applications
CAB - CommandAuthorization AzMan Sample Application
