Discourse の開発を始めたいのですが、どこから始めるべきでしょうか?

I used to develop plugins for a legacy forum platform many years ago that used PHP and MySQL. I was really pleased with some of the things I was able to do and so were my members.

I’ve never worked with Ruby on Rails before, (with the exception of struggling through the import script process to get my data into Discourse in the first place :joy:).

I assume that before diving into some of the documentation and development guides here, that I need some basic stuff first.

Should I learn Ruby on Rails first?

Do I also need to learn Ember.js? Admittedly, I’ve never touched that either, but I understand it is utilized in Discourse core.

I’m also new to Postgres.

Any advice and suggested next steps would be appreciated.

「いいね!」 8

Great!

There are a few useful posts on this. I’ll link you to mine as it references these. How can I make my own Discourse plugins?

(Although I would personally recommend VSCode now)

One way in is to start helping with supporting an existing plugin by submitting PRs (that’s how I began), starting simple with minor problems and then move on to solving bigger issues and maybe adding new features.

If you have an idea for a plugin or Theme Component that’s reasonably simple then start with that. Personal creative goals can be very motivating.

Don’t bite off more than you can chew at the beginning and start simple as the last thing you want to do is lose motivation: this stuff can be hard especially when you want to make fundamental changes.

Be patient. EmberJS is a particularly tricky animal to get your head around.

My advice would be to start with Theme Components and move on to Plugins a little later.

Always use the huge library of existing plugins and TCs as a help. Perhaps someone has solved something similar previously? How did they do it? Take a look at the code. Always use the standards Discourse core sets. Discourse source is also an invaluable resource.

Perhaps the best advice is: just do it! The only way of learning is to get dirty, really. Don’t be afraid of making mistakes and don’t ever let frustration stop you. Keep on going at it and things will eventually work. Try to work things out on your own as much as possible but you can always reach out to others when you absolutely need to.

「いいね!」 12

I spent a long time learning rails. But lots of stuff happens on the ember/javascript side of things. My advice would be to start there with stuff that you can do in theme components. They are much safer, easier to use, and can do just a whole lot.

「いいね!」 7

Ember.js の学習を始めるのに最適な方法はありますか?おすすめのオンラインコースはありますか?

独学で手を動かすよりも、構造化されたコースで学ぶ方が私には合っています。そうすることで基礎を学ぶことが強制されるからです。

Ember.js Guides - Guides and Tutorials - Ember Guides をお読みください

また、https://guides.rubyonrails.org/ もご参照ください

「いいね!」 3

After starting to get into this recently, I agree with Jay @pfaffman.

The best place to start is with theme components

Some reasons (others can give better reasons, here are mine, OTTOMH):

  • theme components are easy to develop and changes can be seen quickly without without a super web dev setup

  • theme components are powerful and a lot can be done with them, including adding javascript libs easily

  • theme components are easy to add your own Javascript code and selectors, so you can easily use the inspector to help you create a selector and insert elements like divs (your fav divs).

Then, after you get familiar with, and have fun with theme components, you can start to get deeper into plugin development.

It a logical way / progression to improve your discourse dev skills and learn the ropes.

「いいね!」 5

すみません、こちらを見落としていたようです。大きく拡張されており、取り組むのに十分な資料があります:Developing Discourse Themes & Theme Components

「いいね!」 3

このトピックですでに素晴らしいものが挙げられていますが、私からの最良の推奨は、Discourse · GitHub にある多数のテーマやコンポーネントのコードを読み込み、何が起こっているかを理解することです。それらをクローンして壊し、何が起きているのかを突き止めてください。私も、そこで小さなプロジェクトに取り組むことと並行して、主にそのようにして学びました。

「いいね!」 3

A good place to start would be to have a look at the GitHub - literatecomputing/feverbee-engagement-theme: Theme component based on expert.feverbee.com and clean it up by deleting all the extra stuff that doesn’t belong in there. And then submit a PR. :slight_smile:

「いいね!」 3

I see what you are doing there, @pfaffman. :grin: That being said, I don’t think you want me cleaning up your code just yet, but I agree that submitting PRs could be a great place to start. First, I need to dig into some of the resources already shared in this thread.

My biggest challenge right now is going to be shifting from my LAMP background to whatever the Discourse stack is referred to. LNPR (Linux, Nginx, Postgres, Ruby/Rails)? Haha.

「いいね!」 3

Can’t blame a guy for trying. :wink:

But seriously, that theme does a bunch of stuff that gives you some ideas about what themes can do. Being able to make a whole new topic list is amazing. Cleaning it up (there is tons of code that just doesn’t belong, but when I tried to remove it I broke stuff and eventually left it rather than finding where I’d mucked up a closing parenthesis or . . . something), even just for yourself, would be a pretty good exercise. To give you more context to know if my advice is likely to be of any use to you, this is from someone with a CS degree who quit learning HTML in about 1998. I understand what CSS can do theoretically, and remain fairly completely flummoxed by Javascript and don’t understand where Javascript ends and Ember starts. I frequently try to make changes that I think will be trivial and end up breaking the world.

Good luck!

「いいね!」 2

私も同じくLAMP(つまりWordPress)環境出身です。この分野は難しいですが、十分な時間をかければ理解できます。

「いいね!」 2