PDA

View Full Version : ASP Gurus


darksidepuffin
04-12-2004, 08:53 AM
Hey All,

This is gonna probably sound like an odd request...but I need help from an ASP guru for a PHP cms I'm writing ^^.Specifically,I need someone to help me come up with a formula so I can create a regex(or a few) for asp syntax highlighting.I realize asp has various languages that can be used so obviously I won't be able to do them all,but isn't VBScript the most common?

anyways...can anyone give me a little push in the right direction for highlighting ASP syntax?


tia ^^

putts
04-12-2004, 08:58 AM
you can just post whatever syntax it is you're looking for out here and either me, Bass, eRad, rdove or the Ausie twins will prolly get to it fairly quickly.

General Syntax standards
<% %> = <?PHP ?>
dim = variable declaration
' = comment


For a list of ASP functions with their javascript equivalents, here's a tutorial I'm currently working on.
www.ageofdigital.com/AOD/aod_tutor_asptojs.asp

darksidepuffin
04-12-2004, 09:03 AM
Originally posted by putts
you can just post whatever syntax it is you're looking for out here and either me, Bass, eRad, rdove or the Ausie twins will prolly get to it fairly quickly.

General Syntax standards
<% %> = <?PHP ?>
dim = variable declaration
' = comment


For a list of ASP functions with their javascript equivalents, here's a tutorial I'm currently working on.
www.ageofdigital.com/AOD/aod_tutor_asptojs.asp

hmm....methinks I'll give a few regex a shot based on your tutorial :) altho I suck at regex so if it ends up even half decent,I'll be surprized :P

I'll be sure to post my discoveries/additional questions in a bit :D

thanks Ryan ^_^

darksidepuffin
04-12-2004, 09:06 AM
one quick question...how does asp define which language the code is in?

bassrek
04-12-2004, 10:08 AM
Originally posted by willamoose
one quick question...how does asp define which language the code is in?

The first line in an ASP page should be:
<%@ Language="VBScript" %>
or whatever the language is.

It's not required, though, and on IIS if it's not there, it's implied that it will be in VBScript.

putts
04-12-2004, 11:53 AM
Oh...a couple others

Response object is a big thing in ASP

Response.write = write stuff to the page
Response.redirect = redirect the page to a different page
Response.clear = clears the current page that was about to get sent back to the requesting browser - handy for custom-made error pages where if the code was halfway thru the page, you can clear that out and just print out the error message
Response.end = stops the processing of the page at this line - handy for checking out a sql string just before it's causing an error

Also....the request collection
request.form
request.querystring
or you can reference items in either one by just using request


Some more sample code:

<%
dim reqItem
dim strQuery,conn,recSet,dbField
for each reqItem in request.form
if reqItem = "sql" then
strQuery = request.form(reqItem)
end if
next

if strQuery = "" then
response.clear()
response.write("Error: you did not properly submit a query string")
response.end
end if

set conn = server.createObject("ADODB.CONNECTION")
conn.open "connection string for database server"

on error resume next
set recSet = conn.execute(strQuery)

if err.number <> 0 then
response.clear
response.write("ERROR: Your query string was not valid")
response.end
end if

if not(recSet.eof) then%>
<table width="100%">
<tr>
<%for each dbField in recSet.fields
response.write("<th>" & field.name & "</th>")
next%>
</tr>
<%while not(recSet.eof)%>
<tr>
<%for each dbField in recSet.fields
response.write("<td>" & dbField & "</td>")
next%>
</tr>
<% recSet.moveNext
wend%>
</table>
<%else%>
Your query string returned 0 results
<%end if

recSet.close
set recSet = nothing
conn.close
set conn = nothing
%>


