From jeff.barczewski at gmail.com Sun Jul 1 13:58:01 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Sun, 1 Jul 2007 17:58:01 +0000 Subject: [Masterview-users] [ANN] MasterView 0.3.3 Rails-optimized (x)html template engine Message-ID: <19cda190707011058s3081f75as84eadd0b5511bee7@mail.gmail.com> = 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.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 From james.britt at gmail.com Mon Jul 2 19:38:51 2007 From: james.britt at gmail.com (James Britt) Date: Mon, 02 Jul 2007 16:38:51 -0700 Subject: [Masterview-users] Forcing a rebuild of all templates from the command line Message-ID: <46898C8B.3040200@gmail.com> I may be doing something wrong, but I can not get my rhtml view files re-built on-demand. For example, if I delete all the rhtml that have been generated from MasterView HTML files, and call the rake task mv:rebuild_all, I do not see the rhtml files recreated. If I go through the MasterView admin Web page it seems to work, but only if I go and alter the html files. (Running 'touch' on the files doesn't help.) It seems that the rhtml files do not get created unless MasterView thinks the source HTML has changed, even if the rhtml files do not exist. And then only via the Web tool. Thanks, -- James Britt From jeff.barczewski at gmail.com Tue Jul 3 07:40:43 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Tue, 3 Jul 2007 06:40:43 -0500 Subject: [Masterview-users] Forcing a rebuild of all templates from the command line In-Reply-To: <46898C8B.3040200@gmail.com> References: <46898C8B.3040200@gmail.com> Message-ID: <19cda190707030440k1973f5acjd3457f818ac3d5c2@mail.gmail.com> On 7/2/07, James Britt wrote: > > I may be doing something wrong, but I can not get my rhtml view files > re-built on-demand. > > For example, if I delete all the rhtml that have been generated from > MasterView HTML files, and call the rake task mv:rebuild_all, I do not > see the rhtml files recreated. > > If I go through the MasterView admin Web page it seems to work, but only > if I go and alter the html files. (Running 'touch' on the files doesn't > help.) > > > It seems that the rhtml files do not get created unless MasterView > thinks the source HTML has changed, even if the rhtml files do not > exist. And then only via the Web tool. I'll take a look and see if I can figure out what might be going wrong. Thanks for mentioning it. -- Jeff Barczewski, MasterView core team Inspired Horizons Ruby on Rails Training and Consultancy http://inspiredhorizons.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070703/3be83629/attachment.html From jeff.barczewski at gmail.com Tue Jul 3 10:18:42 2007 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Tue, 3 Jul 2007 09:18:42 -0500 Subject: [Masterview-users] Forcing a rebuild of all templates from the command line In-Reply-To: <19cda190707030440k1973f5acjd3457f818ac3d5c2@mail.gmail.com> References: <46898C8B.3040200@gmail.com> <19cda190707030440k1973f5acjd3457f818ac3d5c2@mail.gmail.com> Message-ID: <19cda190707030718w29d04972qa4b1e0a8fa658ae@mail.gmail.com> On 7/3/07, Jeff Barczewski wrote: > > On 7/2/07, James Britt wrote: > > > > I may be doing something wrong, but I can not get my rhtml view files > > re-built on-demand. > > > > For example, if I delete all the rhtml that have been generated from > > MasterView HTML files, and call the rake task mv:rebuild_all, I do not > > see the rhtml files recreated. > > > > If I go through the MasterView admin Web page it seems to work, but only > > if I go and alter the html files. (Running 'touch' on the files doesn't > > help.) > > > > > > It seems that the rhtml files do not get created unless MasterView > > thinks the source HTML has changed, even if the rhtml files do not > > exist. And then only via the Web tool. > > > > I'll take a look and see if I can figure out what might be going wrong. > Thanks for mentioning it. James, I took a look and the code appears to be functioning properly, however I believe our documentation wasn't clear about which rake task does what so this may be the source of the problem. rake mv:parse # is the one which generates the rhtml files mv:rebuild and mv:rebuild_all actually only update the HTML template files (if they have outdated imports) not the rhtml that is generated I guess the naming of these wasn't the greatest. I have updated the docs on MV website to clarify this a little and have made a change for the next release to use the rake task name mv:generate_all_rhtml (deprecating mv:parse) so that hopefully this will be a little clearer to people in the future. For now you can use rake mv:parse in next version 0.3.4 this will be the preferred task rake mv:generate_all_rhtml Sorry for the confusion. Also note that if you want files generated to file system you will need to set the config.generate_rhtml_files = true in config/masterview/settings.rb or the appropriate config/masterview/environments/*.rb, otherwise the rhtml is generated only internally. PS. I haven't forgotten about the sidebar content_for issue, just haven't come up with a good approach to solving it yet. Let me know if you have any additional problems. Blessings, Jeff -- Jeff Barczewski, MasterView core team Inspired Horizons Ruby on Rails Training and Consultancy http://inspiredhorizons.com/ -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20070703/9c54d6df/attachment.html