design

Are there any view engines for ASP MVC that are 'designable'?

Here's my problem: I am disturbed by the "impedance mismatch" between what graphic/web designers actually produce, and what is needed by the standard ASP MVC view engine. Basically there is no way to visually design a view i.e. the output of an action. No WYSIWIG designer. The only way to go from a static HTML design to an MVC app is b...

Can I change the visual design UIViewAlert?

Can I change the visual design UIViewAlert? ...

How to store linear range of values? Which Data structure to choose?

I need a simple structure to store polygon names based on sides ... so for e.g. 1 side is "monogon", 2 sides is "digon", 3 sides is "triangle" and so on (say for upto 12 sides) What is the simplest way to store these and reuse them in the code dynamically? for e.g. if my polygonShape class has 3 as the number of sides, it should return "...

Understanding odd database key design

Background I'm having trouble understanding the primary key choices in the database for a major vendor supplied product that we support and write SQL reports on. Some irrelevant details have been changed. Each major table has a unique autonumber "internal ID" field, but this field is not always used as the primary key. My question In...

.net application architecture

I'm currently trying to design an application and I'm having trouble trying to decide on the architecture to use for it. This will be a .net application and essentially what this application will have is a server running some specific software that this application will interact with. On this server there needs to be a provisioning ser...

overhead of using local http calls

Hi, I'm developing a wrapper around an existent RESTful API. I basically have to do some preprocessing, calling the underlying API, and some preprocessing, with a little bit of cache in the middle. The API is specially designed for RESTful access via http. My question is, should I refactor the API so I can invoke it via code, or should...

Class library in Visio

How to represent a .net class library and its classes in the Visio? To me, the Package and the Class seems to represent the library and classes respectively. Any suggestions? ...

Class naming chaos

I often struggle with deciding how to name a class. Not so much because the class's purpose is unclear, but because of names like xxx*Controller*, xxx*Manager*, xxx*Info*, xxx*Helper*, xxx*Util* etc that I see everywhere. If I have a class that uploads some stuff over HTTP, I tend to name it HttpUploader or something on those lines. ...

Is returning null bad design?

I've heard some voices saying that checking for a returned null value from methods is bad design. I would like to hear some reasons for this. pseudocode: variable x = object.method() if (x is null) do something ...

Returning None or a tuple and unpacking

I am always annoyed by this fact: $ cat foo.py def foo(flag): if flag: return (1,2) else: return None first, second = foo(True) first, second = foo(False) $ python foo.py Traceback (most recent call last): File "foo.py", line 8, in <module> first, second = foo(False) TypeError: 'NoneType' object is not it...

How to force call a C# derived method

I have a class that is generated by some tool, therefore I can't change it. The generated class is very simple (no interface, no virtual methods): class GeneratedFoo { public void Write(string p) { /* do something */ } } In the C# project, we want to provide a way so that we can plug in a different implementation of MyFoo. So I'm th...

Why are Mediators coupled to Proxies in Flex PureMVC?

I've just recently learned the PureMVC framework, and am a little confused as to the coupling between Proxy and Mediator objects. The links on this page connect to some documents describing the framework. (Please note, the links on the aforementioned page open PDFs.) The diagrams and examples of PureMVC I've examined often show a dire...

Class Design: Configuration Object

I need to write a class for different "configuration objects" that hold something like "if xyz = 5 then .." to transfer some Rules and Actions to those Rules. Can anybody please help me with a clever design of a class like that? I'm using C#.NET 3.5 ...

Implement a unique page view counter?

I want to implement a user-facing view counter (similar to what SO has for question views) that tracks the number of unique views to a page. There are a couple of similar questions here but none seem to answer my question fully. What would be the best setup for this (in terms of database tables etc.)? Would it be good to add a 'views' ...

Do "expert" programmers and designers really exist

It seems like every job posting I see any more, and most recruiters I talk to, insist that the only way I could qualify for the position posted is if I'm an "expert" programmer and designer. And when they say "programmer and designer" they seem to mean, designer, front-end developer and back-end programmer (and most seem to assume that a...

Dynamic tree structure in JavaScript

For my application i need to create one tree structure which consist of nested folder which will grow depends open server reponse. just like an email has tree structure- inbox or sent or draft or outbox(f)/a(f)/some content inbox or sent or draft or outbox(f)/a(f)/b(f)/email content inbox or sent or draft or outbox(f)/email content ...

Are forward navigation button's even needed in real-world application?

Honestly I can't think of the last time I ever actually used a 'forward' button on either a web browser, or in Windows. We all use the back button, but most users I observe including myself, simply click an item rather than using the forward button. So the simple question stands, is a forward button actually a necessity to any applicati...

Is there a way to save the state of an object for a faster reload later?

A piece of code I'm working on has to analyze a foreign file format produced by another software - a "replay" from a game to be more exact. In this replay, every actions produced by the players are saved with a variable number of arguments. My software produces an analysis of user's action, doing stuff like producing a graph of their act...

When is Inversion of Control useful and when shouldn't it be used?

I've recently been bitten by code that uses Inversion of Control when it's not appropriate. Lately, I'm of the opinion that IoC is among the patterns that have the worst effect when misapplied. This is because it tends to create a coupling of classes that can cause a lot of shotgun surgery if you run into a circumstance that's a little...

Physical world examples of design for testability and test driven development

I'm going to be doing a presentation on unit testing and in doing so I will touch on "design for testability" patterns. In other words using IOC containers, Dependency Injection, avoiding static methods etc. I have a feeling my team will be cold to starting to code differently to accommodate for testing. So I was wondering if anybody ...