independent and unofficial
Prince fan community
Welcome! Sign up or enter username and password to remember me
Forum jump
Forums > prince.org site discussion > Ben, a question about php???
« Previous topic  Next topic »
Page 1 of 2 12>
  New topic   Printable     (Log in to 'subscribe' to this topic)
Author

Tweet     Share

Message
Thread started 01/13/03 6:42am

thecloud9missi
on

avatar

Ben, a question about php???

Hi Ben,

Thanx for all the php tips. Im getting on quite well with it. Ive also started learning asp & have noticed they have similar functions. Which one is better??? Ive heard asp is more powerful
  - E-mail - orgNote - Report post to moderator
Reply #1 posted 01/13/03 9:24am

teller

avatar

thecloud9mission said:

Hi Ben,

Thanx for all the php tips. Im getting on quite well with it. Ive also started learning asp & have noticed they have similar functions. Which one is better??? Ive heard asp is more powerful

I've wondered this myself...also if MySQL is as fast as MSSQL...

I'm currently writing my own board in ASP/MSSQL...let's see how fast/slow it runs compared to the org...
Fear is the mind-killer.
  - E-mail - orgNote - Report post to moderator
Reply #2 posted 01/13/03 12:44pm

thecloud9missi
on

avatar

teller said:

thecloud9mission said:

Hi Ben,

Thanx for all the php tips. Im getting on quite well with it. Ive also started learning asp & have noticed they have similar functions. Which one is better??? Ive heard asp is more powerful

I've wondered this myself...also if MySQL is as fast as MSSQL...

I'm currently writing my own board in ASP/MSSQL...let's see how fast/slow it runs compared to the org...

MSSQL is news to me but I have heard that asp is more expensive to have installed than php which is free, so you must get something for your money?
  - E-mail - orgNote - Report post to moderator
Reply #3 posted 01/14/03 5:16am

teller

avatar

thecloud9mission said:

MSSQL is news to me but I have heard that asp is more expensive to have installed than php which is free, so you must get something for your money?
ASP is part of Windows NT/2000 server, no extra cost. However, NT server itself is rather expensive, and SQL-Server is likewise expensive. It remains to be seen whether the Microsoft way is really worth it...your Linux people will tell you "no" of course. I find it rather comfortable to program in myself...
Fear is the mind-killer.
  - E-mail - orgNote - Report post to moderator
Reply #4 posted 01/16/03 8:06am

thecloud9missi
on

avatar

If Prince.org is written in php, how comes non of the files have the php file extension
  - E-mail - orgNote - Report post to moderator
Reply #5 posted 01/16/03 1:51pm

teller

avatar

thecloud9mission said:

If Prince.org is written in php, how comes non of the files have the php file extension

Some boards generate a new static html page per thread each time someone posts--though I've always figured that way was too slow.

Ben?
Fear is the mind-killer.
  - E-mail - orgNote - Report post to moderator
Reply #6 posted 01/16/03 9:03pm

2the9s

confuse
  - E-mail - orgNote - Report post to moderator
Reply #7 posted 01/18/03 7:29am

teller

avatar

UPDATE: After playing with the org a little and watching the URL, it seems clear that while the request says ".html" it is definitely NOT static. It's some kind of illusion...

Ben?
Fear is the mind-killer.
  - E-mail - orgNote - Report post to moderator
Reply #8 posted 01/19/03 8:47am

thecloud9missi
on

avatar

Im curious now smile
  - E-mail - orgNote - Report post to moderator
Reply #9 posted 01/19/03 10:34am

teller

avatar

Technically, a server app can intercept any request and generate any response, even something with an html extension. But I wasn't aware that PHP was this low-level...in ASP, everything is automatically output as an .asp page...
Fear is the mind-killer.
  - E-mail - orgNote - Report post to moderator
Reply #10 posted 01/26/03 9:09am

thecloud9missi
on

avatar

