You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Jeff Schnitzer <je...@infohazard.org> on 2001/06/17 00:57:18 UTC

ANN: Maverick MVC framework supports Velocity

Maverick is a lightweight MVC framework which allows a wide variety of
view templating options, and as of version 0.9.5, Velocity has been
added to the list.

http://mav.sourceforge.net

We wrote Maverick because we wanted an MVC framework with sophisticated
support for XSLT, but we discovered that clean view separation allows
just about any templating system to be used.  The model/controller
component combines (IMHO) the best aspects of Struts and WebWork, but
the really cool part is what you can do with views.

Views can be built in the traditional manner with JSP or Velocity, or
they can be built directly from XSLT.  In the later case, the JavaBeans
model is wrapped in an adapter which provides a DOM view through
reflection, so generation and parsing of XML is avoided and XSL files
work just like a Velocity template.  You can define a series of
iterative XSLT transformations on a per-view basis, including for
Velocity (or JSP, or static document) views which generate well-formed
XML.

Even without all the cool XSL stuff, it is (IMHO) a great framework for
straight Velocity templating.  The "action mapping" config file can be
used with Velocity like this:

  <command id="runQuery">
    <controller type="org.infohazard.example.controller.RunQuery"/>

    <!-- No XSLT used -->
    <view id="success">
      <velocity model="model" path="queryResults.vm"/>
    </view>

    <!-- Shows how you can use XSLT -->
    <view id="error">
      <velocity model="model" path="generatesXML.vm"/>
        <transform path="lookAndFeel.xsl"/>
        <transform path="lookAndFeel2.xsl"/>
      </velocity>
    </view>
  </command>

A short comparison to Turbine is probably obligitory:  Maverick is a
minimalist framework; it focuses specifically on MVC flow and provides
no code for connection pooling, logging, OR mapping, etc.  Our feeling
is that those features are already implemented reasonably well by
application servers and other existing tools.  This makes Maverick much
simpler and easier to learn, at the risk of not being "everything you
need".  Another key differentiating factor is Maverick's comprehensive
support for XSLT.

Take a look!  http://mav.sourceforge.net


Jeff Schnitzer
jeff@infohazard.org
Scott Hernandez
scotthernandez@hotmail.com

Re: Velocity _still_ appears to cache macros...

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
Sorry - I couldn't resist the previous...

psaunder@comcen.com.au wrote:
> 
> Hi again,
> Just curious, has anyone had sucess in disabling
> macros from being cached under Turbine?
> 
> Jason Van Zyl gave me some advice about setting Velocity
> parameters, though for some reason, Velocity doesn't seem
> to reload the macro when it is parsing the template.
> 
> Is it possible this behaviour is particular to Velocity running
> under Turbine?

No, I doubt it - what do you have as the settings?

It should be

<thingy>.velocimacro.permissions.allow.inline.to.replace.global = true

with whatever the right <thingy> for Turbine should be.

Can you send us the log where Velocity is initialized?  That will tell
us if you are indeed setting it as the VMFactory lists its settings as
it goes through them.

> Would it help if I posted a snippet of my Turbine or Velocity log?

Yes.
 
geir

-- 
Geir Magnusson Jr.                           geirm@optonline.net
System and Software Consulting
Developing for the web?  See http://jakarta.apache.org/velocity/
You have a genius for suggesting things I've come a cropper with!

