design

Design ideas for WCF service

I need to design and I'm looking in to using WCF to accomplish this. Basically here is how I have it: Server process: Generate list of files to transfer across multiple FTP/SFTP sites in to a queue. Client(s): Talk to server to get files to transfer. Transfer the files acquired. All the data necessary to transfer the files will be p...

Dynamic IMAP/Pop3 Email Address Creation

I have a requirement in my project to create dynamic email address on the fly. For example, similar to flickr has the option of uploading photos (or blogger.com has an option of rececing blog posts in predefined email addresses). The email address can be like "[email protected]", once this email address is created what eve...

How to export data which are mapped to enumerations

I have a set of data which needs to be imported from a excel sheet, lets take the simplest example. Note: the data might eventually support uploading any locale. e.g. assuming one of the fields denoting a user is gender mapped to an enumeration and stored in the database as 0 for male and 1 for female. 0 and 1 being short values. If I ...

Java: design for using many executors services and only few threads

I need to run in parallel multiple threads to perform some tests. My 'test engine' will have n tests to perform, each one doing k sub-tests. Each test result is stored for a later usage. So I have n*k processes that can be ran concurrently. I'm trying to figure how to use the java concurrent tools efficiently. Right now I have an exe...

Usability: call for action

I am designing a page, with tiny portlets. Now, I personally like my actions on the right side, yet I wonder if there are methodologies that are targeted about usability. After all, most applications are aimed at the user. What about yourself? Do you prefer information to be on top, on the left or on the right? I've you need to take some...

How to extend this design for a generic converter in java?

Here is a small currency converter piece of code: public enum CurrencyType { DOLLAR(1), POUND(1.2), RUPEE(.25); private CurrencyType(double factor) { this.factor = factor; } private double factor; public double getFactor() { return factor; } ...

KeyValuePair<TKey, TValue> - member fields question

In looking at the source for the KeyValuePair<TKey, TValue> struct, the private member fields are only ever written to by the constructor. Is there a design consideration of some sort as to why these are not marked readonly? ...

What would be the best suited language/technology in this scenario?

I'm about to develop a small system to display dynamic information in public spaces across an entire building (similar to Flight Information Displays on an Airport). The system will have two main components: a back-office for managing the information displayed a front-end which acctually displays the information. The back-office com...

How can I position QDockWidgets as the screen shot shows using code?

I want a Qt window to come up with the following arrangement of dock widgets on the right. Qt allows you to provide an argument to the addDockWidget method of QMainWindow to specify the position (top, bottom, left or right) but apparently not how two QDockWidgets placed on the same side will be arranged. Here is the code that adds th...

Web Design UI initial mock up - what software to use?

When constructing an initial mock up of screens for a web application, what tools would be best to use? For starters, I'd like to avoid MS Paint and MS Visio! Ideally I'd like ones that: Are free Make it quick and easy to design/redesign web application UIs at a basic and initial level. ...

which design choose? - pros and cons

Which of these 3 approches would choose and why? // This is the one I would choose class Car { } class FeeCalculator { public double calculateFee(Car car) { return 0; } } // in that case the problem might be when we use ORM framework and we try to invoke save with parameter Car class Car { private FeeCalcu...

Passing integers as constant references versus copying

This might be a stupid question, but I notice that in a good number of APIs, a lot of method signatures that take integer parameters that aren't intended to be modified look like: void method(int x); rather than: void method(const int &x); To me, it looks like both of these would function exactly the same. (EDIT: apparently not in so...

Having access to a private variable from other classes in Java

If I want to create a form that adds people to a List, how do I have access to that List from another class? Where would I define that List so other classes can access the members, the size, etc? For example, if I have Class Foo that has the GUI for my form, along with buttons to add and remove people to the List, it would make sense t...

How to leverage Spring Integration in a real-world JMS distributed architecture?

For the following scenario I am looking for your advices and tips on best practices: In a distributed (mainly Java-based) system with: many (different) client applications (web-app, command-line tools, REST API) a central JMS message broker (currently in favor of using ActiveMQ) multiple stand-alone processing nodes (running on multip...

Database layer design question

Hi all :) I've been designing a database access layer that allows us to support multiple databases in our programs. In the end, the users of our programs shall be able to choose the underlying database system from a range of database systems. Some small clients might be happy with MS Access, others prefer MySql, others DB2. Those db sys...

Whats the best visual page designer for .NET web applications?

Im currently working on the GUI for an ASP.NET MVC application using Visual Studio 2005. The visual webpage designer (for the views) is awful. Any input on what other people use would be most appreciated! ...

Transition methods in state design pattern

Hi, I have a state machine with many states A--B--C--D--E. I have many transitions from C for example to A if some condition is verified. For every state I have a class extending abstract class Stateand I have a manager that delegates every transition method to state method. The question is "could states call directly manager transitio...

Performing Argument / Bound Checking in Property Set Block

I have a byte array property that must be a certain length. I am tempted to put a check in the property's set block that would throw an ArguementOutOfRange exception if the length is not correct. private const int MY_ARRAY_LENGTH = 25; private byte[] m_myArrray; public byte[] MyArray { get { return m_myArray } set { ...

C++ traits question

I have a templated class template <typename Data> class C { ..... } In most situations, I depend on the compiler to let me substitute types for Data. I call methods foo(), goo() on objects of type Data, so what I substitute needs to provide that. I now need to substitute int and string for my Data type. I do not want to specialize ...

An appropriate C API for inspecting attribute values

There are two obvious ways in C to provide outside access to internal attribute values (A) provide a generic interface that accepts a list of attributes that changes over time (some added / some die) or (B) a specific interface for each and every attribute. Example A: int x_get_attribute_value(ATT att) { if (a) return a_val; if...