Sunday, May 01, 2005

Funny, or I've been studying too long?

So I came across what I think it someone else's answer to last year's Comp118 final exam question. Maybe I've just been staring at this too long, so it seems funny, but wow...
Let’s say, just for hypothetical reasons that I still had dignity or shame, and did not want general people to see it, yet I wanted to be able to give the video up one day to one of my coworkers that saw the incident. This comes into the realm of access. I may not want grandma to ever see any of my college drinking and whoring pictures, but all my close buddies will give me approval for them, thus grandma gets limited access in comparison to my friends. Due to this, I will have to find a way to restrict access to some files while granting it to others. Or kill grandma. You know, whatever.
And...
And this is the story of a user visiting the MVC family. The plan is to have the current web page pass whatever the user wants to accomplish to a Controller class servlet, which would equate to the belligerent drunk father of the program that tells everything what to do. For every problematic father class, we will add in a model class who will take on the role of the mother who denies that there is a problem at all with the fathers control issues. This model/mother class will act as the interface to the database, which is basically calling a friend when she needs help with anything. The View Components (Kids) or Web Pages are actually produced by a combination of XML code tossed into the Controller Father class and the Controllers ex-wife class, XMLTransformer. Together the Father Controller class and the ex-wife XMLTransformer make lots of Web page babies, and make a new one each time the user hits a button. Think Rabbits. The new mommie Model hates the ex-wife XMLTransformer, so they never talk. They just communicate rarely through the deadbeat Controller daddy class. Whenever a user clicks a button, the daddy Controller class gets a phone call about one of his kids in trouble again, so the daddy Controller yells at the mother Model class, blames her family for their programming problems, and then he has to go find that child XML string in particular. Once he finds the child XML string, he beats it religiously and the crying XML string runs to its actual mother, the ex-wife XMLTransformer. She consoles the XML string with gay uncle XSL style sheet, who dresses the XML string quite well, and tells the XML kid string that one day it will go into a cocoon and emerge into a beautiful web page. And it does. As in this crazy browser called life.
If by chance the father Controller yells at the mother Model class and tells her that the user is actually requesting something, say information or a tall glass of water, then the mother gets super nervous and comes to the conclusion that she doesn’t know anything. So Model mother calls her mother, aptly named Grandma mySQL (grandmas maiden name is Database). Like most grandmothers, Grandma mySQL can answer any question, even if its long, drawn out, and has no useful information or redeeming qualities. Grandma mySQL tells the mother how to pour the glass of water, the Model mother says “oh I’m so retarded” and makes the glass of water. Then she asks the father to give the nice visitor the glass of water, but he is drunk and has a lot of children to emotionally scar, so he gives the water to an XML kid string that he beats. The XML kid, sobbing once again, runs to the ex-wife XMLTransformer and gay uncle XSL and they realize that she had good reason for leaving her ex husband. She again fills her child with delusions of grandeur about being a beautiful web page and the little tyke XML string does in fact become a beautiful webpage (assuming the kid is wearing a photoshoped T-shirt). With new found fervor, the webpage returns the requested water to the user, and thus dehydration is no longer the tragic villain in the MVC family.


Ok, since I am no convinced that most of you probably didn't find this funny, I promise something interesting soon...

0 Comments:

Post a Comment

<< Home