design

Design Patterns and Prinicples

I have recently experienced and understood the importance of "Design Patterns and Principles" implemented in our project. I was just wondering if you all would share the importance of Design patterns and principles, of how using them in your source code the project was enhanced, so that we can learn out of your vast programming experienc...

how to develop a program to minimize errors in human transcription of hand written surveys

I need to develop custom software to do surveys. Questions may be of multiple choice, or free text in a very few cases. I was asked to design a subsystem to check if there is any error in the manual data entry for the multiple choices part. We're trying to speed up the user data entry process and to minimize human input differences bet...

When to return bool, throw an Exception and which exception to throw

Hi Stackoverflowers, In designing your class libraries, When you create a method, when do you decide to throw an Exception, or return a boolean. For example. public class MathHelper { public int Divide(int x, int y) { if(y == 0) { throw new DivideByZeroException("Cannot Divide by Zero"); } ...

Object instantiation in Test Classes

I'm using MS UnitTesting and trying to find my way around writing my first unit tests. It seems like all my unit tests start off with creating the same few objects... [TestMethod] CanCreateOrder() { <create an order> ... } [TestMethod] CanSetOrderDeliveryAddress() { <create an order> <create an address> order.Deliv...

When designing a web project, how should use statistics be incorporated?

Suppose you are taking notes on the requirements of an app enhancement for software that sells products X1 - X100 on the internet. The marketing people have a laundry list of features that the software should be able to do, but aren't mentioning things like reporting, feature interoperability, or version testing. In the same way that y...

How to design around type covariance error

How to correct this design. Error because C# doesn't allow Type Covariance. How can I improve or correct this design public interface ITimeEvent { } public interface IJobTimeEvent : ITimeEvent { } public interface IActivityTimeEvent : ITimeEvent { } public interface IAssignmentTimeEvent<T> where T...

Questions while designing OOP hierarchy

Hello When creating inheritance hierarchy, i get confused .Abstract Base class should contain only commonly used stuffs for inherited classes.But knowing which is commonly used methods,fields and properties is not possible while designing.So i feel free myself to grouping them with abstract classes which inherits hierarchicaly. This is ...

Develop an classic UI or be bold with a newer design?

Forgive me if this is the wrong place but I am curious as to how other programmers feel about this topic: I am currently working on my portfolio site, it is being designed and built in silverlight 4. I initially started off with a typical stylised e-folio theme much like a standard website in terms of layout and flow. As I work more in...

Fixed footer with 960.gs

I want to create fixed footer but , is it possible with 960 gs , because I am having trouble with height of container div . I can no set it to %100. <div class="container_12" > <div class="grid_3" id="side-space"></div> <div class="grid_6"> <div id="content-box"></div> </div> <div class="grid_3" id="side-space"...

Does the following indicate a bad design?

Hello, I was wondering whether you think the following code usually indicates a bad design ... class X { public: ... private: Y y; }; Class Y { public: Y( X& value ){ x = value; }; private: X& x; } (i.e. there is some sort of cyclic dependency between the classes X and Y). ...

Software Architecture: Unit of Work design pattern discussion

Hey everybody. According Martin Fowler's Unit of Work description: "Maintains a list of objects that are affected by a business transaction and coordinates the writing out of changes and resolution of concurrency problems." Avoiding very small calls to the database, which ends up being very slow I'm wondering. If ...

JSF data transfer between UI and business layer

Hi, We are using JSF in UI, Spring in business layer, Hibernate in persistence layer. Now my question is how to pass data from the JSF UI to spring business layer. Can I directly use my business object in my backing bean or should I transfer data between the layer through DTO? Can one explain me with clear explanation if possible with p...

View centric design with Django

Hi! I'm relatively new to Django and I'm designing a website that primarily needs usability experience, speaking of optimized CSS, HTML5 and UI stuff. It's very easy to use Django for data/Model centric design. Just designing a couple of Python classes and ./manage.py syncdb - there's your Model. But I'm dealing with a significant amou...

Developing multiple user interfaces for an application

I want to develop an application which has a graphical user interface that could be developed by using different widget toolkits. For example I want to use Qt, GTK+ or even ncurses as a building block for my user interface for the same application. Moreover users could choose which GUI implementation will be used during the next startup ...

How do i make my text wrap in a <div> with a large border radius

in the following code <html> <body> <div style="height:400px; width:400px; -moz-border-radius:100px; -webkit-border-radius:100px; border:3px solid #500; background-color:#a00; overflow:hidden;"> Why is this getting cut at the beginning??? </div> </body> </html> Why isn't the browser wrapping the text around the rounded corners. ...

Alternatives to checking against the system time

Hi, I have an application which license should expire after some period of time. I can check the time in the applicatino against the system time, but system time can be changed by the administrator, therefore it's not a good idea to check against the system time in my opinion. What alternatives do I have? Thank you ...

Design advice. Using DataTable or List<MyObject> for a generic rule checker

Hi, I have about 100,000 lines of generic data. Columns/Properties of this data are user definable and are of the usual data types (string, int, double, date). There will be about 50 columns/properties. I have 2 needs: To be able to calculate new columns/properties using an expression e.g. Column3 = Column1 * Column2. Ultimately I woul...

Passing an array for setting variable

Hi, I often see this idiom when reading php code: public function __construct($config) { if (array_key_exists('options', $config)) { ... } if (array_key_exists('driver_options', $config)) { ... } } Here I am concern with the way the parameter is used. If I were in lisp I would do: (defun ct (&key optio...

How do you create your own drag-n-drop GUI designer ?

Hello I was looking at creating a UI for developing web forms, similar to the Netbeans Visual JSF form designer.It will be targeted to use GWT/GXT components.I am looking at a look very similar to VS/Netbeans. Any thoughts on where/how to start ? Initially, I would prefer to have it as a standalone application, later develop it as ecl...

UI Design, incase of numerous situations

Hi... I'm creating a web form, where in there are around 12-15 Input Fields... You can have a look at the screen and The request is such that depending on the data the user selects in the Gridview and the DropDown list, the appropriate Textboxes and CheckBoxes needs to be displayed. Some times the conditions are very direct, like wh...