design

API design: Abstractions vs. coupling with version

We have a desktop application which needs to expose API. Some people say: API should have an abstraction layer so actual implementation can change in future versions. Others say: API should be version specific. So an API which uses version X will only work with it. Version X+1 will also deploy the dll's of version X in order not to bre...

Tracking changes in complex object graph

I started to think about tracking changes in complex object graph in disconnected application. I have already found several solutions but I would like to know if there is any best practice or what solution do you use and why? I passed same question to MSDN forum but I received only single answer. I would like to have more answers to lear...

Trying to convert a xml file to an object

Heya all, I was wondering what your opinion about this would be. I'm trying to convert an xml file to a .net object. It's a xml file from the World of Warcraft armory. Here is an example. <?xml version="1.0" encoding="UTF-8"?> <baseStats> <strength attack="48" base="48" block="-1" effective="58"/> <agility armor="114" attack="-1" ba...

Few OOP design clarifications

I was wondering about few of the below OOP concepts 1) abstract class cannot have final constructor. Why cant subclasses have same same constructor without rewriting them 2) abstract method cannot be private . We can still implement the abstract class in same file. So why not allow this ...

Class design according to IoC and Abstract Factory pattern

Hi, Which is the correct way of providing values to a abstract factory method? Eg. interface IFactory { ISomething Create(int runTimeValue); } class Factory : IFactory { public ISomething Create(int runTimeValue) { return new Something(repository, runTimeValue); } } In the example the repository is injected via the cons...

Logging / Log4J to database

In my Grails application, I run some batch processes asynchronously, and would like the process to log various status messages so that the administrator later can examine them. I thought of using log4j JDBC appender as the simplest solution, but from what I can tell it doesn't use DataSource. Has anybody gotten it to work or wrote the...

Java GUI building tips?

Hello, I'm building a Java GUI for some code, and I'm not quite sure about some design aspects. As some background - The GUI will be used only for one stream of activity The user loads a file, the file appears on the screen and the user is shown the effects of mathematical transformation 1, transformation 2, and transformation 3 e...

How i should design database ER-Diagram for this problem.

Hello! i have some specific question to solve but i can not think. I have 5-6 statements that I need to store in my database. This system like a news feeds. Statement 1 : A installed this website. Statement 2 : A added store R in provinceX Statement 3 : B reviewed store R Statement 4 : A edited store R Statement 5 : A added product...

ASP.NET - SQL Process Design Connect to Multiple DBs

Scenario Web server running an ASP.NET site that's connected to a sql server instance for all the web related DB needs (products, pricing, users, etc.)... The companies accounting, inventory control(FIFO, etc.) and whatnot are mainly done on another system which uses a different SQL server...much more complex, for obvious reasons. Wha...

Design suggestions for handing mutilple modes in Form

Hi Experts, We are designing one form in WPF which will have 5 modes. Now the question is that should handle these 5 modes in the same form by defining one form enum and manipulating the visibility of the controls. One thing to be noted is that as the mode goes on changing..complexity is going to increase for handling these modes. No...

iPhone UINavigationController app design

Trying to wrap my head around how to structure an app around the UINavigationController. It seems to me that most explanations assume that the app always starts off at the root controller and drills down from there, but I'm unclear as to how this fits in with a login/registration step that happens before you get into the app. The struc...

Guidelines require to solve a mathematical intensive (or machine learning?) problem

Hello, The problem I have has got me puzzled. The problem is explained below, There is a container, for example lets say which has a volume of "V". The container needs to be filled with various types of boxes, where each type has a unique size (volume), for example lets say Box Type A - has a volume of K Box Type B - has a volume of L...

How to represent successful, failed login and logout events

We have an audit requirement where we need to track user activity (e.g. successful login, logout actions and failed logins). We have defined 3 event types to track this information. What would be a nice way to show these violations (e.g. failed logins) or normal events (e.g. successful login, logout events) for the system administrator....

Sharepoint 2010 Reference Resource Suggestion?

Anyone have a suggestion for a decent book / web resource for Sharepoint 2010 technical information? I'm looking for one that provides a technical breakdown of both the design and development aspects of the system (ie. C# library reference + code examples AND user level design tutorials). The resources provided on MSDN are pretty poorly ...

Dependency on 3rd party at runtime?

We have created an applet with javafx and it seems that in order to load the applet several jar, jnlp and js files are required to be downloaded from dl.javafx.com. I tried to work out which files were needed so I could host them on our own server but after spending an hour or so on it I got tired of reading code and gave up. Doesn't it ...

Good way to ensure that a property on a UserControl gets set?

If our UserControl requires certain properties are set for it to be useful, what's the best way to ensure they are set? Even if just as a note to self and/or close colleagues. We've tried using an Initialize method, but that's already caught us out because we forgot to update the Initialize in one instance, having slightly changed the d...

Python Object Oriented Design; Return, Set Instance Variable Or Both

Ok I have some code that boils down to a pattern like this class Foo(object): def get_something1(self): # in the actual code it asks a web server but here I replaced that with "foo_something1" instead of the code from a web server self.something1 = "foo_something1" def get_something2(self): # needs the result of get_someth...

css methodology needed

Hi, i want to start the design of a website. I know i will need to: think of a general layout design banner/footer choose colors and font make sure everything is well positionned test the site with other browsers ... the problem is i don't know what is the good order to proceed in a efficient way. Should i design things from the gene...

How Do I Avoid using Running Totals in My Code?

I am learning programing and software design and Java in school right now. The class that is getting me mixed up is Software Design. We are using Word to run simple VB code to do simple programs. My instructor says I am losing cohesion by using running totals. I am having a hard time thinking of a way to avoid them. Here is an examp...

When should we use method overloading vs method with different naming

Sometimes, I felt method overloading may create confusion. class a { public: void copy(float f); void copy(double d); }; a me; me.copy(1.2); // Not obvious at the first sight on which version we are calling. A workaround on this is. class a { public: void copyFloat(float f); void copyDouble(double d); }; How...