[J4]Let's make JInput easier #34623
-
Dear colleagues. A few years ago, I thought that writing long chains of classes to refer to simple entities is the culture of programmers.
But if you need to perform type checking, but you can write like this. And if you need to specify the INPUT value in the condition?
Developers write such checks everywhere. We compare the INPUT values many times everywhere. You can see how difficult the code becomes to read.
|
Beta Was this translation helpful? Give feedback.
Replies: 8 comments 4 replies
-
You are writing this for Joomla 3. - I doubt that there such generic things will be changed now. In J4.0 much has changed. |
Beta Was this translation helpful? Give feedback.
-
If the community supports me, I will do PR in J4. |
Beta Was this translation helpful? Give feedback.
-
I noticed that a lot of methods in |
Beta Was this translation helpful? Give feedback.
-
Why such difficulties?, the tools should be simple and easy. Even if there are high-tech developments inside |
Beta Was this translation helpful? Give feedback.
-
This will never happen. We should use containers, and $app-> to access to $app related stuff (input, document etc).
It is not dangerous, but hard for testing, and some other stuff I not remember. In the end it is OOP, not procedural programming |
Beta Was this translation helpful? Give feedback.
-
@Fedik @chmst |
Beta Was this translation helpful? Give feedback.
-
Pointless discussion - never going to happen |
Beta Was this translation helpful? Give feedback.
-
This is very similar to how developers write software for themselves. Forgetting that Joomla has programmers, students, beginners, and those who are just a designer, whose task is to be able to fix an error in the code, without understanding technologies at all. |
Beta Was this translation helpful? Give feedback.
This is very similar to how developers write software for themselves. Forgetting that Joomla has programmers, students, beginners, and those who are just a designer, whose task is to be able to fix an error in the code, without understanding technologies at all.
Colleagues, remember yourself when you just started writing code in PHP. For you, the creation of the module was an achievement.
.
Using OOP is great, but I see that the extreme is coming.
PHP has implemented typing similar to C#. But if PHP would make it mandatory to use types like C# for all variables. That would be death.
The Joomla api does the same as PHP would make it mandatory to define the type for variables. But PHP does …