Mar 30 2009

How much should you design Upfront?

Category: .NET | c# | Design | Design Patterns | Methodology | Visual StudioJonathan @ 07:22

FeelGoodFactor

I follow the FeelGoodFactor principle. Requirements at first glance can be cloudy and messy. It can ambiguous and abstract, or it could just be plain daunting. However, you need to list what you can, and the attempt 'solves'. By solves, I mean a logical route to a solve, a prototypical solution to that problem, or at least common consensus by a few good men (cough). You need to get most of the areas in your head sorted, and then commit a bit of that solution in your head to paper and a review by your peers.

More...

Tags: , , , , ,

Mar 27 2009

A Simple Software Design Methodology


No matter what software development methodology you adopt, you will always be faced with 'design' that is between good and bad, between necessary and unnecessary, between complicated and over-complicated. Design, even if it is technically good, can have disastrous effects on the project, if implemented incorrectly, or creates discord within a team, misunderstanding. In fact there are so many reasons, it would be better just to tell you what good design is. That's if I could, but I can't!.
However, I can say that Design is one of the most important factors for a project, it influences time lines more than anything else. Underdesigning, or overdesigning, neglecting to think ahead far enough, not including certain implicit requirements can all add days and weeks to a project.

Most of the time, its in your hands

A project requires thought and understanding. It takes a wide range of thinking outside of the box, thinking realistically, but yet being extremely open to ways of improvement. Here are three activities that will definitely aid your methodologies, skydiving and chess and music.

More...

Tags: , ,

Mar 25 2009

ExtensionMethods repository

Category: .NET | c# | Design Patterns | Visual StudioJonathan @ 07:15

Oh what joy. Fons Sonnemans and Loek van den Ouweland have created a repository for ExtensionMethods. Go on, you know you want to. The site ExtensionMethod, allows you to submit your own creations to the community.

Now I had this idea, just around 10 minutes before I found the site, so they beat me fair and square. (By a mile). So therefore here is my top three ideas for the site, which I had, and hope they think about.

1. Grade it
Allow us to vote for it. However more than that, flag it with Compiled, Tested. Little icons that the site show next to each method.

2. Open Source the ExtensionMethod
Allow the community to edit the code, which will improve it over time. If I use it, and it fails because of something small, allow me to edit it, and solve the problem for everyone. Add original author, and contributor names to the list. Perhaps allow an 'Editor' per Type, to look after it and make sure its tested and complete.

2. Give us an Assembly
Run a build, once a month, compile all the snippets, which could be done automatically, if you get the correct data from the submitted snippet.
As part of the grading, is whether your automated compilation worked, when including the snippet. (snippet compiler like, compile on the fly and validate the method).

Now we can all download an Assembly for all these community driven ExtensionMethods. Updated: I found this nice, yet strangely odd set of ExtensionMethods for boolean.

Tags: , ,

Mar 24 2009

Future Proofing your Application

Category: Design | MethodologyJonathan @ 09:06

Software lifespan types

  1. StaggeredRelease
    We develop versions and patches and roll them out periodically.
  2. ContinuousLeak
    We fix and create mini patches, live alteration, component replacement, live into the environment. Typically its developed by in-house staff, developers and/or support.
  3. OneHitWonder
    An App created and used, more or less with no problems or errors. Seems to be around for a while, and then fades away. Typically a utility, which has very little value, and soon gets replaced or irrelevant. Typically a quick utility written by someone on inspiration, but with little time to spend on its up keep.
  4. RewriteEvolution
    An App released again and again, but always with the knowledge that it will be rewritten and/or always seems to get rewritten. Typically where there seems to be little justification on spending a lot of time on it.
  5. ConcreteBeast
    An App, that is not liked or really wanted at all, but seems to be impossible to get rid off as too many things are dependent on it. Typically a piece of software installed before you got there.


More...

Tags:

Mar 23 2009

Frameworks and the MSDN Library


We all know that the learning curve for Frameworks are quite high. We all know that Frameworks demand commitment, and learning time. We know this because we struggle with it everyday, whether its Java or .NET, Swing, or MFC.

1991-1993, Ralph Johnson and others wrote about Recipes and Cookbooks. There have been papers on documenting frameworks for more than 15 years. MSDN has some of the flavours but none of it is actually polished, nor tailored to the audience and the way in which people seek information.


