[ANN] MasterView 0.3.4 Rails-optimized (x)html template engine

  • Thread starter Jeff Barczewski
  • Start date
J

Jeff Barczewski

= MasterView - Rails-optimized (x)html friendly template engine

MasterView is a template engine plugin that provides another option to
the existing rails view templates (rhtml and rxml). This template
engine has all the power of layouts, partials, and rails helpers but
is still editable/styleable in a WYSIWYG editor.

Another major goal it to have the syntax of these attribute directives
be very similar to rails helpers so that one could intuitively start
using MasterView with little learning curve other than knowing rails.
MasterView users can additionally create their own directives to
encapsulate custom functionality so the system can be easily extended
into specific uses.

MasterView was inspired by Amrita, Kwartz, Tapestry, Zope/PHP TAL,
Liquid, and Web Objects but designed with a fresh approach and
specifically targetted for rails users.

There are several ways to use MasterView:

- Start with a pure HTML prototype of your site and add directives to
the pages to make them live. You can continue to WYSIWYG edit HTML
prototype throughout project life cycle. (See screencast for
demonstration)

- If you don't have an HTML prototype and want to generate a CRUD
application, you may use the MasterView generator which creates a
styled CRUD application which you can then change as needed.

- If you already have an application but would like to use MasterView,
you can start to use MasterView for new pages. MasterView will
co-exist nicely with existing rhtml and you can slowly evolve the site
over time.

== Recent changes (Release 0.3.4) - Partial enhancement and maintenance
Make values in gen_partial and import_partial retain their page
specific values, allowing you to specify different locals,
collections, or objects for import_render than you do on gen_partial.
Also allows you to reuse the partial multiple times on a page with
different values. (thanks James Britt)

Fix rebuild template so that it uses the same list of XHTML empty
elements to determine whether to collapse empty elements (thanks to
Brian Jordan)

Fixed a problem with CruiseControl where ActionController was not
defined when masterview was initialized. (thanks James Britt)

Added mv:generate_all_rhtml rake task which generates all rhtml files to make it
more obvious for users who want to generate the rhtml files. Also
changed the way
gen_partial and import_render work with regards to collections,
object, and locals,
they now retain the values from the page even after rebuild. This
allows you to have
different values on each page and even different values on the same
page if use partials
multiple times on a page.

== Recent changes (Release 0.3.3) - Maintenance release plus auto_copy
Added auto copy feature which can be configured to automatically copy
static files like stylesheets, images, and javascripts from a
non-standard location to the proper location at runtime (under Rails
public). This makes it easy to use HTML prototypes and associated
files with MasterView eliminating any manual copying.

This release fix adds doctype to generated code, and a bug in
gen_replace which outputted <% %> rather than <%= %> (thanks Jon
Frisby). Fixed defect in multipart form and stylesheet_link directives
(thanks Rajavel Lenin).

Made REXML sax2parser configurable. Generator now creates example for
custom admin auth mixin controlling authentication with custom code.
(thanks David Koontz)

Fix defect which prevented MasterView to be used with Goldberg or
other plugins which alter the view base unless MasterView was
configured to generate the rhtml files.

Fix rails runtime detection when running in RadRails which launches using -e

Added rake task mv:clean_mv_rhtml task which removes the MasterView
generated rhtml if you have configured MasterView to generate to the
file system. Only removes files that it generates leaving other rhtml
untouched. This is useful when switching to not generating rhtml mode
when it was previously enabled.

== Release 0.3.2 - Maintenance release plus custom admin auth
This release addresses a compatibility problem with Rails 1.2 where a
view syntax error would not display the normal debug output but
instead displayed only a blank screen. Also fixed a parsing problem
with multiple parameters in some directives. Added the ability to use
custom mixin for authorization to MasterView admin screens. Changed
the MasterView generator to use request, flash, and params rather than
deprecated @request, @Flash, and @params. Tested with Rails 1.2.2


== Details

Author:: Jeff Barczewski
Email:: jeff.barczewski (at) gmail (dot) com
Primary developers:: Jeff Barczewski, Deb Lewis
Website:: http://masterview.org
Rubyforge project:: masterview (http://rubyforge.org/projects/masterview)
License:: MIT open source license like Rails


=== Video ===

A short video demonstrating use of MasterView converting an HTML
prototype into a live application while still allowing round trip
WYSIWYG editing.
http://masterview.org/media/html-to-live/screencast.html


=== Screenshots, illustrations, other video ===

http://masterview.org/media_list.html


=== Packaging ===

MasterView is distributed as a gem or a plugin. You may install it as
a gem and then generate a lightweight plugin which mainly refers to
the gem *or* you can simply install as a plugin which is self
contained. I personally prefer installing as a gem for ease of
management, however if you are running at a shared hosting environment
you might not have authority to install this gem so you may install as
a self contained plugin.


== Goals

- Create/extend a template engine for rails that would be XHTML
friendly and thus could be edited/styled with a WYSIWYG HTML editor
even late in development without breaking template.
- Keep it simple. DRY. No extra config files, simple syntax with ruby flavor.
- Design it specifically for ruby and rails. Use the full power and
not be limited in its capabilities over what can be done with ERb
- Work nicely with layouts, partials, and rails html helpers.
- Reduce complexity, work with existing rails code, no extra view
logic or hashes than what is used by ERb. Scaffold generate initial
templates or work from existing html prototype.
- Reduce the numbers of files, simplifying editing. Define partials
and layouts naturallyl right in the template, no need to go to another
file.
- Preview in browser without running an app. Allow for dummy data in
the template so that the page can be viewed and styled independently
of the application.
- Performance equal to ERb


== Prerequisites

Requires::
No external dependencies

Optional::
tidy (gem) and tidy library
if these are installed you can use tidy to cleanup
html into valid xhtml for use by MasterView

log4r (gem)
if this gem is installed then MasterView will use
it for logging otherwise it defaults to using built
in Logger.



== User Documentation

MasterView documentation is available online at the MasterView site:
http://www.masterview.org
and on the rubyforge project
http://rubyforge.org/projects/masterview/


== Installation

Detailed installation instructions for installing the masterview gems
or a self-contained copy of the plugin is provided in the MasterView
Installation Guide.

The Configuration Guide describes how to customize the configuration
of the MasterView template engine for your application.


== Usage

The MasterView User's Guide and a complete Directives Reference are
provided in the MasterView user documentation. MasterView templates
can be created by adding masterview directives markup to an (x)html
ptototype, or can be generated for typical Rails controller/view
scenarios using the supplied masterview generator developer tool.

A MasterView Admin controller can optionally be activated in your
application to assist you during development with creating and
managing your templates.


== Next Steps

Visit the online documentation page at http://masterview.org/ for
screenshots, illustrations, complete installation and usage
information.

We would love to hear your feedback and ideas around this project!
Visit the rubyforge project to join the users mailing list or to add
yourself to the announce list to receive future announcements. Check
out the video to see MasterView in action!

Thanks for your time!!


MasterView Development Team
Jeff Barczewski and Deb Lewis
 
G

gga

Jeff said:
= MasterView - Rails-optimized (x)html friendly template engine

MasterView is a template engine plugin that provides another option to
the existing rails view templates (rhtml and rxml). This template
engine has all the power of layouts, partials, and rails helpers but
is still editable/styleable in a WYSIWYG editor.

This is beautiful. Thanks for writing this. It addresses rails one
and only major shortcoming.
 

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
474,053
Messages
2,570,431
Members
47,075
Latest member
TysonV438

Latest Threads

Top