Coder Social home page Coder Social logo

Comments (10)

matteing avatar matteing commented on July 27, 2024

Of course, go ahead. It goes with our new modularity guidelines. Thanks for that tip! Remember to use mysqli oop. I'll make some documentation later. Meanwhile, try to work on the experimental branch and after it's stable, make a pull request. Thanks for contibuting!

from zeam.

 avatar commented on July 27, 2024

What if a user doesn't want to use mysqli though? There are ways to allow the user to specify the database they want to use, such as normal mysql or such things.

from zeam.

matteing avatar matteing commented on July 27, 2024

Well I did that because: PDO is a pain to mantain, MySQL is used most of the time, and it performs far better. So if you're gonna use PDO, create a modules branch and then create all the modules there.

from zeam.

 avatar commented on July 27, 2024

Alright then modules it is.

from zeam.

 avatar commented on July 27, 2024

"Well I did that because: PDO is a pain to mantain, MySQL is used most of the time, and it performs far better."

I just want to mention, when doing a project like this, you have to conform to what the users want. What I mean by that is this: What you as the owner wants isn't always what the user might want. For example say you were writing a text editor. You are a Linux only person and only provide a linux install because "windows is evil." However some of your users may want to use windows rather than linux.

All that to say, what if a user wants to use PDO? It would be easy to make it so they can specify any database system they want. The forum engine MyBB does exactly this, when you install it asked you which of the database engines you want to make use of. That is an example of how it should be done.

So true, yes MySQL is used most of the time. However that's not all of the time. Therefore supporting all the other engines would be a wise idea.

from zeam.

matteing avatar matteing commented on July 27, 2024

It'll be a pain to mantain, but yeah, why not simply make 2 modules.

from zeam.

matteing avatar matteing commented on July 27, 2024

You're right 100%.

from zeam.

 avatar commented on July 27, 2024

Since we are using OO, it would be extremely easy to do it in a way where we don't have to manage it at all. I did something very similar in another project of mine.

For example, we could make a database class, and each server type could derive from them. Users could create their own database type such as "PDO" and we could just provide a MySQL default type in the actual code.

from zeam.

nathan815 avatar nathan815 commented on July 27, 2024

Good idea @the-killer-rabbit!

from zeam.

matteing avatar matteing commented on July 27, 2024

I already did this in the rebuild with MySQLi, but I will make another one with PDO. Thanks for the suggestion, issue closed.

from zeam.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.