That is some code that will look for a request field name sql (NOTE: there was no need for the for loop in the beginning - just trying to show example of for loops and request collections - you could have just used strQuery = request("sql") and that'd work just fine :D) and then it attempts to run that query string against the database.

If a recordset is returned with records in it, it cycles through those records using the fields collection - this way, I don't care what the field names are.....I just print the names/values to the user.

So....that's.....like ASP Databases 101 or something.

darksidepuffin
04-12-2004, 01:42 PM
Originally posted by bassrek
The first line in an ASP page should be:
<%@ Language="VBScript" %>
or whatever the language is.

It's not required, though, and on IIS if it's not there, it's implied that it will be in VBScript.

Thanks ^^

so I take it vbscript is the de facto language for asp?

darksidepuffin
04-12-2004, 01:43 PM
Originally posted by putts
Oh...a couple others

Response object is a big thing in ASP

Response.write = write stuff to the page
Response.redirect = redirect the page to a different page
Response.clear = clears the current page that was about to get sent back to the requesting browser - handy for custom-made error pages where if the code was halfway thru the page, you can clear that out and just print out the error message
Response.end = stops the processing of the page at this line - handy for checking out a sql string just before it's causing an error

Also....the request collection
request.form
request.querystring
or you can reference items in either one by just using request


Some more sample code:

<%
dim reqItem
dim strQuery,conn,recSet,dbField
for each reqItem in request.form
if reqItem = "sql" then
strQuery = request.form(reqItem)
end if
next

if strQuery = "" then
response.clear()
response.write("Error: you did not properly submit a query string")
response.end
end if

set conn = server.createObject("ADODB.CONNECTION")
conn.open "connection string for database server"

on error resume next
set recSet = conn.execute(strQuery)

if err.number <> 0 then
response.clear
response.write("ERROR: Your query string was not valid")
response.end
end if

if not(recSet.eof) then%>
<table width="100%">
<tr>
<%for each dbField in recSet.fields
response.write("<th>" & field.name & "</th>")
next%>
</tr>
<%while not(recSet.eof)%>
<tr>
<%for each dbField in recSet.fields
response.write("<td>" & dbField & "</td>")
next%>
</tr>
<% recSet.moveNext
wend%>
</table>
<%else%>
Your query string returned 0 results
<%end if

recSet.close
set recSet = nothing
conn.close
set conn = nothing
%>


That is some code that will look for a request field name sql (NOTE: there was no need for the for loop in the beginning - just trying to show example of for loops and request collections - you could have just used strQuery = request("sql") and that'd work just fine :D) and then it attempts to run that query string against the database.

If a recordset is returned with records in it, it cycles through those records using the fields collection - this way, I don't care what the field names are.....I just print the names/values to the user.

So....that's.....like ASP Databases 101 or something.

nice informative response Ryan ^^

stop it :rolleyes: you'll end up making me learn a language I can't properly use :P

hehe....I kinda got sidetracked(making a leather choker is distracting :D) so I haven't started the syntax highlighting yet...:P

bassrek
04-12-2004, 01:48 PM
Originally posted by willamoose
Thanks ^^

so I take it vbscript is the de facto language for asp?

Yup. I don't know the statistics, but I'd be surprised if non-VBScript accounts for more than 8 - 10% of ASP apps. I've never seen a book that doesn't use VBScript as the language and on web site tutorials, it's pretty much assumed you're using VBScript.

darksidepuffin
04-12-2004, 01:53 PM
Originally posted by bassrek
Yup. I don't know the statistics, but I'd be surprised if non-VBScript accounts for more than 8 - 10% of ASP apps. I've never seen a book that doesn't use VBScript as the language and on web site tutorials, it's pretty much assumed you're using VBScript.

mm....so basically learning asp 'requires' learning VBScript?(I don't know why I'm asking...I'll never learn ASP unless I do it on a windows host,and have a production environment with windows...we run linux..hense why I code in php mainly :P)

bassrek
04-12-2004, 02:01 PM
Originally posted by willamoose
mm....so basically learning asp 'requires' learning VBScript?(I don't know why I'm asking...I'll never learn ASP unless I do it on a windows host,and have a production environment with windows...we run linux..hense why I code in php mainly :P)
Yeah, I think that's a safe statement to make. Kind of like there's no official language in the US, but you are 'required' to learn English to move up the corporate ladder.

(I know you live in Canada, but you know what I'm saying ;))

eRad
04-12-2004, 02:05 PM
Originally posted by willamoose
mm....so basically learning asp 'requires' learning VBScript?(I don't know why I'm asking...I'll never learn ASP unless I do it on a windows host,and have a production environment with windows...we run linux..hense why I code in php mainly :P)
i'm sure you won't have a problem with it... i learned ASP without having ever touched VB

you never really use that many different elements of the language... mostly just the basic loop stuff and all of the response objects... so if you have a lil reference sittin beside you, you should be just dandy =)

darksidepuffin
04-12-2004, 02:06 PM
Originally posted by bassrek
Yeah, I think that's a safe statement to make. Kind of like there's no official language in the US, but you are 'required' to learn English to move up the corporate ladder.

(I know you live in Canada, but you know what I'm saying ;))

lol...yeah.I find it kinda interesting to basically have to learn microsoft's take on JavaScript in order to write the 'norm' of their server side language :P

darksidepuffin
04-12-2004, 02:08 PM
Originally posted by eRad
i'm sure you won't have a problem with it... i learned ASP without having ever touched VB

you never really use that many different elements of the language... mostly just the basic loop stuff and all of the response objects... so if you have a lil reference sittin beside you, you should be just dandy =)

I prefer challenges in learning languages...but I have yet to find one that challenged me in the least(PHP = *types with nose*,Java/JSP = *yawn* wake up the server,Perl = *yawn* boring,Python = :P Perl on steroids ....:P) when learning it,I may as well learn one I can't use and see how I do when I can't use my code :D

putts
04-12-2004, 03:05 PM
Originally posted by willamoose
lol...yeah.I find it kinda interesting to basically have to learn microsoft's take on JavaScript in order to write the 'norm' of their server side language :P

Welll......vbscript is sorta two different languages that I think you're getting confused about.

There's a client-side one which is an adaptation of VBScript for the client-side stuff - not over highly used majorly because of the fact that it's not highly supported - however, I'd say it has all the bells and whistles of javascript.

Then, there's the VBScript which is the main coding language for ASP. This is just a slightly different version of regular ole VB. Not really having anything to do with JAVA :D though it does offer decent OOP, but nowhere near JAVA's OOP.

Slightly confusing......but M$ has to have a language-alternative for everything :D

darksidepuffin
04-12-2004, 03:09 PM
Originally posted by putts
Welll......vbscript is sorta two different languages that I think you're getting confused about.

There's a client-side one which is an adaptation of VBScript for the client-side stuff - not over highly used majorly because of the fact that it's not highly supported - however, I'd say it has all the bells and whistles of javascript.

Then, there's the VBScript which is the main coding language for ASP. This is just a slightly different version of regular ole VB. Not really having anything to do with JAVA :D though it does offer decent OOP, but nowhere near JAVA's OOP.

Slightly confusing......but M$ has to have a language-alternative for everything :D

lol..I wasn't comparing it to java ;) to JavaScript :P ...I thought VBS was a client side adaptation of VB?I also thought VBS client side is only supported on IE?

and yeah..m$ has language alternatives....alternatives to real ones :D lol

darksidepuffin
04-12-2004, 03:10 PM
another question...why does almost every ASP script I see use ADODB?is it like..impossible to do it otherwise?

eRad
04-12-2004, 03:15 PM
there are other interfaces but its the simplest to use for ADO databasing... simply put =P

people use different drivers, such as Microsoft Jet or the MSAccess driver, but i never really found much difference between them

maybe the others can fill you in on its real pros/cons, i haven't seen anything else worthy of my attention

darksidepuffin
04-12-2004, 03:25 PM
Originally posted by eRad
there are other interfaces but its the simplest to use for ADO databasing... simply put =P

people use different drivers, such as Microsoft Jet or the MSAccess driver, but i never really found much difference between them

maybe the others can fill you in on its real pros/cons, i haven't seen anything else worthy of my attention

I dislike using classes I didn't write myself....so I'm guessing I could write my own Database Class using native functions if I so choose?

bassrek
04-12-2004, 03:30 PM
Originally posted by willamoose
I dislike using classes I didn't write myself....so I'm guessing I could write my own Database Class using native functions if I so choose?
Maybe I'm missing something, will, but are you saying you'd rather write your own interface to interact with a database then use ADO if you were going to use ASP? Seems kind of pointless to me as there are dozens and dozens of methods and properties for ADO and it's extremely efficient.

http://www.activeserverpages.ru/ADO/

darksidepuffin
04-12-2004, 03:34 PM
Originally posted by bassrek
Maybe I'm missing something, will, but are you saying you'd rather write your own interface to interact with a database then use ADO if you were going to use ASP? Seems kind of pointless to me as there are dozens and dozens of methods and properties for ADO and it's extremely efficient.

http://www.activeserverpages.ru/ADO/

Yes I am.I have a very awkward pet peeve about using any code I didn't write myself in it's majority.I am of course a PHP developer,whereas your mainly ASP..but you've no doubt heard of PEAR,Smarty etc. premade classes for various purposes.I've never used them,and never will.I have an insecurity with code that if I didn't write it,I feel as if it's not really my application.If it's at all possible,I'd write my own...

bassrek
04-12-2004, 03:43 PM
Originally posted by willamoose
Yes I am.I have a very awkward pet peeve about using any code I didn't write myself in it's majority.I am of course a PHP developer,whereas your mainly ASP..but you've no doubt heard of PEAR,Smarty etc. premade classes for various purposes.I've never used them,and never will.I have an insecurity with code that if I didn't write it,I feel as if it's not really my application.If it's at all possible,I'd write my own...

Fair enough. Can we expect to see a willamoose OS anytime soon, then? :D

darksidepuffin
04-12-2004, 04:09 PM
Originally posted by bassrek
Fair enough. Can we expect to see a willamoose OS anytime soon, then? :D

yeah...it's in line after the DemonicPuffin Processor and the new 3gb PUFF RAM ;)

bassrek
04-12-2004, 04:13 PM
lol...PUFF RAM. I think I might buy me some of that :)

darksidepuffin
04-12-2004, 04:21 PM
Originally posted by bassrek
lol...PUFF RAM. I think I might buy me some of that :)

if you have a mind like mine..it sounds like a lewd act :P

Kram
04-12-2004, 06:02 PM
Just in case you are in the area of files in VBscript, i have been doing alot of work with the FileSystemObject, which has heaps of neat features, if you need some help or a curious, i will help you as much as possible with file problems.

darksidepuffin
04-12-2004, 06:14 PM
Originally posted by Kram
Just in case you are in the area of files in VBscript, i have been doing alot of work with the FileSystemObject, which has heaps of neat features, if you need some help or a curious, i will help you as much as possible with file problems.

Hey Mark ^^


I appreciate the offer,but as I mensioned..I won't be learning ASP anytime soon because I don't have a Windows server for production use(don't have one at all) and don't really wanna use Apache :: ASP on our Linux server :)

Kram
04-12-2004, 06:16 PM
Yeah, no problem. :)

But the offer always stands

darksidepuffin
04-12-2004, 06:29 PM
Originally posted by Kram
Yeah, no problem. :)

But the offer always stands

see what I mean about this forum being like a bunch of old buddies/family then a random webmaster forum?:D

Ninkasi
04-12-2004, 08:06 PM
Originally posted by willamoose
see what I mean about this forum being like a bunch of old buddies/family then a random webmaster forum?:D

No... What do you mean?!?? :D

putts
04-12-2004, 08:30 PM
Originally posted by willamoose
I dislike using classes I didn't write myself....so I'm guessing I could write my own Database Class using native functions if I so choose?

So.....you hate PHP then right?

PHP just built their own version of an ADODB right into their product for ease of communication with mySQL

That's one of the reasons I didn't like working in PHP. It was "marriaged" with mySQL and, personally, I like using my MSSQL database much better :D

All ADODB is is a communication piece to talk to the database - it's just a server protocol - more or less.

VBScript (client-side) is only supported by IE (maybe Opera, too).
VBScript (server-side) is the main language for ASP

They share the same name because they are basically the same thing - replace the response/request object with document and there you have it.

darksidepuffin
04-12-2004, 08:34 PM
Originally posted by putts
So.....you hate PHP then right?

PHP just built their own version of an ADODB right into their product for ease of communication with mySQL

That's one of the reasons I didn't like working in PHP. It was "marriaged" with mySQL and, personally, I like using my MSSQL database much better :D

All ADODB is is a communication piece to talk to the database - it's just a server protocol - more or less.

VBScript (client-side) is only supported by IE (maybe Opera, too).
VBScript (server-side) is the main language for ASP

They share the same name because they are basically the same thing - replace the response/request object with document and there you have it.

yeah...but the functions for php are NATIVE....they arn't some class from pear or whatever....I don't have to do like a:


require_once('class.ADODB.php');
$db = new ADODB('host','user','pass','db');


they're built in functions.Part of the language.It's not like (no offense intended whatsoever by the use of his name...in case there is any confusion) Scoutt wrote the mysql_* functions people use...in which case..I wouldn't use them simply because I didn't write them.

Kram
04-12-2004, 08:40 PM
Are you saying that you just feel more comfortable using classes, etc.. that you know all about? Because there are plent of ways to find out about every class/function

Ninkasi
04-12-2004, 08:42 PM
I'm thinking he feels better about using something that he made, as opposed to something someone else made.... It's a pride thing

darksidepuffin
04-12-2004, 08:49 PM
Originally posted by Ninkasi
I'm thinking he feels better about using something that he made, as opposed to something someone else made.... It's a pride thing

Ninkasi(can't recall your name...if you even told us it :D) is exactly right.Pride of ownership/creationship...if I didn't write 90% of it...it's not really mine.

Kram
04-12-2004, 08:54 PM
wouldnt it fill you with pride to use someone elses code to creat something masterful? That would make me happy. But im not trying to change the way you think, im just curious as to how you think.

Ninkasi
04-12-2004, 08:55 PM
It's Chris :D (Me and Kram have made a list of people from the forum's names! :P)

Anyways, I can understand that totally! I don't do it personally, as long as I have had a hand in there touching it up, and it teaches me something for next time, then I can be happy with taking/using someone elses code

darksidepuffin
04-12-2004, 08:57 PM
Originally posted by Kram
wouldnt it fill you with pride to use someone elses code to creat something masterful? That would make me happy. But im not trying to change the way you think, im just curious as to how you think.


that would make me feel "they wrote most of it...all I did was put clothes on it and make it walk down the street...I'm not a programmer...I'm a fashion designer" :P

darksidepuffin
04-12-2004, 08:58 PM
Originally posted by Ninkasi
It's Chris :D (Me and Kram have made a list of people from the forum's names! :P)

