• (cs)

    Have you considered using Javascr... er... wait.

  • linicks_fool (unregistered)

    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!

  • (cs)

    It's like he tried to reinvent the wheel and some how came up with a Platypus or something.

  • (cs)

    All that for one button press? At least they didn't code their own button like the wtf a few weeks ago.

  • Javier G. Lozano (unregistered)

    <FONT face=Arial>It's like an onion!  Layers upon layers upon layers...</FONT>

  • (cs)

    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...

  • Fregas (unregistered) in reply to Javier G. Lozano

    OH MY GOD! I HAVE SEEN SATAN!!! I HAVE SEEN SATAN!!!!!

  • (cs) in reply to christoofar

        //make sure the receiver page accepted it
    if (xmlHttp.status != 200)....

    Oh God.  My eyes!

  • (cs) in reply to Fregas

    Anonymous:
    OH MY GOD! I HAVE SEEN SATAN!!! I HAVE SEEN SATAN!!!!!

    WTF do you mean? It uses BOTH Javascript and XML, so it's got to be optimal!

    Luddites. Sheesh.

  • x-sol (to lazy to login) (unregistered)

    They need to put a disclaimer on XML that says "For cross platform data migration and *.ini replacement...."

  • (cs) in reply to Javier G. Lozano
    Anonymous:

    <FONT face=Arial>It's like an onion!  Layers upon layers upon layers...</FONT>

    No, it's like a donkey.  It wears its WTFery right out on its sleve.

  • (cs) in reply to rogthefrog

    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.


  • ata (unregistered) in reply to linicks_fool
    Anonymous:
    Now I know why AJAX, the latest buzzword, is swarming IT.

    I suppose it's because it has an 'X' in it. Hell, that's the only reason XML itself is so popular.

  • Nayf (unregistered) in reply to christoofar

    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.

  • (cs) in reply to Nayf

    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.

  • (cs)

    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 $.

  • (cs) in reply to Nayf

    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?

  • (cs) in reply to Stan Rogers

    Oh, the failure to include the Moz-style XmlHTTPRequest version is almost expected -- way too much web stuff is IE-only.

  • (cs) in reply to Lumpio-

    Lumpio-:
    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.

     

    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.

  • andy brummer (unregistered)

    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.

  • (cs)

    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.

  • (cs) in reply to scheky

    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.

  • (cs)

    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.

  • (cs)

    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

  • (cs)

    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

  • (cs) in reply to Free

    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.

  • mitchner (unregistered) in reply to Manni

    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.

  • onyxraven (unregistered)

    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.

  • wekempf (unregistered)

    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.

  • (cs) in reply to wekempf
    Anonymous:
    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.


    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.
  • (cs) in reply to EsotericMoniker

    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.

  • (cs) in reply to christoofar
    christoofar:
    This is a fundamental example of the accidental complexity antipattern (http://en.wikipedia.org/wiki/Accidental_complexity) and possibly reinventing the wheel.


    Dude, seriously. Stuff doesn't get as complex as that by accident.

  • vhawk (unregistered)

    I always wanted to know how Microsoft.XMLDOM worked.  Think I will add this lovely piece of code to my referense set ....  :-)

  • Simon (unregistered) in reply to vhawk

    I always wanted to know how Microsoft.XMLDOM worked.

    I think this is the proof that, in most cases, it works by throwing extra servers at the problem.

  • brazzy (unregistered)

    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.

  • Paul L (unregistered) in reply to brazzy

    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>

  • (cs)

    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.

  • (cs) in reply to joodie
    joodie:
    christoofar:
    This is a fundamental example of the accidental complexity antipattern (http://en.wikipedia.org/wiki/Accidental_complexity) and possibly reinventing the wheel.


    Dude, seriously. Stuff doesn't get as complex as that by accident.



    I agree, you need some deliberate effort to be so blindingly stupid. :)

        dZ.

  • (cs) in reply to brazzy
    Anonymous:

    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.


    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.


  • vhawk (unregistered) in reply to DZ-Jay
    DZ-Jay:
    Anonymous:

    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.


    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.




    Hear hear !!
  • Junto (unregistered)

    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.

  • (cs) in reply to cm5400
    cm5400:
    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.


    No. This time the HPC was paid by the module, under the guidelines of the "more reasonable terms for highly paid consultants".
  • (cs) in reply to Junto
    Anonymous:
    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".


    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.

  • Nikanj (unregistered) in reply to Javier G. Lozano
    Anonymous:

    <font face="Arial">It's like an onion!  Layers upon layers upon layers...</font>



    And it makes grown men cry! :'(

  • webcat (unregistered) in reply to Junto

    we can use a hidden frame to achieve the same effect.

  • Hank Miller (unregistered) in reply to scheky
    scheky:

    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.



    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.
  • (cs) in reply to webcat
    Anonymous:
    we can use a hidden frame to achieve the same effect.


    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.
  • Steve Wahl (unregistered) in reply to Stan Rogers
    Stan Rogers:


    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.


    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.
  • (cs) in reply to Manni
    Manni:

    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.



    Please manni.. for the children.. don't feed the trolls.
  • TWK (unregistered)

    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).

Leave a comment on “The Little Button That Could”

Log In or post as a guest

Replying to comment #:

« Return to Article