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 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 solution that runs SQL

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 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 PH

[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 a

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-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 func

[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 f

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) -> -> mysql.ph

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" 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, delete.php etc. These f

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

[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 f

Re: [PHP] OOP: __construct() and "extend"

2009-12-22 Thread Allen McCabe
Extended classes may have their own constructors which are implicitly called, and as Jonathan mentioned, the constructor of any ancestors (ie. the parent) must explicitly be called. If the child (extended) class does NOT have it's own constructor method defined, the parent's constructor is called.

Re: [PHP] OOP: __construct() and "extend"

2009-12-22 Thread Jonathan Tapicer
Hey, Constructors behave the same way as regular methods with inheritance, you have to manually call the parent constructor, ie: parent::__construct(). Regards, Jonathan On Tue, Dec 22, 2009 at 7:45 PM, APseudoUtopia wrote: > Hey list, > > I'm writing my own class which extends upon the Memcac

[PHP] OOP: __construct() and "extend"

2009-12-22 Thread APseudoUtopia
Hey list, I'm writing my own class which extends upon the Memcached class (php.net/memcached). I'm a bit confused as to how the constructor works when extending a class. class caching extends Memcached { function __construct() { echo "Caching Class Construct!"; } } For something like the above

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

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 > m

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 vari

[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 co

Re: [PHP] OOP Design Software

2009-07-26 Thread Daniel Kolbo
sage- > 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 obje

Re: [PHP] OOP Design Software

2009-07-26 Thread Eddie Drapkin
t; Caner. > > -Original 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

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 al

[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

[PHP] Re: PHP, OOP and AJAX

2009-06-08 Thread Julian Muscat Doublesin
One final update. The way one sets the path to required files is very important. I found it is best to use instead of relative paths. Regards Julian On Fri, Jun 5, 2009 at 2:19 PM, Julian Muscat Doublesin < opensourc...@gmail.com> wrote: > Update. > > Hello Everyone, > > First of all, thank yo

[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 represent

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

2009-05-28 Thread Nathan Nobbe
On Thu, May 28, 2009 at 2:42 PM, Eddie Drapkin wrote: > autoloading doesn't do anything but follow a set of logic rules to decide > what file to require, so it doesn't mess with opcode caches at all. umm.., right, but what do you think happens at the center of that logic ? require / include ca

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

2009-05-28 Thread Eddie Drapkin
autoloading doesn't do anything but follow a set of logic rules to decide what file to require, so it doesn't mess with opcode caches at all. On Thu, May 28, 2009 at 4:02 PM, Nathan Nobbe wrote: > On Thu, May 28, 2009 at 9:25 AM, Tony Marston < > t...@marston-home.demon.co.uk > > wrote: > > > > >

Re: [PHP] PHP, OOP and AJAX

2009-05-28 Thread Nathan Nobbe
On Thu, May 28, 2009 at 5:31 AM, Julian Muscat Doublesin < opensourc...@gmail.com> wrote: > 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 > r

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

2009-05-28 Thread Nathan Nobbe
On Thu, May 28, 2009 at 9:25 AM, Tony Marston wrote: > > "Eddie Drapkin" 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 sa

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 > > > 2009/5/28 kranthi > > > > > > > > > >

Re: [PHP] PHP, OOP and AJAX

2009-05-28 Thread Tom Worster
On 5/28/09 7:31 AM, "Julian Muscat Doublesin" 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 project using MySQL,

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

2009-05-28 Thread Tony Marston
"Eddie Drapkin" 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 writing that

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 have

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

2009-05-28 Thread Tony Marston
"Eddie Drapkin" 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 write readab

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

2009-05-28 Thread Eddie Drapkin
Your code might not, but you sure do! Spending all that time writing require statements = :( On Thu, May 28, 2009 at 9:49 AM, Tony Marston wrote: > > wrote in message > news:000e0cd6ad1a9f7d3d046af89...@google.com... > > Two things: > > > > 1. Try using the fully qualified path (ie /var/www/fo

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

2009-05-28 Thread Tony Marston
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, autoloading is a mu

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

2009-05-28 Thread Luke
2009/5/28 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 > > > 2009/5/28 kranthi > > > > > > > > > > > i recommend you firebug firefox

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 > 2009/5/28 kranthi > > > > > > > i recommend you firebug firefox adddon (just go to the net tab and you > > can see all

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

2009-05-28 Thread Lenin
2009/5/28 kranthi > > > 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 plain javascript

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 wrote: i never faced such a proble

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 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 working. i recommend you firebug

[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" escreveu na mensagem news:5e0039ed0905280431o2e9d8036u217b0449eccd...@mail.gmail.com..

[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 Object

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 wo

Re: [PHP] PHP OOP

2009-02-12 Thread Kyle Terry
gt; > > > 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. > > > &g

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

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 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. It seems fair enough

Re: [PHP] PHP OOP

2009-02-10 Thread Andrew Ballard
On Tue, Feb 10, 2009 at 8:40 AM, Carlos Medina 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. Having

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 wrote: > Marcus Gnaß schrieb: > >> Paul M Foster wrote: >> >>> On Mon, Feb 09, 2009

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 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 fo

[PHP] Re: PHP OOP

2009-02-10 Thread Ondrej Kulaty
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 > of the proliferation of web based applications. My personal opinion is > that's where all programming

Re: [PHP] PHP OOP

2009-02-09 Thread Larry Garfield
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 th

Re: [PHP] PHP OOP

2009-02-09 Thread Yannick Mortier
cific 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. 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

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 Eric Butera
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 of >> the proliferation of web based applications. My personal opinion is that's >> where al

Re: [PHP] PHP OOP

2009-02-09 Thread Paul M Foster
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. > > Wit

Re: [PHP] PHP OOP

2009-02-09 Thread Stuart
resting, 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. > &g

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 i

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 i

Re: [PHP] PHP OOP

2009-02-09 Thread Nathan Rixham
le 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 be

Re: [PHP] PHP OOP

2009-02-09 Thread Eric Butera
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 >> of the proliferation of web based applications. My personal opinion is >> that's where all programming

Re: [PHP] PHP OOP

2009-02-09 Thread Thodoris
re 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 to considering it

Re: [PHP] PHP OOP

2009-02-09 Thread Kyle Terry
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

[PHP] PHP OOP

2009-02-09 Thread tedd
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 to considering it

[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 the

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

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 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 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, 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 " http

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 " http://www.php.net/manual/en/

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 fi

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: http://w

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

[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 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 ha

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 ma

[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 not

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-ba

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 >> im

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

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 t

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 well-

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 c

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 ut

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

2006-10-13 Thread Stut
long run to just implement it myself - at least then I know exactly what it's doing and how, which makes it easier to fix and optimise later. 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

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

2006-10-13 Thread Stut
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 head tends to lead me to a decent design. What a coincidence

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

2006-10-13 Thread Tony Marston
up with one > place where it all happens, and you can choose how much of the internal > workings are exposed to the rest of the system. > > I'd also like to say that OOP itself is not hype. In the same way that > podcasts themselves are not hype. It's what surrounds stuff

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 such

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

2006-10-12 Thread Ed Lazor
that I'd probably aim for all classes to be good enough for public consumption, but I know that takes more time in development. Podcasting 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

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

2006-10-12 Thread Stut
hose years ago. They hype exists because of the cruddy media-driven world we now live in where everything has to be hyped up 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 n

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 >>

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 P

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 >

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

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, but

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 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 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 be

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

  1   2   3   4   >