The State of Formtastic Bootstrap

TL;DR

I’m working on the next version. The fact that Rails, Formtastic and Bootstrap all changed just as I was starting a new job and a family have made it hard to give the attention in deserved.  I will be looking for help with the project going forward.  I will communicate more.  Thank you to everyone!

The Longer Version

Hello to all of the beautiful people who have used Formatastic Bootstrap over the last 9 or so months.  The project has met with more success than I would have every imagined  Thank you!

As you’re likely aware, the project has fallen behind these last several months.  I want to communicate how things got here, where things are now and how I’d like to proceed going forward.

How We Got Here

In November 2011 I had finished winding down my startup project and while looking for a job, I kept myself busy working on various projects.  It was easy to find the time as my week was free and my son could not yet walk (and get himself into trouble!)  Also, the mapping between the output of Formtastic and the markup created by Bootstrap was not so dissimilar.

In December 2011, I had the very great fortune to join a startup where I was helping to build the development team and product.  Within the next two months, Rails, Formtastic and Bootstrap all underwent major upgrades.  I simply did not have time to work on the project as I chase my son and got up to speed at my new job.

In the meantime, several folks took branches and submitted pull requests that provided support the newer versions of Rail, Formtastic and Bootstrap.  I thank them for this!

However, even as I was writing the original version of Formtastic Bootstrap I was unhappy with how it was put together and none of the changes that have been offerred address these issues.  Of course, no one could know this because I’ve never stated this publicly.

Where Things Are Now

Through the Summer of 2012 I have been working on Formtastic Bootstrap v2.0.  This will support Rails 3.2, Fortastic 2.2 and Bootstrap 2.x.

The progress is going slowly.  I only have a couple of hours to work on it every few weeks.    I do not have a stated release date.  (I thought I would be done by the end of July at one point.)

I will push a branch soon which will have the current state of my work.  It will be work in progress (i.e. you shouldn’t point your Gemfile at it!)  However, you should have some idea of how things are progressing from that branch.

One goal is to try and play more nicely with Formtastic so that it will be easier to respond to the changes made in that project in the future.  I am also updating the Formtastic Bootstrap test suite with Formtastic’s.

I’m trying to restructure the code so it is clearer how they produce Bootstrap-friendly markup.

The additional challenge is that the mapping between Formtastic’s generated output and what Bootstrap is expecting is less clear.  It is taking me longer to figure out what to do in each particular instance. (This is made more difficult by the fact I am away from the work for weeks at a time.)  Bootstrap has also added a lot more features.

Going Forward

I am actively soliciting collaborators for the project.  If you are interested, please get in touch with me.  I’m thinking that once the v2.0 release or release candidate arrives, we can help polish it up, add support for additional Bootstrap features, provide better documentation and in general just incrementally keep up with Formtastic and Bootstrap (and of course Rails 4 is on the way…)

I will communicate the status of the project more regularly, sometimes on this blog but probably more often using twitter.

Thank You

Formtastic Bootstrap has been downloaded on 14,000 times and has over 100 forks on Github.  I never in a million years would have imagined I’d put together something so useful!  Thank you to everyone who has used it and who has been so patient over the past few months.

3 thoughts on “The State of Formtastic Bootstrap

  1. For this kind of mapping project, I think the best long term pattern is to have an intermediate model which reflects the bootstrap components and knows how to.render itself as html. Then have a mapping layer from formtastic to this bootstrap model. Other form buildes could even reuse.such a model. Then have this bootstrap-model as a gem. Would be the ultimate solution to maintain etc IMO. I might start such a gem real soon. I did sth simular for prawn to html conversion… thoughts, opinions?

    • This is an interesting idea and it definitely warrants additional conversation.

      I did contact Justin French (author of Formtastic) this January to see if he would consider changing Formtastic to emit a more abstract intermediate form. He thought it was a reasonable idea, but has no direct use for it (or time) so he’s not going to do it. I don’t have time to add it either.

      I do wonder if a “bootstrap-model” approach would cause the loss of a lot of the Formtastic markup: the ids and classes that Formtastic adds to every element. I am not sure how much people actually make use of this though beyond required/options and errors.

      Again, I think what you’re proposing is a really interesting idea.

  2. Ideally I think it would be better to split the gem into two. One gem should be a bootstrap-model which would be a Composite model, perhaps using the Builder and Decorator pattern and knows how to render itself as bootstrap compliant HTML.
    The other gem, call it formtastic-bootstrap, would know how to map formtastic DSL into this intermediate model and then call render on that model to generate the html.

    This bootstrap-model gem could then be reused by other form builders or bootstrap targeted view components of any kind ;) What do you think?
    I would like to start development of such a gem if people show interest.
    Cheers!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s