UI on one side and the business code on the other side.

H

Hans7

Just trying to get some things straight.
I don't want to end up with some ravioli code so I want to get it
straigt from the start.
This is what I want:

A project called CH7_9 has two cs files one called Form1.cs and the
other RWDLog.cs

The From1.cs hold all things related to the UI such as the Form,
buttons etc. and RWDLog.cs holds the code related to whatever it should
do. It this case it should read,write or delete logging entry's in the
eventlogs of windows(but that's not the issue).

How to organize this.???
I'm getting lost in private, public and CH7_9.Form1.x?!....
I think (know) it has to do with things like scope, accessibility of
classes etc. but I can't find a decent text, including an example, that
explains to me how to go about with this.
How to separate the UserInterface part from the business code part.

Any suggestions?

Hans.
 
N

Nicholas Paldino [.NET/C# MVP]

Hans,

Why not have the code that has the form in an assembly that is an
executable and the code for the logging in an assembly that is a library?
Then, you can have the code for the executable reference the library for
logging.

Hope this helps.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top