Code Monkey home page Code Monkey logo

Comments (3)

weaverryan avatar weaverryan commented on July 21, 2024

Hey @sadikoff!

What’s the advantage of your proposal? The current implementation allows us to add other methods in the future for different situations. And I like the auto completion :)

from maker-bundle.

sadikoff avatar sadikoff commented on July 21, 2024

@weaverryan just an idea. For example I have 6 dependencies in make:crud and I need 6 times to write $dependencies->addClassDependency(...) may be we can find better way to simplify it. My initial idea was to write something like:

public function configureDependencies(DependencyBuilder $dependencies)
{
    $dependencies->addClassDependencies([
        [Route::class, 'annotations'],
        [Route::class, 'annotations'],
        [Route::class, 'annotations'],
        [Route::class, 'annotations'],
    ]);
}

Or may be we can make add(...) like in FormBuilder

public function configureDependencies(DependencyBuilder $dependencies)
{
    $dependencies
        ->addClass(Route::class, 'annotations')
        ->addClass(Route::class, 'annotations')
        ->addClass(Route::class, 'annotations')
        ->addClass(Route::class, 'annotations')
        ->addClass(Route::class, 'annotations')
    ;
}

The main advantage is that we will write less code :)

from maker-bundle.

javiereguiluz avatar javiereguiluz commented on July 21, 2024

@sadikoff I tend to agree with Ryan here. Even if your proposal is more concise, it could limit us in the future (this is an hypothesis, I don't have specific examples of what else we could do here). Also, the existing config is annoying mostly for the CRUD generator, whose complexity is an edge case. All the other makes are (a lot) simpler. Let's close for now as "won't fix". Thanks!

from maker-bundle.

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.