design

Web GUI design issue

I'm writing a page with several text fields and a drop down. The fields in the drop down affect the value of the text fields. For example: the drop down options are "a" and "b". The text fields are "name" and "last name". When choosing "a", "name" is filled with "Joe". When choosing "b", "name" is filled with "Bob". I've written a class...

Good practice to create extension methods that apply to System.Object?

Hello, I'm wondering whether I should create extension methods that apply on the object level or whether they should be located at a lower point in the class hierarchy. What I mean is something along the lines of: public static string SafeToString(this Object o) { if (o == null || o is System.DBNull) return ""; else { ...

Should I load my Java object's data on construction, or explicitly through a method call?

This is a design question. I'm trying to decide between 2 implementations. In order to properly explain this I need an example. So, for the sake of example: I have a class that generates a report about, let's say, certain Stock Market values on a specific day. I create a StockMarketReportGenerator object, passing it today's date, and i...

What is the best practice to decouple GUI design from server-side development when developing modern web applications?

We are currently developing a few web applications and are letting our designers convert signed off paper prototypes into static web pages. In addition to having hyperlinks between pages the designers have started adding jquery calls to update elements on the pages by fetching data from static json files. Once the designers are finished ...

How to organize and manage multiple database credentials in application?

Okay, so I'm designing a stand-alone web service (using RestLET as my framework). My application is divided in to 3 layers: Data Layer (just above the database, provides APIs for connecting to/querying database, and a database object) Object layer (responsible for serialization from the data layer... provides objects which the client ...

Scheduling Students to Classes

I am making a website for a side project at school where students enter the classes they need to take, what days they want or don't want classes, and when they cant have or don't want classes. The basics are there are classes, and each class has many sections at different times with different professors that a student can choose from. Wi...

Design Help! How can design Extended properties for Entity with simple and complex data in extended property

I have design question. I have entity such as "Person". Person has properties such as: FirstName, LastName, Gender, BirthDate, .... End user when create a person in application may be need to define another property that is not defined in database table schema (or class person). for example: end user nead to define "property1" that its a...

Customization of ASCX user controls

We have a little situation thats kinda got out of hand latly. Our web application is built upon several ASCX user controls. All of them is available to customize (pointing to another ASCX-path). What we do when we customize is to make a copy of the source ASCX and make some changes. Now the problem, when there have been much commits to ...

Modelling problem - Networked devices with commands

I encountered a head scratching modelling problem today: We are modelling a physical control system composed of Devices and NetworkDevices. Any example of a Device is a TV. An example of a NetworkDevice is an IR transceiver with Ethernet connection. As you can see, to be able to control the TV over the internet we must connect the Devi...

What is the best way to show A4 booklets in iPhone application?

I need to show some booklets (designed in A4 format) in the iPhone application. I suppose to use UIScrollView with possibility to scroll up / down and zoom in / out. Are there another ways to show such content in comfortable to user way? ...

Applied delegating and protocols

Hello, I am trying to figure out the reason why I should learn these things about delegates and protocols. First I thought that it was necessary in order to create nice(er) design of the code. Then I started to read and I cannot really find the reasons I though that I was going to find (That is, "good" reasons...). When should I apply ...

Are singleton network event processors okay?

Suppose you have a system on the other side of a network that sends events and data that needs to be cached to some intermediate broker. Instead of giving every component of your application that needs to be informed of such events a new subscription to the broker, I decide for performance and simplicity (the third party library that ha...

How to create a view and update it later?

Is it possible to update the same view with new data? Using UPDATE after CREATE didn't seem to work. Have only 1 table. Want the view to be a subset of that table. After using the view, I would like the same view to hold a different subset of the data from the only table. Was thinking I can create the view, drop it, then create it ...

Design for a machine learning artificial intelligence framework

This is a community wiki which aims to provide a good design for a machine learning/artificial intelligence framework (ML/AI framework). Please contribute to the design of a language-agnostic framework which would allow multiple ML/AI algorithms to be plugged into a single framework which: runs the algorithms with a user-specified d...

Tree-like queues

I'm implementing a interpreter-like project for which I need a strange little scheduling queue. Since I'd like to try and avoid wheel-reinvention I was hoping someone could give me references to a similar structure or existing work. I know I can simply instantiate multiple queues as I go along, I'm just looking for some perspective by ot...

Book Recommendation: Web Design

I'm looking to get back into advanced Web Design. I'd say I was already fairly advanced but I haven't designed much in a good few years and haven't got any books any more. I was just interested to know if anyone had any good recommendations for Web Design books and resources, I've spent the last couple of days looking around but can't ma...

Application Code Redesign to reduce no. of Database Hits from Performance Perspective

Scenario I want to parse a large CSV file and inserts data into the database, csv file has approximately 100K rows of data. Currently I am using fgetcsv to parse through the file row by row and insert data into Database and so right now I am hitting database for each line of data present in csv file so currently database hit count is ...

Hibernate - One design problem

I am learning Hibernate from the tutorials on JBoss website. I have a confusion in a code example located here. There is a Cat class code at 4.1. A simple POJO example. This Cat class has a reference to his mother as private Cat mother; Q1. If the class has an identifier property as id, then wouldn't it be better to store the cat's mo...

Designing interfaces: predict methods needed, discipline yourself and deal with code that comes to mind

Was: Design by contract: predict methods needed, discipline yourself and deal with code that comes to mind I like the idea of designing by contract a lot (at least, as far as I understand the principal). I believe it means you define intefaces first before you start implementing actual code, right? However, from my limited expe...

Creating a burn effect in Silverlight

Does anyone know of a tutorial on how to create a burn effect in Silverlight? ...