Anyways, I can understand that totally! I don't do it personally, as long as I have had a hand in there touching it up, and it teaches me something for next time, then I can be happy with taking/using someone elses code

heh...I do the 'edit code' phase while I'm learning...but once I understand the basics of a language...my peeve kicks in :)

ah really?you two are stalking the forum :D

Kram
04-12-2004, 08:59 PM
Originally posted by willamoose
heh...I do the 'edit code' phase while I'm learning...but once I understand the basics of a language...my peeve kicks in :)

ah really?you two are stalking the forum :D

Not stalking, just taking note...

darksidepuffin
04-12-2004, 09:01 PM
Originally posted by Kram
Not stalking, just taking note...

yeahhhh :D and I'm not a murderer *hugs cowhide collar and looks affectionately at slice of pigskin to be used for backing* I'm a craftsman ^_^

Ninkasi
04-12-2004, 09:01 PM
Originally posted by willamoose
heh...I do the 'edit code' phase while I'm learning...but once I understand the basics of a language...my peeve kicks in :)

ah really?you two are stalking the forum :D

No, just taking over, finding out who the power players are.. that kinda thing.. :P

Kram
04-12-2004, 09:02 PM
I fear that this post is turning into a conversation rather than a help post for asp, should we maybe go back to it?

darksidepuffin
04-12-2004, 09:02 PM
Originally posted by Ninkasi
No, just taking over, finding out who the power players are.. that kinda thing.. :P

