Re: Replacement for MessageResourcesConfig and MessageResourcesFactory in struts-2

2008-03-26 Thread Antonio Petrelli
Ask this question in the Struts Users mailing list:
http://struts.apache.org/mail.html

Antonio

2008/3/26, sandyvj83 [EMAIL PROTECTED]:


 Hi All,
 Does someone now the replacement for MessageResourcesConfig and
 MessageResourcesFactory in struts2. And also need a brief description for
 using message resources in struts 2.

 Thanks in Advance,
 Sandeep

 --
 View this message in context:
 http://www.nabble.com/Replacement-for-MessageResourcesConfig-and-MessageResourcesFactory-in-struts-2-tp16295697p16295697.html
 Sent from the Struts - Dev mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




Re: Interview question Struts?

2008-03-26 Thread Antonio Petrelli
2008/3/26, James Mitchell [EMAIL PROTECTED]:

 Please ask user questions on the users list.



Or better, in this case I suggest to read a basic tutorial :-D

Antonio


Re: Interview question Struts?

2008-03-26 Thread James Mitchell
Please ask user questions on the users list.

On Wed, Mar 26, 2008 at 9:45 AM, pannar [EMAIL PROTECTED] wrote:


 Hi,

 There was a interview question in Struts framework.
 When i extend the Action class to implement the db/business logic, is it
 possible to invoke my own business logic methods without overriding
 execute() method of Action class??

 regards
 pannar
 --
 View this message in context:
 http://www.nabble.com/Interview-question-Struts--tp16301160p16301160.html
 Sent from the Struts - Dev mailing list archive at Nabble.com.


 -
 To unsubscribe, e-mail: [EMAIL PROTECTED]
 For additional commands, e-mail: [EMAIL PROTECTED]




-- 
James Mitchell


2.1 build

2008-03-26 Thread Musachy Barroso
Hi all,

Any news on the 2.1 build? Is anyone looking into it?

regards
musachy

-- 
Hey you! Would you help me to carry the stone? Pink Floyd

-
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Re: Freekmarker vs. Velocity

2008-03-26 Thread Jonathan Revusky

Jeromy Evans wrote:

I have been of two minds whether to pursue this conversation and make 
certain points. I strongly disagree with some of things you're saying 
here, so, finally, I'll just make the points that I think need to be 
made on this topic. I don't think there's a need for any further debate 
about any of it. It seems you do recognize that the quote on the page in 
question is outrageously misleading, and should be remedied.


One thing I'll say up front is that I can't really look at this as a 
favor to me or our community. You should be doing this because it's 
what's in the interest of your user community and just the general 
public out there.



Jonathan Revusky wrote:

Thanks for the detailed argument Jonathon.

Jeromy Evans wrote:

Niall Pemberton wrote:

I just saw the following comment

FreeMarker is very similar to Velocity, as both are template
languages that can be used outside of a Servlet container. The
framework utilizes FreeMarker because FreeMarker has better error
reporting. However, both are good alternatives to JSP.


I've questioned that a few times myself.  The paragraph doesn't do 
FreeMarker much justice from a technical sense, but then again, most 
Struts 2 users won't exploit the features FreeMarker offers above 
Velocity,


What is your basis for thinking this? It's clear enough from the 
freemarker-user list that people do use advanced features of the tool 
that are not in Velocity. I just don't see offhand why the usage 
patterns of people using FreeMarker in conjunction with Struts 2 would 
be particularly different from users in general.


Though, the other thing is that, even if the assertion were true, I 
don't know how you would know it was... it seems like a seat of the 
pants conjecture...




The basis of my conjecture is that Struts 2 provides little support for 
FreeMarker's more advanced features, so most users won't exploit those features.



To me, this makes little sense. It would seem that we have completely 
different conceptual models of what is going on here. From my 
perspective (though maybe I am the one mistaken...) you have certain 
fundamental misconceptions.


There is basically no need for a framework like Struts 2 to explicitly 
support FreeMarker's more advanced features. They're just there if 
needed. Translatinf this idea to a JRuby result or a Groovy result. we 
could say that if the front end coding is in Ruby, the view could use a 
very small set of Ruby's language features or a much larger one. But 
that has almost nothing to do with the controller used. And the same 
applies to the use of FreeMarker's template language. Whether a project 
makes very sophisticated use of FreeMarker's macro capabilities would 
depend mostly on the project's requirements (and also on the 
skill/experience level of the front-end coders) not on whether the 
project was using Struts 2 or Stripes or Spring MVC, say.


You see, the fundamental usage pattern is that you expose your data 
model to a page template and produce output. In terms of using 
FreeMarker, how the data got to the template layer (whether it was put 
there by Struts 2 or by Stripes or whatever) is irrelevant and doesn't 
have anything or at least very little to do with the complexity or 
sophistication of the templates.


As regards more sophisticated uses of templating, I was thinking about 
this a while back and wrote a blog entry with some (possibly 
wooly-headed) ideas.


http://freemarker.blogspot.com/2006/07/designerdeveloper-division-of-labor.html

The above is worth reading if you want to understand my perspective on 
this sort of thing, and some of the thinking behind FreeMarker.




The model provided to FreeMarker is a map containing the request, 
response, ValueStack and a few other basic structures, where access to 
the ValueStack (Struts2's core model) is limited to Struts2 tags to in 
order to access OGNL.  I don't know the history, but it appears the 
FreeMarkerResult[1] was designed to be equivalent to the Velocity 
implementation rather than to exploit FreeMarker features.  Similarly, 
although the Struts 2 tags use FreeMarker templates, the model is 
limited and the templates don't encourage what I think you'd consider to 
be best-practice.





My conjecture still stands, that as built, most Struts 2 users won't 
exploit FreeMaker's better features. That's not meant as a criticism of 
FreeMarker.

Take a quick look at the source:
[1] 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/java/org/apache/struts2/views/freemarker/ 

[2] 
http://svn.apache.org/viewvc/struts/struts2/trunk/core/src/main/resources/template/css_xhtml/ 


Well, I provided the link to a discussion of FreeMarker vs. JSP from 
Jive Software developers. Jive's product is built on top of Webwork and 
FreeMarker. One of the points made in there was that Velocity simply 
wasn't powerful enough for their needs. Again, it's only one data point, 
but it supports the idea that a