From jeff.barczewski at gmail.com Thu Nov 9 01:44:24 2006 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Thu, 9 Nov 2006 00:44:24 -0600 Subject: [Masterview-users] [ANN] MasterView rails-optimized (x)html friendly template engine - Release 0.3.0 Message-ID: <19cda190611082244p602b5ca6o1b5a71a57ef5ead3@mail.gmail.com> MasterView is a rails-optimized (x)html friendly template engine plugin that provides another option to the existing rails view templates (rhtml and rxml). The main idea is to provide a template engine that would provide all the power of layouts, partials, and rails helpers but still be editable/styleable in a WYSIWYG editor. It was also a major goal that 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 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. Release 0.3.0 was a major release for MasterView with an emphasis on refactoring and simplifying the API for building directives. A DSL syntax was chosen to greatly simplify the creation of directives to both help the core team with directive development as to also enable developers to create their own custom directives easily. MasterView has been constructed to allow directives to be shared amongst the community and this refactoring will enable custom development. To further enhance sharing and prevent collisions, this release introduces custom namespaces to the directives allowing users to create their own namespaces to prevent conflict. Namespaces as well as many other metadata about directives can now be configured at both the app-level and installation-level providing flexibility. **UPGRADE CONSIDERATIONS: (for MasterView deployments that have created custom directives) default namespace of extensions directives changed from mv: to mvx: (custom directive default namespace) upgrade any user created custom directives to use new directive API (see release notes) Video A short video which demos the basic operation is available at http://masterview.org/videos/demo_short.html Screenshots and illustrations http://masterview.org/media_list.html MasterView is released under MIT open source licensing. Main site: http://masterview.org/ Rubyforge Project site: http://rubyforge.org/projects/masterview 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 (rhtml) - 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 (rhtml). Scaffold generate initial templates or work from existing html prototype. Make scaffolds nicely styled and easily useable for production with minor changes. - 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 (rhtml) Release Notes: == Recent changes (Release 0.3.0 - Major update - refactoring of directive API (for developing directives) The directive API for creating directives has been refactored and simplified. This will enable directives to be developed more easily by both core developers and MasterView users. The end goal is to make it extremely simple for anyone to create their own custom directives and to share those with the community, and thus the project can live and grow into many specialty areas. The directive API refactoring is one more step towards those goals. The old directive_base.rb which provided the API for directives has been deprecated and moved to deprecated/directive_base.rb, MasterViewdevelopers which have developed custom directives should upgrade those directives to the new API as soon as possible. During the transition period one can use the original API by requiring the deprecated/directive_base.rb file and changing their directive to inherit from DirectiveBaseOld rather than DirectiveBase. == Recent changes (Release 0.2.5) Fix AdminPage compatibility with Rails 1.1.5+ which uses safe_load_paths to find controllers Fix rake mv:view_rhtml RHTML=foo/_bar.rhtml was not able to find partials 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 videoto see MasterView in action! Thanks for your time!! MasterView Development Team Jeff Barczewski and Deb Lewis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20061109/0f05cd8b/attachment.html From ed.howland at gmail.com Fri Nov 10 13:10:58 2006 From: ed.howland at gmail.com (Ed Howland) Date: Fri, 10 Nov 2006 12:10:58 -0600 Subject: [Masterview-users] Failure to parse templates - user defined directives w/MV: 0.3.0 Message-ID: <3df642dd0611101010m27f82af8h8d6ed7c7402365a1@mail.gmail.com> Jeff and Deb, Turns out I had a project with many user defined directives. I installed 0.3.0 and followed the instructions in your email. What I did was this (in a typical directive in /app/masterview/directives/text_field_tag.rb:) require 'masterview/deprecated/directive_base' module MasterView module Directives class Text_field_tag < MasterView::DirectiveBaseOld ... # for testing this just redefines empty stag/etag methods Then I went into all .html files that had custom directives and changed the namespace from mv: to mvx: (Note: the errors below were unchanged before I switched namespaces to mvx) Running rake mv:parse results in : ERROR -- : Failure to parse template. Exception=undefined method `attribute_qname' for MasterView::Directives::Text_field_tag:Class It also seems to be missing class method : namespace_name Now, some other directives complain about this: ERROR -- : Failure to parse template. Exception=undefined method `harden_metadata' for MasterView::Directives::Link_to_remote_no_quote:Class These exist only in 0.3.0. So it seems that while it seems to be seeing my existing directives in the new namespace or using the new directive_base.rb instead of the old deprecated one. Have I missed a step? Ed -- Ed Howland http://greenprogrammer.blogspot.com From ed.howland at gmail.com Fri Nov 10 13:51:07 2006 From: ed.howland at gmail.com (Ed Howland) Date: Fri, 10 Nov 2006 12:51:07 -0600 Subject: [Masterview-users] Failure to parse templates - user defined directives w/MV: 0.3.0 In-Reply-To: <3df642dd0611101010m27f82af8h8d6ed7c7402365a1@mail.gmail.com> References: <3df642dd0611101010m27f82af8h8d6ed7c7402365a1@mail.gmail.com> Message-ID: <3df642dd0611101051i56f918cdl6f10a71b4ced82dd@mail.gmail.com> I wrote once upon a time: > These exist only in 0.3.0. So it seems that while it seems to be > seeing my existing directives in the new namespace or using the new > directive_base.rb instead of the old deprecated one. > > Have I missed a step? > I remember a previous upgrade had reset my settings.rb file, so I restored the settings there. Basically it was just adding config.directive_paths << 'app/masterview/directives' Since that had no effect, and nothing else did, I still think MV is not finding my directives, since I can not effect the output of rake mv:parse no matter what I try. This leads me to believe these are really error messages that mean 'Failed to find a directive matching mvx:your_directive_name' Ed -- Ed Howland http://greenprogrammer.blogspot.com From djlewis at acm.org Fri Nov 10 15:40:04 2006 From: djlewis at acm.org (Deb Lewis) Date: Fri, 10 Nov 2006 12:40:04 -0800 Subject: [Masterview-users] Failure to parse templates - user defineddirectives w/MV: 0.3.0 In-Reply-To: <3df642dd0611101051i56f918cdl6f10a71b4ced82dd@mail.gmail.com> Message-ID: <20061110204011.GUHD296.fed1rmmtao11.cox.net@fed1rmimpo02.cox.net> ooh, ick - you did right; we missed something in our backwards compatibility for old directive implementations. The new directive architecture includes a mixin class called DirectiveMetadata that the loading and processing facilities rely on now. I'll have to take a look and see if we can hook this directly into the old directive base class or whether we need to patch the necessary protocol back onto the old guy in a different fashion. >> went into all .html files that had custom directives and changed the namespace from mv: to mvx: Alt. approach that would simplify upgrade would be to change the default value of the config setting namespace_prefix_extensions from mvx: to specify using old-style mv: prefix, or add .metadata file in your directives directory containing such a spec. The tactical options probably weren't described well enough (we focused more on documenting the new architecture than on upgrade details, partly because we aren't sure of the magnitude of the problem, i.e., how many directive impl's are really out there in the field ) Preferred approach is [of course?!] to get old directive impl's upgraded to the new framework as soon as possible (it's WAY cleaner and easier to work with). We'll be glad to work with you to help you with conversion if that's useful; just seeing a few of your own classes in the new framework might help seeing what needs to be done. ~ Deb -----Original Message----- From: masterview-users-bounces at rubyforge.org [mailto:masterview-users-bounces at rubyforge.org] On Behalf Of Ed Howland Sent: Friday, November 10, 2006 10:51 AM To: masterview-users at rubyforge.org; masterview-devel at rubyforge.org Subject: Re: [Masterview-users] Failure to parse templates - user defineddirectives w/MV: 0.3.0 I wrote once upon a time: > These exist only in 0.3.0. So it seems that while it seems to be > seeing my existing directives in the new namespace or using the new > directive_base.rb instead of the old deprecated one. > > Have I missed a step? > From djlewis at acm.org Fri Nov 10 19:43:40 2006 From: djlewis at acm.org (Deb Lewis) Date: Fri, 10 Nov 2006 16:43:40 -0800 Subject: [Masterview-users] Failure to parse templates - user defined directives w/MV: 0.3.0 In-Reply-To: <3df642dd0611101051i56f918cdl6f10a71b4ced82dd@mail.gmail.com> Message-ID: <20061111004343.QEKS21630.fed1rmmtao12.cox.net@fed1rmimpo02.cox.net> Ed wrote: >> I remember a previous upgrade had reset my settings.rb file, >> so I restored the settings there. Basically it was just adding >> config.directive_paths << 'app/masterview/directives' Ed - some notes on directives and namespaces [separate from the compatibility problem you encountered, which is something we missed and need to correct] That actually should get picked up by default now, so you shouldn't have to add to the load path unless you want to load directives from somewhere else. The standard startup processing configures the directives load path with masterview's built-in directives and then checks to see if the rails app has an app/masterview/directives directory - if found, that automatically gets loaded as well. Namespace management tips: Although the namespace prefix for directives can be specified individually, the usual pattern is that a developer wants all directives loaded out of a directory to use a common namespace. This is specified by creating a text file in the directives directory named '.metadata' and providing the metadata defaults in yaml-notation. E.g.: # MasterView directive metadata specifications # Rails application directives # default metadata values for directives loaded from this directory default: namespace: mvx description: Rails app MasterView directives Individual directives can override their directory default [should be rare, tho]. The application developer can also override in their app config to handle the case when you're including directives from someone else and want a diff namespace prefix used in your app templates than what the supplier originally specified. This is done by including hash with app-specific metadata defaults when appending a directive path entry. ~ Deb From djlewis at acm.org Sun Nov 12 13:41:29 2006 From: djlewis at acm.org (Deb Lewis) Date: Sun, 12 Nov 2006 10:41:29 -0800 Subject: [Masterview-users] Fix for old directive impl compat framework in MV 0.3.0 In-Reply-To: <3df642dd0611101051i56f918cdl6f10a71b4ced82dd@mail.gmail.com> Message-ID: <20061112184133.XJPH20330.fed1rmmtao05.cox.net@fed1rmimpo01.cox.net> A fix for the problem reported by Ed Howland on Friday that existing directive implementations using the compatibility framework of DirectiveBaseOld for the new MasterView 0.3.0 release aren't handled correctly (resulting in template parsing errors) has been committed to the trunk. Fix is a one-line addition in deprecated/directive_base.rb to add mixin "include DirectiveMetadata" to class DirectiveBaseOld so that old directives support the new accessing protocol for metadata info now used by the template engine (attribute_name, namespace, etc) Additional test cases were also added to cover this aspect of the compatibility facilities, since we regrettably missed detecting the problem prior to release. Official bug fix release 0.3.1 with this correction will be posted in a few days. ~ Deb From jeff.barczewski at gmail.com Sun Nov 19 16:52:11 2006 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Sun, 19 Nov 2006 15:52:11 -0600 Subject: [Masterview-users] [Rails] Script/generate masterview fails - ruby 1.8.5 conflict, resolved in trunk, release 0.3.1 soon Message-ID: <19cda190611191352t7662de70m6fa14f7e0b388c6d@mail.gmail.com> On 11/12/06, zvavox at gmail.com wrote: > > > I have been trying to make MasterView works on my Rails > project. However, every time I issue a script/generate masterview > Product Store command, I always get the following: > > --- > D:\aaa>ruby script/generate masterview Product Store > Initializing MasterView configuration (2006-11-12 21:10) > Program name = script/generate > dependency model > exists app/models/ > exists test/unit/ > exists test/fixtures/ > identical app/models/product.rb > identical test/unit/product_test.rb > identical test/fixtures/products.yml > exists app/controllers/ > exists app/helpers/ > create app/views/store > exists public/stylesheets/masterview > exists app/masterview > exists app/masterview/extra > exists test/functional/ > create app/controllers/store_controller.rb > create test/functional/store_controller_test.rb > create app/helpers/store_helper.rb > create store/destroy.html > wrong number of arguments (1 for 2) > > D:\aaa>rails -v > Rails 1.1.6 > > D:\aaa>ruby -v > ruby 1.8.5 (2006-08-25) [i386-mswin32] > > Zandro, I believe I found the problem you were having. I upgraded my ruby version to 1.8.5 and received a similar error [wrong number of arguments (1 for 2)]. It appears that in 1.8.5 they updated the implemenation of Pathname.dirnamewhich was causing an issue. I was able to make a change that should safely resolve the problem. The changes are in the trunk now and we will be pushing out a new release gem and plugin very soon. Thanks again for brining this to our attention. Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20061119/31bb4db8/attachment-0001.html From jeff.barczewski at gmail.com Mon Nov 20 11:48:35 2006 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Mon, 20 Nov 2006 10:48:35 -0600 Subject: [Masterview-users] [ANN] MasterView rails-optimized (x)html friendly template engine - Release 0.3.1 Message-ID: <19cda190611200848y4c7be3cfg156ccfdd17ba761d@mail.gmail.com> MasterView is a rails-optimized (x)html friendly template engine plugin that provides another option to the existing rails view templates (rhtml and rxml). The main idea is to provide a template engine that would provide all the power of layouts, partials, and rails helpers but still be editable/styleable in a WYSIWYG editor. It was also a major goal that 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 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. Release 0.3.1 was a maintenance release addressing an issue with ruby 1.8.5(wrong number of arguments 1 for 2 during scaffold generation), fixing a problem with the deprecated/directive_base used for custom directives, updating a few out of date docs, and accomodating a change to the API of the Rails 1.2 generator. Release 0.3.0 was a major release for MasterView with an emphasis on refactoring and simplifying the API for building directives. A DSL syntax was chosen to greatly simplify the creation of directives to both help the core team with directive development as to also enable developers to create their own custom directives easily. MasterView has been constructed to allow directives to be shared amongst the community and this refactoring will enable custom development. To further enhance sharing and prevent collisions, this release introduces custom namespaces to the directives allowing users to create their own namespaces to prevent conflict. Namespaces as well as many other metadata about directives can now be configured at both the app-level and installation-level providing flexibility. **UPGRADE CONSIDERATIONS: (for MasterView deployments that have created custom directives) default namespace of extensions directives changed from mv: to mvx: (custom directive default namespace) upgrade any user created custom directives to use new directive API (see release notes) Video A short video which demos the basic operation is available at http://masterview.org/videos/demo_short.html Screenshots and illustrations http://masterview.org/media_list.html MasterView is released under MIT open source licensing. Main site: http://masterview.org/ Rubyforge Project site: http://rubyforge.org/projects/masterview 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 (rhtml) - 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 (rhtml). Scaffold generate initial templates or work from existing html prototype. Make scaffolds nicely styled and easily useable for production with minor changes. - 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 (rhtml) Release Notes: == Recent changes (Release 0.3.1 - Maintenance release This release addresses an issue with ruby 1.8.5, fixes a problem with the deprecated/directive_base used for custom directives, updates a few out of date docs, and accomodates a change to the API of the Rails 1.2 generator == Recent changes (Release 0.3.0 - Major update - refactoring of directive API (for developing directives) The directive API for creating directives has been refactored and simplified. This will enable directives to be developed more easily by both core developers and MasterView users. The end goal is to make it extremely simple for anyone to create their own custom directives and to share those with the community, and thus the project can live and grow into many specialty areas. The directive API refactoring is one more step towards those goals. The old directive_base.rb which provided the API for directives has been deprecated and moved to deprecated/directive_base.rb, MasterViewdevelopers which have developed custom directives should upgrade those directives to the new API as soon as possible. During the transition period one can use the original API by requiring the deprecated/directive_base.rb file and changing their directive to inherit from DirectiveBaseOld rather than DirectiveBase. == Recent changes (Release 0.2.5) Fix AdminPage compatibility with Rails 1.1.5+ which uses safe_load_paths to find controllers Fix rake mv:view_rhtml RHTML=foo/_bar.rhtml was not able to find partials 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 videoto see MasterView in action! Thanks for your time!! MasterView Development Team Jeff Barczewski and Deb Lewis -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-users/attachments/20061120/8607993e/attachment.html