design

Spring IoC: What about serialization?

Hi StackOverflow! I am just in the middle of the development of a new software component involving the Spring Framework. I like it but now i have a question regarding IoC and serialization. Given i have this class (Omitted imports and package declaration): public class EMailNotificationEndpoint implements NotificationEndpoint { priv...

Structure of orders in restaurant

What would be the best way to structure orders for a restaurant (available languages are php and javascript)? Since there are multiple tables (the ones you keep things on...), I thought of using objects in javascript. But I am quite new to javascript and absolutely new to OOP, so I'm not sure whether this is the best solution, and whethe...

How to value in-house functionality versus outsourced web API functionality.

Hi, I'm weighing up building a light-weight email marketing system into our existing platform I've developed. The other solution is to use an already existing tool (e.g campaign monitor / mailchip) and connect it into my platform as much as the api allows. The connection will be a little more cumbersome for the user, there will be diff...

C++ design issue

Hi All, Here is the problem description of my design. There is a class A (Singleton) which creates and maintains objects of class B. But there is such scenario where if a particular condition hit in object of class B, it has to create another object of class B. But I need this creation of object to be done by class A. class B; class...

How to design a system which allows property edit.

I want to design a Visual studio type property window where user can modify the properties of the controls. When the user selects the particular control in the UI, all the editable properties should be visible in the property window. The user control should have control on what properties it want to expose for property window. The user c...

Why is it so hard to enforce YAGNI?

I find myself breaking this pattern all the time. YAGNI - You Ain't Gonna Need It I am only a Junior Developer, but I find even Senior level developers doing the same thing. "Well, this system might use it, and this one, so let's design for it." Sometimes, I catch myself, but most times I run wild. Does anyone have any t...

Handling Deleted data in applications

Assume that you are writing a simple app. The model is that a 'project' has a 'category'. The project's category can be edited by choosing from a drop down list that contains all possible categories. The user creates the following Categories: C1, C2, C3. The user creates the following Projects, Category associations: [P1, C1], [P2, C2]...

Purpose of having API wrapped around interface

I am working on a piece of C# web application that has a page (MainPage) with a small area to display a gadget. There are several kinds of gadgets implementing a main interface (IMainInterface) and an optional interface (IOptionalInterface). In MainPage, when interacting with the gadget class, it uses following syntax: MyAPI api = new ...

Modular Application Design and LINQ, Is it possible?

We are designing a large system and are using PLINQO for our data access. The problem doesn't lay in PLINQO but rather LINQ, I think. We want to make a modular design, ie possibly having multiple and different datacontexts. LINQ doesn't like this. Has anyone thought of a solution, issues or alternatives? Most things I see out there ...

What design pattern? I need two modes in my app, edit and view.

If I need two modes in my application what design pattern would I use so I can prevent ugly conditional code? App is currently MVC, but I don't want conditional code in my controllers and don't want two controllers for each view unless I have to. Any suggestions? ...

Single or multiple thread pools for Java server?

I am writing a fairly complex Java server application which has a significant background processing portion in addition to the usual request-response processing. Some of the background processing is done in a cron-like fashion using Quartz framework. Other tasks are more of on demand - if a new client connects it creates additional job f...

Is it good to store long strings in a database?

I need to store long strings in a database. the string may be 5 or 6 sentences long. do you think this is a good design strategy. or should I store an id for that string and then create a relationship with another table that contains the location of the file storing the string. could you please give advantages and disadvantages of both. ...

Methodologies for Change-Proof Development in Agile Environment

Hi, I am wondering whether there is any methodology to design the program logic which is agile-proof. Currently for example I am developing an application for video recording and uploading. At the beginning it was planned just to enable the user to select the stored recordings from the library and edit title or upload the selected vide...

should one customize default iphone controls?

my app asks the user yes-no questions, user replies using a uiswitch on screen. i've been thinking about creating a custom version of the switch that would display yes/no instead of on/off and would use a green/red background as an indicator of the value. after creating a mock up i'm not so sure this is the way to go. using the default s...

OOP Design Question - Linking to precursors

I'm writing a program to do a search and export the output. I have three primary objects: Request SearchResults ExportOutput Each of these objects links to its precursor. Ie: ExportOutput -> SearchResults -> Request Is this ok? Should they somehow be more loosely coupled? Clarification: Processes later on do use properties a...

Designing JSF applications with UML 2

Does anyone know of a good article about how to represent a JSF application in JSF? I found the article on JSF central about the storyboard approach. However, this is incomplete. This is the only resource I can find on this subject. Any recommendations? Thanks in advance, Zack ...

how to make lyrics site database

I'm new to PHP and MySQL. For my project I want to make a site for lyrics. How to design the database and the relationships? Here is what I have so far: Artist Artist_id Artist_name Artist_bio Artist_thumb Albums Album_id Artist_id Genre_id Album_title Release_year Genre genre_id genre_name Tracks track_id track_title alb...

Class design: file conversion logic and class design

This is pretty basic, but sort of a generic issue so I want to hear what people's thoughts are. I have a situation where I need to take an existing MSI file and update it with a few standard modifications and spit out a new MSI file (duplication of old file with changes). I started writing this with a few public methods and a basic inpu...

Processing un-normalised text data.

With reference to an earlier question of mine on parsing fixed length field files, I have come up with another question at issue. I will probably be using a customised version of the FileHelpers library, with field start and length attributes that dynamically read the values for their target properties from a config file. The text data...

How to make a div appear higher on the page in front the content higher in the flow?

It's a pretty basic design question, but still: I have a header in one file and a few pages which load in succession in other files. I want to add a progress indicator (just an image of a 1/3, 2/3 and 3/3 filled bar) to each of these pages, but I want the bar appear on header, which is in different file and higher in flow, so negative m...