Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Job Scheduler

Status
Not open for further replies.

229257

Programmer
Apr 23, 2002
54
GB
Hi All,

We're developing a scheduler for our new .net application to control reporting / update programs / month end procedures etc. and we were discussing the best way to achieve this...

The main requirement is that we need to execute any method in the BLL layer that could be in different namespaces and classes. The type and number of parameters will also vary.

One solution that I've quickly tested and seems to work is generating some dynamic code using the properties of the job (Assembly Path, Business DLL, Class, Method, Namespace, Parameters), compiling the code and then executing it. The only trouble with this is that compiling code creates an overhead on CPU / RAM.

What other methods could we use? Could we achieve the same using WCF? We have the 3.5 framework available to us for this project.

Any suggestions and a brief explaination would be greatly appreciated!

Andrew
 
i don't see why you would need dynamic code for this. start by defining the core functionality. then determine how to model this functionality in code (hint: the names of the objects should be the same as the names described by the constituents and the members of those objects should be the same as the names they call these actions.) now you have the domain. all you need is the scaffolding to supporting it (database access, object instantiation, GUI, logging, security, etc.)

if you're trying to build a one-solution-fits-all. or get all the features in the first revision, then your project has a high probability of failure.

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Thanks for your comments Jason!

You're right - we don't need to compile any code at runtime.

I've found an alternative method of supplying a dynamic assembly, class, method and parameters. All credit must go to the article below. I've used this as the basis of my prototype so it still needs performance testing.

 
why would you need to dynamically invoke method calls?

Jason Meckley
Programmer
Specialty Bakers, Inc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top