Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.


How to separate logic from ui

How to separate logic from ui

i've read lots of articles about ui/logic separation, i tryied to apply this on my projects but i am having problems even in basic application.

now i want to present a typical example of what i have to do and i want to ask you for some suggestions of how to separate the ui from the logic.

left suppose that we will have to make a data entry form (not web) in any language. We just add the controls required etc.
After the form is complete, we realize that there is a new form which looks similar to this. It has only one extra edit for example ... or two extra radio buttons.

what shall i do:
add the radio buttons on the same form ... hide them ... depending on the showing form ... this way having CODE REUSE

or just make a new form ... with almost the same controls.

now i don't like the second option

but if i go by the first , in a week i will be asked to add some extra edits again. then this forms look like another on i have to do ... and again some tweeking, hiding controls .. and at the end ... this becomes a nightmare to maintain.

is there a smart way to do this?

Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!


Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close