News for hackers. Stuff that matters.
Re:Ten Years of Bootstrap by ThePhysicist on Monday August 23, 2021 @01:47PM (#28279453)
Really loved Bootstrap when it came out, but nowadays the style and its way of doing things feel a bit dated. That said with the current (good) state of CSS in browsers you can build your own responsive designs without relying on a framework.

A negative effect of all these frameworks is that I work with more and more frontend devs that just don't know their way around (S)CSS, so if you throw them into a project that uses a framework they don't know or (gasp) hand-crafted CSS they are completely lost. Same thing with Javascript tooling btw, in a recent project a frontend dev wanted to rewrite the whole codebase because he was not familiar with Webpack and only knew vite (which is the new cool thing it seems), so he wasn't able to work with the existing code.

Re:Ten Years of Bootstrap by idiot900 on Monday August 23, 2021 @02:01PM (#28279647)
Web development is not my job. I still use Bootstrap to very quickly make a passable UI for internal projects. I'm really glad not to have to spend time learning all that stuff.
Re:Ten Years of Bootstrap by codegeek on Monday August 23, 2021 @03:19PM (#28280668)
Easy to say now since we have more choices but bootstrap really changed the game for non designers. We still use it in production for our company and it just works.

Side note, for nostalgia, here is the HN posting on it from 10 years ago: https://news.ycombinator.com/item?id=2904355

Re:Ten Years of Bootstrap by bdcravens on Monday August 23, 2021 @03:12PM (#28280576)
> you can build your own responsive designs without relying on a framework

Except you'll build a framework. You'll add a bunch of classes for frequently used elements (nav, modals, buttons, etc), SASS variables, etc

Re:Ten Years of Bootstrap by JoeyJoJoJr on Monday August 23, 2021 @06:29PM (#28282824)
I don’t really see a problem with this. Every bootstrap project I’ve worked on has entailed lots of nasty and buggy overrides that are hard get your head around.
Re:Ten Years of Bootstrap by KronisLV on Tuesday August 24, 2021 @07:32AM (#28287394)
The problem is that the people who are onboarded 5 years into your project's development will be lost and will have to waste countless hundreds of hours learning your unmarketable framework.

They can't Google how to do something in your framework. They can't find component libraries that extend your framework. They probably can't find sandboxes that demonstrate every single one of your framework's use cases. The documentation of your framework is also likely to be worse than that of frameworks that have had tens of thousands man hours be put in their development and tens if not hundreds of thousands more battle testing them in production across a variety of projects.

Re:Ten Years of Bootstrap by nsonha on Tuesday August 24, 2021 @11:04AM (#28289785)
It’s not a framework, it’s just css. You are making a design system, which if you use bootstrap you still have to do anyway when reach to that point of scaling your front-end.

The difference is instead of having your style in a single language (css) in a cohesive system, you have styles in both css and bootstrap and they often clash.

Re:Ten Years of Bootstrap by KronisLV on Tuesday August 24, 2021 @11:27AM (#28290117)
Disagreed, in my entire career so far i've never seen CSS being written completely separately from the components that will use it - there is always strong coupling between how something should work and look. This is done by Bootstrap, Foundation, Materialize and others, the exceptions to this (like Spectre) being the minority.

For example, in Bootstrap and other frameworks you'll always have JS components as well, for non-trivial concerns, such as providing carousels, lightbox functionality, tooltips, collapsibles, tabs and so on. Not using any of those will mean having to write your own from scratch, which will only make the aforementioned problems worse. Sure, you could probably figure things out without too many problems if it was just CSS, but it never is.

Sure, you'll need custom styling on top of all of those anyways in most cases, but i'd argue that it's harder to screw that up and therefore most teams should just stick to the already tested and established solutions out there, like building atop Bootstrap or others.

Re:Ten Years of Bootstrap by nsonha on Wednesday August 25, 2021 @12:46AM (#28298137)
> carousels, lightbox functionality, tooltips, collapsibles, tabs and so on

I do want to reuse these, i just dont want to have to override the shitty style that comes with them that clashes with my design anyway. Also bootstrap for example doesnt do all of these so you would have to use yet another 3rd party library on top of bootstrap. Bootstrap is useless to me, but I’m not against component libraries in general.

Re:Ten Years of Bootstrap by KronisLV on Wednesday August 25, 2021 @02:08AM (#28298501)
I see! I think we just have differences of opinion/preferences here.

Bootstrap does provide most of those:

  Carousels - https://getbootstrap.com/docs/5.1/components/carousel/
  Tooltips - https://getbootstrap.com/docs/5.1/components/tooltips/
  Collapsible - https://getbootstrap.com/docs/5.1/components/collapse/
  Tabs - https://getbootstrap.com/docs/5.1/components/navs-tabs/
For lightbox functionality, you'd indeed need an external plugin (or just combine modal + responsive image), but i see the fact that such plugins are even available as a plus, since that means being able to download one and start using it, without spending days or weeks developing low level functionality.

I think that the difference here is that you seem to prefer to focus on the design part a lot more (which is valid in projects where the brand is front and center), whereas i care more about implementing functionality quickly and prioritize that. For the latter case, Bootstrap works nicely. Probably less so for the former.

Re:Ten Years of Bootstrap by ThePhysicist on Tuesday August 24, 2021 @03:59AM (#28286134)
Having designed several sites and products without frameworks (e.g. https://github.com/kiprotect/klaro/tree/master/src/scss) I think it's way more concise and easy than relying on a framework.
Re:Ten Years of Bootstrap by DrammBA on Monday August 23, 2021 @02:31PM (#28280028)
I don't understand the reasoning of that frontend dev, was he hired to work on the toolchain or on the frontend product? Because the tooling is almost irrelevant unless he was hired to maintain the toolchain.
Re:Ten Years of Bootstrap by wruza on Monday August 23, 2021 @04:57PM (#28281825)
Frameworks like bootstrap have one big advantage: less creative surface, more get things done surface. They are getting lost not because they don’t know css. They don’t know what was on your mind when you wrote it, and they usually have neither a clue, nor clear documentation, no comments, no common practice guide. Nothing. It is just a wall of fragile definitions already crippled by some previous maintainer to the level when any change explodes into a refactoring of a 20-page interdependent mess. Any negative effect of a framework is heavily offset by the fact that any handcrafted css is eventually fucked up (if not right away), and it is not even negative if a framework helps avoiding it.
Re:Ten Years of Bootstrap by danjac on Monday August 23, 2021 @03:18PM (#28280656)
Something like Bootstrap is great when you don't need the custom design or you don't have a CSS expert available. For example, backend admin CRUD views and reports. It doesn't matter if it looks a bit staid or dated, the end users just need familiar and usable.
Re:Ten Years of Bootstrap by vptr on Monday August 23, 2021 @02:01PM (#28279640)
This. I wish more devs tried to utilize modern css and js directly instead of relying on frameworks.

I try to do this for my own projects but there's gravitational pull toward frameworks in companies.

Re:Ten Years of Bootstrap by traceroute66 on Monday August 23, 2021 @02:33PM (#28280056)
> I wish more devs tried to utilize modern css and js directly instead of relying on frameworks.

Its all well and good saying that, as long as you do not value your time.

Personally, I would rather use a reasonably up-to-date framework such as Bootstrap 5 because Bootstrap has already taken care of the majority of those CSS hacks that are often required to make things look right on various browsers.

And frankly, why re-invent the wheel ? Most "utilize modern css and js directly instead of relying on frameworks" likely ends up looking like "a lot of boilerplate with a few customisations". So why not use Bootstrap for all the boilerplate and spend your time more productively by focusing on the customisations ?

P.S. JS is not a strict requirement for Bootstrap, it can be used CSS-only. But one added benefit of Bootstrap 5 in particular is they've removed the jQuery dependency.

Re:Ten Years of Bootstrap by ramraj07 on Monday August 23, 2021 @03:46PM (#28280992)
Tbh if you’re not a guy whos not full time doing web dev then you shouldn’t say that. I’ve known html since 1997, and basic js since 1999. It’s exhausting as hell to keep up with all the crap the field keeps making up. I just want a page that looks simple, neat, responsive and shows what I want my users to see. Bootstrap has been the only consistent thing that has allowed me to do that. It allows me to spend a day or half designing the page so I can get back to the data and the backend which is where the magic happens for most people.
Re:Ten Years of Bootstrap by throw_m239339 on Monday August 23, 2021 @03:02PM (#28280449)
> This. I wish more devs tried to utilize modern css and js directly instead of relying on frameworks.

Making any large front end application WITHOUT a framework or a view library is just a bad idea, even today. There is nothing in the DOM or spec-wise that is equivalent to the power of React or Vue, period.

When it comes to CSS, the situation is better. Flexbox, CSS grids, ... have made creating CSS layouts extremely easy. So CSS kind of successfully brought in a lot of things that were directly exploitable by front-end developers.

To this day, HTML and the DOM are JUST NOT RAD for complex UI, period. Web components have a few nice ideas but a lot of flaws (especially support on IOS). Whether you build your own framework or use someone else library, you will absolutely need something that sits on top of the DOM for large front-end applications.

So it's not by choice that most front-end devs have to rely on a framework. It's because the standards are not good enough.

> I try to do this for my own projects but there's gravitational pull toward frameworks in companies.

A simple example. you need a mechanism to manage the life cycle of event handlers on your page, if your app uses the history API. If you do so then you've already started writing your own framework.

Web components failed to address a lot of stuff developers use view libraries for. That's why it is not that popular.

Re:Ten Years of Bootstrap by cutler on Monday August 23, 2021 @04:22PM (#28281401)
If CSS was not a hack upon a hack I'd be with you but going back to the early 2000s I must have wasted weeks trying to debug obscure CSS corner cases. Yes, we now have flexbox and css grid to replace CSS-P but that has to work with all that came before it. Anything which reduces the time sink of messing with CSS is a blessing.
Re:Ten Years of Bootstrap by bwship on Monday August 23, 2021 @03:36PM (#28280876)
Yea, I like to use a framework. But I think devs should have the basics down about css. Like margins, padding, div vs. span, etc. I remember reading a css book on vacation in Aruba like 10 years ago, and just having the basics helps considerably, especially when just trying to debug small layout changes.
Re:Ten Years of Bootstrap by beepbooptheory on Monday August 23, 2021 @02:30PM (#28280013)
Hearing anecdotes like this are so nice because it means that maybe one day I can have one of those dev jobs where I can be bad at CSS.
Re:Ten Years of Bootstrap by obstacle1 on Monday August 23, 2021 @02:47PM (#28280234)
The vast majority of dev jobs don't require you to be good at CSS. Unless you're going for a front end position, which is a small minority of jobs, it's not even a factor.
Re:Ten Years of Bootstrap by milkytron on Monday August 23, 2021 @04:07PM (#28281255)
Yup. I've been doing various backend work for most of my career, and never once had to touch CSS for my work responsibilities.
Re:Ten Years of Bootstrap by gedy on Monday August 23, 2021 @02:23PM (#28279928)
I think too many people equate Bootstrap with just their grid system, and then assume "oh I can do this with CSS easily now". As a customizable baseline for styles and components it's much more than that. It's saved me and my projects from writing tons of bespoke CSS.
Re:Ten Years of Bootstrap by antidaily on Monday August 23, 2021 @02:46PM (#28280229)
I start a lot of projects with JUST the grid system (included with SASS) and add anything else I need later (usually buttons and modals).
Re:Ten Years of Bootstrap by cutler on Monday August 23, 2021 @04:16PM (#28281348)
Are you saying he didn't know JS or just Webpack? If the latter there's no shame in that considering he knew a better alternative, ie. Vite. That's like chiding someone for not knowing jQuery when they're familiar with Webpack.