design

What gallery script is this?

Hi there. I really need to know what flash photo gallery is used on this site? http://www.shad0w.ru/impression.html Also do you know any similar javascript script? ...

What is the correct layer to configure your IoC container when using a service layer?

I have a medium sized asp.net MVC app. It consumes a service layer that handles all the repository use, calling domain services, etc. My controller actions are very slim -- they basically call a service class, get a response and show that respose. Most components are interface based with some poor man's DI. The app is growing, needs ...

Java database driver design

Hi, I have this problem where I need to design a java package which is used for: Getting data from different datasources. For example, Class A will retrieve customer data from a Oracle database, while Class B will retrieve the same information from a webservice datasource (via soap). The results will need to be combined, the rule for ...

How to cope with bad code

One of the most unpleasant (and unfortuantely most frequent) situations I am confronted with in my all day life as a developer is that I have to fix bugs or add features into code that is badly designed. Now as a good craftsman I would like to leave the code in a better state than I found it. Often new features can not be implemented if ...

C++ app: modules design

Hi My app contains several modules (big classes) like network io, data storage, controls, etc. Some of them can cooperate. What would be a good way of declaring and binding the modules? I see several possibilities: 1) All modules declared as global, so we have in main.cpp #include ... ModuleA a; ModuleB b; ModuleC c; and if a wants ...

XML Elements vs. Attributes

Possible Duplicate: Should I use Elements or Attributes in XML? I have never been able to figure out when to use xml attributes. I always use elements. I just read this w3schools article. The article states that it is bad practice to use attributes because: attributes cannot contain multiple values (child elements can) at...

Application Design question - Database Tables and Interfaces

I have a database with tables for each entity in the system. e.g. PersonTable has columns PersonId, Name, HomeStateId. There is also a table for 'reference data' (i.e. states, countries, all currencies, etc.) data that will be used to fill drop down list boxes. This reference table will also be used so that PersonTable's HomeStateId wi...

Entity Container and Model generation in different assemblies

I'm doing some refactoring and am trying to reuse my genertated entity models. My application has a few assemblies, one being my outward facing public types (API) and one containing implementations of providers (such as the log). I'd like to split the generation of the entities and models so that the entities will be in the API assembl...

Dynamic width DIV next to a static width DIV

Its in all in the title. I'm trying to get a div on the left of the page to a static width 170px; this works fine. What I'm having issues with is getting a div next to it, that scales to fit the remaining width. Is there a simple approach I can use here? ...

Is this an anti-pattern?

The situation is this: You have two classes that both implement the same interface and both classes work together to complete some business process. For example networkUserManager and localUserManager implement IUserManager which has a method getUser(). networkUserManager.getUser() puts a request to get a User on the queue and returns...

Question about how to present my problem well

Hi Guys: I am writing an IPhone IM Client that uses xmppframework. Now the app has contacts,chat history and can chat with another client. I want to present the app design (maybe a class diagram) to you guys and get some feedback to improve the app. How can I easily present my app design to you? I haven't found a nice tool to draw clas...

Fluent nHibernate

I am having a bit of trouble figuring out how to make a specific design in fluent nHibernate. I have a small workflow prototype with two aspects to it. First, you can design a workflow, that has a collection of 'phases' and a phase has a collection of 'Tasks'. I have this part loading and saving using nHibernate. Second part, these wor...

Attendance table in sql server 2005

Hai guys, My web application stores attendance of employees daily.. How to design an attendance table in sql server 2005? I tried to figure it like this, Attendance table will contain columns EmpId,MonthId,1,2,3,4.....31.. Is this ok enough to hold attendance? Any siggestions.... ...

Track Order Process

Hi Gurus, I am working on a project where I am importing in orders from an external vendor. I will need to validate the information prior to loading it into our ERP system and then send a response with shipping information once we have processed and shipped the order. I wanted to see how others would track the steps necessary to make ...

Difficult concurrent design

I have a class called Root which serves as some kind of phonebook for dynamic method calls: it holds a dictionary of url keys pointing to objects. When a command wants to execute a given method it calls a Root instance with an url and some parameter: root_->call("/some/url", ...); Actually, the call method in Root looks close to this:...

Method knows too much about methods it's calling

I have a method that I want to be "transactional" in the abstract sense. It calls two methods that happen to do stuff with the database, but this method doesn't know that. public void DoOperation() { using (var tx = new TransactionScope()) { Method1(); Method2(); tc.Complete(); } } public void Metho...

Effective Java by Joshua Bloch

I keep hearing very good things about the book Effective Java by Joshua Bloch I'm new to Java and OO in general. Can anyone please tell me what exactly does this book teach and when is the right time to pickup this book. ...

Design Patterns or Tips for Good Design (Generic) when 'C' is the implementation language!

Are there any tips which we should follow for good design when we are considering the 'C' as the implementation language. I want tips which should be considered because we are using 'C' as the implementation language and not related to the functionality. ...

Preferred Design Pattern for Interface Locking

I have an application that performs various tasks that can take up to a minute each. I wanted to make sure that I was setting the application to a "working status" in a consistent way, so I set up a class (we'll call it "LockI") that when initialized records the current state of various things (the cursor, the status bar, screen updating...

JavaScript API design examples

I'm designing a JavaScript API and am looking for outstanding examples. Please point out libraries whose API you like, one answer per library. If you don't mind, a comment explaining why you think it's good would be useful. Also, please upvote existing answers if you agree that some library that's already posted is good. Update: I'm ...