Click here to Skip to main content
15,917,329 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: Chrome Unusable now Pin
Richard MacCutchan11-Jun-18 21:43
mveRichard MacCutchan11-Jun-18 21:43 
GeneralRe: Chrome Unusable now Pin
raddevus12-Jun-18 1:42
mvaraddevus12-Jun-18 1:42 
GeneralRe: Chrome Unusable now Pin
User 742933812-Jun-18 3:13
professionalUser 742933812-Jun-18 3:13 
GeneralRe: Chrome Unusable now Pin
raddevus12-Jun-18 3:37
mvaraddevus12-Jun-18 3:37 
GeneralRe: Chrome Unusable now Pin
dandy7212-Jun-18 3:34
dandy7212-Jun-18 3:34 
GeneralRe: Chrome Unusable now Pin
raddevus12-Jun-18 3:36
mvaraddevus12-Jun-18 3:36 
GeneralRe: Chrome Unusable now Pin
11917640 Member 12-Jun-18 1:53
11917640 Member 12-Jun-18 1:53 
GeneralProject structure opinions? Pin
Jon McKee11-Jun-18 14:18
professionalJon McKee11-Jun-18 14:18 
For context, my current pet project is a modern implementation of the IRCv3 client protocol. It offers three layers to use depending on what you're looking for: directly to the IRC socket (raw messages), a broadcaster (contextual messages), or a "framework" of sorts that obscures details into easy-to-use interfaces like Server, LocalUser, Channel, etc.

Anyway, I've realized my broadcaster folder is becoming irritating and slow to navigate. Between the "everything in one file"-type and the "one class per file"-type I very much lean towards the latter. However with roughly 200 distinct messages in the base protocol alone (not to mention CTCP, DCC, XDCC, SASL, etc) the one-class-per-file method is becoming ornery at best.

After some thinking, I decided this would be a nice solution that would allow easy navigation since everything related to a message is contained in a single file:
C#
//Example RPL_WELCOME file
public interface IWelcomeReply : IReply { }

public partial class IrcBroadcaster
{
    public event EventHandler<IWelcomeReply> WelcomeEvent;

    //Since partial constructors aren't allowed the "base" IrcBroadcaster will simply call
    //partial setup methods.
    private partial SetupWelcomeMessage()
    {
        _commandMap.Add(
            MessageCommands.RPL_WELCOME, 
            msg => WelcomeEvent?.Invoke(this, new Reply(msg))
        );
    }
}

//For many other messages, there are unique parameters so they'd have an interface implementation here.
//IWelcomeReply is one of the simplest so that's not needed as Reply handles it.

Before you'd have to sift through a minimum of 3 files among what would be over 600 to check/change something and the IrcBroadcaster class was a monster. This feels easier to navigate but I was wondering what your thoughts were? And if you've run into a similar situation what was your solution?
GeneralRe: Project structure opinions? Pin
Foothill12-Jun-18 3:24
professionalFoothill12-Jun-18 3:24 
PraiseRe: Project structure opinions? Pin
Jon McKee12-Jun-18 10:00
professionalJon McKee12-Jun-18 10:00 
GeneralRe: Project structure opinions? Pin
Foothill12-Jun-18 10:21
professionalFoothill12-Jun-18 10:21 
GeneralAm I allowed to put the same question that I posted on the Lounge-Non-English Language- General Indian Topics - I really need some help. Pin
indian14311-Jun-18 12:09
indian14311-Jun-18 12:09 
GeneralRe: Am I allowed to put the same question that I posted on the Lounge-Non-English Language- General Indian Topics - I really need some help. Pin
Maximilien11-Jun-18 12:19
Maximilien11-Jun-18 12:19 
GeneralRe: Am I allowed to put the same question that I posted on the Lounge-Non-English Language- General Indian Topics - I really need some help. Pin
indian14311-Jun-18 12:34
indian14311-Jun-18 12:34 
GeneralRe: Am I allowed to put the same question that I posted on the Lounge-Non-English Language- General Indian Topics - I really need some help. Pin
megaadam11-Jun-18 21:31
professionalmegaadam11-Jun-18 21:31 
GeneralRe: Am I allowed to put the same question that I posted on the Lounge-Non-English Language- General Indian Topics - I really need some help. Pin
phil.o11-Jun-18 12:24
professionalphil.o11-Jun-18 12:24 
GeneralRe: Am I allowed to put the same question that I posted on the Lounge-Non-English Language- General Indian Topics - I really need some help. Pin
indian14311-Jun-18 14:09
indian14311-Jun-18 14:09 
GeneralRe: Am I allowed to put the same question that I posted on the Lounge-Non-English Language- General Indian Topics - I really need some help. Pin
Slacker00711-Jun-18 15:21
professionalSlacker00711-Jun-18 15:21 
GeneralRe: Am I allowed to put the same question that I posted on the Lounge-Non-English Language- General Indian Topics - I really need some help. Pin
W Balboos, GHB12-Jun-18 1:09
W Balboos, GHB12-Jun-18 1:09 
GeneralRe: Am I allowed to put the same question that I posted on the Lounge-Non-English Language- General Indian Topics - I really need some help. Pin
dan!sh 11-Jun-18 21:23
professional dan!sh 11-Jun-18 21:23 
GeneralRe: Am I allowed to put the same question that I posted on the Lounge-Non-English Language- General Indian Topics - I really need some help. Pin
Vivi Chellappa12-Jun-18 2:06
professionalVivi Chellappa12-Jun-18 2:06 
GeneralRe: Am I allowed to put the same question that I posted on the Lounge-Non-English Language- General Indian Topics - I really need some help. Pin
dan!sh 12-Jun-18 2:51
professional dan!sh 12-Jun-18 2:51 
GeneralRe: Am I allowed to put the same question that I posted on the Lounge-Non-English Language- General Indian Topics - I really need some help. Pin
Vivi Chellappa12-Jun-18 4:25
professionalVivi Chellappa12-Jun-18 4:25 
GeneralRe: Am I allowed to put the same question that I posted on the Lounge-Non-English Language- General Indian Topics - I really need some help. Pin
dan!sh 12-Jun-18 20:43
professional dan!sh 12-Jun-18 20:43 
GeneralRe: Am I allowed to put the same question that I posted on the Lounge-Non-English Language- General Indian Topics - I really need some help. Pin
indian14312-Jun-18 6:27
indian14312-Jun-18 6:27 

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.