design

MVC: In which component do details of data presentation specified?

Example is fake. ASP.NET MVC: I have a view that renders a student info. Student info consists of First Name, Last Name and (optional) Age (declared as int?). Student info is rendered something like, if age is not specified I want to show "not specified": <span><%= Model.Student.FirstName %></span> <span><%= Model.Student.LastName %><...

Best workflow for binding website user accounts with facebook accounts

I need to implement facebook-connect to a website where users already might have their internal accounts. If internal account doesn't exist, it should be created from facebook credentials. Also it should be possible to link an existing account to facebook account. The technical implementation is clear to me, but I am more interested abou...

Java pattern question - builder or db code in model?

I need to build a 'MyThingie' using 'A'. MyThingie is in the model package and currently no code in model accesses the DB. My question is which of the following patterns should I use? The top or bottom? Or something completely different. package com.model; public class MyThingie { private String foo = ""; private String bar...

Maintaining state in a MVC2 Controller...

Hi... I want to maintain model state between method calls on the controller. Is that possible? A controller is created at the call of some of its methods and destroyed when the called method finishes its execution? If not... how can I maintain the state between method calls? If that is possible... how has it to be written? thanks ...

How to pass argument if event handler is assigned in initialization function?

It is always good to separate presentation layer and behaviour between HTML and Javascript based on head first book. They tell me not to do: <textarea onclick="showAlert()"></textarea> But instead, do below: The example below separate the behaviour from HTML code (structure). <html> <head> <script type="text/javascript"> window.on...

iPhone / iPad - Creating a UI stack of notes like evernote

Any ideas how to go about creating an UI like the one used by the Evernote application where a notebook is represented with a stack of untidy notes under it. I don't need the code (i wont refuse it :) ), just pointers in how to approach this sort of UI. In case you are not familiar with the evernote application, here is a link to the ...

Thinking about design, OO perferable. What metaphors and analogies do you use for your objects?

Sorry, for the vaguely worded question but how do you think about your objects or functions? Do you view them as a series of data structures? Mathematical functions? Is is how pure functional programmers think? Do you think about the lifecycle of an object? For instance, an interesting analogy is to think of set of dependent objects ...

what is Produce Integration with respect to System Design Document

What do we mean by Product Integration, product integration sequence with respect to System design document. ...

chain of responsibility design pattern - regd.

I've seen some questions on this pattern but I am trying to understand more about this design pattern in depth. Any resources in this regard, experts commentary on what scenarios they tend to use this pattern and what scenarios to avoid and some real world examples will be really helpful in this regard. I am not looking for what is COR t...

Maintaining encapsulation when wrapping native libraries

I'm writing a C# library to wrap a Win32 API (the waveOut... family of functions), and have reached a point where I'm unsure how to manage the interaction between different parts of my code without breaking encapsulation. So far, I have a setup like this: public class AudioDevice { ... private WaveOutSafeHandle hWaveOut; ......

Android View Design Issues

I've been playing about with the layout of a view with Android (lets say within the MainActivity) and I'm looking to create this sort of layout using 3 ImageView's (where each block represents an image): This is rather easy to pull of using LinearLayout's but only if you specify the exact size and position of each ImageView. This then...

destroying a singleton object

What is the best way to destroy a singleton object? case A: Single threaded Environment case B: Multi Threaded Environment Sample snippets(if any) will be really helpful. [EDIT] I don't have a specific use case I am just trying to understand that IF AT ALL the singleton has to be used how to destroy it correctly. As i understand...

Design document for Asp.net User Interface

I was asked to create a design document from the aspx pages screenshots provided by the client. Can someone guide me tips/sample design document we can create for aspx pages? (Like using MVC etc..) Thanks in advance Neelu ...

Create a notification popup with a specific animation in mind.. possible?

Hey guys, how would I go about making the following animation for my form submissions? I figured instead of typing it, I would create a visual.. Let me know if you think this is easily done. ...

Help for designing a chess game

I am a C++ programmer trying to learn designing, as a start I am trying to get a hang of designing by giving myself a task to make a OO design for a game of chess.This is not a homework q just trying to develop some skills. Here is the summary of what i have in my mind till now: A "Piece" class which will hold the current position of the...

Steps to follow when trying to OO design an problem statement

What are the steps that you follow when approaching a problem statement, which needs to be converted in to a OO design. I do know the approach might be subjective depending on the problem and varying for each but I am sure there must be some basic generic steps that each good designer will follow while breaking down a problem statement i...

Problem with template specialization and template template parameters

I have a class Helper: template <typename T, template <typename> E> class Helper { ... }; I have another class template, Exposure, which is to inherit from Helper while passing itself as the template template parameter E. I also need to specialize Exposure. Thus I want to write something like the following: template <> class Ex...

How can I build a django homepage with updatable content?

I an building a kind of social network (think of it as last.fm, but gaming related). I want to have a homepage which will feature: site news, announcements etc. in the main part featured items in the right sidebar player of the week in the right sidebar I am trying to think of a way not to be hand coding these every time they need t...

Design in Android, Shapes

I wounder how its possible to make a shape like the example, with round corners and padding from the screen borders, and also put text inside, how is this possible? ...

Compilers Design in my Senior Project (books, codes, resources, etc..)

Hello I have to get a senior project for graduate from my university. And I think get my "Compilers Design" lesson. But I can't get a subject.. Is there anybody tell me a subject about Compilers Design? Do anybody tell me a subject about Compilers Design that i can find books, codes or resources on the Internet? Thanks ...