rofl...so basically your 'suck up' list ;)

darksidepuffin
04-12-2004, 09:04 PM
Originally posted by Kram
I fear that this post is turning into a conversation rather than a help post for asp, should we maybe go back to it?

perhaps :P

Ninkasi
04-12-2004, 09:06 PM
you're rite Kram!

Now, I don't use ASP to its fullest, as I don't use a database in what I'm working on at the moment. I use it for the more mudane actions, as in SSI includes, and some time/page functions that come in handy. Really it's just a normal website/page thingo with the extra little bits.. I could probably get away using something else, but I've gone this far.....

darksidepuffin
04-12-2004, 09:07 PM
Originally posted by Ninkasi
you're rite Kram!

Now, I don't use ASP to its fullest, as I don't use a database in what I'm working on at the moment. I use it for the more mudane actions, as in SSI includes, and some time/page functions that come in handy. Really it's just a normal website/page thingo with the extra little bits.. I could probably get away using something else, but I've gone this far.....

Ryan explained to me that ADODB and such were atchually more like libraries then classes....those I have no problem with.It's just other people's classes...not libraries provided with the language that bother me :P

putts
04-12-2004, 09:15 PM
Will's original thought was that ADODB files had to be included into each ASP page for them to be used in that page.

In all actuality, ADODB, CDONTS, FileSystemObject are all DLL registered on the server.

