Comment On SqlHtml

Today's classic WTF is an M.C. Escheresque journey into design that just... isn't... right.  This is the kind of code you'd expect to see scrawled on the walls of an asylum full of developers.  Without futher ado, here's the classic WTF of the day! [expand full text]
« PrevPage 1 | Page 2Next »

Re: SqlHtml

2005-08-10 11:20 • by Maurits
Ah, I get it! The WTF is that he didn't reimplement HtmlEncode() in a user-defined function.  Right?  ... Right?

Re: SqlHtml

2005-08-10 11:26 • by Chris F
I bet he uses his database to send emails too.

Re: SqlHtml

2005-08-10 11:29 • by Kippesoep
Hmmm... that's a cool technique. I may want to redesign my content
management system. Maybe I can put the stylesheets into the stored
procedures, too!

Re: SqlHtml

2005-08-10 11:33 • by scheky
40442 in reply to 40441

It hurtsssssss usssssss....it hurtssssss ussssssss....


filthy dbasesssssssss....


 


 

Re: SqlHtml

2005-08-10 11:36 • by Ytram
40443 in reply to 40441
Kippesoep:
Hmmm... that's a cool technique. I may want to redesign my content
management system. Maybe I can put the stylesheets into the stored
procedures, too!




Why stop there??  You can have javascript stored in the database,
and you can also store all of your images as blobs in the database.



Btw, to the OP, this has been posted before.  You might want to use the search function before posting.

Re: SqlHtml

2005-08-10 11:41 • by Carsten Otto
40444 in reply to 40443
Ytram, I hate you.

Re: SqlHtml

2005-08-10 11:41 • by Kiriai

Ytram:
I am now going to make sure and comment on each WTF you post this week to let you know that you are re-posting an old WTF.


It was funny when you said it.  But if you are going to actually do it, well that'd be downright annoying.

Re: SqlHtml

2005-08-10 11:44 • by Jake Vinson
40446 in reply to 40445
Anonymous:

Ytram:
I am now going to make sure and comment on each WTF you post this week to let you know that you are re-posting an old WTF.


It was funny when you said it.  But if you are going to actually do it, well that'd be downright annoying.



Heh, I still thought it was kinda funny.

Re: SqlHtml

2005-08-10 11:55 • by emptyset
certain substrings in variable names are classic indicators of Great Programming Skill (tm).  "blob" certainly falls into this category.

Re: SqlHtml

2005-08-10 12:11 • by DZ-Jay
Jakeypoo:

And on a personal note, I want to thank
everyone for all of the reminders that the WTFs this week are all
reposts.  Thanks for keeping me up to date during Classic WTF week.





WTF?? Wasn't this post before?!



    dZ. :)

Re: SqlHtml

2005-08-10 12:15 • by Tom K
We paid thousands of dollars for SQL Server, we are going to get our money's worth!



Thanks for yet another hillarious post.

Re: SqlHtml

2005-08-10 12:23 • by Daniel T
40451 in reply to 40450
I'm actually kind of impressed :-)  I would have *never* thought of that...

Re: SqlHtml

2005-08-10 12:34 • by RFlowers
You know, the sad thing is this is just the kind of thing that might look impressive to the right (wrong) kind of employer. First, look at the complexity of that query! Second, sqlHtml might look killer on my resume. Take that, XHTML!

Re: SqlHtml

2005-08-10 12:42 • by Free

It lets you "optimize" the app server to just use GetRows and GetString to format all the markup.


Today is "W"...


 

Re: SqlHtml

2005-08-10 12:45 • by DZ-Jay
Why they didn't include any JavaScript in there is beyond me.



    dZ.

Re: SqlHtml

2005-08-10 12:48 • by Nunya

Dude...


This was already posted.  WTF???

Re: SqlHtml

2005-08-10 12:52 • by mizhi
40458 in reply to 40457
Anonymous:

Dude...


