From jeff.barczewski at gmail.com Wed Dec 13 13:01:42 2006 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Wed, 13 Dec 2006 12:01:42 -0600 Subject: [Masterview-devel] masterview vs. kwartz? In-Reply-To: <116aa12e0612122254v1ebdf67ak7ba3a1ae9fad430f@mail.gmail.com> References: <116aa12e0612122254v1ebdf67ak7ba3a1ae9fad430f@mail.gmail.com> Message-ID: <19cda190612131001q3a8edefdh6fc6b54a2cca7c64@mail.gmail.com> On 12/13/06, Zaheed Haque wrote: > > Jeff: > > I am in the start of a new project and I am a bit confused by all the > template-technologies out there. My use case is similar to yours i.e > "designers of HTML pages are local design house". I have come across > the following project. > > http://www.kuwata-lab.com/kwartz/ > > Your view/opinion? > > Also it would be nice if you could make a page in masterview.org about > "Template technology comparison or matrix". > > I look forward to hear your views. > > Regards, > Zaheed > Zaheed, Thanks for writing. Yes, I am somewhat familiar with Kwartz, in fact I evaluated using/modifying it to meet my needs before building MasterView. In the end I felt it would be much cleaner to build fresh. >From what I can tell Kwartz appears to be an active project like MasterView, so you should be safe going with either depending on your requirements. Both projects try to provide a better xhtml safe templating solution and here are some of the differences. (These opinions are based on my knowlege of Kwartz from my original evaluation and from reviewing their latest documentation for updates as of November 2006). (We will plan to add some comparison page to our site as well) MasterView provides full html with partials and layouts for WYSIWYG editing MasterView allows you to work with your full html page in your editor and underneath the covers it will create all of the layouts and partials for you. This allows you to have true WYSIWYG editing and html prototypes. Kwartz and other template solutions like Amrita don't have a simple way of doing this. Using one of these tools you will typically either duplicate your layout and partial into each template or you would do some sort of import however even if you do this, you won't be working with the full html when you are editing. MasterView allows you to work just like you would in Rails where you keep things DRY having shared layouts and partials which are not duplicated. MasterView can manage all of the details of importing things when shared objects change so you can always be editing with the current objects. MasterView Rails support Although I noticed recently that Kwartz has started to provide some experimental Rails directives (that look very similar to MasterView's) their feature set with regards to Rails is much more limited. MasterView's specialized Rails directives inherit the style and design from the html in generating the Rails form helpers, so any styling changes are automatically picked up and used. MasterView has support for all of the major Rails form helpers. MasterView is provided as a gem and/or plugin for ease of use with Rails. MasterView has the ability to automatically pick up and cache changes to the templates when running in Rails, Kwartz has compile step. MasterView has close to production quality scaffold generator To make it just as easy to get started with MasterView as Rails, MasterView provides a close to production quality scaffold CRUD generator. It smartly styled html that can easily be tweaked with CSS to customize the layout. MasterView provides full power of ERB MasterView allows you to use the full power of ERB in your templates without jumping through hoops or creating additional presentation objects. You can access your rails models and helpers just like you would in ERB. Kwartz and other templating solutions use another layer to insulate (presentation object) that needs to be created/configured to provide data to your template. The nice thing about this abstraction is that this provides additional layer of security but also means extra work each and everytime you add a new model or add properties to an existing model. (FYI. We have plans to also add non-evaling features to MasterView in the future to support both operational modes for cases where you allow the general public to modfiy views). Kwartz provides ability to generate views for JSTL and PHP Although theoretically MasterView could generate JSTL or PHP code as well (since it can generate any text format), this has not yet been a focus, so Kwartz's capabilities are more fully developed in this area if one is interested in doing cross language deployments. MasterView is extensible with custom directives One of the design goals with MasterView was to make it easy for developers to add their own directives. This allows MasterView to be easily customizable by in house teams and the community. Commonly used functionality can be abstracted into new directives using a DSL style ruby syntax. Kwartz can use any text file Kwartz can parse any text file as a template, where as MasterView uses valid xhtml/xml to parse. MasterView provides integration with Tidy so that invalid html can automatically be cleaned up for parsing. MasterView can however generate any type of text output not just xhtml, so it can be used for email text or other pure text needs. MasterView's primary focus is xhtml/xml and thus has nice functionality to support communication/cooperation between nested directives. MasterView admin tools MasterView has a variety of console and web based tools to facilitate working with templates (synchronizing imported sections), validating format, creating new templates by copying existing, etc. MasterView planned features (in upcoming releases) We are working on some advanced features that will really improve productivity with regards to ajax enabled tables. By adding simple directive to a normal html table, you will be able to get fully ajax'd pagable, sortable, table grid that will also degrade gracefully to normal views if javascript is disabled. Many features like these are planned for release in 2007. Well that is all I can think of off the top of my head. If you have any other specific questions or need clarifications, please let me know. If I can be of any further help, please let me know. Blessings, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-devel/attachments/20061213/06322579/attachment-0001.html From ed.howland at gmail.com Thu Dec 28 13:51:03 2006 From: ed.howland at gmail.com (Ed Howland) Date: Thu, 28 Dec 2006 12:51:03 -0600 Subject: [Masterview-devel] Problem with mv:attr Message-ID: <3df642dd0612281051s5891e3b4pdab0706b8367a4cd@mail.gmail.com> Hi all. I just confirmed this issue with mv:attr The directive help page says that you can use #{} to create an erb in the attribute value. This works only somewhat. E.g
...becomes...
...becomes...
But
...becomes...
And it matters not if you use parens on the helper
...becomes...
But
...becomes...
This happens after the first parameter to any helper function (2, 3, ... n parameters.) Ed -- Ed Howland http://greenprogrammer.blogspot.com From jeff.barczewski at gmail.com Thu Dec 28 14:14:24 2006 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Thu, 28 Dec 2006 13:14:24 -0600 Subject: [Masterview-devel] Problem with mv:attr In-Reply-To: <3df642dd0612281051s5891e3b4pdab0706b8367a4cd@mail.gmail.com> References: <3df642dd0612281051s5891e3b4pdab0706b8367a4cd@mail.gmail.com> Message-ID: <19cda190612281114g42ec67b7jc4cc616b91b7bff8@mail.gmail.com> Thanks for pointing it out Ed. I will take look and see if I can resolve it. On 12/28/06, Ed Howland wrote: > > Hi all. > > I just confirmed this issue with mv:attr > > The directive help page says that you can use #{} to create an erb in > the attribute value. This works only somewhat. > > E.g >
> ...becomes... >
> >
> ...becomes... >
> > But >
> ...becomes... >
> > And it matters not if you use parens on the helper >
> ...becomes... >
> But >
> ...becomes... >
> > This happens after the first parameter to any helper function (2, 3, > ... n parameters.) > > Ed > > -- > Ed Howland > http://greenprogrammer.blogspot.com > _______________________________________________ > Masterview-devel mailing list > Masterview-devel at rubyforge.org > http://rubyforge.org/mailman/listinfo/masterview-devel > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-devel/attachments/20061228/b0c27eec/attachment.html From jeff.barczewski at gmail.com Thu Dec 28 18:07:26 2006 From: jeff.barczewski at gmail.com (Jeff Barczewski) Date: Thu, 28 Dec 2006 17:07:26 -0600 Subject: [Masterview-devel] Problem with mv:attr In-Reply-To: <3df642dd0612281051s5891e3b4pdab0706b8367a4cd@mail.gmail.com> References: <3df642dd0612281051s5891e3b4pdab0706b8367a4cd@mail.gmail.com> Message-ID: <19cda190612281507w53792044h12efdd96c979e575@mail.gmail.com> On 12/28/06, Ed Howland wrote: > > Hi all. > > I just confirmed this issue with mv:attr > > The directive help page says that you can use #{} to create an erb in > the attribute value. This works only somewhat. > > E.g >
> ...becomes... >
> >
> ...becomes... >
> > But >
> ...becomes... >
> > And it matters not if you use parens on the helper >
> ...becomes... >
> But >
> ...becomes... >
> > This happens after the first parameter to any helper function (2, 3, > ... n parameters.) > > Ed I have found and fixed the issue. It had to do with simplistic logic in the parsing using regular expressions. I enhanced AttrStringParser and changed mv:attr to use that instead. AttrStringParser takes nesting and more things into consideration so it doesn't split prematurely on the comma. I added some test cases to verify. Also I added mv:select to the alphabetic list of directives on the bottom of the directives.html page which you mentioned was missing. Since this was such a small fix and there are a few other things I would like to put in, I am going to hold off on pushing out a 0.3.2 release but will email you the 0.3.1.1 gems in a followup email. The code is checked into the trunk. Thanks, Jeff -------------- next part -------------- An HTML attachment was scrubbed... URL: http://rubyforge.org/pipermail/masterview-devel/attachments/20061228/40744d09/attachment.html