Need advice about which tool to choose?Ask the StackShare community!
BEM vs Foundation: What are the differences?
BEM (Block Element Modifier) and Foundation are two popular front-end development methodologies and frameworks used to build responsive and maintainable websites.
Naming Convention: BEM uses a naming convention that helps developers better understand the structure of the code by naming blocks, elements, and modifiers. Foundation, on the other hand, provides a flexible framework with pre-styled components and utilities that simplify building responsive websites.
Modularity: BEM emphasizes modularity by breaking down components into blocks, elements, and modifiers, promoting reusability and a more organized codebase. Foundation offers pre-built modules and components that can be easily integrated into a project without the need for extensive customization.
Flexibility: Foundation provides a more flexible approach to styling and layout, allowing developers to customize the framework to suit their specific design needs. BEM, on the other hand, focuses on maintaining a consistent naming convention and structure throughout the codebase, which can sometimes limit flexibility.
Community Support: BEM has a strong community of developers who advocate for its benefits and best practices, making it easier for new developers to learn and adopt the methodology. Foundation, being a widely-used framework, has a larger community with extensive documentation and resources for developers to access.
Design Patterns: BEM follows a specific design pattern that promotes consistency and predictability in the codebase, making it easier to collaborate with other developers and maintain code quality. Foundation, while providing a solid foundation for building websites, may require additional effort to enforce consistent design patterns and coding standards across projects.
In Summary, BEM focuses on modularity and maintainability through a strict naming convention, while Foundation offers flexibility and pre-styled components for building responsive websites.
Pros of BEM
Pros of Foundation
- Responsive grid160
- Mobile first93
- Open source80
- Semantic75
- Customizable72
- Quick to prototype52
- Simple ui50
- Fast45
- Best practices44
- Easy setup39
- Neutral style6
- HTML, SCSS and JS6
- Accessibility support5
- Professional5
- Xy grid3
- Sass2
- Every new version is smaller, smarter & more efficient2
- Robust1
Sign up to add or upvote prosMake informed product decisions
Cons of BEM
Cons of Foundation
- Requires jQuery5
- Awful site4