![]() |
Products Else For If employ Java as our primary programming language for
building Web software, because of its strengths and suitability to the task.
As a high-level, object-oriented language, it does much to reduce the bugs
and security holes endemic to other languages.
Java also promotes code reuse, which allows software components to be included in many different systems, rather than rewriting them for each. Over the course of years, we have created many reusable components and libraries, most of which are released under an open-source licence, and you are free use them accordingly. These components can greatly simplify Web site construction, and we consider them good alternatives to many popular APIs and frameworks. Where many Web sites are built upon complex and heavy-weight architectures, we have often found that scalability and interoperability can be achieved by a more direct means--a cleaner, leaner (and hence more performant) architecture that is as flexible as its business domain. Some of the libraries below are designed expressly for that purpose, while others are meant as tools and components to enhance any Web site or speed its development. Here's an index for this page:
X-Entity X-Entity represents a scalable design for integrating Java applications
with a relational database: an object-relational layer. There are,
of course, countless other products and APIs which achieve the same end, but
these in general seem monolithic and as a result cumbersome. Most involve
a runtime broker component of some sort, which handles communication between
your business objects and your database, introducing a point of failure that is
difficult to troubleshoot.
Instead, this system generates a fairly simple set of classes for each of your business objects (or, entities, as we prefer), to which you can add your own persistence logic as needed: something persistence layers almost invariably require. Yet the low-level mechanics (e.g., creating basic accessors, and caching) are handled for you, so that tasks like adding members are quick and painless. A few terse XML files describe your data model and object mappings thereunto. Once you have created these, you can build Ant tasks to generate your tables, relationships, indice, ectetera, and also to generate a base set of Java classes, which you can then extend to your heart's content. These classes communicate via JDBC to your database system using stored procedures, which are also generated. (Thus for this feature, your RDBMS must support stored procedures.) A Web interface can also be deployed, by which all these tasks can be performed selectively. It includes a simple JDBC query interface. This system effects a very clear and direct interface between your database and your application. A flexible caching system is the key to scalability. As objects are requested, those cached locally can be checked against the data store for modifications and updated as needed. In this way, multiple application servers clustered around a database server can be kept in sync, with no need for an intermediate, third-party broker object. The goal is a simple, highly extensible and more performant architecture where the extra baggage of a complete runtime "application framework" is not desired. Source and documentation are available here. Other Libraries Most of the following libraries have evolved from various Web site projects. elseforif-servlet This library contains the code we use for Java servlets. There are
classes for outputting HTML in a concise form and also a system of objects
for handling parameters intelligently. These objects are not tied to any
servlet base class--although one is included in this package. The HTML
output and parametric classes are designed to be instantiated as needed,
even within a JSP, if you please.
We think this package represents a design for building Web sites based on pure servlets, a design we prefer to many popular interfaces and frameworks, including Struts. Give it a try. elseforif-xml This contains a few utility classes for working with XML.
com.elseforif.xml.Builder is handy for producing simple XML
documents from scratch. Conversely, com.elseforif.xml.DOMWrapper
provides an interface for extracting data from an existing document.
And com.elseforif.xml.Validator encapsulates XML validation
using SAX.
Grab this little nugget here. elseforif-util The elseforif-util Java library contains classes and systems of classes
of general use. Most are relatively atomic, such as a command-line parser
with default usage and error messages.
You can download it here. Java Applets We love applets! We've been making applets, a few of which
are showcased here, for several years,
and when it comes
to front-end interactivity, they are our speciality. Our elseforif-applet
package collects the reusable components that have come of this particular work.
Actually, most of the classes in this package are built on no more than the Java AWT interface, so they are fit for standalone client applications as well as applets. Many of the graphical widgets in this library are "lightweight" components based on a very compact text rendering engine that uses small GIF images to encapsulate raster fonts. This system is designed with applets in mind. The classes comprising it, along with any font images, can be compressed into a small JAR file, minimizing page-load time at the browser. Some of these components have been in use in various Web sites for years, so you should find them relatively stable. Source code is available at this page. Jikes For Servlets jikes-sp is a modification of the
jikes
compiler from IBM. The "sp"
stands for "servlet parser". Simply put, this is Else For If's answer to
Java Server Pages, which we feel is a somewhat flawed technology. For JSP
attempts to put dynamic HTML output logic in the hands of Web designers
by creating "taglibs", which amount to a strange new language, neither Java
nor HTML, that neither programmers nor designers quite understand.
Moreover, JSPs are in fact servlets, but they cannot share a custom superclass with normal servlets. This denies a coherent design between JSPs and other servlets in the same Web interface, encumbering the development of both. jikes-sp rejects that design in favor of pure servlet development with the addition of JSP-like markup tags for embedding pure HTML in Java source code. Hence it is a preparser for converting the embedded HTML into something like out.print(); statements in the servlet class, at compile time.
We chose to extend jikes because of its performance, and our own parser is optimized C code. Command line options allow for saving a parsed copy of each Java source file during compilation, so that source files containing HTML markup can be compiled by other Java compilers as needed. Many Java servlet containers (such as Resin) provide for integration with any Java compiler, including jikes-sp. By this means, Java source can be placed in a developing Web site's root directory; designers can edit them, changing the embedded HTML content (without requiring a strong understanding of Java); and the modified source code is compiled into the running application automatically. This is in fact how JSP works, but without adding any new "directives" or "taglibs" into the equation. We feel that generating data-driven Web content is dynamic, not declarative, in nature, and that conditional and iterative logic is best expressed with simple keywords like else, for
and if.
For more information, visit the jikes-sp home page. | ||