Do PHP & ASP share the same features or is there somethings you can only do in ASP for example??
  - E-mail - orgNote - Report post to moderator
Reply #11 posted 01/26/03 11:05pm

Harlequin

avatar

2the9s said:

confuse


i feel the same way... HUH??? confuse duh


When all in life gets u down, dont look 2 your friends for help, look to the one that u know will help you.....Jim Beam.
  - E-mail - orgNote - Report post to moderator
Reply #12 posted 02/05/03 3:34pm

ben

Founder

avatar

moderator

Quick answers:

1. If you run apache webserver (as I do) you can make any file 'extension' run any interpreter/language. I never have them be ".php" just so it isn't so obvious. Besides, I used to have an editor that didn't like to open .php files, but did like .html extensions, soo...

2. The site pages are all dynamic php. However, lots of parts are "cached" to minimize database traffic.

3. I prefer PHP. ASP is dead (or will be). Microsoft wants everyone to move to ASP.NET (or any other .NET language). I think that stuff is totally fuckin' obtuse, and I don't want to pay for Win2K server licenses (big $$$). Besides, with the right opcode cache for PHP, I think PHP is faster than ASP. It's difficult to do apples-for-apples comparisons, however, especially because IIS "cheats"... parts of it run in the "kernel" on windows, which makes it a bit faster, but also less secure.

4. Mysql vs. MSSQL2K. Mysql is free, really damn fast, has the basic features you want in a database, and is easy to use. MS-SQL2K is expensive (for someone like me), pretty fast, but has TONS of cool features. Do you need those features (specifically, stored procedures, triggers, clustering, and OLAP stuff)? Most websites don't. However, people who are used to SPs and triggers love them. (If you really want that stuff, you can go with Postgres which has them, and is also free.)
MSSQL2K is the cheapest OLAP product on the market. If you don't know what OLAP is, though, you probably don't need it. And if you do, you probably will buy Oracle to run it on "real" computers like big Solaris boxes smile

There are slightly different approaches to building web apps when you DO have some of the features like stored procedures. Good or bad? Well, different. I know the ins and outs of mysql, how to tune it, etc. I think I can get more performance out of it than mssql, and pay a whole WHOLE lot less (that includes for the hardware to run it on).

5. Linux vs. Microsoft: Another holy war. I'll just say I run Windows where I think it belongs (on my desktop) and I use real OS's (unix and variants) for what they're good at (servers). This is the Neverending Debate, but if you can afford to pay for M$ licenses, actually know how to administrate it within the "available options" microsoft chooses to expose to you, and trust M$ to release non-detrimental, timely patches for security holes, and then you actually apply them, hey, great. That pretty (and useless on a server) GUI tends to attract the wrong type of sysadmins, in my experience.

And don't even get me started on the whole Smarty (and other template engines) vs. XML/XSLT smile [Suffice it to say that I think they are both Good Things if you ever want to redesign your site!]

Here's my advice...
-Want to get a job in Europe developing websites, and have no philosophical problem with being tied to Microsoft's whims you entire career? Learn ASP.NET and some other languages too (C# perhaps). Learn MSSQL server 2000.
-Want to just actually BUILD a site as fast as possible, and run it as cheaply as possible? Use PHP+Mysql.
-Want to get a job doing web stuff in the US, etc? Sort of depends, but Java J2EE is probably a good choice (for your career, not your sanity.)

One of the problems I have is that object-orientation has gone crazy. It's just not needed (to the extent it's proposed, anyhow) for most WEB apps. And yet you can't build anything non-OO in Java or .NET. And most software engineers, especially outside major metropolitan areas, don't know how to do OO design. And shittily-designed OO code is much worse than bad procedural code to maintain.

Anyhow, PHP is really popular among "hackers", and there's a ton of people coding in it, adding to it, free code, etc. etc. If you want a messageboard system to use on your site, or as a basis for your own, you can go download 20 different ones (and about 3 really GOOD ones) for FREE, right now, and get all the source code to learn from, modify, and adapt. I don't think that's the case for ASP.

