Giter Club home page Giter Club logo

Comments (3)

aubreypwd avatar aubreypwd commented on May 26, 2024

Per a call with Eric, this structure may work with more modern PHP frameworks:

Eric's point is that service in the PHP community and components also works for the same thing. My pushback was that a "component" should have one class, but the way I'm doing it you could use multiple classes, so we went with component.

Ping #7 and #10

from wpkickstart.

aubreypwd avatar aubreypwd commented on May 26, 2024

Some notes after talking to Jeremy:

  • features is usually a name for testing things in PHP community
  • components could also be packages (not as in a name, but as in a concept, and should be installed like so via composer). Note, the structure would allow for it, we would need to get composer to install things there
  • Expecting a src/ folder (not sure I would want to do that)
  • Directory structure is not deep enough (we're intentionally steering away from deep structures to reduce complexity)

from wpkickstart.

aubreypwd avatar aubreypwd commented on May 26, 2024
  • The official name for "components" can be components/ but maybe make this filterable so someone can name it somethings else?
  • The official name for "features" should be services/ but can also be called features/ for backwards compatibility
  • The includes/ folder should be renamed to app/ as in #11

So what you end up with is:

  • services|features/ (can either name services/ or features/ but services/ is what's right be default)
    • name/ (e.g. migrate-subsite)
      • class-name.php (e.g. class-migrate-subsite.php)
  • components/
    • name/ (e.g. cli)
      • class-name.php (e.g. class-cli.php)
  • app/
    • class-app.php (always this name for the app() function)

Note some interesting changes w/ Namespace thinking:

  • components/ should be namespaced independent of the plugin framework so they can be mobile
    • Document this in the folder that they should be attached by their root namespace or using a use statement in-file
  • services/ should be namespaced the same as the rest of the plugin framework

from wpkickstart.

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.