News for hackers. Stuff that matters.
Re:Cell – A self-driving web app framework by namuol on Friday June 16, 2017 @08:16PM (#14573517)
> Easy to learn: There is NO API to learn.

True, but how useful is it?

> Easy to reuse: Everything is powered by stateless functions instead of classes and objects, making it extremely modular.

Maybe it's all stateless functions under the hood, but the "hello world" code snippet includes code that mutates the DOM:

    onkeyup: function(e){
      if(e.keyCode === 13){
        document.querySelector("#list")._add(this.value);
        this.value = "";
      }
    }
> Easy to maintain: "Development workflow" doesn't exist. No NPM, No Webpack, No Babel, just vanilla Javascript and 100% based on web standards.

Are these tools really the main source maintenance pain for web developers?

In my experience the code I write is the biggest maintenance burden. I'll suffer through complex tooling if it helps me avoid maintenance anti-patterns (like storing state on DOM elements...)

Re:Cell – A self-driving web app framework by gliechtenstein on Friday June 16, 2017 @08:20PM (#14573537)
Hi, author here. Most of the work cell does internally is to let users interact with the dom as though they are touching them directly, but at the same time actually insulates them from doing so by using a pseudo proxy object. please feel free to take a look at the source. The "Nucleus" is the part that handles all this. Hope this answers your question!
Re:Cell – A self-driving web app framework by namuol on Sunday June 18, 2017 @03:40PM (#14582450)
The problem with the mutations isn't the direct DOM access; it's that mutation is an unscalable approach to representing UI. A lot more needs to be "kept track of".
Re:Cell – A self-driving web app framework by guscost on Friday June 16, 2017 @11:10PM (#14574075)
Here's how I understood it...

The DOM elements aren't stateless, but they will behave like they are if you update every attribute that can change in the `$update` function.

Really all you're doing is mutating the DOM objects themselves, but one of them is this magic `$update` function that runs every time one of that element's attributes changes I think. The framework just provides a proxy object for accessing the attributes, and every cell is extensible with custom data and functions. For some fun try overwriting `this.$update` in `$update`.

Another thing I totally missed at first is the fact that you can embed a <script> containing a variable with the `$cell` property anywhere in the page and the cell will show up in that part of the DOM, and you can do this as much as you want.

Re:Cell – A self-driving web app framework by guscost on Saturday June 17, 2017 @09:05AM (#14575729)
Actually, there's a better method for embedding in an element: Just put the <script> wherever you want, but include an `id` in the configuration object that matches a <div> in your page.
Re:Cell – A self-driving web app framework by Pitarou on Friday June 16, 2017 @08:51PM (#14573663)
I don’t know why they call it “stateless” either. It clearly isn’t. Are they confused about what the word means?
Re:Cell – A self-driving web app framework by SomeCallMeTim on Friday June 16, 2017 @11:28PM (#14574125)
> Are these tools really the main source maintenance pain for web developers?

I consider TypeScript (or Elm) support a best practice for "JavaScript" development, so something that brags about not having a development workflow is a non-starter. It's not only not a pain for me, it's a significant missing feature.

Re:Cell – A self-driving web app framework by the_duke on Saturday June 17, 2017 @04:48AM (#14574943)
Depends on what you are writing.

If it's something that has to be maintained for more than a month, use Typescript or Flow. Just do it. Everything else is a PITA.

If it's just something you want to whip up quickly and won't be maintained, jumping through all the hoops of npm, building and bundling is just annoying.