473,383 Members | 1,822 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

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

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.

Aug 6 '06 #1
1 986
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.
--
- Nicholas Paldino [.NET/C# MVP]
- mv*@spam.guard.caspershouse.com

"Hans7" <he*********@solcon.nlwrote in message
news:11*********************@n13g2000cwa.googlegro ups.com...
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.

Aug 7 '06 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

14
by: Matt | last post by:
I want to know if ASP.NET Web Forms Validation Controls are Server-Side or Client-Side form validation? Since I think each validator control can select either 1) JavaScript based error dialog or 2)...
0
by: ZMan | last post by:
Scenario: This is about debugging server side scripts that make calls to middle-tier business DLLs. The server side scripts are legacy ASP 3.0 pages, and the DLLs are managed DLLs...
4
by: John Boy | last post by:
Hi, Can anyone help. This is really doing my nut in. 3 years ASP exp. and now doing .DOT which is a step in the wrong direction. Basically I am left with the code of a guy who has left. When I...
6
by: Deborah | last post by:
I'm a rookie, and I guess I know just enough to be dangerous. I found a great template website, openwebsign.org, and found an open source template I really liked that even came in 2 versions. ...
5
by: Alex Maghen | last post by:
I frequently find myself wanting to insert some basic client-side JavaScript functions in the page of an ASPX of mine. But I find it so frustrating that I have to actually contruct my JavaScript in...
7
by: Tim_Mac | last post by:
hi, using .net 2.0, i have a web form with lots of textboxes, drop-down-lists etc. There are lots of required field validators and regular expression validators. When i click the 'save' button,...
14
by: rabbitrun | last post by:
Hi Everyone, I work for a financial company. I am planning to give a presentation to rest of the development team (15 people) here on moving server side logic to client-side javascript for an...
10
by: lonsharim | last post by:
Hi all, We have been approached by a company that have large 2 tier ASP based website using SQL Server as the backend. These systems have been in place for well over a decade with a small...
5
by: Simon | last post by:
I heard that we could do that by using AJAX. Could anybody share how to do it? Thanks.
5
by: =?Utf-8?B?dXNmaW5lY2F0cw==?= | last post by:
I'm new to asp.net. I'm trying to follow the tutorial walkthroughs and have got a few done. Now I'm doing the one about validating input, and I've run into some problems. In particular, I am...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.