The ASP.NET Code Behind Whitehouse.gov
An anonymous reader writes "The author looks at the markup for the new whitehouse.gov site, launched today. It uses ASP.NET and various JavaScript libraries. It suffers from various inefficiencies, most easily remedied. Check the images and techniques used to build the site front-end."
Hmm... Freudian slip? FWIW, most of the whitespace is probably generated by the ASP technology they used. Spots where code goes can often generate unexpected whitespace. It's just a side effect of using scriptlet-type technologies.
Don't get me started on the "correct" way to write ASP. The tag-substitution gobbldy-gook encourages all kinds of bad page-development practices. The request-time attributes + templating taglibs seen in JSP provide a much cleaner separation between logic and HTML.
Ouch. Welcome back to 1996. Web developers looking for the smallest file size really need to learn that there is such a thing as palletized PNGs. They're even smaller than GIFs, even.
This is one place where my reaction is "BFD". As long as it looks acceptable under most circumstances, the people with the carefully color calibrated monitors (*cough*yeslikeme*cough*) can suffer a bit. Heck, half the JPGs on the internet look like garbage, so I'm not too worried about artifacting in the gradients.
Can we choose the right technologies for a website? No we can't! Thankfully, the President isn't hired to choose the best technology to run his website. ;-)
Javascript + Nintendo DSi = DSiCade
wait, a government project that suffers from easily remedied inefficiences??!?!
no way.
Not to mention ...
TUE, JANUARY 20, 12:01 PM EST
Change has come to WhiteHouse.gov
The first post on WhiteHouse.gov.
A "first post"?
The fact that he uses them makes them the best.
As of today, IIS6 is the best web server and ASP.NET 2.0 is the best web application framework.
for the author to show his superiority to the Internet. None of what he cites really matters.
Hail Eris, full of mischief...
E pluribus sanguinem
But I agree with the heavy jpeg compression. It is one of my pet peeves, actually. Especially when people use JPEG's for images that really should be GIF's.
And yes, PNG's are smaller but I've found that IE6 can do weird things to them. Even IE7 can sometimes do funky things with the colors in PNG images. And don't forget you can't easily do transparent PNG's until IE6 is finally flushed out of our system (if you are reading this and are using IE6, please upgrade for the love of god).
If they were using ASP.NET MVC you wouldn't have even known the thing was running ASP.NET. You could have thought it was mod_perl or ruby until you looked at the headers. Like most PHP sites, the aspx extension is a dead giveaway :-) ASP.NET MVC is url based, just like a good mod_perl app or a rails app.
Many developers use the JQuery from Google's servers for improved performance and lower latency.
Is this guy serious? Advising Whitehouse.gov to use a remote server to serve javascripts?
Virtual Betting on Facebook for non-geeks.
Personally, I think the site does a great job in balancing usability, layout, and (most importantly) good content. Given the extreme time pressures they were probably under, I think they did a great job.
hey, hopefully a new website like this can have votes for it's citizens about diff issues, stats on who voted for what, and senetor voting to ensure they follow what they say after elected. some free webspace/an email couldn't hurt either. whats webspace to an org like the govt? 2gb for all would get people more involved! as for the idea about open sourced govt, can such a concept be applied for our most imprtant (corrupt) system?
...flash based!
Fortunately, it's valid HTML.
Unfortunately...
http://jigsaw.w3.org/css-validator/validator?uri=http%3A%2F%2Fwww.whitehouse.gov%2F&profile=css21&usermedium=all&warning=1&lang=en
The Turing test cuts both ways
You mean like his entire campaign, and probably the "first 100 days?"
I believe government should be more like technology: it does not have to look good to work and, dammit, we would really prefer it work right out of the box!
The switchover of the whitehouse.gov site also meant that the robots.txt file has changed. From around 2400 lines to just 2 lines: http://www.kottke.org/09/01/the-countrys-new-robotstxt-file
/.'s 10 Millionth
We're not designing for modem bauds anymore. Platforms having a high level of abstraction (Java, Microsoft, etc) inject meta data into the pages. Really, I consider this a non-story. Sure it's fun to see how the website could be more efficient in fine detail; however it doesn't need to be. If you really want to do that, go back to CGI gateway.
Slashdot'ers talk, think, eat, and dream in HTML.
Some can even describe their dreams using VRML.
http://www.linuxjournal.com/content/open-source-force-behind-obama-campaign
My take is that the whitehouse.gov servers are run by the government and have to conform to DoD security guidelines, which have only relatively recently included Linux configurations for certain commercial distributions such as Redhat. So they probably don't have the freedom to redo the servers with whatever they could cobble together with talented volunteers for the campaign.
Anyway, we'll eventually see whether all this talk of change only runs skin deep.
The author states that CSS sprites are "somewhat involved to implement". Unless you're really new to CSS, it's very easy to do.
What I find sad is the poor choice of image formats, i.e. all the graphics of the blue border should have been in 24-bit PNG, not JPEG.
I do applaud them for having clean URLs. Most of them anyway.
...and, admittedly, a pretty sucky one. I figured out html on my own and it's not the main thing I do at work, so I never learned how to do things "the right way", and neither did any of my co-workers, for the most part.
I do want to do things the right way, so I read articles like the one linked to in this story with interest. However, I get NOTHING out of them when they're written like this:
It's annoying to read someone going off about inefficient practices without telling you how to do it better.
"There is a way?" Nice. Thanks for sharing.
(Yes, the "[Search for 'X-Aspnet-Version']" is dead text, not a link to anything...)
It's like this with virtually every other tech problem I've ever tried to research... Zillions of pages of people complaining about a problem, suggesting fixes, or claiming that something they did fixed the problem, and very little in the way of actual, detailed information about the fix, how and why it worked, and what exactly the problem was that it solved.
You see? You see? Your stupid minds! Stupid! Stupid!
'hero shot' is a term I've heard bounced around in web design/publishing before, which possibly may be what is referred to here.
You will encounter this sometimes in your life, and you better get used to it. Sometimes, believe it or not, things are done simply because they need to be done.
They don't spend a lot of time laboring over every little detail, they have a list of tasks and a deadline and they do their best to meet the deadline.
They anticipate that nerds who nitpick Battlestar Galactica episode continuity errors will likely come in and stroke their butter soaked neck beards and chortle about how this or that could be done better to achieve 5% faster page loads, or allow for translation into Swahili.
But, they get paid either way and in the grand scheme of things trying to impress anyone on Slashdot is probably pretty low on anyone's to-do list.
As someone who's argued with people about vi vs. emacs in the past, I can honestly say you guys have reached a new low both in wasting time, having no worthwhile point, and being worthless slashdot editors. The trifecta.
I went to it today. All the links worked. It looked nice and professional. It loaded fast even though I'm sure it was getting hammered.
No complaints from a user.
At the end of the day. Who gives a shit if it's 30bytes less efficient. A hummingbird landing on a telephone line probably disrupts my DSL connection worse.
I just love when people who know nothing about ASP.NET attempt to critique things:
The whitehouse.gov site has long ASP.NET IDs. There are many elements on the page that have very long IDs, which are mainly a waste of bandwidth usually. They could be easily removed on the server side.
<a id="ctl09_rptNavigation_ctl00_rptNavigationItems_ctl01_hlSubNav"...
Sorry bud, they can't really be removed on the server side - these are controls embedded in controls embedded in controls. Maybe a slight shaving of rptNavigationItems down to rptNavItms or something, but the long name is to be able to reference the embedded controls.
Please try again...
They could fix these perf problems instantly using the RPO (www.getrpo.com). If anyone knows the developers, let them know
Indeed, the page in question actually validates as XHTML Transitional which is something that is remarkably rare and shows a concern for craftsmanship.
I noticed that, too. The CSS however does not validate. Still I take your point. APS.NET is not the tool I would use, but they have done well with the tool of their choice.
Prime numbers are exactly what Alan Greenspan says they are -S. Minsky
Who cares about a 30 byte http header when your page is over 800k and ~45 requests, there's plenty of low hanging fruit to pick first. Interesting thing is in the post above a tool called the rpo is mentioned, it seems to do most of the important optimizations automatically.
Comment removed based on user account deletion
Comment removed based on user account deletion
$ host www.whitehouse.gov
www.whitehouse.gov is an alias for www.whitehouse.gov.edgekey.net.
www.whitehouse.gov.edgekey.net is an alias for e2561.b.akamaiedge.net.
Reducing their bandwidth and server load is just not a big deal. (See Akamai and note that the whole site takes the path that the "image" request takes in that diagram.)
This is a classic one:
ASP.Net has built in defences against XSS which are enabled by default. Most sites will however only catch this on the last line of defence; the server-side request causing HTTP error unless manually handled or overridden. It looks like this site also doesn't do any input validation for tags either causing said errors.
Really, you need to switch off the XSS checking and instead HttpEncode all the inputs manually so at least you don't break the site for potentially dangerous requests.
Still, small point though...just makes me slightly uneasy the web-admins left the server to fend for itself when dealing with potentially malicious inputs. Nevermind; It's a nice site overall.
throw new NoSignatureException();
Comment removed based on user account deletion
Comment removed based on user account deletion
If you mean the lack of functors - yes, they did miss that, but that's just one bit of the language. And, of course, it's still quite possible to implement full OCaml on top of .NET, including functors - it's just that F# decided not to do that particular feature.
On the other hand, Don said that we should expect full-fledged type classes sometime in F# 2.0... now that would be quite something.
As for the rest, Eiffel is quite different from C# (and Java, and the likes) - for one thing, it has full MI, which is something the CLR object model does not natively support. Python - I won't even comment here, the difference between a statically and a dynamically typed language should be pretty obvious.
Comment removed based on user account deletion