views:

45

answers:

2

I am developing an application to carry out pre-defined "tasks" on MSSQL database tables. It is really a tool to help with some repetitive data conversion/import tasks we have.

In its SIMPLEST form it could be an "instruction" acting on a table ie. Take the contents of Field A and merge with Field B then write to Field C

I have implemented the basic framework (using SQL SMO) which allows for connecting to the database, selecting the table and fields and defining the output table and that is working fine.

I now need to implement some kind of scripting between the two so that I can

a. Build the "actions" using c#

b. Have some method of testing them?

c. Save these individual actions for future

d. Perhaps "string" them together to form more complex actions.

I am being drawn to using the Workflow Foundation classes, but (a) I dont know how easy this is going to be to integrate within my WinForms application and (b) Are there any other more practical options that anyone has found workable

I am using C# .NET 3.5 VS2008

If anyone can offer any pointers I would appreciate it.

Roger Somerset UK

A: 

Have you considered SQL Server Integration Services (SSIS)? This MS tool is very powerful and allows you to build up complex actions such as getting data from different sources, sorting, merging and generally messing with it, and outputting it to various places. And you can code anything that's not supported out of the box in .Net.

Of course this isn't your own app so you're limited in how people interact with it (basically by running predefined scripts), testing is going to be more difficult, and you're dragging & dropping instead of writing code (which generally sucks!). So not much use if your users have to dynamically create new tasks, but if it does suit the bill it might well be the quickest way.

Other than that, it sounds like you might be looking at writing some kind of Domain Specific Language (DSL) for your users to input into your app, but that's going to be a lot of work.

Grant Crofton
Hi Grant - I have used SSIS on a different project and aside from finding it quite cumbersome especially when trying to use "repeatable" tasks - I also found it quite un-reliable especially in Merging inputs, links which were made would then disappear if edits were made earlier in the flow? I really discounted this.Since asking the question I have stumbled across Managed Scripting Engine (http://managedscripting.codeplex.com/) which on first inspection looks very promising. It is only BETA at the moment and I'm not sure if it is an active development.Thanks for your input
Roger Maynard
Yeah, SSIS isn't my favourite thing. I hadn't seen that Managed Scripting Engine before, looks interesting. You might get some more responses in an hour or two when the Americans come online.
Grant Crofton
Have you had a look at "CS-Script"? http://www.csscript.net. More powerful and feature-complete than Managed Scripting Engine.
Keith Blows
A: 

Guys, many thanks for all your suggestions.

Having looked at the "CS-Script" information on Keith's link, it seems to be able to do everything I will need.

Thats the way Im going to tackle it.

Roger

Roger Maynard