I have a wizard class that gets used a lot in my program. Unfortunately, the wizard takes a while to load mostly because the GUI framework is very slow. I tried to redesign the wizard class multiple times (like making the object reusable so it only gets created once) but I always hit a brick wall somewhere. So, at this point is it a huge...
Hi
Where can I find answers of sharpen your pencil section of "Head first design patterns" ?
...
I'm in the planning phase of our new site - it's an extension of some mobile apps we've built. We want to provide our users with a central point for communication and also provide features for users who don't want to/can't use the mobile apps. One of the features we're looking at adding is a reputation system similar in nature to the SO ...
Hi! I'm curious how to write an abstraction layer.
By abstraction layer, I mean a wrapper above one or more 3rd party libraries.
Or do I have to solve it like this?
#include<an3rdpartyl>
#include<another3rdpartyl>
class layer
{
private:
an3rdpartyl* object1;
another3rdpartyl* object2;
public:
//...
int loadModel(char* ...
I'm trying to write a bitmap editor for a mobile device (i.e. a limited version of Photoshop). The user's document consists of ~4 bitmaps around 1000x500 in size each.
I want a robust and efficient undo/redo system that's as simple as possible. I'm aiming for about ~0.2s to undo or redo an edit. I'm looking for some feedback on my curre...
I have a tab control that loads panels as each tab is clicked. I want to add State by having the panel created on the first tab load, and then save the panel and retrieve it after that. Would that fit under the repository design pattern or is there a better one to use?
...
I'll start here with a little bit of background. We have an ASP.Net MVC web application that sits upon a structure roughly based upon the Onion Architecture concept. Therefore, we have the following (simplified) vertical structure:
ASP.Net MVC controller layer
Application service layer
Business Service layer
NOTE: The above is simpli...
Is it possible implement the GOF command pattern using a Queue of Action delegates?
I have been trying to wrap my head around it for a while and I am stumped because each of the possible actions I want to add to the queue may have a varing number of parameters.
Any suggestions? Am I barking up the wrong tree by focusing on the command ...
I am currently working on a document management system in ASP.NET 3.5 using the Telerik AJAX toolkit. It consists of masterpage with a title banner across the top and a RadTreeview down the left hand side for navigation through the site. The treeview uses a combination of static nodes and dynamic ones. The dynamic nodes are populated via...
I am basically quite sure this pattern must exist and possess a name... for now I will call it "gate pattern"...
Here it is:
In my webpage's javascript, I have to trigger various asynchronous processes. Let's not discuss how trully async js is, but anyway I have to trigger 2 or 3 AJAX calls, must be sure, the UI build-up has finished, ...
Hi All,
I have an application which may needs to process billions of objects.Each object of is of TRange class type. These ranges are created at different parts of an algorithm which depends on certain conditions and other object properties. As a result, if you have 100 items, you can't directly create the 100th object without creatin...
I have the following hierarchy: Party is a base class, extended by Person and Corporation.
I need to change the object class of an entity at some point of its life, and I don't know what's the best way to do this.
I'm modeling the financial world, so I have that a Party can own shares of a Corporation, while only Corporation can have s...
Dear Gurus,
I'm currently developing a web application for one of my clients. This client requested a small billing module. The client istelf is small SIP provider. There are several pricing items, plans, etc. All they different types of payment like onetime, monthly, annual. Are there any best practices, good books, articles on blling...
I'm trying to rewrite some code to break some coupling issues and make it easier to modify in the future.
Right now, I have a static factory method in a base class that, depending on the situation, picks an appropriate implementation. The decision is based on degrees of specialization:
While types A and B both can handle this, B...
There are objects which need two other objects as parameters. This parameter objects may change during runtime.
I use another object which holds the references to the parameter objects. These references are always up to date.
All the other objects ask this objects for the current parameters. They don't have to be updated anymore. Onl...
Sherif M. Yacoub is the author of Pattern-Oriented Analysis and Design: Composing Patterns to Design Software Systems. The last time this book about Pattern Driven development was published was in 2003, and it is now out of print. Does anyone know if any progress has been made in this approach to Software Engineering? Or are there other,...
I'm looking for some ideas on implementing a basic message factory that reads a header from an input stream and creates the appropriate message type based on the type defined in the message header.
So I have something like (roughly.. and I'm willing to change the design if a better paradigm is presented here)
class MessageHeader {
...
Consider a system which has classes for both letters and people; both of these classes compose an address. When designing a database for the system it seems sensible to have a separate schema for the address but this leads to an issue; I don't know how to have a foreign key in the address table cleanly identify what it belongs to because...
There has been a lot of talk of Enums in general violating Clean Code-principles, so I'm looking for people's favorite Enum anti-patterns and alternative solutions for these.
For example I've seen code like this:
switch(enumValue) {
case myEnum.Value1:
// ...
break;
case myEnum.Value2:
// ...
bre...
I have a two tier Delphi for Win32 application with a lot of business logic implemented in a god object I want to outsource into a separate service. This separate service should be accessed by multiple clients via TCP/IP telnet-style protocol.
How do I go about making the transition most simple?
Precisely, I'd like to keep this simplic...