[PHP] OOP to run sequential SQL queries?

2013-02-17 Thread AmirBehzad Eslami
Dear list, We have a bunch of SQL-queries, they should be executed in a sequential order, with a defensive programming style in mind. We were thinking to implement the solution as Stored Procedures instead of a PHP solution that runs SQL queries, but an article in Coding Horro recommendeds to

Re: [PHP] OOP to run sequential SQL queries?

2013-02-17 Thread Marco Behnke
Am 17.02.13 17:00, schrieb AmirBehzad Eslami: Dear list, We have a bunch of SQL-queries, they should be executed in a sequential order, with a defensive programming style in mind. I don't understand what you want? Queries are executed sequentially or do you plan to create a multi-process PHP

Re: [PHP] OOP to run sequential SQL queries?

2013-02-17 Thread Serge Fonville
Hi, We were thinking to implement the solution as Stored Procedures instead of a PHP solution that runs SQL queries, but an article in Coding Horro recommendeds to avoid SP for good reasons: The article shows only one thing. that common practice should be to 'do everything where it belongs'

Re: [PHP] OOP to run sequential SQL queries?

2013-02-17 Thread tamouse mailing lists
On Sun, Feb 17, 2013 at 10:00 AM, AmirBehzad Eslami behzad.esl...@gmail.com wrote: We have a bunch of SQL-queries, they should be executed in a sequential order, with a defensive programming style in mind. We were thinking to implement the solution as Stored Procedures instead of a PHP

[PHP] OOP problems

2011-12-15 Thread Dominik Halvoník
Hello, I would like to ask you for help. This days I am trying to build one of my applications. But I have problem which stopped me. I have folder whit php files like connect.php, delete.php etc. These files contains classes named the same as files. So in file connect.php is class Connect. These

Re: [PHP] OOP problems