If you don't care that much about that kind of thing, you might want to try out Zope with Python, or mod_perl, or... lots of other potentially more "elegant" web languages.

Personally, I know C, C++, Java, Perl and PHP well, and a half-dozen other languages enough to hack out code in them. When I write Perl these days I have to keep looking up stuff in the manual, so it's a little tiresome (and I always know there is a faster/shorter/better way to do any particular thing, which is personally annoying). In Java I always feel like I've written nicely designed, maintainable code when I'm done, but it takes a lot of typing to get something built. With C and C++, well, it takes a while and always has hard-to-track-down bugs (I don't do much in that anymore--just reading and fixing other people's code typically.)

I *enjoy* coding in PHP, and actually get WEB stuff accomplished faster than with anything else. Take that for what you will. (I'm going to learn Ruby next, though... looks like a fun language...)

Blah.
ben -- "the prince.org guy"
  - E-mail - orgNote - Report post to moderator
Reply #13 posted 02/06/03 3:03am

ian

ben said:


Here's my advice...
-Want to get a job in Europe developing websites, and have no philosophical problem with being tied to Microsoft's whims you entire career? Learn ASP.NET and some other languages too (C# perhaps). Learn MSSQL server 2000.
-Want to just actually BUILD a site as fast as possible, and run it as cheaply as possible? Use PHP+Mysql.
-Want to get a job doing web stuff in the US, etc? Sort of depends, but Java J2EE is probably a good choice (for your career, not your sanity.)


Actually Ben I'm not sure I agree with this ... I feel there are far more jobs in Europe nowadays for web developers that know Java - servlets, JSP, JDBC, XML, SOAP, and of course Enterprise Java Beans. There are fuck all jobs that require C# or .NET. I know quite a few guys who make a living out of knowing stuff like MySql, Php, Perl etc.

Then then there is the MS side of things - but small to medium sized enterprises just can't afford MSSQL.

For what it is worth though - although I'm no fan of MS technology, .NET is quite cool. I've messed around with Eiffell # and it was impressive!


One of the problems I have is that object-orientation has gone crazy. It's just not needed (to the extent it's proposed, anyhow) for most WEB apps. And yet you can't build anything non-OO in Java or .NET. And most software engineers, especially outside major metropolitan areas, don't know how to do OO design.


Disagree! Object oriented languages such as Java and C# are quite well suited for developing web apps. The same benefits of OOP in other areas of software engineering apply to web applications equally.

Admittedly it's usually still a bad idea to go for a "pure" EJB design - a lot of people avoid entity beans for the sake of performance and stick with fairly simple session beans and certainly in this case they could just as easily be using PHP or Perl. Worse still, some people embed business logic in the database tier using Oracle. Yuck! Anyway the EJB 2.0 patterns are great and hopefully people will use them more.

However Java skills are common, and cheap. There's lots of great documentation on it, tutorials, API spec. The community process is superb.

True though, there are lots of shit s/w engineers out there and badly designed software. I guess the answer is "hire good people" - thankfully there are a lot of them about and looking for work nowadays with all the layoffs recently.


If you don't care that much about that kind of thing, you might want to try out Zope with Python, or mod_perl, or... lots of other potentially more "elegant" web languages.


Perl is great, I like it a lot... it's even more "hacky" than PHP and the syntax will drive you bananas but at least there's loads of support and documentation online, and it is truly cross-platform. Zope is fun too, although I usually find I can do what I want to do far more easily and quickly with J2EE.

This all said, I'm not a web app guy like Ben. So take my opinions with a pinch of salt, it really isn't my area .

Ian
  - E-mail - orgNote - Report post to moderator
Reply #14 posted 02/06/03 5:50am

teller

avatar

Wow...thanks Ben! worship

It really seems difficult to measure performance from one platform to another a lot of times...but now I suspect that a lot of the org's speed may be a result of the Linux/Apache combination. Maybe I should switch someday...

For what it's worth, I was a Delphi developer for many years and let me tell you--compiling an ISAPI DLL using Delphi is quite possibly the most frustrating and horrible way to web-program imaginable. Borland and their gigantic cross-platform frameworks that go sprawling on for miles as they add wrapper on top of wrapper to stick everything together...yechhh...I've had it with those people. Never again! Well...maybe Delphi.NET...

When I switched over to ASP, programming became fun again. From the sounds of it, PHP would be fun too...I'll be the first to admit that vbscript is kinda goofy at times.

.NET...I've toyed with it, and it seems very sound; I'm considering switching. I loved the Delphi language and C# is the very same architect. I guess as a Microsoft person I have no choice. I'd love to hear any anecdotes about .NET to help push me over the edge. It's just that right now I can get just about anything done with classic ASP, no trouble at all, without any extra overhead.

It is my hope that MySQL will pressure Microsoft into lowering their prices. Too many of the better developers are following the low cost and high performance route that Ben has chosen; MS can't charge such outrageous prices forever, can they?!
Fear is the mind-killer.
  - E-mail - orgNote - Report post to moderator
Reply #15 posted 02/06/03 2:27pm

ben

Founder

avatar

moderator

Ian, you're probably right about your Java comments, at least where you are. In Spain they're a bit backward it seems.

Still, I won't dare develop anything in Java for the web unless I've got a huge budget for staff, tools, and time. Although I'll certainly admit there are times it is the Right Thing, especially in big enterprises. I wouldn't try to sell a bank a PHP solution... but then, I'd get the budget to do a huge EJB solution for sure, anyhow!
(And putting bizlogic in the DB layer--well, Oracle and all the DB vendors encourage it... why? lock you into their platform. And it IS faster... so it's tempting. I also think it's a shitty idea, in general.)

Ian, if you know web developers making bank in php+mysql etc, please tell my staff. They believe (especially in London etc.) that microsoft is the path to full employment. I don't know, in the US that is total bullshit, but I get the impression in Europe it's different. I hope opensource is taking off professionally here (Europe). Ian, if you can do stuff faster in J2EE than in perl typically, you are probably a better java coder than me smile (Of course I might be a better perl coder than you, too, ha!)

As far as .NET goes, I would absolutely build a windows app in it--only way to go would be C#. But I wouldn't build any small to medium size web apps *pure* OO unless I really had to. It just often isn't suited to it, I believe. (Oh yeah, we've been over this smile But .net is a great framework (read: libraries and virtual machine) for "on the desktop" apps. C# and the .net libraries are like Java, but uh, done properly smile

Teller, mysql will not pressure any db vendor to lower prices, sorry. I heard Monty form mysql even demonstrating this. I'm not sure if the argument holds 100% still, but a couple of years ago, Oracle made most of their money from consulting, not DB licenses. They could give the DB away and still be profitable (then, anyhow). If you need enterprise solutions, mysql ain't it. And MS-SQL is actually pretty cheap for small-to-medium sized businesses (we pay something like $1200/cpu/3years I think). That is not bad for the feature set. Of course I'd love to see mysql have all the features of mssql (think triggers, sp's, fantastic remote administration, cubes, FK integrity, and excellent xml support in the drivers and server), but that ain't gonna happen for a while. MSSQL has its place. I just feel if you really need a real DB, run it on a real platform... like Solaris or Linux on IBM, or...

Anyway, interesting conversation. This kind of stuff is more fun over beer though... typing is too much work!
ben -- "the prince.org guy"
  - E-mail - orgNote - Report post to moderator
Reply #16 posted 02/06/03 4:41pm

teller

avatar

