[prev in list] [next in list] [prev in thread] [next in thread] 

List:       velocity-user
Subject:    Re: vrs JSP vrs AppBuilder (also)
From:       James Maes <jmaes () sportingnews ! com>
Date:       2001-04-19 3:36:05
[Download RAW message or body]



Also,
	Objectively, what is the "weakest" area in Velocity?






On Wednesday 18 April 2001 23:02, you wrote:
> James Maes wrote:
> > Hey all,
> >         We are looking at replacing our current templating system
> > (Informix Appage Builder) with a "Better" solution.  The main problem we
> > have ran into at this point is scaling.  We run a pseudo dynamic site
> > where we publish the content from the backend to flat files on the live
> > sites.  We generate 35,000 to 50,000 pages a day of unique content from
> > 300+ templates.
>
> Do you do this in one shot?  I mean, run a batch job at some point in
> the day?
>
> > Other then performance, useable is a large issue.  The current system
> > meshes the HTML (view) and SQL/Logic (model/controller) together in
> > "Pages" and "DTags"
>
> You have come to right place.  No such nonsense here...  Velocity
> strictly enforces the separation between data and presentation.
>
> > Example, a template page might look like this
> > ++++++ START OF CODE +++++++
> > <?head>
> > <?top>
> >    <?left_nav>
> >       <?main_page_body>
> >    <?right_nav>
> > <?bottom>
> > ++++++ END OF CODE +++++++
> >
> > where main_page_body might look something like this
> >
> > ++++++ START OF CODE +++++++
> >
> > <?MIBLOCK COND=$(EQ,$var1,$var2)>
> >         <h4>Quick Little Html Tag Sample</h4>
> > <?/MIUBLOCK>
> >
> > <?MISQL SQL="SELECT something FROM somewhere WHERE this = that">
> >         something result from html query
> > <?/MISQL>
> >
> > ++++++ END OF CODE +++++++
> >
> > We are looking to replace this with JSP's and JavaBeans.
> >
> > I ran across this project from Google tonight, and thought I would take a
> > look.
> >
> > That all being said maybe you can help me with a couple of questions
> > 1. How does this (w/Turbine?) do under heavy loads.  (50,000 pages a day
> > from 300+ templates)
>
> I can't answer this question, as I am not a Turbine person : however,  I
> can't imagine that it would be a problem.
>
> 50,000 a day, spread over a day, is something like 1 every 2 seconds.
> No worries :)
>
> The real question is what is the peak, and do you divide the load over
> more than 1 machine through load balancing...
>
> > 2. Any support for EJB intergration? (for better intergration with our
> > PubSys Interfaces)
>
> Velocity is designed such that a template can access virtually any type
> of Java class with public methods.  This means that while you may have
> to write a wrapper class or two, you should be able to easily use
> data-providing code that you have now.  We follow the bean spec, with a
> few enhancements for ease of use, in our introspection.
>
> Our iterator support in the #foreach() directive will handle anything
> that looks like an Object[],  a Collection, a Map, an Iterator or an
> Enumeration, so you have some freedom there, too.
>
> > 3. Over all ease of use
>
> We think its very easy.  The template language was designed with the
> designer in mind. There are very few directives in the template language
> to learn.  They are basically constrainted to basic logic
>
> #if(  $ref == 1 )
>   do something
> #end
>
> looping
>
> #foreach( $i in $dataarray)
>   do someting
> #end
>
> setting new 'variables'
>
> #set($mycount = 1 )
>
> and of course accessing data
>
> $mystring
>
> $resultset.nextValue()
>
> $hashtable.thekey
>
> etc
>
>
> On the developer side, it's a very simple API to deal with.  Once basic
> setup is out of the way, which is easy as the runtime provides defaults
> internally for every setting, you simply load what we call 'the Context'
> (a glorified hashtable), choose a template (or create one dynamically)
> and have Velocity render the template and context into a writer.
>
> That's pretty much it.
>
> See the developer documentation on the website for an overview on
> programming w/ velocity.
>
> http://jakarta.apache.org/velocity/developer-guide.html
>
> We also provide a servlet base class that you can derive your servlet
> from, and it manages most of the harder stuff, leaving you to control
> logic, the data model, and choosing that pesky template. :)
>
> > 4. Over all application reliability
>
> So far, so good.  We are as fast as our competitors, have a released
> version, and are being used in production environments around the
> world.  That said, we are the 'new guy' in the block, so our 'customer
> base' isn't as large as others.  But it's growing rapidly.  Take a look
> at our mail lists on www.mail-archive.com to get the flavor of the
> problems we have been dealing with lately...
>
> > Any comments would be of great help.
> >
> > Also, if anyone else has come across similar migrations I would love to
> > hear form you.
>
> The migrations to Velocity have mostly been from WebMacro-based systems,
> as Velocity can trace its ancestry directly to WebMacro.  (We admit it
>
> :  we stole the idea, lock stock and barrel.)  The syntax is very, very
>
> similar, the programming pattern / model is almost identical, etc.  So
> it's a easy move from WM to Vel.
>
> Vel has a nifty 'macro' facility called Velocimacros that let your
> template authors compose parameterized macros of template code that they
> can reuse as if it was a built in directive.  it's a powerful feature,
> and sounds like something you would be able use effectively.
>
> Hope this gave you a little insight into what we are about, and we hope
> to see you using Velocity.  Please, don't hesitate with questions.
>
> geir
>
> > ------------------------------------
> >
> > || James Maes
> > || Senior Programmer
> > || jmaes@sportingnews.com
> > || The Sporting News
> > || www.sportingnews.com
> > || fantasy.sportingnews.com
> >
> > ------------------------------------
> >
> > "given enough time and resources we can accomplish anything"

-- 
 
------------------------------------
|| James Maes        
|| Senior Programmer 
|| jmaes@sportingnews.com 
|| The Sporting News     
|| www.sportingnews.com 
|| fantasy.sportingnews.com
------------------------------------

"given enough time and resources we can accomplish anything"

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic