Thanks for the feedback, Justin.
A few others had mentioned the same concern about too many things in one
file. In actuality, you don’t have to put everything in one file, even
though that’s the way I generate it. You could use as many files as you
want, however the reason I put into one file is to make it more DRY so
if you are editing a layout that is used to wrap many different views. I
didn’t want to have this code duplicated, yet it needs to be there if
want to get a real picture of what it will look like in your WYSIWYG
with everything wrapped around it like it should be.
To help things at design time, I use design time only stylesheets to
the parts you are not working on in the WYSIWYG editor and I have some
standalone in browser (without rails running). This lets you visually
with one page at a time while still not having code duplicated. Of
when you look at the source it is all there and could get large going
You can still split out into many files, if you want, it just won’t be
DRY. This might be necessary for larger projects or ones that share
heavily. We’ll have to kick some ideas around in this area to see if we
come up with anything to give you the best of both worlds. I could
some sort of rake task that lets you update the layouts of other files
the main one, that would allow you to break things out and yet still be
It’s a little more complicated doing that, but it should work.
And yes, I had considered going direct from the masterview file calling
directly without generating intermediate (rhtml) files, and this could
the way we move in the future. However I decided to start with the
generation approach so that we could see what was being created and
by ERb (so if anyone had any doubt they could simply look at the
code). This allows one to learn by trying and will make it easy for
to find bugs in the code. It also has a side effect of allowing you to
generate the files on a different box and copy them to any rails server
one without the masterview plugin since they are pure ERb (however
not a big feature since we could have a rake option to generate those or
something). It was mainly done for debugging, clarity, and to start
with the intent to re-evaluate at a later date. It is certainly
that can be changed going forward or maybe even be made configurable.
Thanks for taking the time to check it out and provide some feedback!! I
really appreciate it.