Maybe we'll have that beer one day...there's much to discuss. I feel like I am a senior developer, with nearly 15 years experience and many projects under my belt, lots of wisdom about how to get things done (and released!), but only a few languages and only ever on Microsoft. So I'm really smart and really ignorant at the same time.
Fear is the mind-killer.
  - E-mail - orgNote - Report post to moderator
Reply #17 posted 02/06/03 5:08pm

ian

ben said:

Ian, you're probably right about your Java comments, at least where you are. In Spain they're a bit backward it seems.


Haha smile


Still, I won't dare develop anything in Java for the web unless I've got a huge budget for staff, tools, and time. Although I'll certainly admit there are times it is the Right Thing, especially in big enterprises. I wouldn't try to sell a bank a PHP solution... but then, I'd get the budget to do a huge EJB solution for sure, anyhow!
(And putting bizlogic in the DB layer--well, Oracle and all the DB vendors encourage it... why? lock you into their platform. And it IS faster... so it's tempting. I also think it's a shitty idea, in general.)


Agreed. I'm no fan of vendor lock-in... and it makes a mockery of the classic n-tier enterprise architecture. But as you say, it's quicker. I don't like it though.


Ian, if you know web developers making bank in php+mysql etc, please tell my staff. They believe (especially in London etc.) that microsoft is the path to full employment. I don't know, in the US that is total bullshit, but I get the impression in Europe it's different. I hope opensource is taking off professionally here (Europe).


Oh, it really is. There is a HUGE Linux community in Europe (that's where the OS comes from, after all) and the European distros such as SuSE and Mandrake put the American distros to shame. Several of my friends run small consultancy companies, basically specialising in open-source solutions such as you describe - PHP, Perl, MySQL all the way. I know other guys doing Linux stuff for set-top-boxes, internet kiosks, router hardware etc too.

The European Linux community organises "LBW" every year somewhere in Europe (Linux, Beer and Walking!) basically a social event. Last year my mate organised it in Ireland. If you are serious about open source stuff in Europe Ben, I'd recommend you make some contacts in some of the European Linux community user groups and lists etc. In Ireland we have a group called ILUG (Irish Linux User's Group and no doubt there are similar groups all around Europe.


Ian, if you can do stuff faster in J2EE than in perl typically, you are probably a better java coder than me smile (Of course I might be a better perl coder than you, too, ha!)


I'd agree with both of those things smile My Perl sucks nowadays, I've lost my Perl skills so no doubt you're much more effective with Perl than I am! However I probably am a better Java developer than most given that I am ex-Javasoft (Sun MS) myself and I've written VMs from the ground up, written implementions for different types of hardware etc.


As far as .NET goes, I would absolutely build a windows app in it--only way to go would be C#. But I wouldn't build any small to medium size web apps *pure* OO unless I really had to. It just often isn't suited to it, I believe. (Oh yeah, we've been over this smile But .net is a great framework (read: libraries and virtual machine) for "on the desktop" apps. C# and the .net libraries are like Java, but uh, done properly smile


Ah I dunno man, for me a big selling point of .NET and web services in general is the convenience of WSDL, UDDI and SOAP. Not perfect by any means, but very convenient. A company I used to work for has a product which exposes Corba and EJB systems as proper web services using XML/SOAP etc... so I'm probably just singing from the company songbook a bit.

This all said - if I was a professional web app contractor like some of my mates are, doing a solution for a small-medium sized enterprise, I probably would go with a simple Servlet-MySQL approach or a PHP(or Perl)-MySQL approach too.
Save the fancy pure OO solutions and EJB patterns for the expensive high-end solutions with big budgets smile


Anyway, interesting conversation. This kind of stuff is more fun over beer though... typing is too much work!


Agreed. No doubt when we meet up for that beer we'll talk tech for ages and bore the arse off everyone else in the place smile
  - E-mail - orgNote - Report post to moderator
Reply #18 posted 02/06/03 5:08pm

thecloud9missi
on

avatar

Cheers guys, reading this has been most helpful to me as I am just venturing out from boring old html, javascript & Perl into the new languages of php etc. One question though, what is C#???
  - E-mail - orgNote - Report post to moderator
Reply #19 posted 02/06/03 5:13pm

ian

thecloud9mission said:

Cheers guys, reading this has been most helpful to me as I am just venturing out from boring old html, javascript & Perl into the new languages of php etc. One question though, what is C#???


Microsoft's latest high-level programming language. It's like Java but with some of the shitty parts of C++ tacked on smile Ah it's not that bad. Anyway it's designed to fit with the Microsoft .NET architecture, so if you are into C# you can find out loads about it on the MS site. Or just pick up one of the million of books on the subject (e.g. from O'Reilly).

Other languages can develop .NET objects too, coz it all runs on a VM / VOS layer that forms the base of the .NET platform. So you can do Eiffel# (which I mentioned earlier - Eiffel is a lovely language indeed) and no doubt Cobol# and Microsoft bastardised J# and plenty of others.
  - E-mail - orgNote - Report post to moderator
Reply #20 posted 02/06/03 5:14pm

ian

thecloud9mission said:

Cheers guys, reading this has been most helpful to me as I am just venturing out from boring old html, javascript & Perl into the new languages of php etc. One question though, what is C#???


Hey Lewis you have a kickass website, we should be asking you the questions smile
  - E-mail - orgNote - Report post to moderator
Reply #21 posted 02/06/03 6:49pm

thecloud9missi
on

avatar

ian said:

thecloud9mission said:

Cheers guys, reading this has been most helpful to me as I am just venturing out from boring old html, javascript & Perl into the new languages of php etc. One question though, what is C#???


Hey Lewis you have a kickass website, we should be asking you the questions smile

Wow! Coming from an org staff member, thats a real compliment! smile Thankyou

I can make things that look ok like flash & graphics but its this stuff behind the scenes that I have trouble with. Ive only ventured as far as getting the contents of a MYSQL databse displayed on a page via php. Ive tried other tutorials & scripts but they never seem to work for me sad
[This message was edited Thu Feb 6 18:51:32 PST 2003 by thecloud9mission]
  - E-mail - orgNote - Report post to moderator
Reply #22 posted 02/12/03 6:28am

teller

avatar

ian said:

ben said:

One of the problems I have is that object-orientation has gone crazy. It's just not needed (to the extent it's proposed, anyhow) for most WEB apps. And yet you can't build anything non-OO in Java or .NET. And most software engineers, especially outside major metropolitan areas, don't know how to do OO design.


