design

Activate jquery ui widgets within dynamically loaded form

What is the best practice of activating jquery ui widgets for html loaded and inserted into the document by ajax? I am an advocate of unobtrusive javascript and strongly believe that all functionality accessed by javascript should be also accessible without it. So in the ideal case, each form which opens in a popup, should also have its...

How to test software behaviors that occur at certain interval of time?

I am working on a ad-related project, in which I need to make sure that our system picks up an advertisement from db at certain interval of time and insert it into our normal service flow. How would you design test for systems like this so that you don't have to wait 30 mins while confirming that advertisement do occurs at the right tim...

How to calculate time left in a count down scenario

We have a requirement to count down based on a user taking a test. What would be a best way to tackle tracking the time taken by a user while taking the test. We do capture start time, end time. But the calculations go awry if the application server or the OS goes down during the test. We were thinking of using another variable to store...

Where could I buy a "social networking" html template or psd/ai file?

Hi, I'd like to start some little private social network and I'd need a web design, I looked throughout themeforest but did not found one. (There's only blogs/portfolio templates). Do you know any good place where I could buy a pre-made social network html template? Thanks! ...

Is my singleton design less elegant than it should be? What's the best practice?

I'm currently building a tool for my game engine using WPF. The tool is project-centric (think Visual Studio, XCode, etc.) and allows the user to edit one project at a time. Currently, my implementation hosts a singleton instance of the project class, ArchitectProject. This is available to all other components as a property on the singl...

Why doesn't jQuery bomb if your selector object is invalid?

Was recently using some code along the lines of $("#divMenuContainer:visible").hide("explode"); However after some time spent trying to get it to work I realized my selector was referencing a div that didnt exist. The result of the query was simply that it didn’t execute. Obviously this is by design, could anyone explain the logic...

Database design for download presets

Newbie with databases, I would like some advise please.. I have agencies who can download photo's. Standard each agency can download "medium" & "large" photos. Now from their account page I would like them to make extra custom presets and manage those. I looked in the database of some blog software how they handle categories and wrapped...

Programming != Job Description

I'm currently in a situation where many people on here likely find themselves: I love to program, I do a lot of fun side projects, but it is not my profession. I work as an Electrical Engineering project manager, but at one point I wrote a software application that solved a tricky signal processing problem early in my career. Now the c...

Long method and testing private methods - design problem

Hi, I have a quite long method. It copy an ActiveRecord object with all relations, and changes relations in some cases. To make code more readable, I use private methods. I would like to test them. Technicaly, in Ruby it is no problem, but I suspect, I have bad design. Do you have any advices how to deal with such case? ...

gwt - mvp design

Hi, I'm new to gwt and I'm making an app with header, left-side navigation bar, a menu on top and a panel where I going to show the content. The content panel will have a lot of custom widgets, and the user will can move them, so I'm using gwt-dnd library. How should I desing the UI? Should I put menu, navigation bar and content in ...

what is the recommended approach for application settings in RoR?

i'm a .net guy doing some work/learning RoR. i have a handful of environment-specific settings i'd like to externalize (s3 access info). what is the way to do this? I realize the place for it is in config/environment/[environment], but i'm asking beyond that. Should it be a global constant? should i use an initializer? how do i cleanly m...

Law of Demeter and DAO pattern

Here's a method in my Spring/Hibernate website's code that exemplifies my codebase: public class UserVoteServiceImpl implements UserVoteService { @Autowired UserRepository userRepository; public static int getUserScore(long userId) { return userRepository.findUserById(userId).getScore(); } } I believe that this method...

Design Patterns Chain of Resposibility Vs Decorator..

How Chain of Responsibility Pattern Differs from Decorator Pattern..? ...

java- gui design aesthetics

Hi, I am new to GUI design, and would like to know if there is somekind of standard "project" that I can find a set of "standard"- or not- images for my various components, e.g. buttons, jtree etc so that my GUI looks nicer. If there are icons by theme, would be great.I am using NetBeans but it seems that there is no library of icons in...

When to use a framework or develop from scratch for a PHP web app

How do you decided to use a framework (such as the Zend Framework) when building a new web app? What are the advantages of starting from scratch as opposed to using a framework? I am well aware of the advantages of a framework, as well as some disadvantages. I have heard it said that really large projects generally don't use an off-th...

Looking for a good Javascript gallery manager

I've been looking around for ages, and have settled on Galleria. It's... useful I suppose. Can anyone suggest anything better? What I'm imagining is a gallery format much like this: http://www.lolitaagogo.com/illustration/illustration/ After a little research on her website it looks like it's some custom js built by squarespace. So usi...

When using MVVM pattern, should code relating to property changes go in the setter or an event?

Looking for guidance on where to place code which is dependent upon changes to a property. For example, I have a view model which is used to hold state for an applications settings public SettingsViewModel(ISettingsRepository settings) { _settings = settings; // ... } For each change to a settings property we have to persist ...

How to create default instances of the memento in a Memento Pattern ?

Hi, I use the Memento Pattern to save properties of a multi-instance form, where n forms are created by user inside a parent form. The purpose of the memento is to regain the same number of forms, and their settings, when a user close and later reopen the parent form. The saving of the form mementos are done by a "save" button on the pa...

DDD along with collections

Hi, suppose I have a domain classes: public class Country { string name; IList<Region> regions; } public class Region { string name; IList<City> cities; } etc. And I want to model this in a GUI in form of a tree. public class Node<T> { T domainObject; ObservableCollection<Node<T>> childNodes; } public class Countr...

extension method call another in same extension class - good design?

Hi, i ask myself if it is a good design if an extension method uses another in the same extension class. public class ClassExtensions { public static bool IsNotNull<T>(this T source) where T : class { return !source.IsNull(); } public static bool IsNull<T>(this T source) where T : class { retu...