Skip to main content
added 114 characters in body
Source Link
Neil
  • 22.9k
  • 48
  • 76

Absolutely yes. It is a good idea in the same way that it is a good idea to apply separation of concerns on classes to put each in its own in order to perform a single task. You may only have one instance of that class, but it matters not. The optimization is not in terms of program performance but in terms of organization and overall program "health". You

You want to be able to return to your program one day and not have to scroll through several hundred pages of code, even if it is put into regions (using regions on classes with lots of code is like putting lipstick on a pig, by the way). Should you ever one day decide to use it somewhere else, you can do so gracefully and without many problems.

Just don't make the temptation of giving the user control access to the parent form. If you do it this way, use events to convey information to the parent, with the parent form as a subscriber.

Absolutely yes. It is a good idea in the same way that it is a good idea to apply separation of concerns on classes to put each in its own in order to perform a single task. You may only have one instance of that class, but it matters not. The optimization is not in terms of program performance but in terms of organization and overall program "health". You want to be able to return to your program one day and not have to scroll through several hundred pages of code, even if it is put into regions (using regions on classes with lots of code is like putting lipstick on a pig, by the way).

Just don't make the temptation of giving the user control access to the parent form. If you do it this way, use events to convey information to the parent, with the parent form as a subscriber.

Absolutely yes. It is a good idea in the same way that it is a good idea to apply separation of concerns on classes to put each in its own in order to perform a single task. You may only have one instance of that class, but it matters not. The optimization is not in terms of program performance but in terms of organization and overall program "health".

You want to be able to return to your program one day and not have to scroll through several hundred pages of code, even if it is put into regions (using regions on classes with lots of code is like putting lipstick on a pig, by the way). Should you ever one day decide to use it somewhere else, you can do so gracefully and without many problems.

Just don't make the temptation of giving the user control access to the parent form. If you do it this way, use events to convey information to the parent, with the parent form as a subscriber.

added 18 characters in body
Source Link
Neil
  • 22.9k
  • 48
  • 76

Absolutely yes. In It is a good idea in the same way that it is a good idea to apply separation of concerns on classes to put each in its own in order to perform a single task. You may only have one instance of that class, but it matters not. The optimization is not in terms of program performance but in terms of organization and overall program "health". You want to be able to return to your program one day and not have to scroll through several hundred pages of code, even if it is put into regions (using regions on classes with lots of code is like putting lipstick on a pig, by the way).

Just don't make the temptation of giving the user control access to the parent form. If you do it this way, use events to convey information to the parent, with the parent form as a subscriber.

Absolutely yes. In the same way that it is a good idea to apply separation of concerns on classes to put each in its own in order to perform a single task. You may only have one instance of that class, but it matters not. The optimization is not in terms of program performance but in terms of organization and overall program "health". You want to be able to return to your program one day and not have to scroll through several hundred pages of code, even if it is put into regions (using regions on classes with lots of code is like putting lipstick on a pig, by the way).

Just don't make the temptation of giving the user control access to the parent form. If you do it this way, use events to convey information to the parent, with the parent form as a subscriber.

Absolutely yes. It is a good idea in the same way that it is a good idea to apply separation of concerns on classes to put each in its own in order to perform a single task. You may only have one instance of that class, but it matters not. The optimization is not in terms of program performance but in terms of organization and overall program "health". You want to be able to return to your program one day and not have to scroll through several hundred pages of code, even if it is put into regions (using regions on classes with lots of code is like putting lipstick on a pig, by the way).

Just don't make the temptation of giving the user control access to the parent form. If you do it this way, use events to convey information to the parent, with the parent form as a subscriber.

Source Link
Neil
  • 22.9k
  • 48
  • 76

Absolutely yes. In the same way that it is a good idea to apply separation of concerns on classes to put each in its own in order to perform a single task. You may only have one instance of that class, but it matters not. The optimization is not in terms of program performance but in terms of organization and overall program "health". You want to be able to return to your program one day and not have to scroll through several hundred pages of code, even if it is put into regions (using regions on classes with lots of code is like putting lipstick on a pig, by the way).

Just don't make the temptation of giving the user control access to the parent form. If you do it this way, use events to convey information to the parent, with the parent form as a subscriber.