Disagree! Object oriented languages such as Java and C# are quite well suited for developing web apps. The same benefits of OOP in other areas of software engineering apply to web applications equally.

I'm doing maintenance on an old OO system I designed nearly 10 years ago, and it's fucking horrible. Torture! Admittedly, I designed it badly--it was one of my early forays into OO and I totally overused inheritance and polymorphism just because those features was there. I'm not nearly as foolish in my old age, but I would toss out a couple of observations:

1) OO is great for those functions that are likely to be re-used a whole lot or are likely to be extended a lot. Having OO frameworks such .NET where all the repetitive rubbish is well-encapsulated is nice.

2) But most of us are not designing application frameworks; we're designing applications. OO is often pointless and unnecessary for small-to-medium sized applications. Your code my live inside an OO framework, but to take all your data structures and make objects of them--there had better be a good reason for doing so. It slows things down, makes it hard to debug, and often make design unnecessarily complex.
Fear is the mind-killer.
  - E-mail - orgNote - Report post to moderator
Reply #23 posted 02/12/03 8:41am

ian

teller said:

ian said:

ben said:

One of the problems I have is that object-orientation has gone crazy. It's just not needed (to the extent it's proposed, anyhow) for most WEB apps. And yet you can't build anything non-OO in Java or .NET. And most software engineers, especially outside major metropolitan areas, don't know how to do OO design.


