# About front end structure

**URL:** https://meta.discourse.org/t/about-front-end-structure/106263
**Category:** Development
**Created:** [January 11, 2019, 9:48am UTC](https://meta.discourse.org/t/about-front-end-structure/106263 "2019-01-11T09:48:42Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Chong\_An\_Chen](https://avatars.discourse-cdn.com/v4/letter/c/59ef9b/32.png) [@Chong\_An\_Chen](https://meta.discourse.org/u/Chong_An_Chen)
#### Post date: [January 11, 2019, 9:48am UTC](https://meta.discourse.org/t/about-front-end-structure/106263/1 "2019-01-11T09:48:42Z")

</div>

as far as I know, there are three ways to build front-end code,

1. ember
2. widget
3. raw.hbs (?

and there are some questions:

1. I’ve tried to use ember component in raw.hbs, but it seems not working, how to share all the functionalities in these three types of front end code?

2. sorry, I’ve not fully understood the entire code yet, but just want to ask about the front end structure,  
is it a good structure? is it easy to maintain?

thanks

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [January 12, 2019, 1:37pm UTC](https://meta.discourse.org/t/about-front-end-structure/106263/2 "2019-01-12T13:37:09Z")

</div>

See the #howto topics on theme and plugin development.

---

<div class="post-metadata">

### Author: ![Chong\_An\_Chen](https://avatars.discourse-cdn.com/v4/letter/c/59ef9b/32.png) [@Chong\_An\_Chen](https://meta.discourse.org/u/Chong_An_Chen)
#### Post date: [January 12, 2019, 4:35pm UTC](https://meta.discourse.org/t/about-front-end-structure/106263/3 "2019-01-12T16:35:15Z")

</div>

I’ve read all of the theme and plugin tutorial, but I still could not do it, could you answer the two questions above?

---

<div class="post-metadata">

### Author: ![merefield](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/merefield/32/176214_2.png) [@merefield](https://meta.discourse.org/u/merefield)
#### Post date: [January 12, 2019, 5:24pm UTC](https://meta.discourse.org/t/about-front-end-structure/106263/4 "2019-01-12T17:24:30Z")

</div>

Further reading and watching here:

> [@How can I make my own Discourse plugins?](https://meta.discourse.org/t/how-can-i-make-my-own-discourse-plugins/90032/2):
>
> I’ve only just started but here’s my ‘starter for 10’ to get you going: Read: [these](https://meta.discourse.org/t/beginners-guide-to-creating-discourse-plugins-part-1/30515)[this](https://meta.discourse.org/t/how-to-start-building-stuff-for-discourse-if-youre-newbie-like-myself/45954) Try and read the code on the simplest, [but popular plugins](https://meta.discourse.org/c/plugin/l/top/yearly) and see if you can understand what they are doing (this is not always easy, especially with the complexity of dealing with multiple files and the sometimes brutal functional brevity of javasctipt, but persevere) You need to learn: Lots of Javascript (look no further than @mpj’s [Fun Fun Function excellent & fun (!) videos](https://www.youtube.com/channel/UCO1cgjhGzsSYb1rsB4bFe4Q) (thanks man!)) Lots of …

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [January 13, 2019, 12:36am UTC](https://meta.discourse.org/t/about-front-end-structure/106263/5 "2019-01-13T00:36:12Z")

</div>

> [@Chong\_An\_Chen](#):
>
> could you answer the two questions above?

Your questions are so vague that they don’t really have answers.

> [@Chong\_An\_Chen](#):
>
> I’ve tried to use ember component in raw.hbs, but it seems not working, how to share all the functionalities in these three types of front end code?

Follow the examples in the plugin tutorials. Everything is cached in production. You can’t just edit the stuff and have it work.

> [@Chong\_An\_Chen](#):
>
> 1. sorry, I’ve not fully understood the entire code yet, but just want to ask about the front end structure,  
> is it a good structure? is it easy to maintain?

Yes.