Re: Velocity _still_ appears to cache macros...

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
psaunder@comcen.com.au wrote:
> 
> Hi again,
> Just curious, has anyone had sucess in disabling
> macros from being cached under Turbine?
> 
> Jason Van Zyl gave me some advice about setting Velocity
> parameters, though for some reason, Velocity doesn't seem
> to reload the macro when it is parsing the template.
> 
> Is it possible this behaviour is particular to Velocity running
> under Turbine?
> Would it help if I posted a snippet of my Turbine or Velocity log?
> 
> I have found that restarting Turbine 20 times eventually clags my linux
> system with java process... :(

try setting the 

number.of.times.to.restart.turbine.under.linux.to.clear.vm.cache = 1

that should solve it.

geir

-- 
Geir Magnusson Jr.                           geirm@optonline.net
System and Software Consulting
Developing for the web?  See http://jakarta.apache.org/velocity/
You have a genius for suggesting things I've come a cropper with!

RE: Velocity _still_ appears to cache macros...

Posted by David Duddleston <da...@i2a.com>.
Hmmm. Am I on the right bus... I mean list?

-david

> -----Original Message-----
> From: gmj@mta6.srv.hcvlny.cv.net [mailto:gmj@mta6.srv.hcvlny.cv.net]On
> Behalf Of Geir Magnusson Jr.
> Sent: Monday, June 18, 2001 8:45 PM
> To: velocity-user@jakarta.apache.org
> Subject: Re: Velocity _still_ appears to cache macros...
> 
> 
> Travis Low wrote:
> > 
> > Don't worry about the zombie processes.  They are annoying, but 
> cause no ill effects.
> > 
> > I haven't tried to get 3D acceleration working, though I did 
> spend a bit of time trying to
> > get direct rendering to work.  No luck.  Velocity still runs at 
> the same speed.  :-)
> > 
> 
> We have OpenGL support scheduled for Velocity v25.3
> 
> geir
> 
> -- 
> Geir Magnusson Jr.                           geirm@optonline.net
> System and Software Consulting
> Developing for the web?  See http://jakarta.apache.org/velocity/
> You have a genius for suggesting things I've come a cropper with!

Re: Velocity _still_ appears to cache macros...

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
Travis Low wrote:
> 
> Don't worry about the zombie processes.  They are annoying, but cause no ill effects.
> 
> I haven't tried to get 3D acceleration working, though I did spend a bit of time trying to
> get direct rendering to work.  No luck.  Velocity still runs at the same speed.  :-)
> 

We have OpenGL support scheduled for Velocity v25.3

geir

-- 
Geir Magnusson Jr.                           geirm@optonline.net
System and Software Consulting
Developing for the web?  See http://jakarta.apache.org/velocity/
You have a genius for suggesting things I've come a cropper with!

Re: Velocity _still_ appears to cache macros...

Posted by Travis Low <tr...@dawnstar.org>.
Don't worry about the zombie processes.  They are annoying, but cause no ill effects.

I haven't tried to get 3D acceleration working, though I did spend a bit of time trying to 
get direct rendering to work.  No luck.  Velocity still runs at the same speed.  :-)

T

psaunder@comcen.com.au wrote:

