TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Show HN: Moon – 3kb JavaScript UI compiler

71 pointsby kbralmost 7 years ago

13 comments

sbjsalmost 7 years ago
This looks like it takes Vue.js&#x27;s approach of creating a brand new language that you have to learn (in this case MVL which is similar to HTML). It&#x27;s definitely a preference for a lot of people, but I prefer React.js style, which lets you use languages you already know (HTML and JavaScript) to do literally <i>everything</i>. It may be inconvenient at times, but you don&#x27;t have to reference a new language&#x27;s manual every time you want to do a for-loop to figure out whether the @for attribute should go on the li or the ul.
评论 #17634041 未加载
评论 #17633974 未加载
评论 #17634057 未加载
评论 #17635390 未加载
skrebbelalmost 7 years ago
How does this compare to Svelte, which also compiles itself away and at first glance, looks quite similar? What was your motivation for making this? (other than making something cool, ofc)
评论 #17634986 未加载
dvhalmost 7 years ago
How are variables in &quot;&lt;p&gt;{text}&lt;&#x2F;p&gt;&quot; replaced? Is the security of it just an implementation detail left to the programmer who use it? Safe way would be finding the P and then doing p.textContent = data. But how do you find element by value efficiently? Or do you just to text replace?
评论 #17634628 未加载
ramses0almost 7 years ago
I continue to advocate MarkoJS as &quot;the best&quot; HTML templating language. <a href="https:&#x2F;&#x2F;markojs.com" rel="nofollow">https:&#x2F;&#x2F;markojs.com</a><p>It is the best mix of expressiveness, ease, and clarity I&#x27;ve found.
evmaralmost 7 years ago
I believe Angular has a similar mechanism of compiling templates to code that corresponds directly to the template much like this, and they&#x27;re now backing away from it. The reason is that you end up with a lot of code per template. Some indirection, like stuffing the template parameters via a key-value map, lets you generate more generic code that is overall smaller.
评论 #17633993 未加载
alliecatalmost 7 years ago
Maybe it&#x27;s just me but if you&#x27;re submitting something to Show HN then it&#x27;s helpful if your &quot;Examples&quot; navbar link doesn&#x27;t send me to a `&#x2F;&#x2F;TODO`!
评论 #17635187 未加载
jmiserezalmost 7 years ago
Previous (2017, 192 comments): <a href="https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=15105726" rel="nofollow">https:&#x2F;&#x2F;news.ycombinator.com&#x2F;item?id=15105726</a>
评论 #17634207 未加载
ukulelealmost 7 years ago
Looks like a neat project. What is the ultimate goal of it? I gather it&#x27;s to do a subset of what e.g. Vue does, with simplified API and a small footprint. Is that accurate?
评论 #17633860 未加载
评论 #17633870 未加载
vijaybrittoalmost 7 years ago
Very simple concepts. So easy to try. Saw the code. There are almost no type checks or null&#x2F;undefined checks anywhere. Is this library used in any production application?
评论 #17634489 未加载
dandigangialmost 7 years ago
I kind of like that this feels like a vanilla JS, simple version of components. Any reasoning behind by this was created? I read the about but it was limited.
评论 #17634800 未加载
zubairqalmost 7 years ago
Congratulations on the release. I know we talked about using Moon for AppShare, and I&#x27;ll keep watching the progress. Thanks
childintimealmost 7 years ago
Love the design of the site (or lack of it). Apparently similar to marko.js, but no bootstrap header, etc.
评论 #17634153 未加载
hoppelhasealmost 7 years ago
Are you still claiming to be 14 years old?
评论 #17634276 未加载
评论 #17634727 未加载