r/javascript 8d ago

I created a zero dependency JavaScript framework that is a React alternative

https://codeberg.org/createthirdplaces/places-js

Places.js is a lightweight Javascript framework for creating interactive websites promoting in person interaction. The framework supports the following features and has no external JS dependencies.

  • Asynchronous data fetching.
  • Components with Shadow DOM to encapsulate styles and deter bot scraping.
  • State management that integrates with components and data fetching logic.
  • Support for creating pages that are a combination of static HTML and islands of interactivity.

To get started, download the places-js-latest.js file from this repo. See the places.js documentation at https://createthirdplaces.org/tech/placesjs.html for a more detailed guide

  • This repo has an example of how places.js is used.
  • This website has shows how places.js is used in a production environment
0 Upvotes

8 comments sorted by

3

u/theScottyJam 8d ago

Components with Shadow DOM to [...] deter bot scraping.

Is this a thing? I'm not sure why the shadow DOM would cause any kind of difficulty with bot scraping - they should be able to see the contents of the shadow DOM just fine as they operate outside of the page's sandbox.

If tools do struggle to see the shadow DOM, that seems like a general negative - many people care about SEO.

0

u/Positive_Method3022 8d ago

Specially now that they are using AI bots to scrape web as if they were humans when there is something developers did to make it harder for automated deterministic workflows

-2

u/create-third-places 8d ago

> Is this a thing? I'm not sure why the shadow DOM would cause any kind of difficulty with bot scraping - they should be able to see the contents of the shadow DOM just fine as they operate outside of the page's sandbox.

https://developer.mozilla.org/en-US/docs/Web/API/Web_components/Using_shadow_DOM

Shadow DOM is designed to be hidden from JavaScript DOM scraping tools that bots often use.
There are plenty of ways to work around this limitation, although they add complexity.

> If tools do struggle to see the shadow DOM, that seems like a general negative - many people care about SEO.

The framework is designed to be used on parts of the page that need to be interactive. The entire page doesn't need to be put inside the shadow DOM.

Static content that needs to be visible to tools such as a navbar can be rendered in HTML without JavaScript.

8

u/shrimpcest 8d ago

Shadow DOM is designed to be hidden from JavaScript DOM scraping tools that bots often use. There are plenty of ways to work around this limitation

...it wasn't designed for that.

1

u/iamsamaritan300 8d ago

Let me take alook.

1

u/iamsamaritan300 8d ago

The framework is good for plugging it in for some certain parts of the application but also the documentation is noisy and no clear on what is doing what before demonstrating it with code.

1

u/ExtremePermit3242 8d ago

Not to discourage you, but as honest feedback: https://codeberg.org/createthirdplaces/DMVBoardGames/src/branch/main/src/ui/FeedbackComponent.js . Even if it is zero-dependency, I see no reason to learn to write all this. At that point I’d rather pay the preact prize of 4KB min+gz and call it a day, or use other small Ux frameworks that are known.

I have seen more than 5-10 no-dep, no-something frameworks made recently (I assume all with AI). I really don’t understand the ponis

1

u/javascript 8d ago

Very cool!