This was already posted.  WTF???





There seems to be a disconcerting number of people on this forum that lack basic reading comprehension skills.

Re: SqlHtml

2005-08-10 13:05 • by BatsShadow
40460 in reply to 40458
mizhi:
Anonymous:

Dude...


This was already posted.  WTF???





There seems to be a disconcerting number of people on this forum that lack basic reading comprehension skills.




Yes.  Yes there does.

Re: SqlHtml

2005-08-10 13:12 • by Dr. Shim
40461 in reply to 40458
mizhi:


There seems to be a disconcerting number of people on this forum that lack basic reading comprehension skills.




That's scaring me too!



By the way, that WTF is a repost. Use the search fucntion. ;)



Re: SqlHtml

2005-08-10 13:17 • by Daruku
40462 in reply to 40461
It totally is a repost!!!! (when does this get annoying?)

Re: SqlHtml

2005-08-10 13:23 • by Mung Kee
40463 in reply to 40462
Anonymous:
It totally is a repost!!!! (when does this get annoying?)


Yesterday

Re: SqlHtml

2005-08-10 13:24 • by Kazrael
40464 in reply to 40462
Yes people should learn to read, as well as use the search function.  BTW this is a repost.  =D

IIS vs. DB

2005-08-10 13:34 • by Bytecodes is not codebytes
This is common. IIS is running 286 and DB-server is running beowulf-cluster.

Re: SqlHtml

2005-08-10 13:35 • by DZ-Jay
40467 in reply to 40458
mizhi:
Anonymous:

Dude...


This was already posted.  WTF???





There seems to be a disconcerting number of people on this forum that lack basic reading comprehension skills.




There seems to be a disconcerting number of people on this forum that lack a basic sense of humour.



    dZ.



Re: SqlHtml

2005-08-10 13:35 • by DZ-Jay
40468 in reply to 40464
Kazrael:
Yes people should learn to read, as well as use the search function.  BTW this is a repost.  =D




"What is this repost you talk about?"



    dZ.

Re: SqlHtml

2005-08-10 13:40 • by Ytram
40469 in reply to 40468
DZ-Jay:




"What is this repost you talk about?"



    dZ.




NOOOOOOOOOOO!!!!

Re: SqlHtml

2005-08-10 13:42 • by Fregas
40470 in reply to 40443

Ytram:
Kippesoep:
Hmmm... that's a cool technique. I may want to redesign my content management system. Maybe I can put the stylesheets into the stored procedures, too!


Why stop there??  You can have javascript stored in the database, and you can also store all of your images as blobs in the database.


My last job, they almost went that far: they used cursors in stored procedures to generate HTML and I think they actually did email it from there.  Genius!

Re: SqlHtml

2005-08-10 13:46 • by Bytecodes is not codebytes
- I for one welcome our new sqlHtml-coding overlords!

Re: SqlHtml

2005-08-10 13:46 • by Mung Kee
40472 in reply to 40468
DZ-Jay:
Kazrael:
Yes people should learn to
read, as well as use the search function.  BTW this is a
repost.  =D




"What is this repost you talk about?"



    dZ.




This one is funnier every time though.

Re: SqlHtml

2005-08-10 13:50 • by BAnVA

Steve McConnell's rate just went up $100 an hour.  Coding Horror!

Re: SqlHtml

2005-08-10 13:52 • by Bytecodes is not codebytes

Employer: Can you code HTML?


Employee: No, but I know some SQL!


Employer: That's what I asked, you retard! get out! NEXT!

Re: SqlHtml

2005-08-10 14:00 • by Hanneth
40475 in reply to 40441
Do I mention that MS SQL Server 2005 is designed to run up to "middle
tier" web sites with no IIS intervention? You can used their XML
storage type and do selections on nodes in the XML through SQL, as well
as embed .Net code in the database and "not have to run a web server."



*scratches his head thinking isn't a program that serves web pages a web server?*

