Click here to Skip to main content
15,922,015 members

Welcome to the Lounge

   

For discussing anything related to a software developer's life but is not for programming questions. Got a programming question?

The Lounge is rated Safe For Work. If you're about to post something inappropriate for a shared office environment, then don't post it. No ads, no abuse, and no programming questions. Trolling, (political, climate, religious or whatever) will result in your account being removed.

 
GeneralRe: Acceptability of C# Partial Classes Pin
Ravi Bhavnani19-Jul-16 3:00
professionalRavi Bhavnani19-Jul-16 3:00 
GeneralRe: Acceptability of C# Partial Classes Pin
BillWoodruff19-Jul-16 3:06
professionalBillWoodruff19-Jul-16 3:06 
GeneralRe: Acceptability of C# Partial Classes Pin
Ravi Bhavnani19-Jul-16 3:10
professionalRavi Bhavnani19-Jul-16 3:10 
GeneralRe: Acceptability of C# Partial Classes Pin
PIEBALDconsult18-Jul-16 19:04
mvePIEBALDconsult18-Jul-16 19:04 
AnswerRe: Acceptability of C# Partial Classes Pin
Mycroft Holmes18-Jul-16 22:26
professionalMycroft Holmes18-Jul-16 22:26 
GeneralRe: Acceptability of C# Partial Classes Pin
Clifford Nelson19-Jul-16 5:18
Clifford Nelson19-Jul-16 5:18 
AnswerRe: Acceptability of C# Partial Classes Pin
Jörgen Andersson18-Jul-16 22:48
professionalJörgen Andersson18-Jul-16 22:48 
AnswerRe: Acceptability of C# Partial Classes Pin
Marc Clifton19-Jul-16 2:12
mvaMarc Clifton19-Jul-16 2:12 
For a particular WinForm app, I have a lot of controls on the main page. I use partial classes to break up the handling of the control events into their logical groups.

Otherwise, I never use partial classes, and instead use a publisher/subscriber pattern to communicate between instances, which also has the advantages of:

1) letting me hook in logging so I can see what the heck is going on
2) process intercommunication asynchronously, as the pub/sub I use can make message handler call on a separate thread
3) better exception handling, as the pub/sub will wrap the message handler call in a try-catch and log exceptions
4) because the exception handler uses the pub/sub itself to log the exception, I get can wire up other services, like an email notification, when errors occur
5) and the pub/sub instantiates the receiver class, so I'm enforcing completely isolated processing, which is great for thread safety.

So effectively, all the things that actually do non-UI things become services, and I often write them as runtime loaded modules that register themselves in the pub/sub, which is cool because I can then easily mock the services, change the business logic by loading a different module that implements different behaviors, extend the behaviors simply by adding new modules that handle the same messages, and so forth.

So there, in a nutshell, you have The Clifton Method[^].

Marc
Imperative to Functional Programming Succinctly

Contributors Wanted for Higher Order Programming Project!

Learning to code with python is like learning to swim with those little arm floaties. It gives you undeserved confidence and will eventually drown you. - DangerBunny

GeneralIoT contest Pin
Chris Maunder18-Jul-16 11:10
cofounderChris Maunder18-Jul-16 11:10 
RantF****** FORD GPS! Pin
Brisingr Aerowing18-Jul-16 10:43
professionalBrisingr Aerowing18-Jul-16 10:43 
GeneralRe: F****** FORD GPS! Pin
raddevus18-Jul-16 10:56
mvaraddevus18-Jul-16 10:56 
GeneralRe: F****** FORD GPS! Pin
Ravi Bhavnani18-Jul-16 11:01
professionalRavi Bhavnani18-Jul-16 11:01 
GeneralRe: F****** FORD GPS! Pin
Brisingr Aerowing18-Jul-16 11:11
professionalBrisingr Aerowing18-Jul-16 11:11 
GeneralRe: F****** FORD GPS! Pin
Ravi Bhavnani18-Jul-16 11:35
professionalRavi Bhavnani18-Jul-16 11:35 
GeneralRe: F****** FORD GPS! Pin
Brisingr Aerowing18-Jul-16 11:41
professionalBrisingr Aerowing18-Jul-16 11:41 
GeneralRe: F****** FORD GPS! Pin
Ravi Bhavnani18-Jul-16 11:46
professionalRavi Bhavnani18-Jul-16 11:46 
GeneralRe: F****** FORD GPS! Pin
User 842019-Jul-16 3:04
User 842019-Jul-16 3:04 
GeneralRe: F****** FORD GPS! Pin
Clifford Nelson18-Jul-16 11:15
Clifford Nelson18-Jul-16 11:15 
GeneralRe: F****** FORD GPS! Pin
jeron118-Jul-16 11:24
jeron118-Jul-16 11:24 
GeneralRe: F****** FORD GPS! Pin
Brisingr Aerowing18-Jul-16 11:44
professionalBrisingr Aerowing18-Jul-16 11:44 
GeneralRe: F****** FORD GPS! Pin
jeron118-Jul-16 11:47
jeron118-Jul-16 11:47 
GeneralRe: F****** FORD GPS! Pin
den2k8818-Jul-16 22:29
professionalden2k8818-Jul-16 22:29 
GeneralRe: F****** FORD GPS! Pin
R. Giskard Reventlov18-Jul-16 11:28
R. Giskard Reventlov18-Jul-16 11:28 
GeneralRe: F****** FORD GPS! Pin
Brisingr Aerowing18-Jul-16 11:46
professionalBrisingr Aerowing18-Jul-16 11:46 
PraiseRe: F****** FORD GPS! Pin
Stephen Gonzalez18-Jul-16 12:17
Stephen Gonzalez18-Jul-16 12:17 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.