Giter Club home page Giter Club logo

Comments (5)

burzum avatar burzum commented on June 17, 2024 1

I agree about the mapping code but this is mostly done to make it work out of the box. Honestly I can't think of many people using it unchanged. The best way to use it is to bake a simple controller and replace the method contents with a call to the corresponding component method. Like I said, if you have suggestions about how to improve it, just tell me.

from cakephp-user-tools.

burzum avatar burzum commented on June 17, 2024

The code will be more clear short and may more performance.

Can you provide a benchmark and results or is that just a claim without proof? The reason it is a component is pretty obviously done for a good reason: Just attach it to any controller. Reuseability.

The controller can be override a little more easily

Explain me how extending a controller is more easy than a component. Foo extends Bar job done.

The component is useful when we use its functions in multi places

Like... multiple projects? The reason it is a component is simply reuseability. It was intentionally made this way to decouple it from a controller. The old CakeDC plugin was a pain in the ass to override on the controller level. This is another reason it is now a component.

What exactly do you need to extend? The component is very configurable and if that is not enough just extend the component? I don't see the problem. I don't mind improving it and making it more easy, but changing the component to a controller is not going to happen.

from cakephp-user-tools.

eymen-elkum avatar eymen-elkum commented on June 17, 2024

What exactly do you need to extend? The component is very configurable and if that is not enough just extend the component? I don't see the problem.

I didn't mean that there is a problem, I just found the component script a little complicated and every thing just to extent the controller.

For example:

  • actionMap logic will not be needed.
  • $this->response = $this->_controller->response;
  • $this->_controller = $registry->getController();

sorry if the list is not meaningful enough, I think that I have to implement this idea by myself and then share you the result, then the discuss will be more clear-full

finally: I would to say that the target of extending ability is very wonderful and made me leave other plugins and work with this.

from cakephp-user-tools.

eymen-elkum avatar eymen-elkum commented on June 17, 2024

OK

from cakephp-user-tools.

burzum avatar burzum commented on June 17, 2024

If you check the mailer branch you'll see that I've moved some code into traits and refactored the email sending stuff into a mailer class. I still need to test if the emails are still send and add unit tests.

from cakephp-user-tools.

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.