5 ms·
Show HN: Mosaic – A declarative, front-end JavaScript library for building UIs
- tobr 8y agoLooks fairly interesting. Two questions the documentation ought to answer: 1. How mature is it? My assumption is that it’s not mature, in which case it’s more credible if the README says so. 2. What would be the reason to use this instead of, say, lit-html or Preact or Mithril.js?
- misterdata 8y agoThis looks a lot like Vue.js - how is it different/better?
- akho 8y agoSo you made a web thing and called it Mosaic.
- foobarbecue 8y ago(8) sidestep to little bits of history repeating (8)
- arethuza 8y agoIt would be amusing to write a basic web browser in JavaScript and call it Mosaic...
- deleted 8y ago[deleted]
- openbasic 8y agoI don't think the new generation knows what Mosaic was.
- purrcat259 8y agoNot sure if I am alone in this, but I tend to skip straight to demos after skimming the first few lines. I guess it serves as a basic indicator that the code actually works. Would love to see some demos of this library.
- bestest 8y agoMany examples of the library-in-action may be found on the homepage: https://mosaicjs.netlify.com https://mosaicjs.netlify.com edit: update link
- saagarjha 8y agoYour link seems to be broken.
- BerislavLopac 8y agoInterestingly, it works from the home page; I didn't bother checking, but I assume there is some JS handling going on.
- dmethvin 8y agoI wasn't able to find any working examples from the homepage, even with the updated link. Can you link directly to a demo page or two that uses the library, rather than a Github repo with code that uses the library?
- bestest 8y agoLooks like they could improve their examples section. These are links to jsfiddle from their documentation with some examples: https://jsfiddle.net/authman2/kdfzL2m5/39/embedded/js,html,result/#Result https://jsfiddle.net/authman2/kdfzL2m5/39/embedded/js,html,r... https://jsfiddle.net/authman2/e8nuydLo/39/embedded/js,html,result/#Result https://jsfiddle.net/authman2/e8nuydLo/39/embedded/js,html,r... https://jsfiddle.net/authman2/yfhsxrcm/35/embedded/js,html,result/#Result https://jsfiddle.net/authman2/yfhsxrcm/35/embedded/js,html,r...
- vladsanchez 8y agohttps://mosaicjs.netlify.com https://mosaicjs.netlify.com contains a lot of broken links. If you really want to promote your library, fix them! Otherwise ppl will focus on your broken windows instead of the value of your product. Thanks for sharing Mosaic.
- darepublic 8y agoreminded me a bit of angularjs, with its constant watching of state data
- Zelphyr 8y agoCan someone explain the trend of mixing HTML and JS code that has been increasing lately? We fought for years to get away from that so I'm curious to know what happened to make people think it was suddenly a good idea. I'm not suggesting it's not or that it is permanently bad. I'd simply like to know why it's good after being considered a bad practice for so long?
- prezjordan 8y agoWhen building certain applications, it turns out those concerns aren't really separate! It helps a lot to colocate the markup and the code that generates/modifies it.
- MentallyRetired 8y agoI fought hard for that as well among friends and colleagues. Here's my take on it: * I view vue/react/etc as a sort of polyfill for webcomponents. * I also look at JSX and Vue templating as just that -- programmatic templates that serve as a guideline for the HTML they create. That's what lets me sleep at night.
- dcre 8y agoLike the other commenter said, people realized that separate languages does not necessarily mean separate concerns. Once you start modifying HTML from JS enough, you start to realize the JS counts as view logic just like the template does. So the division of concerns changed from View (HTML template)/Controller (JS) to View (dynamic, written in JS)/Data (also likely JS). The thing is, people were effectively writing HTML in JS before too, it's just that it looked like `el.style.color = 'red'` instead of `<div style={{color: 'red'}}>`.
- crabl 8y agoThis has some eerie similarities to [Backbone.js](https://backbonejs.org/#View-extend https://backbonejs.org/#View-extend). That's not necessarily a bad thing, because Backbone was doing its level best to compete as a framework in its heyday, but it's still interesting to see how different it would be if Backbone was designed today.
- spankalee 8y agoThe source looks like it has a lot of bits in it from lit-html. ️