Re: SqlHtml

2005-08-10 14:06 • by Rhett

This guy was probably a PL/SQL Oracle developer who came over to SQL Server or whatever.  Oracle has some packages, HTP and HTF if I recall, for doing exactly this.  They were probably annoyed that their new database didn't have the 'normal' packages, and so decided to do it manually.

Re: SqlHtml

2005-08-10 14:36 • by foxyshadis
40477 in reply to 40468
I guess besides being report from hell week, it's also spam week. =D



The only thing this is missing is a busy-wait loop to test for incoming
HTTP connections. I hope the guy gets on it, I'd hate to see the
opportunity to have all three layers in a database passed up.

Re: SqlHtml

2005-08-10 14:40 • by WIldpeaks
40478 in reply to 40462

All the people complaining about the repost is a wtf in itself, lol


PS: why read when you can use text-to-speech to mispell for you ? [:D]

Re: SqlHtml

2005-08-10 14:42 • by WIldpeaks
40479 in reply to 40478

Or said another way: "brilliant !" [:D]

Re: SqlHtml

2005-08-10 15:01 • by Jochen
40481 in reply to 40476
This guy was probably a PL/SQL Oracle
developer who came over to SQL Server or whatever.  Oracle has some
packages, HTP and HTF if I recall, for doing exactly this.



Not only that, Oracle even
invented "HTMLDB" which uses Apache, mod_plsql and the packages you
mentioned to generate webpages with database content. As "IDE", you get
a web interface where you can put page elements together and back them
up with some SQL statements (or click them together, of course). My
boss thinks this is a really cool idea because finally you get rid of
all those confusing tiers...


Re: SqlHtml

2005-08-10 15:02 • by bugsRus
40482 in reply to 40479
WIldpeaks:

Or said another way: "brilliant !" [:D]





Should that have not been (in keeping with the reposted content theme)



package test;

public class paulaBean {

private String paula = "Brillant";

public String getPaula() {
return paula;
}
}



Re: SqlHtml

2005-08-10 15:05 • by kdd

 


Reminds me of a large IT consulting company that implements their 'resuable software framework' in client projects.


It uses all the latest technologies. It's kind of a write once and no more code changes approach.


Every attribute of each component in the entire Web UI is stored in a database.(font, x, y, size, page, etc.). Plus workflow, navigation, page layouts, security, etc. also in the same database.


Want to change that label text in a page -- easy!! Change the value in column x in table y to 'z'.


Want to add a new button -- add a new row to couple tables!


See - Nothing is hardcoded. No recompilation. No deployment.


As Staples says 'That was easy!'


Don't need any more programmers after the first implementation.


May also know as the Crazy Extreme programming.


Yep! the learning curve is a lot of fun.

Re: SqlHtml

2005-08-10 15:17 • by OneFactor
40484 in reply to 40442
scheky:

It hurtsssssss usssssss....it hurtssssss ussssssss....


filthy dbasesssssssss....



