Thursday, August 17, 2006

Training Day 3

Day 3 of training was as great sa Day 2 was.

Quickly we covered layered architecture. Which was just going over the normal multi-tiered application archietecture that everyone has been talking about for a long time. Mr. Adams went into how and where the business objects and different patterns would be used and implemented in relation to the servers and the layered architecture. He used the term layered instead of tiered, because each layer is not neccessarily on a different computer, and sometimes a single layer can reside on multiple computers.

Microsoft Application blocks are re-usable code that Microsoft has provided for you. Be sure to check out Patterns & Practices for additional information on patterns. I've been here several times before and have always had a hard time understanding what I was reading. Mr. Adams made a point to state that it's very difficult. This is not something that's easy to grasp the first time. However, if you put in the time to work at it and understand it, then you will get it. You will be able to use it quickly and easily, because once you get it, you always get it. It's not regular expressions, the pattern is the same no matter what, then you just have to implement it in your specific solution.

We learned the Factory Pattern. Quickly, the Factory pattern creates a class that cannot be created on it's own.

We covered the Model View Presenter and I received a sample application the implement the Model View Controller pattern. I think I understand the controller pattern, but the presenter is still confusing. But they both decouple the state of the application from the actual user interface to allow Unit tests of the state of things. When using these a mock object can pretend to be the actual user interface that can be used to test.

The Observer pattern is the final pattern for today. We didn't really get to implement it ourselves though. The sample that we worked through already had the code and we just uncommented it. The hardest thing about the Observer pattern is that you need to have an understanding of .Net delegates and events, because that is how it is implemented. Delegates still give me trouble. I constantly have to look it up and use trial and error before I figure it out. I need to spend some time to make sure I have a complete understanding of these delegates, maybe I just need to use them more, by writing more test projects. The observer pattern can be hugely useful, especially because it can be used across networks through remoting.

Finally we discussed Scalable Distributed applications and using Web Services and remoting. Remoting is another topic that I need to spend a lot of time on. I worked through the lab for over an hour after everyone else left. I know for a fact that at least the three other groups near me didn't finish the lab. I stayed to also finish the bonus, because the remoting was the bonus. I liked how the training had you make a change and then run it and receive an error. It helped to explain why each step needed to be taken. I have a little better understanding now, but remoting is still a rather complex topic.

After the I finished the lab I was talking with Mr. Adams a little and again he asked if I was bored. "It's clear that you and one other students are far more senior than the rest of the class. You just have a much better understanding of all of the material." I'm glad that I'm not as novice as I thought, so I guess that means that I'm beginner, because I definitely don't feel comfortable with specifically designing with patterns in mind.