IWETHEY v. 0.3.0 | TODO
1,095 registered users | 0 active users | 0 LpH | Statistics
Login | Create New User
IWETHEY Banner

Welcome to IWETHEY!

New What I mean
We use PHP. I have no problem admitting that the development environment for ASP is much richer than that for PHP. All of our database interaction, for instance, has to be done manually. We've created classes to abstract the nitty-gritty, but we still have to interact with it at a fairly low level.

Granted, one of the problems with ASP is that it encourages people to not bother understanding what they're doing. But the promise that you shouldn't need to know that is the goal. So for now instead of having to type five lines of code every time we want to query a database, we only have to type three.

Sure, there's better error handling and reporting, and we've got some convenience and debugging features built in. But we all know the DB abstraction class could be improved. But until we have time to re-write every single page that touches the existing class, it's a non-starter. We've discussed versioning, but the code is bloated enough without introducing our own layer of class-version hell.
===
Microsoft offers them the one thing most business people will pay any price for - the ability to say "we had no choice - everyone's doing it that way." -- [link|http://z.iwethey.org/forums/render/content/show?contentid=38978|Andrew Grygus]
New PHP database code?
All of our database interaction, for instance, has to be done manually. \r\n

\r\nI am not sure what you mean by "manually".\r\n

\r\n

\r\n So for now instead of having to type five lines of code every time we want to query a database, we only have to type three. \r\n

\r\n

\r\nIf you use mostly one (standard) connection throughout the app, then most query calls can be reduced to something like:\r\n

\r\n
\r\nrow = myQueryWrapper("select * from foo")\r\nwhile getNext(row) {  // for each row in result set\r\n  print("Amount is " & row['amt'])\r\n  ....\r\n}\r\n
\r\nBoth ASP and PHP can do something like this (although ASP requires a MoveNext IIRC). I am not sure where the bottleneck is in your simplification attempt.\r\n

\r\nI take that back. I think you need two different handles minimum for PHP (assuming MySQL API). I'll have to experiment to verify that.\r\n

________________\r\noop.ismad.com
Expand Edited by tablizer Nov. 7, 2002, 03:21:05 AM EST
New What I mean by "manually"
We have to specify which DB server, which database and which table for every query. For pages that deal exclusively with one database we can set up the single connection and re-use it.

I know you don't like OO,, but that's how we write our PHP. Since we're using OO programming to interface with an RDBMS, there is an "impedance mismatch". If we had an object/relational database, we could define the objects in the DB and query things much more naturally. So instead of

$db = new objDB( "db_server_1" );\n$sql = "SELECT \n  tbl_user.*,\n  tbl_office.addr1 AS office_addr1,\n  tbl_office.addr2 AS office_addr2,\n  tbl_office.city AS office_city,\n  tbl_office.state AS office_state,\n  tbl_office.zip AS office_zip,\n  tbl_office.phone AS office_phone,\n  tbl_office.fax AS office_fax\nFROM\n  db_user.tbl_user,\n  db_office.tbl_office\nWHERE\n  tbl_user.office_id = tbl_office.id\n  AND tbl_user.id = '$user_id'";\n$db->query( $sql )


we could use

$db = new objDB();\n$db->query( "GET user '$id'")


That's what I mean by "manually".
===
Microsoft offers them the one thing most business people will pay any price for - the ability to say "we had no choice - everyone's doing it that way." -- [link|http://z.iwethey.org/forums/render/content/show?contentid=38978|Andrew Grygus]
New inter-paradigm translation costs
Since we're using OO programming to interface with an RDBMS, there is an "impedance mismatch". If we had an object/relational database, we could define the objects in the DB and query things much more naturally.

Since you *don't* have an ORDB nor an OODB, perhaps it would make sense to stop trying. IOW, give up on OO so that you are not constantly battling paradigm translation/adaption issues. I suppose your response is that OO is so useful that the translation costs are still worth it. Is OO really that much more useful in your mind that you are willing to spend such translation/adapting costs to have OO? I won't fuss if you say, "yes", I just want to confirm if this is your reasoning for pursuing it despite an admitted translation tax.
________________
oop.ismad.com
New Yes
===
Microsoft offers them the one thing most business people will pay any price for - the ability to say "we had no choice - everyone's doing it that way." -- [link|http://z.iwethey.org/forums/render/content/show?contentid=38978|Andrew Grygus]
     Hm... sharpen yer virtual pencils - (tseliot) - (49)
         Gave my opinion a while back - (drewk) - (41)
             Shoot. Missed that whole conversation. - (tseliot) - (11)
                 My goal is to automate as much as possible then pass - (boxley) - (2)
                     Do you feel... - (tseliot) - (1)
                         2 of course - (boxley)
                 Don't know how to answer that - (drewk) - (7)
                     I was interested in the web part. -NT - (tseliot) - (6)
                         Well ... - (drewk) - (5)
                             Re: Well ... - (dshellman) - (4)
                                 I think we've leapfrogged the technology - (drewk) - (1)
                                     Agreed -NT - (dshellman)
                                 And this differs from any other pair of technologies..how? - (ben_tilly) - (1)
                                     Riding the waves - (dshellman)
             That would seem to indicate that... - (CRConrad) - (5)
                 What I mean - (drewk) - (4)
                     PHP database code? - (tablizer) - (3)
                         What I mean by "manually" - (drewk) - (2)
                             inter-paradigm translation costs - (tablizer) - (1)
                                 Yes -NT - (drewk)
             Another take - (wharris2) - (22)
                 That's a growing problem at technical schools - (tjsinclair) - (21)
                     Reminds me of first computer related course that I took... - (a6l6e6x)
                     Real Story - (jake123) - (19)
                         Don't I wish - (drewk) - (1)
                             Re: Don't I wish - (jake123)
                         Web Programming and OO? - (Simon_Jester) - (16)
                             Couple of answers - (drewk)
                             Javascript is like Python wrt OO - (admin) - (2)
                                 re: Javascript is like Python wrt OO - (tablizer) - (1)
                                     That wasn't my point. -NT - (admin)
                             Functional programming languages - (ChrisR)
                             Why OO techniques in web programming - (jake123) - (10)
                                 why does that need OO? - (tablizer) - (9)
                                     It doesn't. It just makes it a lot easier. - (jake123) - (8)
                                         Of course I don't believe you - (tablizer) - (7)
                                             Whatever you say, sunshine. -NT - (jake123) - (6)
                                                 I was hoping for a technical comparison, not flame-bait -NT - (tablizer) - (5)
                                                     Re: I was hoping for a technical comparison, not flame-bait - (jake123) - (4)
                                                         Start a new thread if you two get into it :-) - (admin) - (1)
                                                             Should we put it in the Flame Quarentine section? -NT - (tablizer)
                                                         just recursion there - (tablizer) - (1)
                                                             Recursion not the point; it's object references (new thread) - (jake123)
         Low-level programming - (Arkadiy) - (2)
             I don't quite agree. - (static) - (1)
                 I was trying to say the same thing. -NT - (Arkadiy)
         I don't personally believe in end user programming. - (tuberculosis) - (3)
             human factors bust automation goals - (tablizer) - (2)
                 Re: human factors bust automation goals - (wharris2) - (1)
                     re: Peer Kudos - (tablizer)

It’s merely anecdotal, but someone who can severely misconstrue the meaning of “Green Eggs and Ham” has no business being considered smart.
170 ms