The concept of hyper-persistance



  • Well, when some folks are taught Java and "Internet Programming" long before they understand HTML and HTTP, they will go miles, inventing a horde of anti-patterns before their code appears on TDWTF.

    Hyper-persistance is one such concept.
    Imagine having to pass 10 values from 1 web page to another. Sure is easy. Even if they are attributes of an object or a prototype.
    Hyper-persistance is different. It is betta coz it is easily understandable - you keep everything in the persistance layer aka the DB.
    So, when you have to pass 10 values from one page (page 1) to another (page 2), well, you pass all the values to a server side page (err, make this page 2, and the earlier one as page 3) which collects the values, creates an object from those values and persists that object in the database, returning an xref for "later" use.
    Then there is a redirect to the "actual" landing page (page 3), where some javascript code parses the URL to obtain the xref, and err... sends you to to a server side page which uses the xref to query the DB and fetch the values checked in by page 1.

    If this wasnt brain damaging enough, envisage an Eclipse plugin that will automate the creation of most of the HTML + JS and PHP or JSP code so that hundreds of such dysfunctional quadruplets can be created with ease.



  • I love roller coasters - back and forth, up and down, in and out - over and over and over - until it makes you puke!   Whheeeeeeeeeeee !

     


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.