My D4 Software Frameworks Pattern Language points you to some Patterns for documenting Frameworks:

WritingReference
You must provide a reference of interfaces.
WritingRecipe
You need to provide examples of isolated features of the framework that a pure reference cannot show.
WritingCookbook
You need to combine a large amount of recipes.
SelfDescribing
Using tools and generators, you can generate documentation.


All of them are self explanatory, except let me add, amazing that blogs seem to be the number 1 source for this kind of information, as well as google tends to find things on MSDN better than MSDN finds on their own material?.

The Solution to the MSDN Dilemna

The last one (SelfDescribing) is where I am particularly keen. Not GeneratingReference but SelfDescribing Imagine if a method on a class called MethodA() had been marked with an attribute called TemplateMethod()

Well a Tool, would be able to highlight it for you. If you had a tree of all Types, TemplateMethods and Hooks, you would now better understand the way in which the types where constructed. You would now know that MethodA() called Method(B) then MethodC(). The internals of MethodA() ois not known, shown or cared for. But from a documentation point of view it is crucual for certain designs.

It is this, that is missing from MSDN, because it is missing from all frameworks. Documentation needs to be better, but cannot, until the compiled code, can be examined in a much more thorough way. Developers of Frameworks, must declare their intentions of methods, class and patterns by attributing metadata onto it.

So the solution, is to mark the .NET Framework Types with documenting metadata. Allow all Framework developers to utilize this metadata descriptions for their frameworks, and provide a tool to inspect it.

Tags: , ,

Mar 20 2009

D4 Software Frameworks

Category: Design | Design Patterns | Frameworks | MethodologyJonathan @ 09:03

Effectively, here is an Index to the pattern language in draft.

A Pattern Language for Designing, Developing, Documenting and Deploying Object-Oriented Software Frameworks




D4 Software Frameworks
More...

Tags: , ,

Mar 19 2009

A point about AgileDesign

Category: .NET | Design Patterns | Frameworks | MethodologyJonathan @ 07:00

Two comments came through to me regarding AgileDesign. It was pointed out that Agile is a loaded term, and perhaps I should look to rename it. Another aspect mentioned to me in an email, was that Extensible and Agile are probably the same or too similar to be different principles. The thing though, is that my AgileDesign, is exactly "Agile" Design, and although Extensible and Agile are both concerned with change, there is a very important difference between them.
More...

Tags: , ,

Mar 18 2009

Software: LackOfEvolution


The majority of Software is quite multicellular. This sounds quite good, but in fact, its not even a small insect yet. or one could argue they are at the bug stage. Software tends to be rude, uncultivated, and unevolved, mainly due to LackOfEvolution.

One of the significant aspects of this, is that focus is granted to the development of the initial project, and then a handful of people (or if you are unlucky, just you), who are burdened with supporting it afterwards. This basically means "bug fixes until death" and lots of phone calls and emails later, you lose the lack of thought and action, but the software does not evolve. Software suffers from LackOfEvolution

Why do I say this
I say this because the vast majority of software only undergoes one full life-cycle. It may then get a smaller cycle of a patch or update, but most do not go to version 2 with the same code base. Version 2 tends to have very little of the original team members, and the code may very likely have completely rewritten areas. Version 3 even less of anything original. It may even have a new technology or language that it uses. Developers also enjoy writing their own code, rather than using other code, so this makes it easier to rewrite.

solution?
The problem is that the software does not get time to age, mature and be cultivated.
We need that extra time. An extra cultivation iteration is needed in all software teams, on any project. Create a planned version 1.1. Get your full team to conduct a special maturing cycle, where they add a few features, refactor code, shuffle things around. Plan it properly just as you would the first life-cycle.

LackOfEvolution for Teams

Software Teams can suffer from LackOfEvolution also. Developers can sometimes get caught in a project and not learn new things while they are busy on a project. You get to the end of a two year development and realize a few things have passed you by.

solution?
It is vital to stimulate debate about code, to have a trainer in for a day, to get show and tell sessions by members of the team, and other useful activities to counter act the stagnant waters. If you don't do SCRUM, have a SCRUM week, where you follow SCRUM for the week and evaluate it. Have a CompetencyFramework fro all developers with a plan on their evolution within a project and technology. We all need evolution, of character, skills and understanding, it is how we get better.

Tags: , ,

Mar 17 2009

Understanding Framework Types