Disagree! Object oriented languages such as Java and C# are quite well suited for developing web apps. The same benefits of OOP in other areas of software engineering apply to web applications equally.

I'm doing maintenance on an old OO system I designed nearly 10 years ago, and it's fucking horrible. Torture! Admittedly, I designed it badly--it was one of my early forays into OO and I totally overused inheritance and polymorphism just because those features was there. I'm not nearly as foolish in my old age, but I would toss out a couple of observations:

1) OO is great for those functions that are likely to be re-used a whole lot or are likely to be extended a lot. Having OO frameworks such .NET where all the repetitive rubbish is well-encapsulated is nice.

2) But most of us are not designing application frameworks; we're designing applications. OO is often pointless and unnecessary for small-to-medium sized applications. Your code my live inside an OO framework, but to take all your data structures and make objects of them--there had better be a good reason for doing so. It slows things down, makes it hard to debug, and often make design unnecessarily complex.


Not at all. Object oriented programming exists for simple benefits such as data encapsulation, reusable code modules, and the fact that it is a natural way to design many systems. Some tasks suit functional programming better, but application development is perfectly catered for by OO design.

Most people who dismiss so casually OOP are people who either don't understand it, or use it badly.

OO systems are not by necessity "slower" that's a ludicrous thing to say. They are not more difficult to debug. Design is as complex as you make it.

The scope of OO goes far beyond simple apps running in an application framework such as EJB containers or .NET platform. If you don't get that, then you don't get OO.

Don't get me wrong - I'm an old-school assembly and pure C coder, bred on K&R style C in Unix. It tooks some time before I truly appreciated OO design. However it is very important not to confuse OO design with "inexperienced coders who try to cram in every pattern they've ever seen and make it all as elegantly OO as possible". OOP, like anything else, is only as good as the person doing it.

OOP != C++
OOP != bad design
OOP != using every pattern and language feature possible
OOP != enterprise app frameworks

Ian
  - E-mail - orgNote - Report post to moderator
Reply #24 posted 02/12/03 11:01am

teller

avatar

Maybe I'm just reacting to what I've seen as overuse of OO. It most certainly IS slower, however--flat procedural code by nature doesn't have the overhead of object method tables and related pointer-lookups. C++ code is almost universally slower than C code.

You're not of those people who insist that every int or char be an object, are you?
Fear is the mind-killer.
  - E-mail - orgNote - Report post to moderator
Reply #25 posted 02/12/03 1:05pm

ian

teller said:

Maybe I'm just reacting to what I've seen as overuse of OO. It most certainly IS slower, however--flat procedural code by nature doesn't have the overhead of object method tables and related pointer-lookups. C++ code is almost universally slower than C code.

You're not of those people who insist that every int or char be an object, are you?


I've never heard of a person like that, and I doubt they exist. You appear to be stigmatising a widely adopted programming paradigm because you misunderstand it.

OO is not slower by necessity - C++ code is not always slower than C code (the quality of C++ compilers nowadays is very high indeed) and even if that were true it means nothing with regard to the object oriented programming paradigm in general. Perhaps certain specific languages and implementations may perform slowly for certain tasks in comparison to functional counterparts, but that isn't something you can generalise on.

"Slower" is such a ridiculously vague term anyway, it means very little. Code developed with an object oriented language can be just as fast as functional programming.
Sorry Teller but your generalisations and assumptions are just plain wrong and sound like a knee-jerk reaction of someone who just hasn't used or learned OO properly and worked on substantial projects using an OO language.

Anyway such religious wars like that are pointless. Right tool for the job I say, and in todays software industry that is frequently (and usually) in an object oriented langauge.
  - E-mail - orgNote - Report post to moderator
Reply #26 posted 02/12/03 1:26pm

teller

avatar

ian said:

Anyway such religious wars like that are pointless. Right tool for the job I say, and in todays software industry that is frequently (and usually) in an object oriented langauge.

Agreed...

