[sword-devel] Dynamic Download first hack at .jsp

Troy A. Griffitts sword-devel@crosswire.org
Thu, 04 Nov 1999 13:07:17 -0700

Hey Derek,
	Thanks for your suggestion.  I've heard about php (and have been
impressed with it on sites like http://www.freshmeat.net).  I've been
looking over their docs this morning and I think it is a really cool
technology.  My motivations behind the choice for .jsp  are based in the
following areas:

	o	It is not java-like.  It IS java.  I can use any existing class
library including JDBC drivers and container libraries like JGL or any
future work anyone else does in the Java world.
	o	I don't have to learn any new syntax, save a handful of markup tags,
and I have visual IDEs like JBuilder for Solaris / Linux that can
graphically debug and provide method and parameter completion on my
objects (which is how I built the supporting classes for the
	o	JSPs are automatically compiled to multi-threaded servlets leaving no
build burden on the developer; and
	o	although the first hit on the page after modification is slow due to
the recompile, every subsequent hit is merely another thread running
thru an already loaded servlet, making it considerably fast.

Consider what this page is doing every time you hit it...  It searches
thru all files found in the config directory, parsing 146 .conf files
and creates a Map<String, <String, Map>> container with all entries.  I
then use this object to enumerate all entries in the outside map
(Sections) and grab information I need about the module.  I don't take
advantage of any static classes, but I could instantiate an SWMgr (when
the files are parsed) on first load and then for each subsequent load
use this static class for each thread.  This would make things much
faster, but we would loose the ability to update the modules and see the
effect immediately (which, I'm not sure, is a very big deal).

Hope this provides some justification in your mind of why we might want
to use jsp's.  I know specific technologies easily become near to our
hearts, so I don't expect you to say, "Of course!  It all make sense
now." :)

	God's blessings,


Derek Neighbors wrote:
> Troy,
> I would suggest using PHP http://www.php.net instead of Java Server Pages.
> They are much faster and MUCH MUCH easier to develop web related things
> with.  Just a suggestion.  The syntax is pretty much identical to C++ so
> there should be virtually zero learning curve.
> Just a suggestion.
> Derek Neighbors
> DFC, Inc.
> http://developers.forchrist.com
> dneighbors@forchrist.com
> > -----Original Message-----
> > From: owner-sword-devel@crosswire.org
> > [mailto:owner-sword-devel@crosswire.org]On Behalf Of Troy A. Griffitts
> > Sent: Thursday, November 04, 1999 4:40 AM
> > To: sword-devel@crosswire.org
> > Subject: [sword-devel] Dynamic Download first hack at .jsp
> >
> >
> > Ok, everyone, if you have time, check this out:
> >
> >       http://www.crosswire.org/sword/download2/
> >
> > This is a first hack at a jsp for dynamically building a page that will
> > allow our end users to download modules right from the /pub/sword/raw
> > repository.  It doesn't work yet, but it does read the repository and
> > display info about all the modules that it finds.
> >
> > Source code is included as a link at the end of the page.
> >
> > Choose 'Common'
> > Then either:
> >       Texts / Translations
> >
> >       Commentaries
> >
> >       Lexicons / Bible
> >       Dictionaries
> >
> >
> > Comments, suggestions, help are appreciated.
> >
> >       g'nite,
> >               -Troy.
> >