General guidelines on how to design classes with best known industry practices.

learn more… | top users | synonyms

0
votes
2answers
64 views

What is the difference between proxy class and delegation in Python?

Wiki: A proxy, in its most general form, is a class functioning as an interface to something else. The proxy could interface to anything: a network connection, a large object in memory, a file, ...
1
vote
1answer
66 views

How to avoid having nested generic in class

I'm working on a side project, and I turned on all rules for code analysis in Visual Studio, and I got the warning notice: Warning CA1006 Consider a design where ...
2
votes
0answers
264 views

Have I created a Big Ball of Mud?

I'm working on a WPF application, trying to stay strict in separating View, ViewModel and Model. My application has a few different views in a relatively flat hierarchy. There is one view for editing ...
2
votes
0answers
125 views

How to build child classes as parent configuration?

I'm using Codeigniter PHP Framework for developing a web application, and when developing an admin zone, I've ended building a generic parent class called AdminController which is extended by the ...
2
votes
0answers
568 views

Provide an OnChange event for an internal property which is controlled externally?

For fun and by request I am updating this ImageGrid component, a kind of listbox for images that has a FileNames property of type TStrings. For ease of writing, I have been misusing its ...
1
vote
0answers
125 views

Correct Class Design for EAV Model

I need to design a class model to represent an EAV Model. I based my classes on this presentation ...
1
vote
0answers
217 views

Class Interfaces with Multiple Classes and Dependency Injection

NOTE ON QUESTION TITLE: I did not really even know how to phrase the title so if someone can edit and make it more articulate I would really appreciate it. QUESTION: Basically, what I'm trying to do ...
0
votes
0answers
21 views

Designing a (Spreadsheet) Report Class for Excel

A lot of my time is spent getting data into VBA, analysing it and printing it out again in nicely formatted Data Tables. This is my fist draft of designing a Class Object to handle Array Data ...
0
votes
0answers
46 views

Organising code in X++ where all classes for the application are in one long classes list

I am just beginning to develop in Dynamics AX 2012, using X++ (my background is .Net). The development environment in the application stores all classes for the application in one long classes list. ...
0
votes
0answers
11 views

What's a way to encapsulate “mapping” code and provide reusable functionality in a base class?

I have created a set of repository base classes, using the generic repository pattern. The Repo<T> has CRUD functions incorporated. Some of the View Models need to be mapped (unflattened, etc) ...
0
votes
0answers
95 views

Class design for Token, TokenType and regex constants

For use in a lexer class a have a class Token which represents a token of a specific type and its value, while the types are defined by the enum TokenType in which every token holds its own regular ...
0
votes
0answers
63 views

Should I ever reset object state?

I have a series of TextBlocks which are drawn on frames to make a video of a book. I do it when user click on Make Video. User may change the content of some blocks and click again on Make Video. I ...
0
votes
0answers
215 views

What is a good way to structure my UI classes?

So, I have a program which has a swing GUI. (Java - duh!) I really, really don't think the way I'm structuring my classes now is good, so I am reorganizing from the ground up to follow best practices. ...
0
votes
0answers
98 views

Reporting Logic vs Domain Logic

Should the reporting logic to extract domain data in a certain format reside in domain objects or separate reporting objects? The reporting logic needs to: select entities/data which match selection ...