But knee-jerk reactions? Sheesh...you gonna tell me interpreted code is just as fast compiled code next?

.
[This message was edited Wed Feb 12 13:31:29 PST 2003 by teller]
Fear is the mind-killer.
  - E-mail - orgNote - Report post to moderator
Reply #27 posted 02/12/03 3:53pm

ian

teller said:

ian said:

Anyway such religious wars like that are pointless. Right tool for the job I say, and in todays software industry that is frequently (and usually) in an object oriented langauge.

Agreed...

But knee-jerk reactions? Sheesh...you gonna tell me interpreted code is just as fast compiled code next?

.
[This message was edited Wed Feb 12 13:31:29 PST 2003 by teller]


I didn't say that, did I? What has that got to do with anything? I didn't even mention interpreted code did I?

That said though, with some VM trickery I've had Java apps running within about 5% of the performance of native code which isn't bad at all.
  - E-mail - orgNote - Report post to moderator
Reply #28 posted 02/12/03 4:31pm

teller

avatar

ian said:

I didn't say that, did I? What has that got to do with anything? I didn't even mention interpreted code did I?

That said though, with some VM trickery I've had Java apps running within about 5% of the performance of native code which isn't bad at all.

What does WCMDA have to do with NTT Docomo?

Interpreted code is a layer of abstraction that slows things down the further away you get from the actual hardware. That's why assembly language is fastest of all, and that's why OO is slower than procedural--because the OO layer generalizes certain constructs whereas the procedural code can treat "OO" behavior as strictly optional--only putting such behavior where it needs to be. It's a valid generalization, IMO, and not at all religious.

Of course, if your inner loops are tight, all is well and everything flies fast.

Knee-jerk? Sheeesh...I'm an old man...my knee can no longer jerk! I can barely jerk off!
Fear is the mind-killer.
  - E-mail - orgNote - Report post to moderator
Reply #29 posted 02/12/03 6:13pm

ian

teller said:

ian said:

I didn't say that, did I? What has that got to do with anything? I didn't even mention interpreted code did I?

That said though, with some VM trickery I've had Java apps running within about 5% of the performance of native code which isn't bad at all.

What does WCMDA have to do with NTT Docomo?

Interpreted code is a layer of abstraction that slows things down the further away you get from the actual hardware. That's why assembly language is fastest of all, and that's why OO is slower than procedural--because the OO layer generalizes certain constructs whereas the procedural code can treat "OO" behavior as strictly optional--only putting such behavior where it needs to be. It's a valid generalization, IMO, and not at all religious.

Of course, if your inner loops are tight, all is well and everything flies fast.

Knee-jerk? Sheeesh...I'm an old man...my knee can no longer jerk! I can barely jerk off!


I know what interpreted code is Teller, I'm a bloody software engineer. I've designed super-optimised Java VM technology from the ground up, for dozens of microprocessors out there so I don't need a software engineering 101 masterclass from you, thanks very much.

However, you brought it up despite the fact that it has nothing to do with objected oriented design or object oriented programming. High level object oriented source code can produce extremely tight, low level machine code. Your analogy doesn't work, they are two different topics and two different issues.

There is no such thing as an "OO layer" and OO design does not mandate "generalised certain constructs" as you put it - not when the code is compiled. You are for some reason grouping OO design and OOP with interpreted code. The two issues have nothing to do with each other.

Will you ever admit, for once in your life, when you are out of your depth and talking about stuff you don't entirely understand? biggrin You may have a grasp of the basics, but if you haven't got a substantial amount of OO experience why not just try listening for once instead of trying to be an authority all the time? Sheesh. I'm not trying to put you down or anything, but you seem to have an issue with being afraid of appearing unknowledgeable or something.
  - E-mail - orgNote - Report post to moderator
Page 1 of 2 12>
  New topic   Printable     (Log in to 'subscribe' to this topic)
« Previous topic  Next topic »
Forums > prince.org site discussion > Ben, a question about php???