adobe / aem-core-wcm-components

Standardized components to build websites with AEM.
https://docs.adobe.com/content/help/en/experience-manager-core-components/using/introduction.html
Apache License 2.0
730 stars 736 forks source link

Extension of core components need's to be simplified #2417

Open mkovacek opened 1 year ago

mkovacek commented 1 year ago

Feature Request

Real-life example:

Sounds super simple and straightforward right!?

Try and failures:

  1. Let's extend the SearchResultServlet - nope, it's an internal, not exported class
    • Let's say it is exported - still you can't override methods (they are private or protected)
  2. Let's include the servlet
    • again you need to include a lot of other internal classes
    • you get a messy codebase
  3. You gave up in the end, and you write your own solution.
    • I believe that was not the intention and the goal of core components.

This was not the first time that happened. It's all great if the feature fits 100% to the project needs, but sooner or later when you need to put some change on top of that, you have a real challenge.

I really appreciate the work that you guys are doing, and believe there were a few time discussions about that, but this need's to be somehow improved.

HitmanInWis commented 1 month ago

FWIW this is an unfortunate fundamental limitation of using WCM Core components that's been raised a few times for many years. I find that code bases built initially to extend WCM Core components over time evolve to overwrite more and more of it to accommodate client needs.

Thankfully the code is open source, so if you do need to write it on your own, you can start from the code here.