Link to home
Start Free TrialLog in
Avatar of rnicholus
rnicholus

asked on

web frontend for a C# application

I have recently developed, in C#, (and am testing and constantly improving) a large program, compete with GUI that spawns a number of seperate processes.  The output screens of each of these console processes are captured and displayed in real-time in a listbox (seperate form/listbox for each process).  Also, the contents of each processes' console output is parsed and checked for error conditions.  The resource usage for each process is retrievable via the GUI, and any log file associated with each process is tracked and parsed in case that particular process fails.  If a process does fail, and a specific logging standard is observed, the log file is parsed in an attempt to determine what caused the failure.  Finally, when an error condition is detected in any of the processes, an alert is generated.  All alerts are collected and viewable with timestamps on a tab on the GUI.  Very severe alerts prompt information to be sent to email addresses and cell phones.  Also, if a process were to fail unexpectedly, a severe alert is generated, and the process is restarted.  

With that out of the way, I have thought about providing a web-based frontend for my application.  I figure I should start out simple.  With this in mind, I would like to develop a web frontend that lists specific information about each process, as well as the master program itself.  I imagine that this should be done using ASP, though I have never worked with ASP before (though I have worked with JSP).  I don't even know where to start, but I would think that the web frontend would need to be able to call methods on the application itself to gather data.  Can someone get me pointed in the right direction?  I'm sure I will have a LOT of questions on this issue, and I expect this thread will get fairly large and stay open for a while.
Avatar of rnicholus
rnicholus

ASKER

I should mention that my program does a lot more than I mentioned, but I figured a brief summary was all that was needed.
Well, to put it simply, it's not possible to have both a WinForms/Console gui as well as a web interface.  They run as completely different types of applications.  Your best bet is to use a database to log application data (which will be written with the WinForms/Console applications) and then read the database with the web application.  One nice thing about .NET applications, though, is that different types of applications can share a class library.  This way you can just create one class library (business logic layer, if you will) that contains all the reading/writing code and then reference the .dll from any application (winforms/console/web).
SOLUTION
Avatar of pbowens
pbowens

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I'm not sure I understand your suggestion.

>>The way I would approach this (if you need to stick to console output), is to output to a file on disk, and then use your WEB >>GUI to read this file and present it in a nice format. You can have your console application running anywhere, as long as >>the web server has access to the output of the console application.

There are times when my master program might be controlling 100 seperate console applications.  Even if I had 100 seperate files displaying output for each seperate process, this still leaves out all of the other data I want to display on my web frontend, such as resources usage for each process.  As well as failure counts, alerts for each process, running time for each process, etc, etc.  There must be some way that my web frontend can talk to my winforms app.  
There's not really an easy way.  I suppose you could probably do it using some set of ridiculous API calls.  

Really, the best way to do this is to have the master program write its observations to a database or a file and then have the web application read it.  

Alternatively, if you were to write almost all of the master programs code in a business logic layer class library you could allow your web application to basically become a second instance of the master program.
Well, I suppose I could have my mast program write all of its observations to a file or DB, but this seems like it would require quite a bit of overhead.  

I'm not sure I know what a business logic layer class library is.  Also, when you say I could allow my web app to basically become a second instance of my master program, what does this mean exactly?
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
BurntSky:

Thank you for your comments and information regarding Enterprise Applications.  It is helpful for me to be aware of such details and methods.  I am going to keep this thread open for a few more days, just to make sure I have covered all of my bases.
Ok.  I'm going to close this up for now.  When or if I get around to this portion of my project, I may re-open as another topic if I need any additional info.  Thanks everyone.