The last days I’ve been experimenting with the database class and read about alternative database classes.
For most sites the database class is not used. It’s not even used in the panel. Kirby does not need it in order to work. It’s not something that is tight bundled with Kirby but some extra thing that hangs on Kirby as a sideload.
Maybe break it out and have it as a plugin instead?
I mean no disrespect to the database class, just thinking modular and keeping things tight.
What do you think about that?
It’s already optional. Just because the files are there doesn’t mean that it adds complexity. The files are only autoloaded if they are needed.
We will keep it as part of the Toolkit as the Toolkit is just a collection of useful classes. Otherwise we would have to create a lot of modules and that would make it complex.
Right on, you better choose your words carefully around the database class! It’s known to be easily offended and shows no mercy to the haters.
All hail to the database class!
@diondiondion’s comment made my day
There’s a german saying. “It doesn’t eat any bread” for things which are not really adding any kind of burden or overhead, so you can just keep them.
The Database Class adds around 34 KB of code and as Lukas pointed out, it’s only loaded if you call it.
The idea of this topic came up because I was thinking about using another database class for really complex queries and that would leave me with 2 database classes, where the built in one would not be needed.
Otherwise we would have to create a lot of modules and that would make it complex.
Alright, less complexity is better.
Right on, you better choose your words carefully around the database class!
I really hope I did not offend the class or any real person. That’s why I added “I mean no disrespect to the database class”… but I see now that I forgot to add smilies so here they are…
It doesn’t eat any bread
Nice! Then I don’t need to worry about it.