design

How to measure or represent change in a value between time periods?

I need to provide some indication of the way a value is changing between time periods. This value could move in any of the following ways: 0 -> some positive value some positive value -> 0 positive value -> larger positive value positive value -> smaller positive value I have initially looked at providing a % change value, however thi...

Using MethodInvoker in a backend class

I have a backend class that has to raise an event with no arguments. The MethodInvoker has the desired signature but it feels a little odd to use it in a backend class since it is defined in System.Windows.Forms. Is there another delegate with this signature in other namespaces in the .Net Framework? If not, do you think that I should de...

What approach should I take to understand a large J2EE application if I don't know any of the frameworks involved yet?

I started working in my company 5 or 6 years ago as a junior Java developer, and I got to do some J2EE programming using Servlets and Jsp. I didn't spend much time in that position and I went to work with databases, so I distanced myself from the software development world. Now I've had to go back to Java programming, and I was given a W...

Cleanest RESTful design for purely "action" calls?

Hello all, I am sticking my toe in the RESTful waters and I just can't find a "satisfactory" solution to how to handle truely "action" oriented calls on a RESTful service? My quandry can be broken down into two parts. 1) Transactional calls: I understand the idea of having an ActionTransactor that you get a resource too with a post...

What is the most underused or underappreciated design pattern?

I have been reading a lot on design patterns lately and some of them can make our lives much easier and some of them seem to just complicate things (at least to me they do). I am curious to know what design patterns everyone sees as underunsed or underappreciated. Some patterns are simple and many people do not even realize they are usin...

Need advice to design 'crack-proof' software

I am currently working on a project where i need to create some architecture, framework or any standards by which i can "at least" increase the cracking method for a software, i.e, to add to software security. There are already different ways to activate a software which includes online activation, keys etc. I am currently studying few r...

Real world examples of Factory Method pattern

I just read Factory Method. I understand that it provides a way to delegate the instantiation to sub-classes. But I couldn't understand the possible uses in a real-world scenario. Can anyone give one typical example showing how Factory method pattern can be used so that I can relate to what I have read. A problem statement for which fa...

Is it better to create a singleton to access unity container or pass it through the application?

I am dipping my toe into using a IoC framework and I have choosen to use Unity. One of the things that I still don't fully understand is how to resolve objects deeper into the application. I suspect I just haven't had the light bulb on moment that will make it clear. So I am trying do something like the following in psuedo'ish code voi...

is it too early to accept HTML 5 ?

HTML 5 has interesting features for developer and user, but if customers are still demanding to have support for old browsers should designer/developer go for HTML 5 ? Or should stick to good old ways using JavaScript libraries, flex and flash to do the heavy lifting. If accepting HTML 5 is too early, how long you think it will take to ...

PHP5 __get() best practice

I have a PHP class that stores a complex multidimensional array, and rather than write individual accessor methods as an interface to this array I decided to use PHP5's __get method. As I started to write these magic accessors it donned on me that I had no idea what best practices are here, so I thought I'd ask. Is one large if/else str...

Design: Handling mouse events dependent on modifiers...

Apologies if this is a bit of a vague question with no proper answer. Please move/close it if it's not in the right place. I've written a few relatively trivial GUIs in WxWidgets and Qt, and I'm persistently unsure how to architecturally handle the following situations: You catch a mouse event to do something to a graphical object in...

Business library reuse or exposing services

I am having trouble deciding between two possible design choices. I have a web site which has a pretty extensive business layer and DAL (website, bll, and dal are all in multiple separate dlls). I need to design a windows service that can take some of my business objects, write them to a file, and store them locally within our network. T...

(Design Idea) Best Practise to reserve record for multi-process workflow engine

I'm designing multiple process to query job from database. Each job wake up once per minute to query task and send to workflow system. I need advice about which best way to mask record and query it and not duplicate with other process. ...

How to create best form design in asp.net 3.5 ?

How to create best form design in asp.net 3.5 ? ...

How to Develop a DJ Application for iPhone

Hi All, I am new to iPhone development, so please bear with me if I ask some simple questions. I have to develop a DJ application for iPhone. My application should have some common features like selecting songs from the device, mixing, scratching and turntable implementation. Any help in this respect will be highly appreciated. Thank...

How to release resource if the resource is passed on to a serial of objects?

I am implement a pipeline pattern, the resource is passed on to a serial of objects that will process the resource, when one object is done using the resource it passes it on to the successor, so when and which object to release the resource? ...

Algorithm design: can you provide a solution to the multiple knapsack problem?

I am looking for a pseudo-code solution to what is effectively the Multiple Knapsack Problem (optimisation statement is halfway down the page). I think this problem is NP Complete so the solution doesn't need to be optimal, rather if it is fairly efficient and easily implemented that would be good. The problem is this: I have many wo...

How do search engines merge results from an inverted index?

How do search engines merge results from an inverted index? For example, if I searched for the inverted indexes of the words "dog" and "bat", there would be two huge lists of every document which contained one of the two words. I doubt that a search engine walks through these lists, one document at a time, and tries to find matches wit...

A practical replacement for ICloneable

The "question" here is a general discussion topic. It's pretty well known that ICloneable has serious problems. Purely immutable objects are trivially cloneable (by reference), so it's safe to assume that the interface for cloning an object deals with mutable objects. One place where I've seen the concept of a cloneable object be extrem...

Design from scratch - building classes

Hi All, I've started a new project where I'm writing a WPF business application, but I'm having trouble with the design. The database was easy to put together, but I'm not sure how I have to go about the designing the application itself. The main thing that I find hard is the code design. I've decided that the MVVM pattern is very ap...