[6] Massssster isssss corrupt. We cannots log in.
[:'(] No! Massster is good! Massster takes care of us!
[6] Masssster issss falssssse and tricksssssey. We will take precioussss HTML for ourssssselvessss.
[:'(] Nooo! It is too risky! Master wants us to log in a different way.
[6] We could let HER do it...
[:O] Brillant! Paulab-Ean will take care of Master, and SHE does not want precious, and then WE will have precious HTML.

Re: SqlHtml

2005-08-10 15:19 • by Cristian Berneanu
40485 in reply to 40479
Don't you mean "brillant"?

Re: SqlHtml

2005-08-10 15:34 • by jeremydwill
40487 in reply to 40484
OneFactor:
scheky:

It hurtsssssss usssssss....it hurtssssss ussssssss....


filthy dbasesssssssss....



[6] Massssster isssss corrupt. We cannots log in.
[:'(] No! Massster is good! Massster takes care of us!
[6] Masssster issss falssssse and tricksssssey. We will take precioussss HTML for ourssssselvessss.
[:'(] Nooo! It is too risky! Master wants us to log in a different way.
[6] We could let HER do it...
[:O] Brillant! Paulab-Ean will take care of Master, and SHE does not want precious, and then WE will have precious HTML.



Stop it! I am crying, and my co-workers are looking at me funny (well, funnier than usual)[:'(]

Re: SqlHtml

2005-08-10 15:35 • by Doobie Dan
40488 in reply to 40468

DZ-Jay:
Kazrael:
Yes people should learn to read, as well as use the search function.  BTW this is a repost.  =D


"What is this repost you talk about?"

    dZ.


It just keeps getting worse.  Ah, what the hell, I'll join the fun.


postcount++

Re: SqlHtml

2005-08-10 15:39 • by DZ-Jay
40489 in reply to 40479
WIldpeaks:

Or said another way: "brilliant !" [:D]





You meant "Brillant!", right?



    dZ.

Re: SqlHtml

2005-08-10 15:43 • by DZ-Jay
40490 in reply to 40489
DZ-Jay:
WIldpeaks:

Or said another way: "brilliant !" [:D]





You meant "Brillant!", right?



    dZ.




Oh, dammit!



Must... reload... before posting!



    dZ.

Re: SqlHtml

2005-08-10 16:04 • by Blackhawksq
40492 in reply to 40490
My first programming job had something like this.



It was used as a 'Content Manager' allowing Panacore's clients to go in and edit their site 'Without'
knowing html... They literally had whole website stored in the webpage,
when you connected to this site it would use php to query the database
and grab the page you want base on a page name.



The beauty really came into play when they tutored the clients on how
to use it... "Go into word and design the page, click 'Save as html'
then view source and copy and paste".



 The interface had all the normal buttons but when you clicked
bold you saw <b>text</b>. You had to know html to even read
what you put in.





Re: SqlHtml

2005-08-10 16:06 • by Blackhawksq
40493 in reply to 40492
"They literally had whole website
stored in the webpage" stored in the database... ofcourse it would be
the webpage... stupid edit...

Re: SqlHtml

2005-08-10 16:29 • by JThelen
40495 in reply to 40490
DZ-Jay:
DZ-Jay:
WIldpeaks:

Or said another way: "brilliant !" [:D]





You meant "Brillant!", right?



    dZ.




Oh, dammit!



Must... reload... before posting!



    dZ.




Bah, you both got it wrong anyway.  No need to thank me for fixing it..



Dev1:  I just had a marvelous idea!

Dev2: Oh? What's that?

Dev1:  Put the HTML in the SQL!!!

Dev2:  Put the HTML in the SQL?  BRILLIANT!!







Re: SqlHtml

2005-08-10 16:54 • by diaphanein
40498 in reply to 40447

emptyset:
certain substrings in variable names are classic indicators of Great Programming Skill (tm).  "blob" certainly falls into this category.


"blob" is actually a datatype in some DBMSes.  So is "CLOB" and "GLOB". These are large objects.  FileBlob actually makes a fair amount of sense.


I love how people mock that which they do not understand.  There is a very simple reason for doing this.  Performance.  Yes, its harder to maintain, yes it abuses the database, but it can be significantly faster.  In old data-driven ASP pages, I used this technique a fair amount.  Not nearly to this degree, but I used it.  To save iterating in an interepretted language on my slow ASP host (I'm talking a dual 200 Mhz Pentium Pro), I used my mainframe DBMS host to generate some of my html.


Response time to client before:  30s.  Response time after the change:  <1s.

Re: SqlHtml

2005-08-10 17:29 • by i am funny
40501 in reply to 40467
DZ-Jay:



There seems to be a disconcerting number of people on this forum that lack basic reading comprehension skills.
what
« PrevPage 1 | Page 2Next »

Add Comment