> Hey Travis,
> _exactly_ same setup as mine. I use jbuilder 4.0 for development of
> my java modules etc, so it's convenient and a good idea to use the IBM
> JDK 1.3 that comes with that for running Turbine..
> 
> I also saw all those Zombie processes that were _very_ resistant to kill -9.
> 
> BTW, ever get 3D accel working? I did everything down the the last full stop and couldn't get it working. I think once the config gets a bit screwed 
> it can be a dog to get working.. :(
> 
> Patrick.
> 
> Quoting Travis Low <tr...@dawnstar.org>:
> 
> 
>>That's what I do, but occasionally I get a bunch of zombie processes as
>>a result.  I'm 
>>running the IBM JDK 1.3 on Mandrake 8.  Just FYI.
>>
>>-- Travis Low
>>    <ma...@dawnstar.org>
>>    <http://dawnstar.org/travis>
>>
>>
>>Jon Stevens wrote:
>>
>>
>>>on 6/18/01 5:31 PM, "psaunder@comcen.com.au" <ps...@comcen.com.au>
>>>
>>wrote:
>>
>>>
>>>>I have found that restarting Turbine 20 times eventually clags my
>>>>
>>linux
>>
>>>>system with java process... :(
>>>>
>>>>Thanks,
>>>>
>>>>Patrick.
>>>>
>>>>
>>>What?
>>>
>>>You do realize that when you do a ps -uax you see the JVM *threads*
>>>
>>and not
>>
>>>extra *processes*, right? All you need to do is properly kill the root
>>>
>>JVM
>>
>>>and that will restart things.
>>>
>>>-jon
>>>
>>
>>
> 
> 


-- 
-- Travis Low
    <ma...@dawnstar.org>
    <http://dawnstar.org/travis>


Re: Velocity _still_ appears to cache macros...

Posted by ps...@comcen.com.au.
Hey Travis,
_exactly_ same setup as mine. I use jbuilder 4.0 for development of
my java modules etc, so it's convenient and a good idea to use the IBM
JDK 1.3 that comes with that for running Turbine..

I also saw all those Zombie processes that were _very_ resistant to kill -9.

BTW, ever get 3D accel working? I did everything down the the last full stop and couldn't get it working. I think once the config gets a bit screwed 
it can be a dog to get working.. :(

Patrick.

Quoting Travis Low <tr...@dawnstar.org>:

> That's what I do, but occasionally I get a bunch of zombie processes as
> a result.  I'm 
> running the IBM JDK 1.3 on Mandrake 8.  Just FYI.
> 
> -- Travis Low
>     <ma...@dawnstar.org>
>     <http://dawnstar.org/travis>
> 
> 
> Jon Stevens wrote:
> 
> > on 6/18/01 5:31 PM, "psaunder@comcen.com.au" <ps...@comcen.com.au>
> wrote:
> > 
> > 
> >>I have found that restarting Turbine 20 times eventually clags my
> linux
> >>system with java process... :(
> >>
> >>Thanks,
> >>
> >>Patrick.
> >>
> > 
> > What?
> > 
> > You do realize that when you do a ps -uax you see the JVM *threads*
> and not
> > extra *processes*, right? All you need to do is properly kill the root
> JVM
> > and that will restart things.
> > 
> > -jon
> 
> 
> 

Re: Velocity _still_ appears to cache macros...

Posted by Travis Low <tr...@dawnstar.org>.
That's what I do, but occasionally I get a bunch of zombie processes as a result.  I'm 
running the IBM JDK 1.3 on Mandrake 8.  Just FYI.

-- Travis Low
    <ma...@dawnstar.org>
    <http://dawnstar.org/travis>


Jon Stevens wrote:

> on 6/18/01 5:31 PM, "psaunder@comcen.com.au" <ps...@comcen.com.au> wrote:
> 
> 
>>I have found that restarting Turbine 20 times eventually clags my linux
>>system with java process... :(
>>
>>Thanks,
>>
>>Patrick.
>>
> 
> What?
> 
> You do realize that when you do a ps -uax you see the JVM *threads* and not
> extra *processes*, right? All you need to do is properly kill the root JVM
> and that will restart things.
> 
> -jon



Re: Velocity _still_ appears to cache macros...

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
As interesting as this is... any chance you can tell us the settings and
the log ? :)

geir

psaunder@comcen.com.au wrote:
> 
> Oh,
> just the standard way: reboot my linnx machine..
> Joke!
> 
> Actually, nothing special,
> just bin/catatlina stop;  bin/catatlina start
> 
> BTW, just so I'm understood, I do see my updates to macro library
> after every restart, just not after edit while Turbine is running.
> 
> Pat.
> 
> Quoting Jon Stevens <jo...@latchkey.com>:
> 
> > on 6/18/01 5:51 PM, "psaunder@comcen.com.au" <ps...@comcen.com.au>
> > wrote:
> >
> > > Jon, I'm not sure which angle you're coming from..
> > > If it came across like I as bagging Turbine, well, that
> > > was certainly not my intention.
> > > Hey, I know bouncing it 20 times is probably
> > > going to leave Java a little groggy,
> > > so, yeah, I probably need a little education on how
> > > to keep it healthy.. but then I never professed to
> > > be an expert on this... =:o
> > >
> > > -Pat
> >
> > No "angle"...just letting you know...
> >
> > Also, I'm not really sure how you are "bouncing" turbine...care to
> > share?
> >
> > -jon
> >
> >

-- 
Geir Magnusson Jr.                           geirm@optonline.net
System and Software Consulting
Developing for the web?  See http://jakarta.apache.org/velocity/
You have a genius for suggesting things I've come a cropper with!

Re: Velocity _still_ appears to cache macros...

Posted by ps...@comcen.com.au.
Oh,
just the standard way: reboot my linnx machine..  
Joke! 

Actually, nothing special, 
just bin/catatlina stop;  bin/catatlina start

BTW, just so I'm understood, I do see my updates to macro library
after every restart, just not after edit while Turbine is running.

Pat.

Quoting Jon Stevens <jo...@latchkey.com>:

> on 6/18/01 5:51 PM, "psaunder@comcen.com.au" <ps...@comcen.com.au>
> wrote:
> 
> > Jon, I'm not sure which angle you're coming from..
> > If it came across like I as bagging Turbine, well, that
> > was certainly not my intention.
> > Hey, I know bouncing it 20 times is probably
> > going to leave Java a little groggy,
> > so, yeah, I probably need a little education on how
> > to keep it healthy.. but then I never professed to
> > be an expert on this... =:o
> > 
> > -Pat
> 
> No "angle"...just letting you know...
> 
> Also, I'm not really sure how you are "bouncing" turbine...care to
> share?
> 
> -jon
> 
> 

Re: Velocity _still_ appears to cache macros...

Posted by Jon Stevens <jo...@latchkey.com>.
on 6/18/01 5:51 PM, "psaunder@comcen.com.au" <ps...@comcen.com.au> wrote:

> Jon, I'm not sure which angle you're coming from..
> If it came across like I as bagging Turbine, well, that
> was certainly not my intention.
> Hey, I know bouncing it 20 times is probably
> going to leave Java a little groggy,
> so, yeah, I probably need a little education on how
> to keep it healthy.. but then I never professed to
> be an expert on this... =:o
> 
> -Pat

No "angle"...just letting you know...

Also, I'm not really sure how you are "bouncing" turbine...care to share?

-jon


Re: Velocity _still_ appears to cache macros...

Posted by ps...@comcen.com.au.
Jon, I'm not sure which angle you're coming from..
If it came across like I as bagging Turbine, well, that
was certainly not my intention.
Hey, I know bouncing it 20 times is probably
going to leave Java a little groggy, 
so, yeah, I probably need a little education on how
to keep it healthy.. but then I never professed to
be an expert on this... =:o

-Pat

Quoting Jon Stevens <jo...@latchkey.com>:

> on 6/18/01 5:31 PM, "psaunder@comcen.com.au" <ps...@comcen.com.au>
> wrote:
> 
> > I have found that restarting Turbine 20 times eventually clags my
> linux
> > system with java process... :(
> > 
> > Thanks,
> > 
> > Patrick.
> 
> What?
> 
> You do realize that when you do a ps -uax you see the JVM *threads* and
> not
> extra *processes*, right? All you need to do is properly kill the root
> JVM
> and that will restart things.
> 
> -jon
> 
> 

Re: Velocity _still_ appears to cache macros...

Posted by Jon Stevens <jo...@latchkey.com>.
on 6/18/01 5:31 PM, "psaunder@comcen.com.au" <ps...@comcen.com.au> wrote:

> I have found that restarting Turbine 20 times eventually clags my linux
> system with java process... :(
> 
> Thanks,
> 
> Patrick.

What?

You do realize that when you do a ps -uax you see the JVM *threads* and not
extra *processes*, right? All you need to do is properly kill the root JVM
and that will restart things.

-jon


Velocity _still_ appears to cache macros...

Posted by ps...@comcen.com.au.
Hi again,
Just curious, has anyone had sucess in disabling
macros from being cached under Turbine?

Jason Van Zyl gave me some advice about setting Velocity
parameters, though for some reason, Velocity doesn't seem
to reload the macro when it is parsing the template.

Is it possible this behaviour is particular to Velocity running
under Turbine?
Would it help if I posted a snippet of my Turbine or Velocity log?

I have found that restarting Turbine 20 times eventually clags my linux
system with java process... :(

Thanks,

Patrick.

Re: ANN: Maverick MVC framework supports Velocity

Posted by "Geir Magnusson Jr." <ge...@optonline.net>.
Jeff Schnitzer wrote:
> 
> Maverick is a lightweight MVC framework which allows a wide variety of
> view templating options, and as of version 0.9.5, Velocity has been
> added to the list.
> 
> http://mav.sourceforge.net
> 
> We wrote Maverick because we wanted an MVC framework with sophisticated
> support for XSLT, but we discovered that clean view separation allows
> just about any templating system to be used.  The model/controller
> component combines (IMHO) the best aspects of Struts and WebWork, but
> the really cool part is what you can do with views.
> 
> Views can be built in the traditional manner with JSP or Velocity, or
> they can be built directly from XSLT.  In the later case, the JavaBeans
> model is wrapped in an adapter which provides a DOM view through
> reflection, so generation and parsing of XML is avoided and XSL files
> work just like a Velocity template.  You can define a series of
> iterative XSLT transformations on a per-view basis, including for
> Velocity (or JSP, or static document) views which generate well-formed
> XML.
> 
> Even without all the cool XSL stuff, it is (IMHO) a great framework for
> straight Velocity templating.  The "action mapping" config file can be
> used with Velocity like this:
> 
>   <command id="runQuery">
>     <controller type="org.infohazard.example.controller.RunQuery"/>
> 
>     <!-- No XSLT used -->
>     <view id="success">
>       <velocity model="model" path="queryResults.vm"/>
>     </view>
> 
>     <!-- Shows how you can use XSLT -->
>     <view id="error">
>       <velocity model="model" path="generatesXML.vm"/>
>         <transform path="lookAndFeel.xsl"/>
>         <transform path="lookAndFeel2.xsl"/>
>       </velocity>
>     </view>
>   </command>
> 
> A short comparison to Turbine is probably obligitory:  Maverick is a
> minimalist framework; it focuses specifically on MVC flow and provides
> no code for connection pooling, logging, OR mapping, etc.  Our feeling
> is that those features are already implemented reasonably well by
> application servers and other existing tools.  This makes Maverick much
> simpler and easier to learn, at the risk of not being "everything you
> need".  Another key differentiating factor is Maverick's comprehensive
> support for XSLT.
> 
> Take a look!  http://mav.sourceforge.net

I will take the liberty of adding the announcement to our home page. 
Holler if you don't like this. (what are the odds of that...)

geir

-- 
Geir Magnusson Jr.                           geirm@optonline.net
System and Software Consulting
Developing for the web?  See http://jakarta.apache.org/velocity/
You have a genius for suggesting things I've come a cropper with!

Re: ANN: Maverick MVC framework supports Velocity

Posted by Jon Stevens <jo...@latchkey.com>.
on 6/16/01 3:57 PM, "Jeff Schnitzer" <je...@infohazard.org> wrote:

> A short comparison to Turbine is probably obligitory:  Maverick is a
> minimalist framework; it focuses specifically on MVC flow and provides
> no code for connection pooling, logging, OR mapping, etc.  Our feeling
> is that those features are already implemented reasonably well by
> application servers and other existing tools.  This makes Maverick much
> simpler and easier to learn, at the risk of not being "everything you
> need".  Another key differentiating factor is Maverick's comprehensive
> support for XSLT.

Actually, Maverick doesn't compare with Turbine at all because it is simply
a publishing framework and is lacking the webapp aspects that Turbine has.
The other thing is that if you are using just Tomcat, it is missing quite a
few of the "features" that you claim other app servers have and should
provide.

If anything you should compare Maverick with Cocoon.

:-)

-jon

-- 
"Open source is not available to commercial companies."
            -Steve Ballmer, CEO Microsoft
<http://www.suntimes.com/output/tech/cst-fin-micro01.html>