« first day (2862 days earlier)      last day (2078 days later) » 

1:45 AM
Turns out that WordPress is using the ezSQL library as its wpdb core. Does anyone know this library? Is it safe to include it in my project? It hasn't been updated for over a year.
 
 
1 hour later…
2:56 AM
@JackJohansson I think you can, and not being updated is actually a good thing IMO. Anyway IMHO this is an example to why I fail to understand people that made their own systems from zero. Sure we (especially me) like to rant against wordpress, but in the end of the day if you use wordpress you do not have to bother yourself with this kind of questions.
 
Was just wondering if WP uses a enhanced version in case of security. I don't see much escaping and other preventions in the original code
 
it looks like a DB driver, nothing more. Why to actually use anything in the first place instead of the PDO API?
 
Isn't PDO for when you're not sure which DB you'll need to connect?
 
no, it is a modernization of the DB APIs of PHP, or at least that was the intent as far as I get it. It is much more structured
 
ezSQL does also offer PDO
 
3:12 AM
why do you need the middleman? (maybe you do, I never got down to such low levels)
 
I can write it myself but I was hoping a library could help with security and provide some basic methods
 
In a way this is an answer to the question "is it maintained" by going deeper to PHP APIs you just avoid it
 
I'm not very familiar with db anyway
 
I am sure PDO is more secure than direct mysql calls. You use prepared statements in about the same way wordpress does "prepare".
Wordpress can not use PDO for that because prepared statements will not work well with filtering SQL statements
... using filters on....
anyway, this goes back to our previous discussion, it seems like you focus on details instead of big picture ;). Once you have your own low level primitives, selecting a DB "driver" is just a technicality, some thing you can change your mind about at any time
 
I'm more about learning at this point
 
3:22 AM
or to say it differently, you first need to define yous own DB driver that implements your need. After that you can decide if it is better to use PDO/mysqli directly or you need a middleman
 
I could just use the prestashop and everything goes fine
 
+10 learning is always good
 
Funny how starting a project is harder than finishing it aye?
 
lol, tell that to GB people
I am sure for them it was 100 times easier to start
ignorance is just so golden
 
Gotta use <?php // Ignorance is golden from now on
 
3:25 AM
LOL
but yes, designing things correctly from the start will leave you with handling bugs in the end, but hopefully without a need to restructure your code
 
Yes I'm trying to avoid restructures, I have to think everything thrice before any commitments
 
most important thing is probably to get a client to commit to what he asks for, so when he changes his mind it will not come as a surprise that the delivery time and cost will change as well
 
Sure. Like he asks for a blog first and then says I wanted a shop?
There are other cool frameworks like MeDoo too
 
3:41 AM
yeh, I like their description
 
Then I wouldn't even need a database class if I'm going to use PDO
 
yes
 
 
6 hours later…
9:53 AM
lol, got a java related question wordpress.stackexchange.com/questions/311700/… who knows maybe will get a prolog one at some point
 
The language doesn't really matter as long as it's WP related. But in this case … well. :)
 
10:12 AM
oh come on, did you expect to ever see a java stack trace here? ;)
 
10:28 AM
we had a valid Java question here once
without a stack trace of course
 
11:19 AM
I'd have preferred PDO be used by WordPress, but it's academic
 
 
2 hours later…
1:46 PM
Just started playing Draughts again. lidraughts.org This is much harder than I remember!
 
 
2 hours later…
3:37 PM
@TomJNowell I guess it's worth learning PDO for me. Decided to give it a go, seems like I only need a few wrapper functions instead of writing a whole lot of code to reproduce $wpdb
 
 
1 hour later…
4:51 PM
0
Q: Using framework (Wordpress) functions in layered architecture

MichaelI'm building an app with the usual layers like presentation, application, infrastructure. Right now, I have been using Wordpress functions in both my controllers and repositories. I figured that controllers need to be re-written anyways should the framework change, and repositories are part of an...

 
 
2 hours later…
7:03 PM
golden answer over there
 

« first day (2862 days earlier)      last day (2078 days later) »