In this aspect, ASP is very open source. All you need to do to use a third party component/utility would be to register the dll on your web server and then instead of Server.CreateObject("ADODB.CONNECTION") you'd do something like Server.CreateObject("WILLDB.CONNECTION")

Woohooo!!! GO M$ OPEN SOURCE :D :boogy:

Ninkasi
04-12-2004, 09:17 PM
This would have to be the only thing that M$ would have as open source yeh?

Kram
04-12-2004, 10:43 PM
When I was first a member here, i was asking all about SSI when I asked the question:
"Why isnt there a tag which does the same thing as the <!--#include file="blah.asp"--> tag in asp?"

And all i got was: "because its already done in asp, no need to"

But the question still stands that I think that a new html tag should be made so that newbies who dont know much about SSI dont need to do so much research into it.

What do you all think?

putts
04-12-2004, 10:47 PM
nah.....any newbie wanting to get into a serious coding language such as ASP or PHP should already be doing research anyway.

Includes are already fairly self-explanatory.

Also, it'd be more confusing to straight HTML coders and also not-needed as far as HTML goes so it shouldn't be a part of that.

Ninkasi
04-12-2004, 10:51 PM
I started off my HTML coding learning from looking at the codes and such that FrontPage made for me... not the best way to start off, but I think I learned alot from that experiance...
the way not to code! :P

