Re: Velocity JSP Generation
I totally agree with Florin Vancea about it. Taming struts with torque/hibernate can be marvelous. Struts++ ;) Asif - Original Message - From: Florin Vancea [EMAIL PROTECTED] To: Velocity Users List velocity-user@jakarta.apache.org; Shinobu Kawai [EMAIL PROTECTED] Sent: Thursday, February 24, 2005 12:23 PM Subject: Re: Velocity JSP Generation - Original Message - From: Shinobu Kawai [EMAIL PROTECTED] To: Velocity Users List velocity-user@jakarta.apache.org Sent: Thursday, February 24, 2005 8:41 AM Subject: Re: Velocity JSP Generation snip I wonder if anybody uses Velocity to create Velocity templates. I might need to add vtl to the EscapeTool. (half joking, half...) snip Well, I was kind of thinking about this right before I saw your message. (only half seriously...) But really, what if (only what if) one would provide the Struts validator and config files (which are info-rich-enough), along with the *.properties containing messages, and at the startup of the WAR (or even at build time) Velocity would generate a set of Velocity templates for all required pages (maybe even Action classes). Yes, it's not something one can whip up before coffee break, but it may be interesting as it would produce Instant Applications - just add CPU/database and enjoy a nice hot cup of Velocity Java :) Florin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Escaping in VTL (was Re: Velocity JSP Generation)
Hi Will, #* First time I've ever heard of creating JSP with Velocity. :) I wonder if anybody uses Velocity to create Velocity templates. I might need to add vtl to the EscapeTool. (half joking, half...) *# Ha. I wrote an app that uses Velocity to generate Velocity templates. It's a quick start tool to generate a Velocity-based application for new users. Wow! Great work. :-) Escaping the VTL properly was a little challenging, but otherwise it was no big deal. I still don't get the whole escaping scheme, partly because I can't find any documentation that is completely correct. We might want a document totally devoted to escaping in VTL. :( Best regards, -- Shinobu -- Shinobu Kawai [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Velocity JSP Generation
Don't get too carried away :) It was just caused by lack of coffee early in the morning. :) Actually I do not see such a framework being very useful, at least not compared to the complexity involved. It seems like Will was way ahead and I truly believe that such a framework is viable only for: a - to build a startup point which will be refined later _by_hand_ (what I understand Will did) b - to automate part of app building, within some organization big enough to support continuous customizing of the generator. From my experience, any other usage scenario for a (completely) automated app-builder is very unlikely. But then again, maybe I'm wrong or short-sighted. Cheers, Florin - Original Message - From: Rana Asif Rubbani [EMAIL PROTECTED] To: Velocity Users List velocity-user@jakarta.apache.org; Shinobu Kawai [EMAIL PROTECTED] Sent: Thursday, February 24, 2005 10:12 AM Subject: Re: Velocity JSP Generation I totally agree with Florin Vancea about it. Taming struts with torque/hibernate can be marvelous. Struts++ ;) Asif - Original Message - From: Florin Vancea [EMAIL PROTECTED] To: Velocity Users List velocity-user@jakarta.apache.org; Shinobu Kawai [EMAIL PROTECTED] Sent: Thursday, February 24, 2005 12:23 PM Subject: Re: Velocity JSP Generation - Original Message - From: Shinobu Kawai [EMAIL PROTECTED] To: Velocity Users List velocity-user@jakarta.apache.org Sent: Thursday, February 24, 2005 8:41 AM Subject: Re: Velocity JSP Generation snip I wonder if anybody uses Velocity to create Velocity templates. I might need to add vtl to the EscapeTool. (half joking, half...) snip Well, I was kind of thinking about this right before I saw your message. (only half seriously...) But really, what if (only what if) one would provide the Struts validator and config files (which are info-rich-enough), along with the *.properties containing messages, and at the startup of the WAR (or even at build time) Velocity would generate a set of Velocity templates for all required pages (maybe even Action classes). Yes, it's not something one can whip up before coffee break, but it may be interesting as it would produce Instant Applications - just add CPU/database and enjoy a nice hot cup of Velocity Java :) Florin - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Velocity vs. FreeMarker
Hello, the FreeMarker people claim that FreeMarker is more advanced in some respects. Could you check if that's (still) true ? You can edit the page: http://confluence.atlassian.com/display/TEST/Velocity+vs.+FreeMarker Cheers, Meikel Bisping - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Velocity vs. FreeMarker
Rather than fill out a detailed checklist, which issues are of the most concern? The latest version of Velocity (currently unreleased but in the nightly source code drop) supports decimal numbers in templates. That used to be a significant issue that's now gone away. When you're comparing, be sure to look at Velocity's sub-project, Velocity-Tools, which adds integration with Struts, JSP, servlets, etc. It also provides a number of tools to do useful tasks like formatting, etc. Best, WILL - Original Message - From: Meikel Bisping [EMAIL PROTECTED] To: velocity-user@jakarta.apache.org Sent: Thursday, February 24, 2005 10:09 AM Subject: Velocity vs. FreeMarker Hello, the FreeMarker people claim that FreeMarker is more advanced in some respects. Could you check if that's (still) true ? You can edit the page: http://confluence.atlassian.com/display/TEST/Velocity+vs.+FreeMarker Cheers, Meikel Bisping - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Enhydra/Barracuda?
We have been using Velocity/Struts for an ecommerce application and have been very pleased with the technology. We are planning to build a different application (from scratch) and reviewing platform options. A few Pros and Cons of staying with Velocity/Struts vs. Enhydra/Barracuda vs. ?? would be much appreciated. THX., John Mahan
Freemarker comparison - macro recursion
Of paramount importance for me is possibility to invoke a macro recursively. Can you do that with Velocity? But I'm only beginning to use template engines so eventually breaking out of loops, name spaces and XML transformation capabilities different from XSLT might become interesting in the future. Eventually it's not only about my current issues. Other programmers will have to decide between Velocity and FreeMarker, so it would be good if the comparison list is correct. Regards, Meikel - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Freemarker comparison - macro recursion
On Thu, 2005-02-24 at 20:07 +0100, Meikel Bisping wrote: Of paramount importance for me is possibility to invoke a macro recursively. Can you do that with Velocity? yes of course, but it's usually easier to handle on the java side (you can have a little tool that enumerate the leaves of a tree for instance). if you still think recursion is your way, it's easier with the #local macro (which is not included by default, it should be somewhere in a subversive whiteboard), which role is to protects the variables namespace inside each level of recursion. -- Claude - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Enhydra/Barracuda?
On Thu, 2005-02-24 at 10:49 -0800, John Mahan wrote: We have been using Velocity/Struts for an ecommerce application and have been very pleased with the technology. We are planning to build a different application (from scratch) and reviewing platform options. A few Pros and Cons of staying with Velocity/Struts vs. Enhydra/Barracuda vs. ?? would be much appreciated. Make sure you take a look at Spring (www.springframework.org) It also has good support for Velocity. Regards, -- Darren Davison Public Key: #DD356B0D signature.asc Description: This is a digitally signed message part
Re: Velocity vs. FreeMarker
The Velocity language is simple and powerful, as well as very fast. In a well-designed application, the template designer can be placed in a sandbox of data and tools and left to play happily without supervison. The fact is, anything can be done in Velocity, in a nicely organized way, given cooperation between the programmers and template designers. Beware of the allure of having more programming type options within the templating language. In fact, a lot of folks judge a view application (such as Velocity and FreeMarker) as most effective when the designer has few options to manipulate data; they only decide how to present it. The more complicated the programming of the template, the more programming expertise will be required of the template designers. The Velocity developers have made very conscious decisions to keep the core language as simple as possible. This, in turn, makes the templates easy to write and maintain. There is a wide spectrum of just how much control should be given to the programmers vs. designers when it comes to templates. Within this spectrum, FreeMarker gives more control to the template designer, with more tools included in the core language. Velocity gives more control to the programmer, providing additional tools as appropriate. Many tool programs have already been written and are readily available in the Velocity Tools project. I might also add that the Velocity community is very helpful and supportive. Super, in fact! Barbara Baughman X2157 On Thu, 24 Feb 2005, Meikel Bisping wrote: Hello, the FreeMarker people claim that FreeMarker is more advanced in some respects. Could you check if that's (still) true ? You can edit the page: http://confluence.atlassian.com/display/TEST/Velocity+vs.+FreeMarker Cheers, Meikel Bisping - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Velocity vs. FreeMarker
Nice summary. Choosing a tool is more than hitting a checklist of features. Good design and ease of use are also important. Having said that, if there's specific questions or concerns you have, this is a good place to ask about them. WILL - Original Message - From: Barbara Baughman [EMAIL PROTECTED] To: Velocity Users List velocity-user@jakarta.apache.org Sent: Thursday, February 24, 2005 2:11 PM Subject: Re: Velocity vs. FreeMarker The Velocity language is simple and powerful, as well as very fast. In a well-designed application, the template designer can be placed in a sandbox of data and tools and left to play happily without supervison. The fact is, anything can be done in Velocity, in a nicely organized way, given cooperation between the programmers and template designers. Beware of the allure of having more programming type options within the templating language. In fact, a lot of folks judge a view application (such as Velocity and FreeMarker) as most effective when the designer has few options to manipulate data; they only decide how to present it. The more complicated the programming of the template, the more programming expertise will be required of the template designers. The Velocity developers have made very conscious decisions to keep the core language as simple as possible. This, in turn, makes the templates easy to write and maintain. There is a wide spectrum of just how much control should be given to the programmers vs. designers when it comes to templates. Within this spectrum, FreeMarker gives more control to the template designer, with more tools included in the core language. Velocity gives more control to the programmer, providing additional tools as appropriate. Many tool programs have already been written and are readily available in the Velocity Tools project. I might also add that the Velocity community is very helpful and supportive. Super, in fact! Barbara Baughman X2157 On Thu, 24 Feb 2005, Meikel Bisping wrote: Hello, the FreeMarker people claim that FreeMarker is more advanced in some respects. Could you check if that's (still) true ? You can edit the page: http://confluence.atlassian.com/display/TEST/Velocity+vs.+FreeMarker Cheers, Meikel Bisping - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Velocity vs. FreeMarker
Friday, February 25, 2005, 2:04:34 AM, Will Glass-Husain wrote: Nice summary. Choosing a tool is more than hitting a checklist of features. Good design and ease of use are also important. From my standpoint the point is that the FM Vs Vel. page should be updated, since it was made for Vel 1.2, and thus probably outdated. Or it has to be removed... but I think that doesn't server the users well. Having said that, if there's specific questions or concerns you have, this is a good place to ask about them. WILL -- Best regards, Daniel Dekany Miert fizetsz az internetert? Korlatlan, ingyenes internet hozzaferes a FreeStarttol. Probald ki most! http://www.freestart.hu - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Velocity JSP Generation
Florin Vancea [EMAIL PROTECTED] wrote: But really, what if (only what if) one would provide the Struts validator and config files (which are info-rich-enough), along with the *.properties containing messages, and at the startup of the WAR (or even at build time) Velocity would generate a set of Velocity templates for all required pages (maybe even Action classes). I take a Cayenne database model, run it through Velocity and create a combination of nine struts-config files, validator xml files, java actions, and velocity templates for generating reports on database entities and creating/editing database entities. Cayenne takes the same database model, runs it through velocity and creates database layer objects. I just give my ant task a database table entity and out comes a report component and editing tool. The only thing I might do afterward is swap a few fields on the html.vm template to organize the form differently. That and update my main struts-config.xml file to include all of the new pieces. So it's certainly doable. -Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Escaping in VTL (was Re: Velocity JSP Generation)
Shinobu Kawai [EMAIL PROTECTED] wrote: Escaping the VTL properly was a little challenging, but otherwise it was no big deal. I still don't get the whole escaping scheme, partly because I can't find any documentation that is completely correct. We might want a document totally devoted to escaping in VTL. :( Escape all [$], [#], [], [!] and [']. (actually, ! might be overkill, but better safe than sorry.) Just use your tool :) Always use formal notation ${x} That's always worked for me, and never surprises me. -Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Freemarker comparison - macro recursion
Hi, Maintenance wide, I give Velocity two thumbs up. Velocity is simple and efficient. We are using Velocity for our web based application and we are very happy with it. Jian On Thu, 24 Feb 2005 20:20:44 +0100, Claude Brisson [EMAIL PROTECTED] wrote: On Thu, 2005-02-24 at 20:07 +0100, Meikel Bisping wrote: Of paramount importance for me is possibility to invoke a macro recursively. Can you do that with Velocity? yes of course, but it's usually easier to handle on the java side (you can have a little tool that enumerate the leaves of a tree for instance). if you still think recursion is your way, it's easier with the #local macro (which is not included by default, it should be somewhere in a subversive whiteboard), which role is to protects the variables namespace inside each level of recursion. -- Claude - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Escaping in VTL (was Re: Velocity JSP Generation)
Hi Mike, I still don't get the whole escaping scheme, partly because I can't find any documentation that is completely correct. We might want a document totally devoted to escaping in VTL. :( Escape all [$], [#], [], [!] and [']. (actually, ! might be overkill, but better safe than sorry.) Just use your tool :) I'll add [\] to that. :) Always use formal notation ${x} That's always worked for me, and never surprises me. If I can be sure that EscapeTool will be in the Context, it isn't hard at all. But what if it's not? Anyways, what I wanted to say was I want a complete and accurate document on how escaping works in Velocity. It should cover references, directives, silent notation, formal notation, schmoo... Anything else? Best regards, -- Shinobu -- Shinobu Kawai [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]
Re: Escaping in VTL (was Re: Velocity JSP Generation)
Doesn't quite work that easily. The problem is that if #directive is not an actual macro, than \#directive is shown verbatim. You only should escape when the same code is legit in both the source and the generated Velocity. This can be a little confusing. Will - Original Message - From: Mike Kienenberger [EMAIL PROTECTED] To: Shinobu Kawai [EMAIL PROTECTED]; Velocity Users List velocity-user@jakarta.apache.org Cc: Velocity Users List velocity-user@jakarta.apache.org Sent: Thursday, February 24, 2005 7:07 PM Subject: Re: Escaping in VTL (was Re: Velocity JSP Generation) Shinobu Kawai [EMAIL PROTECTED] wrote: Escaping the VTL properly was a little challenging, but otherwise it was no big deal. I still don't get the whole escaping scheme, partly because I can't find any documentation that is completely correct. We might want a document totally devoted to escaping in VTL. :( Escape all [$], [#], [], [!] and [']. (actually, ! might be overkill, but better safe than sorry.) Just use your tool :) Always use formal notation ${x} That's always worked for me, and never surprises me. -Mike - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]