Coder Social home page Coder Social logo

Comments (2)

DennisTT avatar DennisTT commented on May 27, 2024

Originally the data handlers were designed to have consistent and reusable code for input validation. They weren't meant as a full "model" layer of a MVC application (as you are probably referring to), since 1.x doesn't have a MVC foundation, nor real OOP practices.

Moving forward, yes it would make sense to do so especially when we move to MVC or some other OOP pattern.

Dennis

On 2013-03-18, at 11:07 AM, Euan T. [email protected] wrote:

I've never understood why the likes of get_user() are standalone functions instead of methods of the datahandler classes. The datahandler classes should, in my opinion, perform all CRUD operations for the data entities they're meant to handle.

This would make developing on top of MyBB make a lot more sense as one wouldn't need to require in a large file with many unnecessary functions and can simply require the datahandlers they need and any other classes (DB_*, cache handlers etc).

In order to maintain backwards compatibility with the 1.6.x series, we could have the usual get_*() function act as aliases to the class methods.

Just some food for thought.


Reply to this email directly or view it on GitHub.

from mybb.

euantorano avatar euantorano commented on May 27, 2024

Fair enough. I can wait I guess till 2.0.

from mybb.

Related Issues (20)

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.