views:

66

answers:

1

Please don't judge me for what I'm doing because I realise it's a bizzare thing to do but my Boss wants it as an internal tool.

I needed to Sync the tasks with a Microsoft Project File with an outlook calendar via an outlook add on. The add on takes tasks that don't have any sub tasks and places them in the calendar spanning the time of the task. I have managed to get the application to :

  • Load the project file
  • Add, Update and Delete appointments from Outlook when syncing.
  • Work out on load when the project is out of sync with the calendar.
  • Monitor The Project File and ask the user whether to sync.
  • Update tasks in the project file on the fly when updating appointments in outlook.
  • Allow for the user to choose the hierarchy of the tasks/appointment such as Task B is a sub task of Task A.
  • Some other boring stuff.

Now this all works fine but today I was trying reverse the desgin process and I realised that the design is far from perfect. The code is fairly tidy and I feel I have avoided most code smells but I feel the design is not obvious from looking at the code and is not easy to understand immediately. I've just started to get interested in design patterns and someone here suggested refactoring an application as a great way to learn.

Does anyone have any ideas or have any links for common design patterns to help me get a head start such as a typical modern sync pattern as time is in short supply.

Many Thanks

Paul

+1  A: 

I don't know of any architectural patterns that fit syncing two applications specifically. If we saw the source code we could suggest design patterns where they fit but I doubt that is possible :). Here is a great site for design patterns http://www.dofactory.com/Patterns/Patterns.aspx , and another good one for architectural patterns http://martinfowler.com/eaaCatalog/. THe second link is from Martin Fowler's book on Enterprise Application Patterns.

Remember, patterns are to be used only when specific problems arise. Don't try to fit a pattern where those problems don't exist. Common mistake.

Wix
Thanks for the advice. I've seen Martin Fowlers blog before, the architect at my last place loved him and told me to read his stuff. I spoke to another friend the other night and he said the same thing regarding trying to make patterns fit for the sake of it so I shall bare that in my mind. Once again thanks for the answer.
Paulie Waulie