Kram
04-12-2004, 10:58 PM
I see what you are saying putts, coders who want to code cant go through life looking for the easy alternative

putts
04-12-2004, 11:04 PM
Originally posted by Ninkasi
I started off my HTML coding learning from looking at the codes and such that FrontPage made for me... not the best way to start off, but I think I learned alot from that experiance...
the way not to code! :P

Hey, try not knowing HTML at all and discovering that you need to learn ASP.

Yeah....that was a tough one.

Ninkasi
04-12-2004, 11:04 PM
nor do half of them try to. I find that alot of coders prefer to work out their own problems... I'm a mix.. sometimes I can't be bothered figuring it out and want an answer then and there, and others I would sit and try to figure the problem out

Ninkasi
04-12-2004, 11:07 PM
Originally posted by putts
Hey, try not knowing HTML at all and discovering that you need to learn ASP.

Yeah....that was a tough one.

Ahhh... yeh that would suck big time! :Ds

darksidepuffin
04-13-2004, 04:46 AM
I started out using something even worse then frontpage(printshop web site designer :rolleyes: ) but I got past that,learned as much about html,css and such that I could...started hacking perl/php scripts...heh...now I have a precursor of knowledge that makes learning any language a breeze for me :D

Ninkasi
04-13-2004, 05:52 PM
I should learn some more langauges, but at the moment I have no need at all for them.. So I guess all in due time! :D

Kram
04-13-2004, 06:01 PM
I found Java and C++ to be the best style of language that I have ever used, i love OOP.

darksidepuffin
04-13-2004, 07:41 PM
Originally posted by Kram
I found Java and C++ to be the best style of language that I have ever used, i love OOP.

OOP is great.I love OOP to the point I code OOP whenever I can.and Chris...I am obsessed with learning new languages...rather or not I have a use for them :D

Ninkasi
04-13-2004, 08:19 PM
Thats fair enogh, but I'm lazy, and probably wont find a need for them, until I need them.. go figure eh?

putts
04-13-2004, 08:23 PM
Originally posted by Kram
I found Java and C++ to be the best style of language that I have ever used, i love OOP.

HUH?? WHAT???? HOW??

Argh....I despise any version of C, however I love JAVA. I've always considered these two languages to sorta be opposites when it comes to their syntax.

You should try C#....all the power of JAVA with a lot of C Syntax.

Kram
04-13-2004, 08:25 PM
Originally posted by putts
HUH?? WHAT???? HOW??

Argh....I despise any version of C, however I love JAVA. I've always considered these two languages to sorta be opposites when it comes to their syntax.

You should try C#....all the power of JAVA with a lot of C Syntax.
I have read a bit of C#, one of my friends is doing it. He likes it alot to for the same reason you mentioned.