You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@velocity.apache.org by Brian Lloyd-Newberry <ne...@yahoo.com> on 2001/08/29 17:48:40 UTC
Is Velocity Implementation == MVC Implementation? was re: floating point types
--- Jon Stevens <jo...@latchkey.com> wrote:
>
> In other words, we should modify Velocity because your app has
> "design
> flaws".
>
> Hmmm...
>
Nope, not what I was saying at all. :) (Read on for why) Remember
that I really don't care I was just giving a "real world" example from
my trenches where numbers that happen to have floating point precision
are involved in what to me is completely divorced from business logic.
> In other words, if we provided context tools that were "commonly"
> distributed with Velocity, the issue would be resolved without having
> to
> modify VTL.
>
> Hmmm...
I think the issue we are batting around here is that numbers are
dealt with in the velocity "core" (for lack of a better term). The
numbers happen to be integers, however I see no compelling reason that
they have to be (The BigNumber idea is compelling). There seems to be a
disagreement in regards to "needing" floats in an MVC architecture,
which I would argue (not that I develop or design the velocity core at
all) is not central to Velocity per say.
From the web site I quote the following text which to me says that
Velocity Implementation != MVC Implementation (or according to the text
below, at least it does not have to be). MVC is good, however limiting
velocity's implementation of numbers for the sole purpose of making it
harder to not do MVC is a little silly. :)
=====
>From http://jakarta.apache.org/velocity/
=====
What is Velocity?
Velocity is a Java-based template engine. It permits anyone to use
the simple yet powerful template language to reference objects
defined in Java code.
When Velocity is used for web development, Web designers can work
in parallel with Java programmers to develop web sites according to
the Model-View-Controller (MVC) model, meaning that web page
designers can focus solely on creating a site that looks good, and
programmers can focus solely on writing top-notch code. Velocity
separates Java code from the web pages, making the web site more
maintainable over the long run and providing a viable alternative
to Java Server Pages (JSPs) or PHP.
Velocity's capabilities reach well beyond the realm of web sites;
for example, it can generate SQL and PostScript and XML (see Anakia
for more information on XML transformations) from templates. It can
be used either as a standalone utility for generating source code
and reports, or as an integrated component of other systems.
Velocity also provides template services for the Turbine web
application framework. Velocity+Turbine provides a template service
that will allow web applications to be developed according to a
true MVC model.
=====
In reality I am perfectly willing to use context tools for number
support in velocity if that is the resolution of this long thin thread.
;) The power and agility that velocity gives us far outweighs any
annoyances.
I personally would rather see access into the parse tree when
events are caught in an EventManager than native floating point number
support. It would enable me to get better line/column error messages to
be integrated into some of the tools that I am working with. When I
have "down" time I am looking into patching some of this in and
contributing it.
Again, thanks to ALL who have made Velocity what it is today. I
couldn't do my job without it.
-Brian
__________________________________________________
Do You Yahoo!?
Make international calls for as low as $.04/minute with Yahoo! Messenger
http://phonecard.yahoo.com/