Skip to main content
deleted 10 characters in body
Source Link
Jamal
  • 34.9k
  • 13
  • 133
  • 237

theThe following is my code and I hope anyone who has been doing PHP can help to review or comment for any improvements or weaknesses on my code.

I want to develop my style of code in which copy-and paste is minimum and functionality expandability is rich. for eg :For example, the execute()execute() function in UserDBthe UserDB class..basically is basically the same function and can be used widespread in many diff db class, so do. Do I need to copy and paste the code again or should I just moved this piece of code to abstract class  ?

next is the UserFactory classUserFactory class

next is my UserDB classUserDB class

Next is my Database abstract class.Database abstract class

Last is my User object classUser object class

the following is my code and I hope anyone who has been doing PHP can help to review or comment for any improvements or weaknesses on my code.

I want to develop my style of code in which copy-and paste is minimum and functionality expandability is rich. for eg : the execute() function in UserDB class..basically the same function can be used widespread in many diff db class, so do I need to copy and paste the code again or should I just moved this piece of code to abstract class  ?

next is the UserFactory class

next is my UserDB class

Next is my Database abstract class.

Last is my User object class

The following is my code and I hope anyone who has been doing PHP can help to review or comment for any improvements or weaknesses on my code.

I want to develop my style of code in which copy-and paste is minimum and functionality expandability is rich. For example, the execute() function in the UserDB class is basically the same function and can be used widespread in many diff db class. Do I need to copy and paste the code again or should I just moved this piece of code to abstract class?

UserFactory class

UserDB class

Database abstract class

User object class

meaningful title + spelling
Source Link
Caridorc
  • 27.6k
  • 7
  • 54
  • 135

need help to review my php code User and Database classes in PHP

How can I optimized my code to made it better for future functionalities such as other select, insert, update and delete while maintaining readability and still within OOP strandardsstandards ?

need help to review my php code

How can I optimized my code to made it better for future functionalities such as other select, insert, update and delete while maintaining readability and still within OOP strandards ?

User and Database classes in PHP

How can I optimized my code to made it better for future functionalities such as other select, insert, update and delete while maintaining readability and still within OOP standards ?

added 344 characters in body
Source Link
Melvin
  • 149
  • 2

I want to develop my style of code in which copy-and paste is minimum and functionality expandability is rich. for eg : the execute() function in UserDB class..basically the same function can be used widespread in many diff db class, so do I need to copy and paste the code again or should I just moved this piece of code to abstract class ?

How can I optimized my code to made it better for future functionalities such as other select, insert, update and delete while maintaining readability and still within OOP strandards ?

I want to develop my style of code in which copy-and paste is minimum and functionality expandability is rich. for eg : the execute() function in UserDB class..basically the same function can be used widespread in many diff db class, so do I need to copy and paste the code again or should I just moved this piece of code to abstract class ?

How can I optimized my code to made it better for future functionalities such as other select, insert, update and delete while maintaining readability and still within OOP strandards ?

Tweeted twitter.com/#!/StackCodeReview/status/167752380899790848
Source Link
Melvin
  • 149
  • 2
Loading