views:

332

answers:

2

I am working with a Web application, based on Asp.Net 3.5 and WSS 3.0 platform. Recenlty i've got a task as follows.

Import bank statement using FTX - Desktop application and parse those statements into database in every 24 hours

ie. i need to download bank statement with the help of a desktop application(which i can call by batch file). Then i have to go through each statement(text file) and convert those data into our database for future reference.

As far as i know, .Net provides the following options to implement such a functionality.

  1. SharePoint Timer Jobs
  2. Web Services
  3. WCF
  4. Windows Services

I would like to go for SharePoint Timer Jobs, but there are some plans to move whole application to Asp.net platform. I am interested with WCF since i haven't much experience with WCF applications, but not in a position to take final decision :)

Which is the most suitable way for this kind of task? Please suggest.

+1  A: 

I don't see any single one of them as the winner - you need bits from each:

  • you need some scheduling capability, e.g. "run this app every 24 hours at 4am" - that's best handled by e.g. Windows scheduled tasks

  • you need some kind of communications capability, to download the file. WCF can help, or you could use something like FTP or whatever it is that works for you

  • the rest like parsing and storing is really just plain old .NET stuff - neither WCF nor a Windows Service will help here.....

So the question really is: how do you download the file today (or in the future), and how do you make sure to start your app every 24 hours.

Where something like WCF would really help you is if you could turn the process around, e.g. if that bank statement file would be actively sent to you, instead of you going out to grab it. Then you need an endpoint (an address with a service running behind it) that is up and running - that's where WCF really comes into play.

marc_s
How about SharePoint Timer Jobs over Windows Scheduled Tasks
kannan.ambadi
@Kannan: why use something like Sharepoint, when the base Windows already has a great functionality for that??
marc_s
A: 

I would suggest putting the parsing/processing code into a library and keeping it decoupled from the scheduling portion of the code. That way you or someone in the future can easily roll it into a different application/solution.

Really you have 2 good solutions for the scheduling:

  • Windows service load the scheduling from a config file
  • Windows Scheduled task running your program
Zac