Slim4 Foto Kit demo project

Yes, @LLEGAZ . PHP. It’s obvious @tj_gumis do not understand everything to the end. Let’s leave it to him.

What’s your problem with french people guppi ? kiurva tak ? xD

I’m not even that french, just french not french french. I can understand (a bit) why you are mad but please don’t take all this too seriously (especially my jokes..)

He is young, and poor fellow is quite mad. Beside I think he has a quick and irreversible judgment which is not a great virtue but meh, I am assured he got lots of those nonetheless.

edit to TJ : not saying mad as an insult against you, just mad like all the world is made lately.. I’m too

Yes. Youth is a disadvantage that goes away with age.

Ok, guys, there is still lots of things to learn in your case, both of you.

You will never achieve anything without humility. Stay humble whole your life, no matter your age, and it will help you to reach any goal much faster.

1 Like

@tj_gumis. Hmm. And what about your code?

Обирай союзників мудро. Не сери на руку, яку хтось тобі безкорисливо простягає.

Otherwise, just like in this case, you will be always left alone. Tapping your shoulders is worthless, but constructive criticism might be priceless.

This small advice is all I can do for you.

@tj_gumis . Why did you think so long? And my advice is for you: do not play with such words. As I said I know some Polish people. They are brave, honest and polite. You have to learn from your fellow countrymen.

OK sorry, you are right, humility is important and you were in a better approach than I remembered at the start; so please excuse my terrible memory and my haste in siding with Eugene thinking you were a bit hasty too and harsh in your judgements (and advices which were very nice of you btw, to take some of your time to give feedback, I dunno why I remembered otherwise) and was also thinking you were lacking of humility..

All in all it’s quite funny everybody was thinking that somebody was lacking humility among other virtues.

Maybe we should all breath a good one and remember we are only human after all.

Plus, I hope, PHP friends.

Please, have a good week (I really mean week not weak this time ^^) and have some fun.. And thank you both for that discussion. I am quite sure you are real humans now xD

1 Like

So. Thi is some comments for @tj_gumis ‘s example:

// As I can see ActionController may be some basic 

// for concrete Action controllers. 

// It's interestig to see subtypes of ActionController.

// Also, it's interesting to see ActionControllerInterface.

// Interfaces are abstraction, tools for polymorphism.

class ActionController implements ActionControllerInterface

{

    public function __construct(

        // DI in action.

        // And this is injected with constructor-injection. 

        protected JsonResponderInterface $responder

    ) {

    }




    // Good.

    // As PHP docs say: "The __invoke() method is called 

    // when a script tries to call an object as a function."

    // PHP's way of supporting pseudo-first-class functions.

    // Why? Code clarity.

    public function __invoke(

        // It's Psr\Http\Message\ServerRequestInterface

        ServerRequestInterface $request,

        // It's Psr\Http\Message\ResponseInterface        

        ResponseInterface $response,

        // Why it's here? 

        // Can it be injected in the class constructor? If not, why?

        ActionServiceInterface $actionService,

    ): ResponseInterface {

        return ($this->responder)(

            $request,

            $response,

            $actionService,

        );

    }

}

Yes TJ is good at coding and is very humble so we should stop tormenting him. He is a good fellow. And his code remembered fun stuff from school so I will give it a :heart:

Peace on you both guys, and on your families.

1 Like

@EugeneM uses AI to analyze the simplistic controller code.

@LLEGAZ does not even know it is AI performance.

and they claim to be good enough to evaluate my code. Wtf???

What a waste of time with both of you.

@tj_gumis .

Everything can be used. But untill some measure. Nothing can replace real knowledge. AI, for today and in some way, is mostly aggrigator and translator of some knowledge pieces. My comments are not from AI. If you do not believe, it’s up to you. I’ve seen just some chunk of your code. It’s nothing.

@tj_gumis you should train your softskills.

And I agree with @LLEGAZ . Peace for all of us.

My comments are not from AI.

It is worse. You don’t even understand what you copy/pasted pal.

@tj_gumis.

… ActionControllerInterface

It’s interesting to see its code. Interface of Action plus Controller.

class ActionController…

If it’s invokable class with some action, may be it can be named just SomeAction instead of weird ActionController.


public function __construct(
protected JsonResponderInterface $responder
) {

What about response of not only JSON format? Action response can be an HTML-page.

You seem like a nice (and humble) guy tho, I am deeply sorry for your loss of time.

Dear Slim PHP community.
I refactored my humble project a little bit.

According to @LLEGAZ’s constructive remark

web app standard (AJAX, even if it’s old fashioned it works well)

I replaced AJAX with Fetch API slim4-foto-kit/public/js/admin at master · emyca/slim4-foto-kit · GitHub .
And yes, I remain jQuery in the project. I think it’s more convenient than vanilla JS. Also I’d like not to use any JS framework to be minimalistic as much as I can. A sentence “jQuery is dead” looks like “PHP is dead”, but reality is another for now.
Thank you.

UPD: You can find AJAX-way here slim4-foto-kit/public/js/admin at first-release · emyca/slim4-foto-kit · GitHub

UPD2: Recent news - jQuery has its final release 4.0.0 https://blog.jquery.com/2026/01/17/jquery-4-0-0/. It’s really not dead)

1 Like