News for hackers. Stuff that matters.
Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by llamataboot on Tuesday October 22, 2013 @12:11PM (#6592865)
Foundation is a bit lighter and nicer IMHO, used it on a recent project, but I'm going to suggest going for something like neat instead http://neat.bourbon.io/

This assumes the primary reason you are using a framework is to get the niceness of an infinitely nesting responsive grid and you care about semantic HTML.

Putting the grid in your LESS or SCSS is so much nicer than littering your HTML with "large-4 columns", etc -

Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by ville on Tuesday October 22, 2013 @01:07PM (#6593272)
Note that you don't have to use the classes like "col-lg-4" in Bootstrap either. You can use your own classes and build the grid with .make-row() and .make-lg-column() mixins instead. (See http://getbootstrap.com/css/#grid-less for examples.)

I'm currently using Bootstrap in two very different projects. One is an internal admin site where we have managed to get very far just using Bootstrap components in the HTML without any custom CSS at all. It's an AngularJS project and with Angular directives for Bootstrap (http://angular-ui.github.io/bootstrap/) you can use Bootstrap like any native UI toolkit and if you don't need a customized look and feel you can get by with the defaults or just add a Bootstrap theme (http://bootswatch.com/) on top.

Another one is a large application with lots of LESS stylesheets and themed for different clients. By building our custom UI components in the same way as Bootstrap components are built we have managed to keep it very easy to customize for different themes. Bootstrap provides whole lot of variables as customization points and we have added a bunch of our own on top. By changing those variables we can create new themes very easily.

For choosing Bootstrap vs Foundation, just pick one you like. More importantly, use the components provided by the framework as much as you can. When you to roll your own components, make them in the same modular fashion as the framework components. Put components in their own files and namespace them with classes. This way you can keep things nice and modular, and your stylesheets don't turn into an entangled monolithic blob that is difficult to maintain.

Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by DanielKehoe on Tuesday October 22, 2013 @01:38PM (#6593486)
OP here. Maybe this is what I should do for my example applications and the "Learn Ruby on Rails" book. Use mixins from either Bootstrap or Foundation in a CSS file so I can use my own semantic CSS classes in the application views and isolate my code from the front-end framework. Though it sounds like too much complexity to introduce to Rails beginners in the book.
Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by jelled on Tuesday October 22, 2013 @12:42PM (#6593107)
I'm going to check out neat, thanks for the link. I also dislike seeing grid markup all over the html.

As far as foundation vs bootstrap I've used both tend to prefer foundation.

Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by fein on Tuesday October 22, 2013 @12:28PM (#6592998)
Foundation 4 user here.

The only benefit bootstrap has over foundation (imo) is the huge number of plugins that already exist. I had to adapt datepicker, xeditable, datatables.js (the worst offender), etc in order to play nice with F4.

Aside from the snazzy 3rd party UI elements (F4 has some in the playground), F4's semantics rock my socks.

F4's docs also explain damn near every line of SASS you'll ever need, so this should fit perfectly with a rails project. All of my work has been in PHP.

Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by Bahamut on Tuesday October 22, 2013 @12:31PM (#6593021)
For those who use Angular, the Angular UI Bootstrap plugin is CSS agnostic, so the datepicker would be nice and easy to use with Foundation :) .
Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by ecaron on Tuesday October 22, 2013 @01:51PM (#6593596)
Except the land of getting AngularJS & Foundation to play nicely is full of unresolved landmines (e.g. http://coder1.com/articles/foundation-4-angularjs)
Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by 5vforest on Tuesday October 22, 2013 @12:01PM (#6592779)
Bootstrap 3 introduces some pretty weird markup IMO. Foundation is a bit better, but I'm going to suggest something unpopular, which is to use a lighter-weight framework like http://purecss.io/ or http://cardinalcss.com/ instead.
Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by mikeroher on Tuesday October 22, 2013 @12:12PM (#6592880)
PureCSS really needs to improve its markup. I tried using it but soon found my CSS littered with 'pure-' everywhere. And the grid is really "unsemantic" (?). It might just be my personal opinion, but I really disliked it.
Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by jrhorn424 on Tuesday October 22, 2013 @06:18PM (#6595375)
Have you looked into https://github.com/dhg/Skeleton? It's very lightweight. If you want something heavier, but semantic, I like http://gumbyframework.com/. I think it was based on 960gs. It also looks pleasant.
Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by pspeter3 on Tuesday October 22, 2013 @01:32PM (#6593438)
Cardinal seems pretty awesome. Thanks for sharing!
Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by berto99 on Tuesday October 22, 2013 @02:02PM (#6593709)
cardinal looks exactly like inuit.css
Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by SkyMarshal on Tuesday October 22, 2013 @12:27PM (#6592989)
Suzy is another good one worth evaluating.

http://susy.oddbird.net/

Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by poxrud on Tuesday October 22, 2013 @01:42PM (#6593522)
Another vote for Susy. It is ridiculously easy to create a responsive grid using their sass mixins.

Susy should not be compared to Bootstrap/Foundation since it is just a small grid system and not a full blown framework. It can be compared to something like Bourbon Neat.

Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by DanielKehoe on Tuesday October 22, 2013 @11:55AM (#6592734)
My decision: For the book [1] I chose Zurb Foundation. For the RailsApps example applications [2] I intend to support both using the Rails Layout gem [3].

[1] http://www.kickstarter.com/projects/909377477/learn-ruby-on-...

[2] http://railsapps.github.io/

[3] https://github.com/RailsApps/rails_layout

Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by DanielKehoe on Tuesday October 22, 2013 @12:16PM (#6592907)
I like the naming scheme for Semantic UI (though I'm not sure it is truly "semantic" and it seems a bit pre-release still). PureCSS and Cardinal are new to me (thanks for the info, HN people!). Maybe I can include them as options in the RailsLayout gem. For the beginner's book, I still think Foundation is optimal (for popularity plus direct support for Rails with Sass and a gem).
Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by bwilliams on Tuesday October 22, 2013 @01:08PM (#6593275)
I really like to rock [Bourbon](http://bourbon.io/) and [Neat](http://neat.bourbon.io/). It's not a complete solution like Bootstrap or Zurb but it has just about everything you need to build off of. It's more of a long term solution than Bootstrap or Zurb.
Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by subpixel on Tuesday October 22, 2013 @01:48PM (#6593574)
On a current project, I got seduced by all the 'potentially useful' javascript that comes with Bootstrap. But in my experience, Bourbon/Neat were a whole lot simpler to work with. And pretty much everything I'd ever need (e.g. scroll spy functionality) can be accomplished with jQuery and available jQuery plugins.
Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by DanielKehoe on Tuesday October 22, 2013 @01:30PM (#6593423)
Say more? Why more of a longterm solution? Longterm is what I need since I am introducing it in "Learn Ruby on Rails" which is my book for beginners that I don't want to have to rewrite often.
Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by runako on Tuesday October 22, 2013 @01:08PM (#6593278)
Google Trends says Bootstrap is ~7x as popular as Foundation:

https://www.google.com/trends/explore?q=twitter+bootstrap#q=...

On that basis, I'd go with Bootstrap.

Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by DanielKehoe on Tuesday October 22, 2013 @01:27PM (#6593398)
OP here. The issue is integrating Bootstrap with Rails, relative to Zurb providing a supported gem for Rails. And breakage for SimpleForm going from Bootstrap 2.3 to 3.0. I'd be happy to choose Bootstrap on the basis of its popularity but I need a front-end framework I can recommend in my "Learn Ruby on Rails" book that isn't going to have integration issues with new versions.
Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by phillmv on Tuesday October 22, 2013 @02:08PM (#6593762)
I would just not use SimpleForm, especially if you're pushing it on newbs. It does for views what Inherited Resources does for controllers, i.e. replace a really simple system with horrendous workarounds should you want to do anything other than the default.
Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by subsection1h on Tuesday October 22, 2013 @03:04PM (#6594027)
Horrendous workarounds?

You don't need to use SimpleForm for every form in an app.

Also, you aren't restricted to using SimpleForm helpers when using simple_form_for. You can use input_field, label, etc. anytime you want to.

Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by dallen33 on Tuesday October 22, 2013 @12:23PM (#6592962)
Bootstrap has a nicer grid system, in my opinion. XS/S/M/L vs. S and L with Foundation.
Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by ecaron on Tuesday October 22, 2013 @01:57PM (#6593653)
4.3 introduced a M, for what its worth (http://foundation.zurb.com/docs/changelog.html)
Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by dallen33 on Wednesday October 23, 2013 @02:58PM (#6600852)
True, but it's "experimental" only.

http://foundation.zurb.com/docs/components/grid.html

Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by Robdel12 on Tuesday October 22, 2013 @12:07PM (#6592842)
Foundation. Main reason being Foundation is built on SCSS and bootstrap is built on LESS.
Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by te_chris on Tuesday October 22, 2013 @04:07PM (#6594569)
Just remember, foundation 4 is mobile first and IE <8 don't support media queries. Have been burnt with this recently and it was a huge pain in the ass, so just a warning for those who still need to support such people.
Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by thomasmeeks on Tuesday October 22, 2013 @12:05PM (#6592828)
Been using Zurb on a free-time site for about 9 months. I've been consistently impressed with it. It gave me a good place to start, and customization has been a breeze.
Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by sevfurneaux on Tuesday October 22, 2013 @12:16PM (#6592903)
I'd use neither and go for the Skeleton CSS framework. Nice and clean: http://www.getskeleton.com
Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by jcomis on Tuesday October 22, 2013 @12:33PM (#6593031)
skeleton was great when it came out and I used it a lot, but I think it's gotten a bit dated. Not being mobile first is a the largest issue for me.
Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by paultannenbaum on Tuesday October 22, 2013 @01:51PM (#6593602)
I've used both extensively.

Foundation uses SASS, is more modular in approach, is much easier to re-skin, and has a better grid system.

Bootstrap uses LESS, has much more mind share, more plugin and theme support, and has better default styling.

Both are great frameworks. I tend to use Bootstrap for prototyping, and Foundation for production.

Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by beat on Tuesday October 22, 2013 @12:19PM (#6592939)
I've been developing my work using Foundation. I can't say I'm making a terribly informed decision, because I'm a back end guy and I'm still learning to write good modern front end. But Foundation felt better to me, and it's not driving me up a wall yet.
Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by jwallaceparker on Tuesday October 22, 2013 @01:11PM (#6593297)
Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by philliphaydon on Tuesday October 22, 2013 @12:21PM (#6592948)
I'll never touch bootstrapper while it has no semi-colons.

Zurb is awesome, but I'm using Semantic UI now. It's new, no V1, but I enjoy working with it more than any other web framework I've used.

Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by JDSD on Tuesday October 22, 2013 @12:36PM (#6593057)
I would definately recommend ZURB foundation, and would try to leverage use of mixins, although it is a bit more advanced.
Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by joeblau on Tuesday October 22, 2013 @12:52PM (#6593179)
Bootstrap: Bigger community, more widgets, more support and more examples.
Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by nc on Tuesday October 22, 2013 @12:42PM (#6593103)
Foundation 5 looks incredible, might be worth checking out too.
Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by ecaron on Tuesday October 22, 2013 @01:59PM (#6593679)
Where do you get that information from? The only F5 information that I can find is http://abetteruserexperience.com/2013/08/get-a-sneak-peek-of..., and the changes fall into the camp of "things I don't need to hold my breath for."
Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by berto99 on Tuesday October 22, 2013 @01:50PM (#6593590)
how about purecss? purecss.io
Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by sdf123 on Tuesday October 22, 2013 @12:02PM (#6592798)
Both Twitter and Foundation are for idiots. You should go with something better, like SemanticUI or PureCSS (http://purecss.io/)
Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by beat on Tuesday October 22, 2013 @12:07PM (#6592838)
Alas, most people (including me) are idiots, so the Bootstrap/Foundation debate is important to us.
Re:Twitter Bootstrap or Zurb Foundation for RailsApps? by AJAlabs on Friday October 25, 2013 @09:26AM (#6611415)
Bootstrap!