Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I am working on a program with two views, html and ajax (which will be html transmitted via json).

The HTML view is the standard, and by default the ajax should look the same. However, the ajax view is also meant to have options configurable on the client side for which components of the page should be displayed.

I'm having trouble wrapping my head around making an elegant way to handle this requirement. Is there a standard way to handle related views like this?

share|improve this question
1  
It's unclear what the problem is that you're trying to solve. –  Robert Harvey Feb 15 '12 at 22:27
1  
While I'm not totally clear on what you are asking, isn't the HTML view a degenerate case of the "ajax" view equivalent to the ajax view with all configurable components turned on? If so, doesn't that simplify the dependency? –  psr Feb 15 '12 at 22:59
    
@psr yes, absolutely. I guess I am just left to a single view with a bunch of conditional statements. It's actually pretty simple if I think about it. –  user973810 Feb 16 '12 at 2:28
add comment

1 Answer

up vote 1 down vote accepted

Isn't the HTML view just a degenerate case of the "ajax" view - equivalent to the ajax view with all configurable components turned on? If so, doesn't that simplify the dependency?

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.