Tag Info

New answers tagged

1

The trick is to specify the behavior you want in plain language. "A member borrows a book" You have two nouns in that sentence. Each noun it is likely to end up as a class-- in your case Book and Member. There is also the verb "borrows" this will likely end up as a method in one of the classes, and, most likely the subject -- its the member who is doing ...


2

There is a very simple analysis technique in which you write down the use cases in plain text and extract nouns and verbs. The nouns are likely to be essential concepts in your domain (so probably classes), the verbs are likely actions to be taken in the domain (so probably methods). This rule is not written in stone but it can help you get going. When I ...


1

Separation of concerns is just as important in UI as anywhere else, if not more so. Anything that doesn't directly involve user interaction does not belong in the UI. It belongs somewhere else. Consider what happens when you create a UI having the usual event hooks: private void Form1_Load(object sender, EventArgs e) { listView1.Items.Add(new ...


0

That design seem to violate SRP since your Config (which is a config, just a configuration holder) will know how to generate configuration for each specific agent). I think an Agent should create Config instance, passing to it it's name (which is used to deduce configuration file path from it) and the callback, which should returns Agent's initial ...



Top 50 recent answers are included