- Feature Articles
- CodeSOD
- Error'd
- Forums
-
Other Articles
- Random Article
- Other Series
- Alex's Soapbox
- Announcements
- Best of…
- Best of Email
- Best of the Sidebar
- Bring Your Own Code
- Coded Smorgasbord
- Mandatory Fun Day
- Off Topic
- Representative Line
- News Roundup
- Editor's Soapbox
- Software on the Rocks
- Souvenir Potpourri
- Sponsor Post
- Tales from the Interview
- The Daily WTF: Live
- Virtudyne
Admin
Have you considered using Javascr... er... wait.
Admin
Now I know why AJAX, the latest buzzword, is swarming IT.
Remote requests in Javascript has been around and in use for quite a while.
Nothing like an acronym to pour kool-aid.
You go Javascript!
Admin
It's like he tried to reinvent the wheel and some how came up with a Platypus or something.
Admin
All that for one button press? At least they didn't code their own button like the wtf a few weeks ago.
Admin
<FONT face=Arial>It's like an onion! Layers upon layers upon layers...</FONT>
Admin
I worked at an outfit that operated exactly like this. XML-panacea. Everything had to be done with XML, even though the possibility of multiple layers of seperation were minimal... at best, with the database server sitting beside the application server.
This is a fundamental example of the accidental complexity antipattern (http://en.wikipedia.org/wiki/Accidental_complexity) and possibly reinventing the wheel. I mean really, how many more ways do we need to invent an invole->call to database->resturn result paradigm?
I guess the program would have been a bit more interesting if the button click caused a message to dump into MSMQ, to get picked up by another server, processed and routed back to a database table, then have another thread spinlock until the update/approve went through...
Admin
OH MY GOD! I HAVE SEEN SATAN!!! I HAVE SEEN SATAN!!!!!
Admin
Oh God. My eyes!
Admin
WTF do you mean? It uses BOTH Javascript and XML, so it's got to be optimal!
Luddites. Sheesh.
Admin
They need to put a disclaimer on XML that says "For cross platform data migration and *.ini replacement...."
Admin
No, it's like a donkey. It wears its WTFery right out on its sleve.
Admin
It's crap like that button that make me cling to winforms. If you can't do it on the web with PHP, then it's not worth doing.
Admin
I suppose it's because it has an 'X' in it. Hell, that's the only reason XML itself is so popular.
Admin
I wonder if there's a rule that says that if a WTF is a really, really cool WTF, it passes into the realms of awesome. I think there's a fine line in many cases. This? This is awesome. Yes.
Admin
Another WTF is only supporting IE. Either the WTF is the thing about only supporting IE itself or it's the company/whatever still using IE for accessing the page.
Admin
Obviously, this is the work of some good-hearted consultant who wants to be sure that her client gets her money's worth.
Lotsa code for Lotsa $.
Admin
C'mon folks, don't blame AJAX (or, um, "background XML requests", as we used to call them last week) -- at least the requests don't set off a clickstorm in IE like adhoc iframed postbacks would. (Oh, and anyone who would suggest going back for a whole new UI every time a datum changes really ought to given a 20-year sentence restricting them to a 300 baud strap-on acoustic modem and a rural POTS line. No-one who gives half a crap about either the customer or the server would do that. Granted, it works well in single-user testing on localhost or over a five-foot gigabit LAN cable to a dev server.)
No, the WTFery is in the server-side Goldberg machine. Why would anyone want to simply flick the lightswitch?
Admin
Oh, the failure to include the Moz-style XmlHTTPRequest version is almost expected -- way too much web stuff is IE-only.
Admin
Well Lumpio, welcome to the real world, where many corps do indeed use IE, both as a browser for their employees and as the only browser supported for internal web apps. Only needing to support IE may have actually been part of the defined standard architecture for the company, and if so, it would have been a WTF to not take advantage of that fact.
Of course, this code makes my brain hurt...somebody needs an enema.
Admin
I worked on something similar, except every com object method call was done with a pair of access numbers which referenced an xml document stored in a database which told the system which output template to use and how to map query string variables to method parameters.
That was just the beginning. In order to debug the application I had to have a minimum of 4 instances of VB6 running in debug mode, sometimes more. The state of the request was stored in an XML document that was never persisted. Each procedure call added a node to the document and xsl transforms were loaded from the database to transform nodes of the document and add the transformed xml back into the original document in a different node. Then the new and updated data were used randomly by different components.
To top it off, it interacted with a SQLServer database, Java web service, a home grown queue system based on a SQL server table and Oracle Active Queue. Plus I was in a design review for the project before it was started. Made sure I let everyone know it was a horrible idea, but they went off and did it anyway only for it to drop back in my lap 2 years later.
Admin
My Friggin Eyes! I can not believe that... Wait a minute, must have been written by a highley paid consultant that got paid by the line, no WAY would anyone have so many layers in between. That's like creating a database table for each item of data that you need to store. WOW, my brain hurts thinking about that POS code, I need an migrane pill now. I would have ran screeming through the friggin hills, blowing up every bridge on the way if I had to maintain that, and not looked back for one nanosecond.
Admin
scheky: If that's indeed the truth here then the developer has done nothing wrong - but my post didn't imply that. Using IE is still a WTF.
Admin
It always has to turn into an anti-Microsoft campaign by some of you, doesn't it? Using IE is a WTF? I have coworkers that use Mozilla, Firefox and Netscape and have their own set of problems.
As for this nugget of Javascript/XML overkill...wow. I had no idea something so simple could be so over-complexified.
Admin
Most poeple who reinvent wheels do it because the don't understand "the wheel".
Ending up with a platypus should not be a surprise :D
Admin
It's like someone tried to reinvent the wheel and ended up with a dodecahedron. It still rolls, but is more than a bit clunky.
http://mathworld.wolfram.com/Dodecahedron.html
Admin
Do you guys REALLY want to see what a HASH this guy'd have made of mozilla-style code? It'd have been entirely new pages with entirely different code, partly copy-pasted from the old and partly from the web, including lots of unnecessary "workarounds" he found for NS 3/4 bugs and then workarounds to work around the workarounds, and requiring a different server for a different xml/db schema. It'd probably involve a custom xpi being installed too.
I tried pushing FF in my company, but I'm afraid I'll never be able to do it without some support for group policies (microsoft's or homegrown). Full privs for everyone and editing everyone's profile separately are not options to any admin who values her time.
Admin
Using IE is not a WTF. The WTF is taking something so simple and coding it in a browser-specific manner. If someone is writing an intranet page that uses of tons of DHTML to build super-fancy menus and such, maybe IE-only code is OK. A simple 'submit' button using IE-only activeX controls certainly rates as a WTF in my book.
Admin
So we've got ajax style message passing for a simple post, and a plethora of com objects... thats all pretty good WTFery, but one of the things I do like is that it sounds like the class that executes the stored procedure is using ADODB to execute a procedure in the 'standard method' ... with all of this XML being thrown around, did they not know that SQLServer2000 speaks pretty good XML itself?
The last company I worked at used primarily XML for web interaction, using xslt to transform complicated database calls into html for display. It was rather clean, and decent seperation of MVC, lots better than ugly COM objects and crap everywhere.
Admin
This architecture sounds very J2EE to me. Everythin in the Java world has the same number of abstractions and patterns applied to every single concept, no matter how simple. Ever done any Struts coding combined with Hibernate? Through in a little AJAX and that sounds like exactly what was built here.
Admin
I'm not sure what you've been doing with Java but I don't see a lot of COM, actually I don't see any outside of the MS world. ActiveX controls in IE? Hmm, I'm thinking this is pretty ASP/ASP.NET'ish. It is true that Struts + Hibernate can get a bit complicated with all the configuration files but you have to realize that's buying you a lot of flexibility in terms of changing components and not having to go and update a lot of code. Now weather that flexibilty is worth a hill of beans in most web apps is a different question. This WTF though remains a MS WTF, perhaps you can rejoice when we have a Java WTF tomorrow.
Admin
I think our friend anonymous meant it reminded him/her of the spirit of J2EE, which is a massive WTF of layers. I doubt s/he meant that today's WTF was J2EE.
Admin
Dude, seriously. Stuff doesn't get as complex as that by accident.
Admin
I always wanted to know how Microsoft.XMLDOM worked. Think I will add this lovely piece of code to my referense set .... :-)
Admin
I think this is the proof that, in most cases, it works by throwing extra servers at the problem.
Admin
I think a lot of the response here are based on the same kind of thinking that shows a side-by side comparison of doing formatted output of a number in C with printf (one line), and doing the same in Java (quite a few lines) and from there arriving at the conclusion that Java must be overengineered WTF crap because it takes more lines to do a trivial thing... completely forgetting (or being unaware) that formatted number output is pretty DAMN complex if you take into account different formatting conventions in different countries. Doing that in C cleanly would take quite a few more lines.
My point is this: hello world types of tasks are NOT a correct basis to judge a system as being over-engineered, having too many layers or too much abstractions, because layers and abstractions only make sense when you see the big picture, and can pay off really well there.
Admin
This example has reminded me that: <font size="2">"</font><font face="Lucida Sans"><font size="2">Any problem in computer science can be solved with another layer of indirection, except for too many layers of indirection."</font>
</font>
Admin
Its beautiful!
Come on guys, you have to admit it... its like if someone asked "could you go to the store and buy me a wheel"; then, not knowing what exactly a wheel was, they went ahead and tried to make their own; and accidentally ended up desigining a batmobile!
Sure, when they returned with the batmobile, it really didn't fit in the original bicycle's front fork, and it was sort of clunky to pedal it with a huge monster strapped to the front, and it ended up being expensive, and requiring a bat-cave to house it in and all that.... But its XML! :)
dZ.
Admin
I agree, you need some deliberate effort to be so blindingly stupid. :)
dZ.
Admin
I guess you're right. This JavaScript/XML/COM behemoth would prove very useful and flexible in the future if they ever decide to change the behaviour of the button, from posting a single query to a DB, to say, self-diagnosing the entire collection of data center systems, while computing gyroscopic corrections for geo-stationary satellite orbits, and brewing coffee for the sysadmin.
We should all design our modules and classes this way -- who knows what changes will be needed in the future. Have a function to compute total line-item price (product_price * qty)? Then definitely make room for future expansion -- just in case the function is needed in the future to compute factorials or geometric transformations.
Simplicity is for wimps.
dZ.
Admin
Hear hear !!
Admin
Just a small point, but technically this shouldn't be a WTF. If anyone can get a button on a web page to perform a postback to the server, without posting back the entire page, then you can accuse me of being wrong.
Although I detest the fact that some designer or marketeer has given a "funky" (stupid) name (Ajax) to the concept of client-side "background" postback using XmlHttpRequest, it is undoubtedly a useful concept. See Google Maps if you don't believe me as it uses the same technology (as does Google Suggest). Plus I'm surprised it didn't get called "iJax" as it seems you can make anything cool by sticking an "i" before it these days. In the good old days you used an "e" you know. It is bloody Apple's fault!
Anyway.... though rather clunky and slow, plus Internet Explorer seems to have problems with memory leaks* using XmlHttpRequest, the technology does have a place and valid uses. I just hope that a "i-cool" name doesn't give it the XML treatment. i.e. Everyone uses it for everything because it is the "thing-to-do".
For those of you that are interested:
Google Suggest - http://www.google.com/webhp?complete=1&hl=en
My example of using the Google Map API - http://www.junto.co.uk/Album/Maps/SouthAmerica.aspx
*I haven't looked into the memory leak in detail, but just noticed that the browser got slower and slower while I've was playing around with the Google Maps API . This especially happens over long periods of time, such as when I leave the browser open displaying a map for a coupel of hours doing nothing. This could be due to a problem in Google's JavaScript too though. Either way, it isn't something you use to be super quick, or reliable.
Admin
No. This time the HPC was paid by the module, under the guidelines of the "more reasonable terms for highly paid consultants".
Admin
You missed the point. Nobody is saying that background postbacks are a bad idea. As a matter of fact, most posts in this thread comment on how it has been there for years, and just now have become the "latest craze", when christened with a techy-sounding name, AJAX.
What people are criticizing is the over-use of multiple layers of abstraction to perform what in essence is (or should be) a simple procedure. The punishment should fit the crime, the solution should fit the problem, and the level of abstraction -- and therefore, its complexity -- should be in balance with the intricacies and the needs of the overall design.
A hammer is a very useful and versatile tool, and it can be applied to many other uses beyond its original intention; but I wouldn't use it to clip my nails or prune my bushes.
-dZ.
Admin
And it makes grown men cry! :'(
Admin
we can use a hidden frame to achieve the same effect.
Admin
Sigh... Shades of a job I had 5 years ago. They revealed a new system for developers to reserve test equipment. IE only of course. Nevermind that all development was on Solaris, only 1 in 3 developers even had a Microsoft windows machine in their office. Most had to find someone with IE to reserve anything needed. (and long term reservations could not be for more than a month, with no notice when they expire) IE on solaris did not work - I tried.
Admin
You've never done that with multiple asynchronous and timed queries, have you? Iframe postbacks, particularly in IE, cause the same "click" as if a user had clicked a link. Do that more than once or twice in a session, and you get really, truly annoyed users. Do it in an intranet app used in a cube farm and no-one can hear themselves think anymore. It works, yes, but that's not the only consideration.
Admin
Thanks, Stan. I'm usually a linux / Firefox user (and, at that, I'm an embedded C developer, not a web developer), and it's always been a WTF for me when I use the kids machine, that (a) I can't turn that damn IE click off, especially when I'm using the system to play music in the background; and (b) why some web pages kept making these click noises when I wasn't doing anything.
The lack of a preference for the click is still a WTF, but you explained the second one.
Admin
Please manni.. for the children.. don't feed the trolls.
Admin
Internet Explorer Rules!!
It is so awesome that IE provides full access to COM functions right through JavaScript. Think of all of the possibilities this presents to developers (and hackers).