I am a freshman who is not a software engineering major. I like playing Minecraft very much, so I learned Java development in high school and successfully wrote some Minecraft server-side plugins to personalize Minecraft games.
When I came into contact with Flarum, I was attracted by this elegant forum system. I installed it and wanted to expand it. I thought it would be as "easy" as expanding Spigot (a server-side program for Minecraft), just learn the plain JavaScript and PHP, just like I learned plain Java to extend Spigot. It took about 10 days to learn the basic techniques of PHP and JavaScript.
But when I actually came into contact with Flarum's extension development, I found that every step I made was very difficult, because Flarum used the framework. In addition, Flarum's API documentation seems a bit too "simplified", many methods are not explained, it is often difficult for me to retrieve and understand the methods in the API documentation.
And there is another problem. My English is not very good. When I read all English learning materials, my efficiency is significantly lower than when I read the learning materials of my mother tongue.
In addition, I have some too utilitarian. I am eager to use plain PHP and JavaScript to make the functions I want quickly, and I am afraid of "wasting" too much time on learning the framework. Because I don’t know which part of the framework I need to master to expand Flarum, I am not a web developer.
I can't even write a very simple extension right now after 15 days of hard work, and I feel very frustrated about it. Can someone give me some suggestions? Either mentality or method. As for the method, my main confusion is that I don’t know what specific knowledge I need to have (such as telling me to master the basic syntax of ECMAScript, DOM programming, JSON, exception handling, instead of telling me to learn JavaScript) in order to let It has become easier for me to expand Flarum, and I always feel that I am learning blindly.
The first extension's function I want to achieve is:
- [ √ ]Add a button in the SettingPage, onClick, show a modal.
- [ √ ]Create a modal with a form with {text input: email, code; button: sendCode, submit}
- when user clicked 'sendCode' button, give this address a regex test; if pass, then send the code.
- when user clicked 'submit', check wheter the code is correct; if correct, update column 'test' in table 'users'.