design

How to design a language binding to a web api?

If you were trying to design a language binding to a restful web api, how would you do it? What would you take into consideration? What resources would you consult first? Would you try to mock the web api interlace 1:1 or would you try to use your language idioms instead? How would you prevent making excessive HTTP requests? Etc I've be...

Howto design Tables for Navigating Hierarchical Regions with Diamond Structures

Our solution needs us to work in hierarchies of regions which are as follows. STATE | DISTRICT | TALUK / \ / \ HOBLI PANCHAYAT \ / \ / ...

Class design: Passing values via Property(Set var) vs Function vs Constructor argument

This is a kind of open question. I always keep scratching my head when deciding between these. I can pass values to a class by: Passing an argument to class function: MyClass m = new MyClass(); m.DoSomething(arg); Passing argument when creating object: MyClass m = new MyClass(arg); m.DoSomething(); Setting the value using a differ...

Can you help me improve my decorator-based design?

I have a small program to build a house. A house will have many floors (storeys), a storey can have many rooms, a room can contain many items. So I tend to use the Decorator Pattern for this program. Here is the initial design: Can you help me to improve the design? ...

How to create a button with gradient background and background image?

hi there, i'm trying to use some jquery client side validation for my asp.net 2.0 webform. and it seems that the normal input submit button can easily trigger the validation on click. but i'm currently using a three divs made up image button for this page, thus it doesn't auto trigger the validation. i was looking at css3 and found th...

Multiple thead/tbody design

I have a question about usability/design. I currently am using some JQuery to hide/show entire areas. Currently these are all in one big table with a thead at the very top as the main header, followed by a second thead which is the header of what would be displayed. Next is another thead which is the header of whatever is hidden which is...

Handling exceptions in a property's set/get

In the example code below I am taking a list of strings and concatenating them to a delimited string. The problem occurs when I use the setter with an empty list. The ToString method throws an ArgumentOutOfRangeException since the second parameter is a -1. How should conditions (exceptions thrown in getters/setters) like this be handl...

Class Design Question

I need help trying to figure out the proper design of my classes. I have a user class: class AppUser: _email - String _fullname - String _organizations - List of ???? _active - Boolean ------------------ getOrgs - Method Also, I have an Organizations class: class Organization: _name - String _domain -...

Best Design for Passing Filter Set into Database Class for SQL use

I'm developing a FlashCard App. Part of this is giving the user the option to filter results on difficulty level and category (more options in the future probably). See the image for a quick mockup of the user screen. The data for the flash cards are stored in a Derby DB in a single table. One column for Level. A column for each catego...

How to make Patch-able/Update-able application?

I have completed a student project, this project extract data from xml files on internet and save to database and displays it. And i use that data in a few different ways e.g. display on main page, in another tab as a table, and to create some graphs. I did all this by making 5 different classes. Each class extracts different type of XM...

Android - Activities vs Views

I am working on an Android app that has multiple screens the user will need to navigate between and I am curious what the best practices are when switching between those screens. I am torn between creating a new Activity for each screen and simply changing the view (setContentView(R.layout.whatever)). The screens all share at least som...

If you could substantially alter Java's classpath libraries, whichdifferent decisions would you make?

If you had the chance to significantly change/update Java's classpath libraries, which things would you add/update/change/deprecate/remove? ...

planning to create a website - help needed

Hi, I want to create a website, just out of passion. I do not have much web programming experience( zero experience ) but I do have good Java programming skills. I am planning to do my development on WAMP stack so that it would be easier to migrate at a later stage if needed. I have the following questions: 1) How to design a good dat...

Stopping a Thread

Here is the situation. I have a thread that gets started with the click of a button. It then works for approx 2 min (give or take quite a bit) and then finishes, updating the UI and all along the way. It is quite nice. Now I have decided to add a "Cancel" button to the mix. My question would be what is the best approach to stop a th...

Where should Exceptions be caught?

In designing class with multiple/nested has-a relationships, who should catch exceptions? I guess this depends on design but is there any rule of thumb? ...

Implementing a GUI framework that acts as both search and input

Hi, How would you implement a reusable gui framework or such in a DDD environment that acts as both search and input? Example: MVP-architecture Entity - Person - Name - Age - JoinDate - etc. GUI - PersonView (input) - Name (TextBox, accepts string input) - Age (TextBox, accespt integer input) - JoinDate (DateTimePicker) - etc...

Is there any tool or technique to convert from phtoshop to HTML?

I would design the whole mock up page for by website using photoshop including sample data ... When i finished and i'm satisfied with my whole page layout, i would split images and write styles to generate plain html page with images and markup tags... I wonder is there any simple tool or technique to convert photoshop image into HTML ...

Why are good Coders bad Designers?

Why are good Developers bad Designers? and why are good Designers bad Developers. How can this lack fixed of both sides? Should coders beginn to draw? to fix this lack? and should Designers beginn to study Math to fix this lack? ...

The principles of beautiful web design vs Desktop software design

I'm about to embark on my first attempt at Desktop Software Design and I wanted to know any similarities behind the core principles of Web design that i can take with me or differences or books or articles etc? Any help greatly appreciated. ...

ASP.NET Web-Application Architectures / Patterns

Does anybody knows good, short and slim tutorials, which describe actual/modern web-application architectures / patterns (especially for ASP.NET based (classic and MVC) applications (maybe also with embedded Silverlight components) ? How would you you design today an ASP.NET application which uses different datasources (databases, servic...