FAQ Database Discussion Community


C# Code design / Seperate classes for each TabControl

c#,oop,architecture,software-design,code-design
My main problem is that my tool grows and grows and I start loosing the focus on the different parts of my code. The main-Form got a docked tabControl at fullsize. I got 5 different tabs with for really different functions. So I can say my tool is splitted into...

Is skipping “accept” where type is known, a valid optimization for the Visitor pattern?

java,visitor,visitor-pattern,code-design
Consider the following visitor for a simple language interpreter. public interface Visitor{ void visit( VarStat vs); void visit( Ident i); void visit( IntLiteral a); void visit( Sum s); } For completeness I add some code that gives necessary implementation details (you can skip and read directly the question). public interface...

Requiring same module in multiple files

javascript,node.js,express,code-design,code-structure
I'm using Underscore.js in my project. Almost all files have this line of code: var _ = require('underscore'). The require function is synchronous so the same file is loaded each time it is used. Is this the right thing to do? Doesn't this affect performance? Instead of this, is it...

Design pattern for incremental code

java,design-patterns,code-design
According to the business logic, the output of one of the method is used as an input to another. The logic has linear flow. To emulate the behaviour, now there is a controller class which has everything. It is very messy, too much loc and hard to modify. Also the...

prevent unassigned objects, any reason this is a bad design consideration?

c#,wpf,resharper,code-design
In my WPF application, I have a few places that based on a given ID of a record, I call a new form to be displayed as modal to view details. It then closes and returns back to calling source as expected. All this works no problem. To keep this...