Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Should I use raw web components? #37

Open
CarbonHeartDev opened this issue Jun 19, 2019 · 6 comments
Open

Should I use raw web components? #37

CarbonHeartDev opened this issue Jun 19, 2019 · 6 comments

Comments

@CarbonHeartDev
Copy link

I got informations about the new Web Components standard and I'm thinking to use them in building the front end of a web application but I'm worried about a thing: in many places I read that they aren't meant to be created manually and used "raw" but more as plumbing to use in the making of front end libraries and frameworks that needs a way to specify reusable and encapsulated interface components.

What's your stance on that? In the context of a small project (in short it's a single page application with 3-6 views) should I ignore these warning and manually build Web Components in order to have a frameworkless application (I plan to include just some lightweight libraries) or it's better to find a good front end framework?

@CarbonHeartDev CarbonHeartDev changed the title Should I use raw web components? Shall I use raw web components? Jun 20, 2019
@CarbonHeartDev CarbonHeartDev changed the title Shall I use raw web components? Should I use raw web components? Jun 20, 2019
@francesco-strazzullo
Copy link
Member

francesco-strazzullo commented Jun 24, 2019

Hi @EmiSan1998,
I don't think that here someone can really tell you the answer. Nobody knows the context of your project apart from you and your team. Virtually with web-components, you can also have a different tool for every component.

In my opinion, you can start with simple and frameworkless Web-Components and then add a framework when you need it. This approach will follow the YAGNI principle: you can start simple and add them only when is needed. https://it.wikipedia.org/wiki/You_aren%27t_gonna_need_it

@francesco-strazzullo
Copy link
Member

One of the tools that I use to choose if using a framework or not is the "Framework Compass Chart". It's a visual way to see the most important non-functional requirements of your project. You may find more information about it here

@dvelasquez
Copy link

I've worked extensively using web components and as close as vanilla I can get, and let me tell you, after a couple of months you will have your own library.
You will start noticing some patterns on how you build things and create little helpers for this.
There is nothing wrong with this approach at all! Just be mindful of this.

@CarbonHeartDev
Copy link
Author

I've worked extensively using web components and as close as vanilla I can get, and let me tell you, after a couple of months you will have your own library.
You will start noticing some patterns on how you build things and create little helpers for this.
There is nothing wrong with this approach at all! Just be mindful of this.

Have you got some public repos where you worked just with vanilla Web Components? I'm curious to know how you worked to take some ispiration for my projects.

@dvelasquez
Copy link

dvelasquez commented Jun 7, 2020

@EmiSan1998 Most of that is inside the github enterprise instance. But I can write an article about it, set up some code examples in my public github if you want.

I think the only "concession" we made with this was use TypeScript. I can go in detail on the reasons in the article. If you have some specific questions, feel free to ask and I will add it to the post ;)

@francesco-strazzullo
Copy link
Member

Hi @dvelasquez when your article is ready you may add a PR in our awesome list? https://github.com/frameworkless-movement/awesome-frameworkless ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants