Echo JS 0.11.0

<~>

tracker1 comments

tracker1 2133 days ago. link 1 point
It's worth noting, that this application does not use 12-factor[1] principles in general.  There are no unit tests, and some Dockerfile or better yet a Docker compose file would be helpful in getting started with local development.

Aside: seems to be a SaaS provider for this service, unsure how much different the commercial offering is from the source offering.

1. https://12factor.net/
tracker1 2136 days ago. link 1 point
Decent rant in terms of where the divide between a website and a web application are... it's a bit muddled.

Personally, I build web based applications... some of them have been public facing, many have been internal.  Some have been training simulations.  In the end, what this has been comes down to what you're trying to do.

If you are dealing with mostly static content, I would favor using markdown docs and templates.  For interactivity, I would suggest loading JS as a module and use the browser support.

If you are building an application, I reach for React + @material-ui/core + redux + parcel ... It's a combination of tools that makes it easier to build applications.  Not everything needs to be a web application.
tracker1 2137 days ago. link 2 points
Even then... most modern JS is written in modules (cjs or esm)...

    //module singleton...
    let numProcess = 0;

    export default { // or module.exports for cjs
      increment: () => numProcess++,
    };

Can still have the internal numProcess private.
tracker1 2137 days ago. link 1 point
Nice tutorial... SVG in React has been incredibly useful.  I would make a minor suggestion, and that would be to just embed the styles into the component render directly, instead of CSS for this type of component, if making it for a reusable case.

This is also a really good approach for something like simple pie charts, etc... most of the frameworks that provide charts/graphs are very big, when all you might need is a little SVG.  I've also used SVG for scalable content display and overlays...  Inside the SVG, you can use the actual image (say from a scan) dimensions, where outside, you use the containing sizes.

React + SVG = <3
tracker1 2138 days ago. link 3 points
No... no, no, no, no...

It's either a string, or a literal object... there's NO SUCH THING as a JSON Object in JS.

JSON is a serialization format for Objects... the syntax matches the JSON literal syntax with certain restrictions (double quotes around object keys, etc).

When it's a literal, it's just Object Notation, not a JSON object.
tracker1 2138 days ago. link 2 points
Interesting... looked to check... should probably note in the Readme that this is NODE ONLY, not for browser use... my first concern is that someone might put this in a browser exposing their API access.
[more]