top | item 37517776

(no title)

_d3Xt3r_ | 2 years ago

Noob here, but also a former web dev from the Web 1.0 days, looking to get back into the game.

Like you, I dislike much of the modern web frameworks and all the bloat and unnecessary complexities that come with it. I roughly tuned out of this stuff when JQuery became mainstream and everyone and everything started using it, and I couldn't be bothered to keep up any more, nor did I feel inclined to invest my time in such a bloated framework. I did come back to webdev every now and then for casual projects, but every time I did, the world moved from one fad framework to the other, which made me dislike this messy ecosystem even more.

In particular, one environment/toolset that I really disliked was Node.js. Every time I did anything with Node, it always turned into pulling down a gazillion dependencies, and eventually down the line, that led to stuff breaking because some random dependency of a dependency was no longer compatible a with newer version of node or something. It basically put me off modern webdev for good, to the extent that I web back to using plain ol' php for the backend, and since then I've been exploring using pure HTML5+CSS3 without any Javascript for the frontend, but I've been seeing limitations like not being able to do stuff like real-time form validation etc.

Which brings me to your example:

   # install dependencies   
   npm install
May I enquire why you're using npm here? Exactly what dependences are you pulling down? I thought the whole point of Nue was to avoid bloat like Node.js and dependency hell? Isn't Nue supposed to be a self-contained library/ecosystem?

Can I use Nue without touching any Node stuff at all?

discuss

order

tipiirai|2 years ago

I hear you! I went all-in to jQuery- scene. Even wrote a semi-famous library called "jQuery Tools" (oldies know). Then came React and I wrote Riot to simplify the syntax. Then I sidetracked to a startup world for (too) many years and watched aside how the frontend ecosystem grew to it's current dimensions.

Node uses a single dependency, htmlparser2 [1], in the package.json [2]. The HTML parser is used to traverse the HTML that is written on the Nue files. I quickly _thought_ of writing my own parser, but right now I'm having my eyes staring at Bun's native HTML parsing capabilities. Instead of Node, I'm using Bun to develop everything. I need less dependencies with it, because things like JS minification or .env file parsing are biult in.

Avoiding NPM dependencies is a high priority!

[1]: https://github.com/fb55/htmlparser2

[2]: https://github.com/nuejs/nuejs/blob/master/package.json#L12

[3]: https://github.com/oven-sh/bun/discussions/1522

naasking|2 years ago

Sounds like you might be interested in htmx. Lots of client dynamism, easy integration with backends and you don't need to write any JavaScript.

tipiirai|2 years ago

I've been looking at HTMX. It's good for HTML/CSS/UX developers to add dynamic pieces to a multi-page application. However, It's quite different from what Nue attempts to be. Nue is meant for building both dynamic islands and full blown web applications. It's just targeted for UX developers and the JS developers can shift their focus more to the "back of the frontend" [1]. Ultimately Nue is going to be a complete frontend ecosystem and alternative to tools like Vite and Next.

[1]: https://bradfrost.com/blog/post/front-of-the-front-end-and-b...