Hi terabytesoftw and thank you for the articles.
I decided to write you, since I’m a bit disappointed and confused - are these “posts” on forum supposed to be a replacement for the proper documentation?
Many years ago, when I read the Yii2 documentation, I was far less experienced and the docs were like guide to me to the new world of frameworks and better programming. It literally taught me be a better programmer by explaining why is this thing done that way and why is convenient to do things this way.
But when I’m reading the posts about Yii3 on the forum I’m just confused from everything. There is a lot of new stuff and approaches (which isn’t anything bad) but almost nothing is properly explained. It’s more like cooking receipt. Do this, then this and don’t ask anything. (That’s why I hate food cookboks – they don’t teach you cook, they just blindly tell you what to do without a reasons. Someone should finally make a cookbook for programmers ) But if I wanna use the FW in any scenario, I need to understand why are things the way they are and how they work.
For example, take this post about parameters. In Yii2, having app parameters like app name or charset was extremely clear and easy – there were filles with configs, they were merged together and accessed by Yii::$app->parameters. That’s it. I know that in Yii3 we can’t access components this way, but in the post, you are describing a lot of new things and explain nothing. Like literally nothing.
- Why is there still the config file with the parameters and then a special class, where I have to repeat all to parameters?
- What’s the point of having ApplicationParameters class?
- Why I have to add two methods for every parameter?
- Why are the methods made exactly this way they are?
- It seems like a lot of repeating work (copypaste method code for every params? What the heck…) – why isn’t it automated/abstracted somehow?
- What’s the diff between email() and getEmail() and when should I use what method?
- What’s the purpose of application-parameters.php and why is the array the way it is? The
Creating an application #2 unfortunately wasn’t the best starting point
- What exactly the sentence “Automatically the container resolves the dependency and accesses the parameter.“ does mean? The code above looks like a magic to me. If you are pointing to some topic you wrote about earlier, why don’t you link it?
I believe all this code has a good reasons why it’s made this way and that you guys designed it with much higher knowledge then I have, but from my current point of you, it looks like bloody complicated code for adding just one parameter. It looks ridiculous. So if we are supposed to do this way, the brain must now why, what’s the reason, the benefit. And I wanna understand it, I wanna do this way since I believe your approach is good. But I can’t see it in the post. It’s just bunch of very simple instruction “do this, do that”.
Maybe others more experienced with Yii3 understand it better, but maybe there are other people like me who would like to start with Yii3 but struggling with the “entry barrier”. And honestly this posts doesn’t break the barrier a lot.
Also – I’m not a native English speaker, but usually I’m more then okay reading any technical stuff, but these posts feel kind of strange to me. Sometimes it’s hard to understand what was the point of a sentence etc. (I know my writing is much worse )
So my question is – will there be a proper documentation in Yii2 docs quality and format with explaining theory and good examples?
Or am I just stupid and should get this post right away?
Thank you guys for your work. I used to use Yii1 for few projects and since then I’ve been working with Yii2 and I love it. Over the years I dug deeper and deeper and understand it more and more to the point I used almost every detail mentioned in the docs. It was satisfying to apply the theory from docs to real world problems, optimizing the code, performance, structure…
But now I’m trying to move on, looking a bit for Symfony and Laravel (their docs are actually great so far – you can feel how hard they try to make you understand them) but also still waiting to Yii3 a long time. But at least for me, these posts don’t help me to get into Yii3.