Live data from Hacker News

Ask HN: What novel tools are you using to write web sites/apps?

news.ycombinator.com

41–50 of 333 posts

Re: Ask HN: What novel tools are you using to write web sites/apps?

#41
Json-patch [1] for dead simple RESTful object mutations via PUT.

Mongoose-patcher [2] for using it with mongoose / mongodb.

Json-patch-rules [3] for declarative security on patch operations.

[1] http://jsonpatch.com/

[2] https://github.com/claytongulick/mongoose-json-patch

[3] https://github.com/claytongulick/json-patch-rules

Re: Ask HN: What novel tools are you using to write web sites/apps?

#43

Semantic HTML, CSS, Vanilla JS, and JAMStack. Semantic: embed data directly in HTML. If I have a list of wines with categories, each wine's "class" attribute has a class for each category. HTML: can be generated by anything and consumed by anyone. Great SEO. CSS: These websites were all made with the same HTML, only CSS changing. http://www.csszengarden.com/ Let's imagine we have a checkbox, that when checked, should…

IS CSS really this well featured and expressive these days? I havent tinkered with it in years.

:checked and :not() have been dependable for quite a few years now. Firefox has had ’em since at least version 1 (2004), Safari got ’em in 3.1 and 3.2 (2008), and Internet Explorer was the last player to the table in Internet Explorer 9 (March 2011). The rest of the selector features (tag, attribute, class, adjacent sibling, child) are older still (IE7 supported it all).

Re: Ask HN: What novel tools are you using to write web sites/apps?

#44

This partially might be more of a what's old is new again, but here's what I use: - 100% server side rendered - Progressively enhanced (fully works without JS, but having JS enabled makes it nicer) - In select places where I need SPA-like snappiness I use a ~100 line long DOM diffing algorithm (I request full HTML through AJAX and diff it into the current page; if the user has no JS enabled then the page just refresh…

I do this a lot these days with prototypes and poc’s but usually with Go since I’m more familiar with it. Sure it only works on one machine, but it’s usually so fast scaling means it was a success and now you have a war chest.

I’d add adding s3 to backup things though.

Re: Ask HN: What novel tools are you using to write web sites/apps?

#46
Fav thread ever!

A good 5+ years ago I built HasGluten [1] with react backed by a google spreadsheet, hosted on github pages. Proven technology, it's still working.

More recently I hacked together MultiPreview [2] with react + API served by firebase functions. I'm also temp using firebase hosting as I have little traffic, but plan to replace it with edge computing / CDN caching.

MultiPreview is backed by Saasform [3]. This is more like a classic node/express (nestjs) application, but I really like how we're separating concerns: the SaaS = MultiPreview handles the biz logic / Saasform handles landing page + auth + payments.

While building the new landing page I played with and liked a lot Bulma [4], I used but didn't like AlpineJS [5] and I'm thinking to move to Hotwire [6].

My personal experience is that performance only matters when you're big enough, so in the near future I want to experiment more on usability / nocode side. And I'd love to see more open source alternatives to the big ones.

[1] https://hasgluten.com

[2] https://multipreview.com

[3] https://github.com/saasform/saasform

[4] https://bulma.io

[5] https://github.com/alpinejs/alpine

[6] https://hotwire.dev

Re: Ask HN: What novel tools are you using to write web sites/apps?

#47
- tailwindcss

I moved a React side-project from CRA to Next.js for server-side rendering benefits, but the latter doesn't support directly importing css styles in jsx to avoid problems with the global scope.

The two options offered were CSS modules and CSS-in-JS. I didn't like either approaches having hashes in the classname when opening the website in devtools, and both seemed too locked into React/JSX.

Tailwind 1. doesn't have component framework lock-in 2. doesn't make me think of css classnames 3. atomic classnames are readable in dev tools 4. provides default colors and box shadows, etc.

In addition, they're starting to make a render-less component library (https://headlessui.dev/): that means you can customize how components look without having to understand how its javascript internals work, which I'd find a huge plus compared to other libraries like ant design or material-ui.

- vite + react

More beginner friendly than webpack in starting a new project, and faster developer experience: page reloads almost instantly when you're modifying a component.

Re: Ask HN: What novel tools are you using to write web sites/apps?

#48
Not sure if this counts, but for simple stuff (both front and back-end!) I've been loving regular JS template strings for rendering HTML. Your render logic ends up looking very similar to React functional components, and you can get editor extensions that do syntax highlighting inside the string.

There are obvious downsides - on the back-end it's slower than a proper templating system, and on the front-end you're rebuilding the DOM tree from scratch each time, with all the limitations that includes (performance, animations get interrupted, HTML state gets lost, any event listeners have to be re-initialized). But for simple stuff, I cannot recommend it enough.

Here's a back-end example from my personal website: https://github.com/brundonsmith/website/blob/master/src/rend...

And here's a front-end example: https://github.com/brundonsmith/blogs/blob/master/docs/site....

Re: Ask HN: What novel tools are you using to write web sites/apps?

#49

This partially might be more of a what's old is new again, but here's what I use: - 100% server side rendered - Progressively enhanced (fully works without JS, but having JS enabled makes it nicer) - In select places where I need SPA-like snappiness I use a ~100 line long DOM diffing algorithm (I request full HTML through AJAX and diff it into the current page; if the user has no JS enabled then the page just refresh…

No SQL database is the one thing I disagree with. What if you want to write a SQL query/report? Do you have transactions? As the app gets bigger you might want that.
Post reply on HN