views:

78

answers:

2

I have previously really only worked on your general 3-tier system.

I am now tasked with something slightly different. I now need to retrieve files from 3rd party location using FTP. In the few times in the past I would have built a console app run and ran it on a schedule. It would have worked but maybe not been the best.

I am looking for some general patterns that might be helpful. I am not looking to go into architect astronaut land. I just want to make sure I don't re-invent the wheel or make a newb mistake.

I will be implementing this on the .net framework

+2  A: 

My view is that (generally) the best architecture is simply the simplest archetecure that achieves all of the requirements.

The two immediate options that I can see are:

  • A simple console application that runs on a scheduled task
  • A simple service that runs

Some people might argue that writing a service is more flexible and therefore a better architecutre, however its also the more complex design - for example:

  • What happens if someone wants to do manually trigger the download?
  • You also now need to mess around with timers and threads etc...
  • What happens if there is a failure?
  • etc...

It might be that certain requirements (e.g. resilience or something) mean that a simple console application doesn't fulfill all of the requirements in which case you are forced to go with the more complex solution, however if you can get away with it I'd go for the console application.

Kragen
I agree that you should use the task scheduler. Use the tools that were written to handle this scenario. This will allow you to focus your time and attention on the console app.
fatcat1111
A: 

I agree with the idea of always writing the least complex application that satisfies the requirements. In this case it sounds like a console app run use task scheduler would be perfect. I also suggest you use test driven development and log4net for your logging.

mpenrow
Agree on TDD and log4net.I am already using log4net alongside fluent and Nhibernate.TDD is a work in progress. I have typically rolled my own but am now attempting to use Nunit.
bearrito