is this PHP code beautiful code?
>>59353794
The ugliness of object oriented PHP is exactly why I don't touch it.
>that code is fucking ugly
>>59353794
>php
>raw sql instead os stored procedures
>functions that return html
>line 5951
>hardcoding html
>no brackets in blocks of more than 1 line
>no error handling
>class doesnt know what it wants to be
Panjeet Systems (R) Certified Programer (TM)
>>59353794
- $retrieve and the database connection should be parameters created by the environment.
- Are you sure the for() loop does what you want it to do?
- Don't mix html and PHP if possible. Is your class a Model or a HTML helper?
- Read about SOLID, DRY, etc..
- Do not use var.
>>59353949
Stored procedures are only for special cases. If you are using a control version system just don't bother.
>>59354244
>Stored procedures are only for special cases.
no they're not.
>>59354795
DBMS optimizers made raw queries suck less.
>>59354058
What's wrong with hard coding html
>>59356879
Shit gets messy. You only need to pass back values of the vars.
>>59356879
>"I want to change the way posts look"
Now you have to go and edit in 5 different functions because the post date, comment, post number etc returns the markup from all over the place.
How is this? I took all of your advice and tried to apply it.