2011-12-15 Thread Alex Pojarsky
I'm not sure I've understood you correctly, but you may try something like the following primitive autoloader (I didn't debug it, it's just an example): class Base { protected $_path = ''; public function construct($base_path) { $this-_path = $base_path; } public

Re: [PHP] OOP problems

2011-12-15 Thread Fatih P.
On 12/15/2011 01:05 PM, Alex Pojarsky wrote: I'm not sure I've understood you correctly, but you may try something like the following primitive autoloader (I didn't debug it, it's just an example): class Base { protected $_path = ''; public function construct($base_path) {

Re: [PHP] OOP problems

2011-12-11 Thread Dominik Halvoník
Hi guys, I try to applied your solutions but I have problems whit it. I need to achieve this schema( - is something like ../ it means that it is one level up folder): connec.php(class Connect MySql)- select.php(class Select MySql) - -

[PHP] OOP problems

2011-12-08 Thread Dominik Halvoník
Hello, I would like to ask you for help. This days I am trying to build one of my applications. But I have problem which stopped me. I have folder whit php files like connect.php, delete.php etc. These files contains classes named the same as files. So in file connect.php is class Connect. These

Re: [PHP] OOP problems

2011-12-08 Thread Stuart Dallas
On 8 Dec 2011, at 17:14, Dominik Halvoník wrote: I would like to ask you for help. This days I am trying to build one of my applications. But I have problem which stopped me. I have folder whit php files like connect.php, delete.php etc. These files contains classes named the same as files.

Re: [PHP] OOP problems

2011-12-08 Thread Mokaddim Akm
Sent from a handheld device On 08-Dec-2011, at 11:14 PM, Dominik Halvoník dominik.halvo...@gmail.com wrote: Hello, I would like to ask you for help. This days I am trying to build one of my applications. But I have problem which stopped me. I have folder whit php files like connect.php,

[PHP] OOP Design Question

2009-12-20 Thread Daniel Kolbo
Hello PHPers, I have a collection of about 60 objects (class definitions). They are all very similar. They all share a substantial % of the same core. But they all have slight variations as well. The approach I took was to make an abstract core class, and each of the 60 objects extends that

Re: [PHP] OOP Design Question

2009-12-20 Thread Robert Cummings
Set up autoloading: http://php.net/manual/en/language.oop5.autoload.php Cheers, Rob. Daniel Kolbo wrote: Hello PHPers, I have a collection of about 60 objects (class definitions). They are all very similar. They all share a substantial % of the same core. But they all have slight

Re: [PHP] OOP Design Question

2009-12-20 Thread Larry Garfield
On Sunday 20 December 2009 10:35:56 am Daniel Kolbo wrote: Hello PHPers, I have a collection of about 60 objects (class definitions). They are all very similar. They all share a substantial % of the same core. But they all have slight variations as well. The approach I took was to make

Re: [PHP] OOP Design Question

2009-12-20 Thread Larry Garfield
On Sunday 20 December 2009 1:08:46 pm you wrote: Maybe this would be the perfect opportunity for the php autoload functions...? Thanks for your help/thoughts/comments, dK ` Yep, this is a textbook case for a proper autoload setup. And no, cramming all of the functionality into

[PHP] OOP Design Software

2009-07-26 Thread Daniel Kolbo
Hello, Is there an objected oriented programming software that can help me keep track of my methods and properties of my objects. My memory is not what it used to be, and i'd like to have a quick 'overview' or layout of all the objects I have to work with. Maybe the software would even let make

RE: [PHP] OOP Design Software

2009-07-26 Thread Caner BULUT
19:46 To: PHP General Subject: [PHP] OOP Design Software Hello, Is there an objected oriented programming software that can help me keep track of my methods and properties of my objects. My memory is not what it used to be, and i'd like to have a quick 'overview' or layout of all the objects I

Re: [PHP] OOP Design Software

2009-07-26 Thread Eddie Drapkin
Message- From: Daniel Kolbo [mailto:kolb0...@umn.edu] Sent: 26 July 2009 19:46 To: PHP General Subject: [PHP] OOP Design Software Hello, Is there an objected oriented programming software that can help me keep track of my methods and properties of my objects.  My memory is not what

Re: [PHP] OOP Design Software

2009-07-26 Thread Daniel Kolbo
...@umn.edu] Sent: 26 July 2009 19:46 To: PHP General Subject: [PHP] OOP Design Software Hello, Is there an objected oriented programming software that can help me keep track of my methods and properties of my objects. My memory is not what it used to be, and i'd like to have a quick

[PHP] PHP, OOP and AJAX

2009-06-05 Thread Julian Muscat Doublesin
Update. Hello Everyone, First of all, thank you all for your input. I ran a sinmple test using the suggestions you gave me and and require_once. Using firebug to test the output, I got an internal server error. I found out what the problem was. What I am doing is I have classes which

[PHP] PHP, OOP and AJAX

2009-05-28 Thread Julian Muscat Doublesin
Hi Everyone, This is the first time that I am posting in the PHP forum, so hope that I am osting in the right place. I would like to say that before submitting to this forum I have done some research looking for a solution without success. I had been programming in ASP.NET for years using

[PHP] Re: PHP, OOP and AJAX

2009-05-28 Thread Jo�o C�ndido de Souza Neto
Julian, could you please show us an example of this problem? -- João Cândido de Souza Neto SIENS SOLUÇÕES EM GESTÃO DE NEGÓCIOS Fone: (0XX41) 3033-3636 - JS www.siens.com.br Julian Muscat Doublesin opensourc...@gmail.com escreveu na mensagem

Re: [PHP] Re: PHP, OOP and AJAX

2009-05-28 Thread kranthi
i never faced such a problem and i can assure you that it will never happen. try... main.php ?php require('second.php'); ? second.php test call main.php via AJAX and see the responseText. many things can go wrong in your coding. dont come to the conclusion that this particular thing is not

Re: Re: [PHP] Re: PHP, OOP and AJAX

2009-05-28 Thread oorza2k5
Two things: 1. Try using the fully qualified path (ie /var/www/foo/bar.php instead of foo/bar.php) 2. Look at setting up autoloading so you don't need to manually include anyway. If you're going OOP, autoloading is a must! On May 28, 2009 8:49am, kranthi kranthi...@gmail.com wrote: i

Re: [PHP] Re: PHP, OOP and AJAX

2009-05-28 Thread Lenin
2009/5/28 kranthi kranthi...@gmail.com i recommend you firebug firefox adddon (just go to the net tab and you can see all the details of the communication between client and server) and i find it helpful to use a standard javascript(jQuery in my case) library instead of highly limited

Re: [PHP] Re: PHP, OOP and AJAX

2009-05-28 Thread Olexandr Heneralov
Hi! Do not use low-level AJAX. There are many frameworks for ajax (JQUERY). Try to use PHP frameworks like symfony, zend framework. They simplify your work. 2009/5/28 Lenin le...@phpxperts.net 2009/5/28 kranthi kranthi...@gmail.com i recommend you firebug firefox adddon (just go to the

Re: [PHP] Re: PHP, OOP and AJAX

2009-05-28 Thread Luke
2009/5/28 Olexandr Heneralov ohenera...@gmail.com Hi! Do not use low-level AJAX. There are many frameworks for ajax (JQUERY). Try to use PHP frameworks like symfony, zend framework. They simplify your work. 2009/5/28 Lenin le...@phpxperts.net 2009/5/28 kranthi kranthi...@gmail.com

Re: Re: [PHP] Re: PHP, OOP and AJAX

2009-05-28 Thread Tony Marston
oorza...@gmail.com wrote in message news:000e0cd6ad1a9f7d3d046af89...@google.com... Two things: 1. Try using the fully qualified path (ie /var/www/foo/bar.php instead of foo/bar.php) 2. Look at setting up autoloading so you don't need to manually include anyway. If you're going OOP,

Re: Re: [PHP] Re: PHP, OOP and AJAX

2009-05-28 Thread Tony Marston
Eddie Drapkin oorza...@gmail.com wrote in message news:68de37340905280737t3e1ad844y188ab8fa08f17...@mail.gmail.com... Your code might not, but you sure do! Spending all that time writing require statements = :( If you are too lazy to write require statements then you are probably too lazy to

Re: Re: [PHP] Re: PHP, OOP and AJAX

2009-05-28 Thread Eddie Drapkin
There's a huge difference between laziness and opting in to use an incredibly useful (and easy to properly deploy) feature to save myself time so that I can spend more time writing that structured and efficient code of which you speak. And the problem with what you're saying is that you still

Re: Re: [PHP] Re: PHP, OOP and AJAX

2009-05-28 Thread Tony Marston
Eddie Drapkin oorza...@gmail.com wrote in message news:68de37340905280801m6964d355l2d6d8ef773f3b...@mail.gmail.com... There's a huge difference between laziness and opting in to use an incredibly useful (and easy to properly deploy) feature to save myself time so that I can spend more time

Re: [PHP] PHP, OOP and AJAX

2009-05-28 Thread Tom Worster
On 5/28/09 7:31 AM, Julian Muscat Doublesin opensourc...@gmail.com wrote: I had been programming in ASP.NET for years using Object Oriented Princeliness but decided to walk away from that. I am now researching and specialising in the open source world. yay! I have started to develop a

Re: [PHP] Re: PHP, OOP and AJAX

2009-05-28 Thread Ashley Sheridan
On Thu, 2009-05-28 at 16:17 +0300, Olexandr Heneralov wrote: Hi! Do not use low-level AJAX. There are many frameworks for ajax (JQUERY). Try to use PHP frameworks like symfony, zend framework. They simplify your work. 2009/5/28 Lenin le...@phpxperts.net 2009/5/28 kranthi

Re: [PHP] PHP OOP

2009-02-12 Thread Kyle Terry
_hate_ java... However, while I don't know PHP OOP, I am open to considering it because of the proliferation of web based applications. My personal opinion is that's where all programming is headed anyway, but that's just my opinion. With that said, what's the differences and advantages

Re: [PHP] PHP OOP

2009-02-12 Thread Virgilio Quilario
Java is really awesome at OOP and it is great for teaching OOP or, shall we say illustrating OOP. OOP is a programming technique in general without any bias towards any programming language. Good background on OOP concepts is essential in learning language specific OOP implementation. So don't

[PHP] Re: PHP OOP

2009-02-10 Thread Ondrej Kulaty
, and popular OOP language. However, while I don't know PHP OOP, I am open to considering it because of the proliferation of web based applications. My personal opinion is that's where all programming is headed anyway, but that's just my opinion. With that said, what's the differences

Re: [PHP] PHP OOP

2009-02-10 Thread Marcus Gnaß
Paul M Foster wrote: On Mon, Feb 09, 2009 at 11:02:37AM -0500, tedd wrote: As a side note, I think students should learn a language like C before learning something like Perl, Python or PHP. Having to deal with defining/declaring variables and their storage methods before use I think makes

Re: [PHP] PHP OOP

2009-02-10 Thread Carlos Medina
Marcus Gnaß schrieb: Paul M Foster wrote: On Mon, Feb 09, 2009 at 11:02:37AM -0500, tedd wrote: As a side note, I think students should learn a language like C before learning something like Perl, Python or PHP. Having to deal with defining/declaring variables and their storage methods before

Re: [PHP] PHP OOP

2009-02-10 Thread Byron
Where I study, Intro to OOP is taught in C# using Visual Studio 2003 and further OOP concepts are taught in Java, with the academic computer science of OOP alongside. On Wed, Feb 11, 2009 at 2:40 AM, Carlos Medina i...@simply-networks.dewrote: Marcus Gnaß schrieb: Paul M Foster wrote: On

Re: [PHP] PHP OOP

2009-02-10 Thread Andrew Ballard
On Tue, Feb 10, 2009 at 8:40 AM, Carlos Medina i...@simply-networks.de wrote: Marcus Gnaß schrieb: Paul M Foster wrote: On Mon, Feb 09, 2009 at 11:02:37AM -0500, tedd wrote: As a side note, I think students should learn a language like C before learning something like Perl, Python or PHP.

Re: [PHP] PHP OOP

2009-02-10 Thread tedd
At 9:36 AM -0500 2/10/09, Andrew Ballard wrote: On Tue, Feb 10, 2009 at 8:40 AM, Carlos Medina i...@simply-networks.de wrote: Marcus Gnaß schrieb: Hi @ all, but this is a php list... Regards Carlos Yes, it is, but the original question was about OOP and not specifically about PHP.

Re: [PHP] PHP OOP

2009-02-10 Thread German Geek
A loosely typed language like PHP might not be the best choice for teaching OOP, because even though PHP makes it easier with loose types, you should know about them and how they are stored etc. PHP is a great language but maybe not strict enough for students to understand all the errors that can

[PHP] PHP OOP

2009-02-09 Thread tedd
to understand how they work -- thus I think a specific language is required I lean toward C++ because I wrote in it for a few years AND C++ appears to be the most common, widespread, and popular OOP language. However, while I don't know PHP OOP, I am open to considering it because

Re: [PHP] PHP OOP

2009-02-09 Thread Kyle Terry
know PHP OOP, I am open to considering it because of the proliferation of web based applications. My personal opinion is that's where all programming is headed anyway, but that's just my opinion. With that said, what's the differences and advantages/disadvantages between C++ and PHP OOP

Re: [PHP] PHP OOP

2009-02-09 Thread Thodoris
to understand how they work -- thus I think a specific language is required I lean toward C++ because I wrote in it for a few years AND C++ appears to be the most common, widespread, and popular OOP language. However, while I don't know PHP OOP, I am open to considering it because

Re: [PHP] PHP OOP

2009-02-09 Thread Eric Butera
don't know PHP OOP, I am open to considering it because of the proliferation of web based applications. My personal opinion is that's where all programming is headed anyway, but that's just my opinion. With that said, what's the differences and advantages/disadvantages between C++ and PHP OOP

Re: [PHP] PHP OOP

2009-02-09 Thread Nathan Rixham
, while I don't know PHP OOP, I am open to considering it because of the proliferation of web based applications. My personal opinion is that's where all programming is headed anyway, but that's just my opinion. With that said, what's the differences and advantages/disadvantages between C++ and PHP

Re: [PHP] PHP OOP

2009-02-09 Thread Per Jessen
tedd wrote: I lean toward C++ because I wrote in it for a few years AND C++ appears to be the most common, widespread, and popular OOP language. I would agree, although I suspect Java is also a good candidate. However, while I don't know PHP OOP, I am open to considering it because

Re: [PHP] PHP OOP

2009-02-09 Thread Per Jessen
tedd wrote: I lean toward C++ because I wrote in it for a few years AND C++ appears to be the most common, widespread, and popular OOP language. I would agree, although I suspect Java is also a good candidate. However, while I don't know PHP OOP, I am open to considering it because

Re: [PHP] PHP OOP

2009-02-09 Thread Stuart
to see how concepts are applied to understand how they work -- thus I think a specific language is required I lean toward C++ because I wrote in it for a few years AND C++ appears to be the most common, widespread, and popular OOP language. However, while I don't know PHP OOP, I am open

Re: [PHP] PHP OOP

2009-02-09 Thread Paul M Foster
OOP, I am open to considering it because of the proliferation of web based applications. My personal opinion is that's where all programming is headed anyway, but that's just my opinion. With that said, what's the differences and advantages/disadvantages between C++ and PHP OOP? I don't know

Re: [PHP] PHP OOP

2009-02-09 Thread Eric Butera
language. However, while I don't know PHP OOP, I am open to considering it because of the proliferation of web based applications. My personal opinion is that's where all programming is headed anyway, but that's just my opinion. With that said, what's the differences and advantages

Re: [PHP] PHP OOP

2009-02-09 Thread Per Jessen
Paul M Foster wrote: PHP is *not* a good example for OO. There are a lot of OO principles it doesn't follow. I would have suggested Smalltalk, the original OO language, except that no one uses it any more, and other languages don't necessarily fully implement OO as done in Smalltalk.

Re: [PHP] PHP OOP

2009-02-09 Thread Yannick Mortier
lean toward C++ because I wrote in it for a few years AND C++ appears to be the most common, widespread, and popular OOP language. Yes C++ is not bad for this, but it has also got some flaws. However, while I don't know PHP OOP, I am open to considering it because of the proliferation of web

Re: [PHP] PHP OOP

2009-02-09 Thread Larry Garfield
are interesting, people need to see how concepts are applied to understand how they work -- thus I think a specific language is required I lean toward C++ because I wrote in it for a few years AND C++ appears to be the most common, widespread, and popular OOP language. However, while I don't know PHP OOP

[PHP] OOP - Calling methods from classes that are inheriting?

2008-09-21 Thread Ben Stones
Hi, How do I call methods from classes that are inherited? I want to add a mysql_num_rows() function to a second class that is an addon to a MySQL query in the first class. The first class will be used in several different classes for different parts of the site so I don't want to directly add

[PHP] OOP in PHP

2007-08-15 Thread Patrik Hasibuan
Dear my friends, This is the first time for me to use OOP concept of PHP. I wrote still a very simple codes but it doesn't work as my manual book taught. the book titled MySQL/PHP Database Application by Jay Greenspan say these lines should work but in fact it don't work as expected. Here is

Re: [PHP] OOP in PHP

2007-08-15 Thread Nathan Nobbe
what sort of error are you encountering ? -nathan On 8/15/07, Patrik Hasibuan [EMAIL PROTECTED] wrote: Dear my friends, This is the first time for me to use OOP concept of PHP. I wrote still a very simple codes but it doesn't work as my manual book taught. the book titled MySQL/PHP

Re: [PHP] OOP in PHP

2007-08-15 Thread Robert . Degen
Theoritically if Class koneksi is being initialized than it prints koneksi berhasil (connection succeeded) but it doesn't. What does it? Just nothing? No warnings at all? Possibly disabled? so far rob -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] OOP in PHP

2007-08-15 Thread Jim Lucas
A few missing pieces in your code. Take a look below within your class. I corrected it. try also using include_once instead of require and make sure that your error level and reporting are turned on so you can see what is happening. Patrik Hasibuan wrote: Dear my friends, This is the

Re: [PHP] OOP in PHP

2007-08-15 Thread Patrik Hasibuan
Dear Jim, You've solved my problem, Jim. Thank you very much. Now, my code give the output as my expectation: superclass koneksi dipanggil koneksi berhasil negara- . But come another problem, namely: the $negara is empty. I tried to read the documentation on

Re: [PHP] OOP in PHP

2007-08-15 Thread Jim Lucas
Patrik Hasibuan wrote: Dear Jim, You've solved my problem, Jim. Thank you very much. Now, my code give the output as my expectation: superclass koneksi dipanggil koneksi berhasil negara- . But come another problem, namely: the $negara is empty. I tried to read the documentation on

Re: [PHP] OOP in PHP

2007-08-15 Thread Patrik Hasibuan
Dear Jim, thanks for your help. I've modified my codes as you adviced. But than the output is: superclass koneksi dipanggil koneksi berhasil No results found The column 'country' of table 'countries' already really contents complete all contry name from all over the earth. How come the query

Re: [PHP] OOP in PHP

2007-08-15 Thread Jim Lucas
Patrik Hasibuan wrote: Dear Jim, thanks for your help. I've modified my codes as you adviced. But than the output is: superclass koneksi dipanggil koneksi berhasil No results found The column 'country' of table 'countries' already really contents complete all contry name from all over the

Re: [PHP] OOP in PHP

2007-08-15 Thread Jim Lucas
Jim Lucas wrote: Patrik Hasibuan wrote: Dear Jim, thanks for your help. I've modified my codes as you adviced. But than the output is: superclass koneksi dipanggil koneksi berhasil No results found The column 'country' of table 'countries' already really contents complete all contry name

Re: [PHP] OOP in PHP

2007-08-15 Thread Patrik Hasibuan
Dear my friend, Jim Lucas. Thank you very much for your help. You've solved my problem one more time. I really appreciate your help. === On Wed, 15 Aug 2007 14:17:02 -0700 Jim Lucas [EMAIL PROTECTED] wrote: Jim Lucas wrote: Patrik Hasibuan wrote: Dear Jim, thanks for your help. I've

Re: [PHP] OOP slow -- am I an idiot?

2006-11-08 Thread Stut
Stut wrote: This is a question of design, not a question of whether to use OOP. For example, in several of the sites I maintain I have classes that inherit from a base class called Table. The base class provides a lot of the basic methods for working on a table (think ActiveRecord). It also

Re: [PHP] Solution: [PHP] OOP slow -- am I an idiot?

2006-10-16 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-10-15 13:59:39 -0700: As I cannot think of a class-based way to build my report, I think I'll use a customer class everywhere BUT in the report. Inside the report I'll just use one SQL statement instead of dozens of instances and hundreds of queries. I'll make a

[PHP] Solution: [PHP] OOP slow -- am I an idiot?

2006-10-15 Thread Chris de Vidal
As I cannot think of a class-based way to build my report, I think I'll use a customer class everywhere BUT in the report. Inside the report I'll just use one SQL statement instead of dozens of instances and hundreds of queries. I'll make a note inside the class that this and that method is

Re: [PHP] OOP slow -- am I an idiot?

2006-10-14 Thread Tony Marston
Stut [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Tony Marston wrote: Stut [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] My general approach to designing a system is data-centric. I tend to start by defining the database schema since getting that clear in my

Re: [PHP] OOP slow -- am I an idiot?

2006-10-14 Thread Tony Marston
Stut [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] Ed Lazor wrote: On Oct 12, 2006, at 4:36 PM, Stut wrote: If I then go on to create an admin interface for the users, I would create another completely separate class called UserCollection to handle more than one user. I may at

Re: [PHP] OOP slow -- am I an idiot?

2006-10-14 Thread Tony Marston
Ed Lazor [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Oct 13, 2006, at 1:35 AM, Tony Marston wrote: What a coincidence! That's exactly my approach, but I've taken it one step further. I always start with a properly normalised database which I can then import into my

Re: [PHP] OOP slow -- am I an idiot?

2006-10-14 Thread Tony Marston
Ed Lazor [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Oct 13, 2006, at 1:54 AM, Stut wrote: Youch!! Your implementation seems to be focused on development efficiency rather than runtime efficience. In all but rare research projects this is backwards for a web-based system.

Re: [PHP] OOP slow -- am I an idiot?

2006-10-13 Thread Stut
Please include the list when replying to that others may benefit (or suffer) from the discussion. Bruce Cowin wrote: I like your static user class. Does the user instance then get saved to a session variable that is serialized/unserialized on every page? There is no user instance as

Re: [PHP] OOP slow -- am I an idiot?

2006-10-13 Thread Stut
to PHP... OOP is a stable, mature methodology. However, OOP in PHP is fairly new (if you ignore PHP4's pitiful efforts) and there's still a lot of unease about this new kid on the block, along with a lot of hype around the idea that it will launch PHP into being a real programming language instead

Re: [PHP] OOP slow -- am I an idiot?

2006-10-13 Thread John Wells
On 10/13/06, Stut [EMAIL PROTECTED] wrote: Ed Lazor wrote: ...Or is it something else entirely; I dunno, maybe UserCollection has a property defined as an array of User class? I think that's what people were saying earlier in the thread as being a very bad thing in terms of memory

Re: [PHP] OOP slow -- am I an idiot?

2006-10-13 Thread Ed Lazor
On Oct 13, 2006, at 1:35 AM, Tony Marston wrote: What a coincidence! That's exactly my approach, but I've taken it one step further. I always start with a properly normalised database which I can then import into my daa dictionary application. From there I can press a button and create a

Re: [PHP] OOP slow -- am I an idiot?

2006-10-13 Thread Ed Lazor
On Oct 13, 2006, at 1:54 AM, Stut wrote: Youch!! Your implementation seems to be focused on development efficiency rather than runtime efficience. In all but rare research projects this is backwards for a web-based system. This is exactly the practice I am trying to discourage. It's a

Re: [PHP] OOP slow -- am I an idiot?

2006-10-12 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-10-12 06:49:22 +0100: Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2006-10-11 21:28:36 +0100: Richard Lynch wrote: This is a classic example of the obvious OOP solution being wildly inappropriate. Ok, so I now find myself in the unusual position of disagreeing with

Re: [PHP] OOP slow -- am I an idiot?

2006-10-12 Thread Tony Marston
Roman Neuhauser [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] # [EMAIL PROTECTED] / 2006-10-11 21:28:36 +0100: Richard Lynch wrote: On Tue, October 10, 2006 6:14 pm, Chris de Vidal wrote: I want to create a customer class which fetches its attributes from a MySQL database. No,

Re: [PHP] OOP slow -- am I an idiot?

2006-10-12 Thread Chris de Vidal
By the way, about myself. I'm primarily a system administrator. Most of the time I USE code, NOT write it. But I also dabble, and right now we need to improve our old custom PHP revenue application which has sat stagnant for a few years. We can't afford a full-time programmer and I know

Re: [PHP] OOP slow -- am I an idiot?

2006-10-12 Thread Richard Lynch
On Wed, October 11, 2006 3:28 pm, Stut wrote: Richard Lynch wrote: On Tue, October 10, 2006 6:14 pm, Chris de Vidal wrote: I want to create a customer class which fetches its attributes from a MySQL database. No, you don't. :-) This is a classic example of the obvious OOP solution being

Re: [PHP] OOP slow -- am I an idiot?

2006-10-12 Thread Richard Lynch
On Thu, October 12, 2006 12:49 am, Stut wrote: Roman Neuhauser wrote: # [EMAIL PROTECTED] / 2006-10-11 21:28:36 +0100: Richard Lynch wrote: On Tue, October 10, 2006 6:14 pm, Chris de Vidal wrote: I want to create a customer class which fetches its attributes from a MySQL database. No, you

Re: [PHP] OOP slow -- am I an idiot?

2006-10-12 Thread Richard Lynch
On Thu, October 12, 2006 3:11 am, Tony Marston wrote: I have to disagree as well. There is absolutely nothing wrong which the approach of creating one class for each table in the database. It cannot be wrong for the simple reason THAT IT WORKS! Only problem is that then you often end up

Re: [PHP] OOP slow -- am I an idiot?

2006-10-12 Thread Richard Lynch
On Thu, October 12, 2006 8:24 am, Chris de Vidal wrote: [use the archives] I can't architect a good OOP solution to a problem that hasn't been fully defined, any more than one can architect a house without knowing all the rooms that are needed... I agree that all the code samples you provided

Re: [PHP] OOP slow -- am I an idiot?

2006-10-12 Thread Ed Lazor
On Oct 12, 2006, at 10:18 AM, Richard Lynch wrote: I can't architect a good OOP solution to a problem that hasn't been fully defined, any more than one can architect a house without knowing all the rooms that are needed... Sorry to jump into the middle of the conversation, but I thought this

Re: [PHP] OOP slow -- am I an idiot?

2006-10-12 Thread Stut
Richard Lynch wrote: I *still* don't see OOP as a Right Answer for spitting out HTML web pages in optimized minimalist time frames... Maybe my brain just got warped by all that AI/Lisp work I did for a couple decades, but it feels to me like a bad selection of weapons for the task at hand, most

Re: [PHP] OOP slow -- am I an idiot?

2006-10-12 Thread Stut
Ed Lazor wrote: On Oct 12, 2006, at 10:18 AM, Richard Lynch wrote: I can't architect a good OOP solution to a problem that hasn't been fully defined, any more than one can architect a house without knowing all the rooms that are needed... Sorry to jump into the middle of the conversation,

Re: [PHP] OOP slow -- am I an idiot?

2006-10-12 Thread Richard Lynch
On Thu, October 12, 2006 1:03 pm, Ed Lazor wrote: On Oct 12, 2006, at 10:18 AM, Richard Lynch wrote: I can't architect a good OOP solution to a problem that hasn't been fully defined, any more than one can architect a house without knowing all the rooms that are needed... Sorry to jump into

Re: [PHP] OOP slow -- am I an idiot?

2006-10-12 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-10-12 16:29:09 -0500: On Thu, October 12, 2006 1:03 pm, Ed Lazor wrote: On Oct 12, 2006, at 10:18 AM, Richard Lynch wrote: I can't architect a good OOP solution to a problem that hasn't been fully defined, any more than one can architect a house without knowing

Re: [PHP] OOP slow -- am I an idiot?

2006-10-12 Thread Ed Lazor
Comments / Questions below. On Oct 12, 2006, at 12:15 PM, Stut wrote: Except that is the attitude that leads to painful OOP in PHP. PHP is not the same environment as C++. The environment (classes, objects, etc) needs to be created and destroyed with each request. I definitely agree that

Re: [PHP] OOP slow -- am I an idiot?

2006-10-12 Thread Tony Marston
Richard Lynch [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] On Thu, October 12, 2006 3:11 am, Tony Marston wrote: I have to disagree as well. There is absolutely nothing wrong which the approach of creating one class for each table in the database. It cannot be wrong for the

Re: [PHP] OOP slow -- am I an idiot?

2006-10-12 Thread Stut
if it's going to be popular, even if it's short-lived. To relate that twoddle to PHP... OOP is a stable, mature methodology. However, OOP in PHP is fairly new (if you ignore PHP4's pitiful efforts) and there's still a lot of unease about this new kid on the block, along with a lot of hype

Re: [PHP] OOP slow -- am I an idiot?

2006-10-12 Thread Ed Lazor
is the next stage of audio and video entertainment in the same way that colour TV was all those years ago. *cough* AskNinja.com RULES! hehe *cough* To relate that twoddle to PHP... OOP is a stable, mature methodology. However, OOP in PHP is fairly new (if you ignore PHP4's pitiful efforts

Re: [PHP] OOP slow -- am I an idiot?

2006-10-11 Thread Chris de Vidal
--- Johan Martin [EMAIL PROTECTED] wrote: You should look into getting Professional PHP5 by Lecky-Thompson, Eide-Goodman, Nowicki and Cove from WROX. ... The collection class in chapter 5 discusses a programming problem just like yours. I will look into that, thank you. CD Think

Re: [PHP] OOP slow -- am I an idiot?

2006-10-11 Thread Chris de Vidal
--- Larry Garfield [EMAIL PROTECTED] wrote: For your rudimentary example of object-relational mapping below, yes, performance is going to be atrocious. That's because you're not taking any advantage of the features that using OOP gives you. Well, I /thought/ I was taking advantage of black

Re: [PHP] OOP slow -- am I an idiot?

2006-10-11 Thread Satyam
- Original Message - From: Chris de Vidal [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Wednesday, October 11, 2006 12:42 PM Subject: Re: [PHP] OOP slow -- am I an idiot? --- Johan Martin [EMAIL PROTECTED] wrote: You should look into getting Professional PHP5 by Lecky

Re: [PHP] OOP slow -- am I an idiot?

2006-10-11 Thread Richard Lynch
On Tue, October 10, 2006 6:14 pm, Chris de Vidal wrote: I want to create a customer class which fetches its attributes from a MySQL database. No, you don't. :-) This is a classic example of the obvious OOP solution being wildly inappropriate. The sad thing is, there are a zillion applications

Re: [PHP] OOP slow -- am I an idiot?

2006-10-11 Thread Stut
Richard Lynch wrote: On Tue, October 10, 2006 6:14 pm, Chris de Vidal wrote: I want to create a customer class which fetches its attributes from a MySQL database. No, you don't. :-) This is a classic example of the obvious OOP solution being wildly inappropriate. Ok, so I now find myself

Re: [PHP] OOP slow -- am I an idiot?

2006-10-11 Thread Roman Neuhauser
# [EMAIL PROTECTED] / 2006-10-11 21:28:36 +0100: Richard Lynch wrote: On Tue, October 10, 2006 6:14 pm, Chris de Vidal wrote: I want to create a customer class which fetches its attributes from a MySQL database. No, you don't. :-) This is a classic example of the obvious OOP solution

  1   2   3   4   >