× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Nathan Andelin skrev den 07-07-2008 13:16:
Thorbjørn,

I wonder how many people will really study and ponder your explanation of JSP and JSF. I assure you that I did. And it clarified a lot for me. To the point that it made me realize that other people who may have been following this discussion may have been scratching their heads and wondering what I was meaning by "mapping SQL result sets to browsers"? Thanks for taking the time to write a somewhat lengthy explanation of JSP and JSF.
You are welcome.

Just to state what JSP and JSF are again:

JSP was originally HTML with embedded Java (or Java with embedded HTML) which then grew to allow embedding "macros" in the form of tag libraries (<h:dataTable> is a tag).

As it was seen that mixing languages at a low level leads to madness, the trick again is as usual in computer languages to introduce yet another layer of abstraction. Please notice that the b.jsp does not contain a single HTML tag - it is all in the JavaServer Faces tag libraries.

These are quite powerful, but also hard to learn to use properly.

Extensions have appeared that allow runtime decisions (to present any resultset etc), but the basic, original JSF I worked with did not provide much besides static presentation.

Basically you marry the technology you use. The great advantage of using JSF as opposed to templating (where you insert data on the fly) is that the tag libraries can be mixed without having to do major surgery on the files. We use a small helper library which allow us to put focus on a given submit button with javascript in IE.



The development and runtime paradigms that I use are so different from the ones that you use, that the terms I was using in my posts may have been confusing to a number of people, including those who develop under MS .Net, for example. I think I know better now.

Hopefully it is a bit clearer now. I have found these things out by myself so there might be things I name different from others. Let me know if you find any :)

I work closely with Cobolprogrammers so I know the paradigms are very different :)

Under my runtime paradigm, HTML streams are loaded into memory, which also contain delimiters, marking the positions where program data is inserted just before streaming it to the browser. And I began working on a new intelligent procedure to simplify the process of copying row and column values from SQL result sets to formatted output streams. To do more work with fewer lines of code. To simplify the API for the programmer. That was my idea of "mapping".
This is what I would think as "templating". I believe there is a great templating engine written in Java from http://velocity.apache.org/.

"Velocity is a Java-based template engine. It permits anyone to use a simple yet powerful template language to reference objects defined in Java code. "

This might save you some time.


methods that may be referenced, all compile into a self-contained executable prior to runtime. So any interfaces with SQL results sets, and any mapping that may be performed,
Yes. The JSP-compiler create a Java class which then is static code (until a new JSP is compiled).


must be explicitly written (or generated) prior to runtime, in order for the executable to compile. Which helps me understand IBM's rationale for putting so much work into their IDEs, to assist with code generation.
Java and Java technologies are truly a pain to write if you do not have an assisting IDE to help you, since they tend to be very verbose and unforgiving. I have found that this strictness and other nasty stuff results in - lo and behold - maintainable code!
(Let me know if you want my opinion on this :)


ps. I think email attachments are removed by the list server, so if your sample project was attached that way, you may want to post it to a server. I think midrange.com provides a place for posting code files.
Sigh. I did attach it to my mail. The posting place only allows plain files, not zips, so I put it on

http://www.runjva.com/articles

Otherwise I'd be happy to mail it. It is a 400 Kb zip file.


As an Amazon Associate we earn from qualifying purchases.

This thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.