design

UML state of the art

I'm a fan of UML and use Fowlers UML distilled book as a reference. My question is : have things moved on in UML, what is the current 'state of the art'. Is there a better reference book for modern UML or is the above still a good reference. I'd be less interested in 'proposed extensions' and things committees are considering; really I...

Design advice for file parser

I am trying to design an edifact parser, I was planning on having one class to read the file, one class to map the data and then one other class to deal with data storage. The part where I am having a major problem is in how instances of those classes should communicate with each other. Any advice would be appreciated. ...

Best designs for breaking down business logic and data layer when they seem to overlap?

I'm building a MVC web application (using the Spring MVC framework), and I'm a little stumped on the best way to design a particular area. The application has to interact with a series of web services which are not really all that greatly designed, and don't offer much abstraction in and of themselves - basically there is a web service ...

DDD vs TDD

Which one offers more advantages for a large software, say like Photoshop? Also by TDD I don't mean just unit tests, because you can use unit tests in DDD too, just not the same way TDD does. DDD: Design-Driven Development TDD: Test-Driven Development ...

OOP approach for inventory system

We're developing a system to track inventory at our field offices. At its core, the system will have a list of "Assets" - things like Bikes, Computers, Tents. Each Asset goes through states like "Active", "Lost", "Checked Out", "Inventoried". Some states have additional information, like "Checked Out To" or "Inventoried By". So, I'm th...

Spatial mapping of keyword/tags

I'm trying to understand the stategy or idea's for building spacial maps of related/common keywords or tags. Using SO as an example; if you go to http://stackoverflow.com/tags and type in "python" you will get all tags that have that word in it, but no tags that might be closely related ( WSGI, Google's App Engine, flying, etc ). In li...

What is your threshold to use factory instead of a constructor to create an object?

What is your threshold to use factory instead of a constructor to create an object? You always use factory. You use factories only if you have invariant checks other than checking for nulls. You always use constructors You rarely use factories... what are those cases?? pros and cons Update: I am applying factory pattern from Domain ...

Persisting data suited for enums

Most projects have some sort of data that are essentially static between releases and well-suited for use as an enum, like statuses, transaction types, error codes, etc. For example's sake, I'll just use a common status enum: public enum Status { ACTIVE(10, "Active"); EXPIRED(11, "Expired"); /* other statuses... */ /* c...

Microsoft Sync Services - good solution for me?

We upload sales transactions from our stores to the headoffice server. At the moment, we use DTS (SQL Server Data Transformation Services), but we’re planning on replacing that with Microsoft Sync services for ADO.NET, as this seems to be Microsoft’s preferred solution for this type of setup and we want to follow the standard (that will ...

Java: No interface implementation?

Today I got my book "Head First Design Patterns" in the mail. Pretty interesting stuff so far, however I do have a question about it's contents. I have no Java/C# background nor do I wish to jump into those languages right now (I'm trying to focus on C++ first). In the book is said that java does not have an implementation for interface...

Dealing with nested if then else/nested switch statements

Are there any design patterns/methods/ways to remove nested if then else conditions/switch statements? I remember coming across some methods used by the Google folks listed in a Google code blog post. Can’t seem to find it now though ...

Multiple Instances for Applications-- One for each customer?

I am thinking about offering my product as a service-- delivered via online. Currently it's a shrink-wrapped software that users download to their servers and run on their servers-- like fogbugz. In my new business model, I will offer two business mode, one is the traditional shrink-wrapped software that users install on their servers ...

is logging an exception on the code of the Exceptions base class a good design approach?

some friends just finished the implementation of an app and they use Custom Exceptions. something that took my attention is that when a custom exception was raised they logged the exception in the code of the exception base class they implemented. so my question will be is this a good design approach?. my thinking is that a logging helpe...

Most elegant solution for humungous problem

I'm working on a site where a user could select certain dates that apply to them, e.g Date 1,Date 2, Date 3, etc. Each date will have certain questions belonging to it, so if the customer checked off 'Date 1' to indicate that this date applies to him, he'll then see a bunch of textboxes asking him about Date 1 and how it applies to them...

best practice for create database for Versioning System like CMS

Hi, I am working with system like CMS that need to versioning documents. what is best practice and methodology for create database for it with any how its table? ...

How to check if an object construction is complete?

Have a class with couple of integers and a pointer , class A { int a; int b; char* s; public: ... class ConstructA { A &a; public: ConstructA (A& ta) : a(ta) {} ... }; }; As seen ConstructA is responsible for constructing object A. I want to write a me...

Best way to write a Proof of Concept (PoC) app?

I am currently working on a project with which I need to program up a bit of a proof of concept app. I have written PoC apps before but they have only been really small and haven't really had lots of layers where as the app I'm writing now has a: Form layer - talks to data layer. Data layer - talks to Database and Interop layer. Inter...

Why are many languages case sensitive?

Is it simply a matter of inheritance? C++ was case-sensitive because C was, Java is case-sensitive because C++ is, etc? Or is there a more pragmatic reason behind it? ...

UI interface and TDD babysteps

OK, having tried my first TDD attempt, it's time to reflect a little and get some guidance, because it wasn't that successful for me. The solution was partly being made with an existing framework, perhaps making TDD less ideal. The part that seemed to give me the biggest problem, was the interaction between the view and controller. I'll ...

Member functions for derived information in a class

While designing an interface for a class I normally get caught in two minds whether should I provide member functions which can be calculated / derived by using combinations of other member functions. For example: class DocContainer { public: Doc* getDoc(int index) const; bool isDocSelected(Doc*) const; int getDocCount() const...