[Rails][ANN] BoilerPlate 0.1.0 -- An application skeleton for Ruby on Rails

M

Michael Schuerig

Hi folks!

I'd like to announce the availability of a first version of BoilerPlate.
See the README below.

I hope you enjoy it. There are still several rough edges, so play
carefully. I'm looking forward to your comments and suggestions.

Michael


= BoilerPlate -- An application skeleton for Ruby on Rails

BoilerPlate is (intended to become) some general code on top of
Rails for easily creating list and form views.
See below for some more details.

BoilerPlate is still in its infancy. There will almost certainly, and
out of sheer necessity, be fundamental changes.
At the time of this writing, I'm using Rails for about eight weeks.
BoilerPlate is what has become of my efforts thus far, but there are
bound to be problems in there due to my misunderstanding of Rails and
the other pieces of the puzzle.

This release is primarily meant to gather feedback. I appreciate your
suggestions for improvement, comments on the code. Helpful advise on
how to improve test coverage.

It is very unlikely that BoilerPlate in its current state is useful for
anyone. But I hope that it contains enough otherwise reusable code and
demonstrates some interesting techniques.

To get an idea how it looks and feels, please go to

http://www.schuerig.de/michael/boilerplate

There you get to see some screenshots and static generated pages with
client-side functionality intact. I am sorry, currently I've got no way
to
host a live demo.


== Requirements

* libgettext-ruby - debian package or from
http://ponx.s5.xrea.com/hiki/ruby-gettext.html
* ruby-json - available as a gem from RubyForge


== Installation

* Unpack the tarball/zip.
* Add symbolic links (or equivalent) to all the top-level rails packages
to the vendor directory.
* Create a new MySQL database user named "boilerplate" with enough
rights to create and use databases.
* Create and populate a MySQL demo database by running
+script/create_and_populate_demo_db+.
* +script/server+
* Point your browser to http://localhost:3000


== The Good

* It looks pretty nice on the right browsers. Firefox, Konqueror, and
hopefully Safari.
* High level of abstraction. A lot of things can be done
quasi-declaratively.
* Forms
 * User-friendly display of conflicts from optimistic locking.
 * Mostly declarative client-side validation.
 * Widgets for calendars, popup choosers of associated objects,
many-to-many choosers.
 * Marking of changed fields.
* List views
 * Drag & drop of columns.
 * Filter criteria per column.
* Rudimentary support for "What's This"-type help messages.

== The Bad

* Test coverage is scant at best. Sigh.
* Internet Explorer mangles the page layout into an unusable mess.

== The Ugly

* Some heavy, though transparent, patching into Rails functionality.
* Too much HTML in helper methods.
* The code organization is somewhat messy.
 * Some code hasn't found its right place yet.
 * I haven't wrapped my mind around what needs to be required where (and
in what way).
* I'm confused about strings and symbols as hash keys and it shows in
the code.

== The Missing

* Query criteria can't be saved yet
* Column filtering for attributes of associated objects.
* Ajax for
 * reloading only table bodies in list views
 * showing only matching candidates in many-to-many choosers

=== If I had a wish: What I'd like to have in Rails

Most of all easier access to reflection information. Rails really ought
to be able on its own to derive validation constraints from the
underlying database meta data. _And_ any validation constraints ought
to be open to reflection. Currently, I'm patching my way through Rails
to bring NOT NULL constraints easily to the generated HTML as
+class="mandatory"+ attributes. I'd feel better without the patching.
See http://dev.rubyonrails.org/ticket/861

Also, I'd really like to see my additions to associations and the
enhanced
+select+ tag functionality in Rails.


== The Goodies (easily usable independently of BoilerPlate)

* navigable.rb - accessing properties along paths
* Extensions of standard Ruby classes, e.g. Enumerable#join_on
* Client-side validations based on HTML class attribute.
* Dynamic markers for changed form entries.
* JavaScript extensions and Protoplus.js


== Acknowledgements

Thanks to all the helpful people who answered my questions on

* the Rails mailing list
* comp.infosystems.www.authoring.html
* comp.lang.javascript
* comp.lang.ruby
* de.comm.infosystems.www.authoring.misc
* de.comp.lang.javascript


== Author

I'm a software developer located in Bonn/Germany.
If you'd like to get an idea of what I do and what I'm interested in,
please visit http://www.schuerig.de/michael.
I've more than enough work to do all the time, it would be nice if
more of it was paid. Available for hire.


== License

This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2.1 of the License, or (at your option) any later version.
See http://www.gnu.org/copyleft/lesser.html
 
C

Carl Youngblood

------=_Part_891_22168455.1119028028746
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

This stuff looks pretty cool. Any chance that it could get included in the=
=20
base rails distribution? Or at least turned into a generator?

Thanks,
Carl

=20
=20
Hi folks!
=20
I'd like to announce the availability of a first version of BoilerPlate.
See the README below.

------=_Part_891_22168455.1119028028746--
 
M

Michael Schuerig

Carl said:
This stuff looks pretty cool. Any chance that it could get included in
the base rails distribution? Or at least turned into a generator?

It won't be included as that would be against DHH's policy of keeping
Rails slim and general. Incidentally, I agree.

My plan is to package BoilerPlate as a gem and provide a generator. I'm
just not there yet. So far, I haven't got the faintest idea how
generators are implemented and there are things with higher priority.
Anyway, maybe I've got it figured out by the end of this month.

What would you like to see in a generator? What I can think of,
currently, is very little: make an installed BoilerPlate gem available
to the project. Regarding any other tasks, I'm trying to keep the level
of abstraction in the code very high, so that it's easier to write code
directly than generating it.

Anyway, keep your suggestions coming.

Michael
 
C

Carl Youngblood

------=_Part_975_22797729.1119034804862
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
Content-Disposition: inline

On second thought, a gem would probably be all that's needed, since from=20
what I have seen of your view code, most of the work is done for you behind=
=20
the scenes by your modifications to rails.

=20
What would you like to see in a generator? What I can think of,
currently, is very little: make an installed BoilerPlate gem available
to the project. Regarding any other tasks, I'm trying to keep the level
of abstraction in the code very high, so that it's easier to write code
directly than generating it.

------=_Part_975_22797729.1119034804862--
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,731
Messages
2,569,432
Members
44,832
Latest member
GlennSmall

Latest Threads

Top