297 reputation
312
bio website
location San Francisco, CA
age 35
visits member for 3 years, 3 months
seen Feb 13 '13 at 19:58

I like computers and food.


Aug
9
accepted How did Git and Mercurial develop so similarly at the same time?
Aug
9
asked How did Git and Mercurial develop so similarly at the same time?
Jul
26
accepted How are multiple values returned in Java?
Jul
26
awarded  Teacher
Jul
26
comment How are multiple values returned in Java?
So this answers Chris Farmer's question (in the Q's comments) that real Java people don't necessarily create getters and setters for little internal classes. You are a "real" Java person, right?
Jul
25
asked How are multiple values returned in Java?
Jul
25
awarded  Scholar
Jul
25
accepted Should I include HTML markup in my JSON response?
Jul
25
comment Should I include HTML markup in my JSON response?
Great point about the reuse. Everyone seems to be voting for the Ajax request to only contain data, and no markup, for various reasons. But this one is a big one. Thanks.
Jul
25
comment Should I include HTML markup in my JSON response?
I like your idea of burning the JSON data into the page -- not here since I don't fetch the additional data until I know what item you're adding to your cart. Making a request for the page layout, then a second for the data seems to be common these days. Having the data in a JavaScript variable eliminates the need for the second HTTP request without having the have two different bits of rendering code (i.e, client and server).
Jul
25
comment Should I include HTML markup in my JSON response?
Thanks for the reply. That's actually what I meant in option 1. The lightbox as a container would be burned into the page but hidden. The JSON data from the Ajax request would be used to generate the content in the container. Some of that content would be marked up using HTML. How did you interpret option 1? Maybe that can be my third option.
Jul
25
awarded  Supporter
Jul
24
awarded  Student
Jul
24
asked Should I include HTML markup in my JSON response?
Jul
2
awarded  Autobiographer