Category: Design | Design Patterns | FrameworksJonathan @ 07:03

Traditionally, you read about the following two types.

Vertical Frameworks
or an Application Framework that covers all the elements top to bottom. It may be narrow, or relatively wide. However, it is most likely to be specific to a type of Application and not concerned with cross application reuse. For example: Employee Benefits, Batch Manufacture, Ledger and things of that nature. It would contain its own logging, errorhandling, data access, auditing. It would allow extensibility, configuration, but from a vertical perspective.

Horizontal Frameworks
or Infrastructure Framework is concerned with the wider services, and does not dictate the higher layers of an Application. So it would contain a wider range of services, but offer less vertical specializations.

More...

Tags: , , ,

Mar 13 2009

Framework Definition in less than 140 characters

Category: Design | FrameworksJonathan @ 04:24

What is a Framework? Its a difficult one, since most of the time, we all have terminology that differs in meaning for us.

My usual line is this "a class is to object" as "framework is to application", but it doesn't speak of the relationships between classes, or the architecture or structure.

I am trying to compile a list of definitions from you, so we can look at how we think of Frameworks today, right now. Over time, I wish to discuss each definition, break it apart. Look at what is good and bad, misleading, wrong, or right. Debate the definitions and then hopefully we can all understand it better. So please add me to your twitter and send me your definition.

A Framework is: More...

Tags: , , ,

Mar 11 2009

ReuseSplit

Category: .NET | Design | Design Patterns | Frameworks | MethodologyJonathan @ 05:16

Not spliff, split.

ReuseSplit is simple.
Getting true reuse takes time, and effort, and thought, but with ReuseSplit, you can achieve a good percentage. It also provides a focus for reuse, where it can grow.

Two (Inter)Faces "if you are as two faced as momma always says, why do you always wear that ugly one?" - anon

Generalization and Specialization. Split your code out into these two (inter)faces. The Generalization should be contained within a separate project. The Specialization within your current project.

Its not revolutionary, its simple. However, the majority of code in the business looks like Specialization only. Then perhaps what is common, then perhaps something reusable. However, by ReuseSplit, you are immediately doing two very important things. You are splitting what changes from what does not, and you are developing with reuse in mind, which creates separate code for reuse later, which means you are developing malleability into your solution as well.

Generalized

When we say, lets create a "Generic" something, we mean something that is versatile, more or less common, more or less reusable, more or less specialized.

By generalizing, we convert, "The quick brown fox jumps over the lazy dog", to "the (adj) animal jumps over the (adj) animal".

Now we know we need two instances of an Animal class, and some descriptive attributes that can be applied to the Animal.
This does not mean inheritance, it could be implemented in any sort of way, its the separation of Animal and Fox that is key.

Specialization

If you need a specific Fox, then build one, using the Animal, whether by composition or inheritance. The Specialization then feeds the Generalization. If it is common move it down.

By using this technique, thinking about ReuseSplit with everything I do, I like to think that I make an extra 10% of reuse on code, without thinking. Like driving a car, I don't think about it as I am doing it, however, reuse is usually higher, when I hit a project.

Tags: , , ,

Mar 5 2009

Guide for Building Frameworks

updated:
So what would I think are the most important principles for building a Framework?
Here are my current ones, in no specific order. I plan on gathering a collection of these on my pages, but for now here are a few to go on.

A large percentage of the patterns, heuristics, principles for Frameworks will apply to standard software development.

1. Convention Over Configuration
2. Works out of the box
3. Fine grained objects
4. Hotspots
5. Coalescent Patterns (Composite patterns - GoF)
6. One Voice or (Too Many Cooks spoils the..)
7. Prototyping Applications
8. more on the link below..

Click for full list

Tags: , ,

Mar 2 2009

All New DSL's will be 2nd Class Citizens until at least 2018

Category: .NET | Design | Development Tools | Visual StudioJonathan @ 03:29

So you have heard of Domain Specific Languages, maybe even wrote your own. Maybe even rolled it out to the public. Maybe you don't believe you have used a DSL? What about Cascading Style Sheets? Ever used CSS?

Very soon we have to answer a very important set of questions.
How do we use the language? Text Editor? Smarter tools such as Eclipse or Visual Studio? How does it integrate with other languages?

The Common Language Runtime (CLR) puts Microsoft at the front of all this? or does Eclipse have what it takes to adapt?

More...

Tags: ,