purrcat259 5 years ago

Not 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.

akho 5 years ago

So you made a web thing and called it Mosaic.

  • arethuza 5 years ago

    It would be amusing to write a basic web browser in JavaScript and call it Mosaic...

  • openbasic 5 years ago

    I don't think the new generation knows what Mosaic was.

  • foobarbecue 5 years ago

    (8) sidestep to little bits of history repeating (8)

Zelphyr 5 years ago

Can 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 5 years ago

    When 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.

  • dcre 5 years ago

    Like 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'}}>`.

  • MentallyRetired 5 years ago

    I 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.

tobr 5 years ago

Looks 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 5 years ago

This looks a lot like Vue.js - how is it different/better?

crabl 5 years ago

This has some eerie similarities to [Backbone.js](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.

vladsanchez 5 years ago

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.

spankalee 5 years ago

The source looks like it has a lot of bits in it from lit-html. ️

darepublic 5 years ago

reminded me a bit of angularjs, with its constant watching of state data