Looking at the List (3 of 6 or 7)

Here’s the next set of annotation for the list of reasons your development is crazy.


Each item is also the reason devleopment is possible, and wonderful. I am not whining about this – just trying to get a meaningful perspective and taxonomy to rein in crazy development. While I’m working on my taxonomy passes, feel free to do your own. Just categorize the items in any way that feels useful to you. That’s all a taxonomy is – a useful organization.


 21.  Generics


Generics provide a pattern from which many classes derive. These are extremely powerful in refactoring hierarchies and often result in an extra hierarchy layer so there is a polymorphic non-generic base class, and a generic base class.

 

22.  Reflection


Reflection allows you to break scoping rules at will. Sometimes this is highly desirable, such as creating factories and overcoming limitations in the generic New constraint.

 

23.  Intellisense


In addition to designing classes for their runtime behavior, we need to design them to minimize Intellisense polluting. This primarily involves a design pass of adding attributes to items inappropriate for Intellisense.

 

24.  Partial classes


Partial classes remove the anticipated relationship between files and classes. It also allows fragments of a file to be placed anywhere in your source code – potentially a vulnerability if you have marginally trusted people in your source code. There is currently no way to track partial classes.

 

25.  Partial methods


Partial methods result in new design patterns for the sake of allowing code replacements. This approach is unique in that code is actually not compiled, rather than being compiled and treated in a special manner at runtime. In addition to being philosophically unique, it allows for hazardous side effects.

 

26.  Extension methods


From a logical and Intellisense perspective, you can add methods to any class and anyone can add methods to your class. They do not need to be have your source code and from the perspective of the class or programmers maintaining the class, these methods do not exist.

 

27.  Lambda expressions and delegates


Delegates and lambda expressions allow fragments of code to be passed around the application. This technique became much more powerful with the introduction of generic delegates where common features can be implemented without casts. As a result, classes can be designed so that important portions of their functionality plug in and behavior might differ markedly depending on runtime assignments.

 

28.  Anonymous types


You don’t even have to write the class anymore. Simple objects with data (not behavior) can be created on the fly at runtime and not even known at compile time.

 

29.  Declarative – XAML


XAML offers a new syntax for creating objects and properties. By itself that has little impact on class design. However, XAML also offers markup extensions which allow a specialized string only syntax for constructors. Also, since XAML doesn’t run code, code must be contained in an adjacent “code beside” file that is not even written in the same language. At runtime, XAML becomes .NET code, so there is an extra level of redirection in debugging. Effectively using XAML and markup requires consideration during design.

 

30.WPF – styles


WPF redefines what it means to be a UI item. It allows separation of UI into layout, appearance and behavior. This relies on styles which are a collection of property settings, relying on other property settings. Thus UI behavior is comprised of code in many places, and because of implicit properties these are not all available through the property name, but its type.


 

Leave a Reply

Your email address will not be published. Required fields are marked *


*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>