This document is an introduction to the more general concepts of 2step. What it is, what it
can do, requeriments, new features, etc.
- 1. What is 2step
Figure 1: 2step architecture
2step is a development environment for developing web applications in Java.
With 2step you can build and run applications with web interface as
e-commerces, content management system, web services, etc.
2step is composed of three main parts: a programming language,
a runtime servlet, and the servlet container.
- 1.1. Programming language
The programming language is a simplified version of Java
with some additions
oriented to web applications, as the ability to work with requests,
sessions, blocks, tags and templates.
When compiled, a 2step program is translated
into Java. In fact, in 2step you are always working with Java objects. It is
more a wrapper around Java than a complete programming language.
2step was designed by and for Java developers. For a Java programmer
only some things will be new, while the rest will be just Java.
- 1.2. Runtime environment
Figure 2: 2step architecture using AJP
The runtime servlet is the interface between the servlet engine and the 2step
application. It receives and processes requests from servlet engine and calls
the part of application requested, and then returns the response to the servlet
It does automatically some functions, as managing database
connections (JDBC), processing multipart requests, writing logs, generating access
statistics, allowing and denying access to parts of 2step applications,
deploying and reloading applications, selecting the right language for each
client in I18N applications, etc.
- 1.3. Web server and servlet container
A servlet needs a servlet container and a web server to work properly.
You can choose the web server and servlet container you want to use.
2step comes with a simplified version of Jetty as a built-in servlet container
and web server. Jetty supports
HTTP, HTTPS and AJP. This means that you can use it as a web server, or
you can map request through AJP and use Apache or IIS as a web front-end,
or use AJP for load-balancing 2step applications.
But if you want to use another servlet container different than Jetty, you
may use any other, as Tomcat.
- 2. What is needed to run 2step?
A 1.4+ Java virtual machine. Some of current operative systems come
with one installed by default, but it can also be downloaded
For running 2step applications you will only need Java Runtime Environment,
but for compiling them you will also need Java Development Kit, mandatory
for compiling Java.
And, of course, the 2step distribution package.
- 3. What can a 2step application do?
Basically, the same as a JSPs, ASPs, PHP or .NET one. In fact it is possible
to integrate a 2step application with any of the other ones (specially with JSPs)
As a part of the Java platform, you can use any of the existing Java libraries
for doing what you wish to do or create your own library in Java.
- 4. How 2step works
2step is used for developing web applications. A web application is an application that
can be invoked remotely through HTTP. The HTTP request is received by a
web browser which passes it to the web application that executes some code
(depending on the request) and generates a response that is sent back to
the requester client (usually as HTML but the response can be XML, PDF,
JPEG or in any imaginable form).
A 2step application, when compiled is translated into Java, and then compiled
into Java bytecodes, so what is executed is just Java. There is not any
slow interpreter as it happens with other technologies.
2step runtime is a servlet. So when a request arrives to the web server
it passes to the servlet container and then it passes to 2step runtime which
executes the right part of Java bytecodes and returns the response back
to the servlet container, and from it to the web server and finally to the client. All
this process is usually transparent and as a developer you only will have
to decide which host and URI the web application is mapped to.
- 5. 2step 7.0 features
The main features of the 2step environment are:
- General features
- Small: runtime library for executing 2step applications is smaller than 400Kb
- Fast: A compiled 2step application is a pure Java application.
- Flexible: Use everything you wish from Java platform.
- Robust: It can serve pages for months without interruption.
- Scalable: From small applications to large clustered applications can be developed.
- Secure: 2step is prepared for high security environments.
- Familiar: 2step language grammar is strongly based on Java.
- Open sorce: 2step is free
- Web-based administration area
- Access control for granting and revoking access to 2step applications on the fly
- Complete real-time activity statistics with charts
- Documentation accessible from administration
- Application rebuilding: A 2step application knows how to rebuild itself
- SQL console for querying the dababase from web
- Remote application deployment on the fly
- Remote monitoring supported
- Web development features
- Template manipulation facilities: In 2step you work with templates and blocks
- JDBC data models: a way to automatize accesses to database
- Built-in access control: login page is rendered whenever needed automatically
- Java objects exposed through URLs: as a simplified RPC over HTTP for mapping methods to URLs
- URL rewritting built-in: 2step applications support browsers with cookies disabled
- Programmable URL scheme: Define how request parameters are embedded into URLs
- Automatic logging of IPs, sessions and requests
- Internationalization (I18N)
- Support for internationalized texts
- Browser language autodetection
- Support for internationalized text in database
- Support for XML development: pagers, views and other objects can be rendered as XML
- Browser XSL support detection
- XSL transformations supported in client, or in server if client does not support them
- PDF generation through XSL-FO
- Web development API
- Form utilities
- URL navigation utilities (forward, back, etc)
- Pager utilities
- User input check utilities
- Navigation bar
- Web server with SSL support
- Servlet engine for executing 2step applications
- Integrates with web servers through AJP
- Supports load balancing
- Supports strong two-way client/server authentication through SSL certificates
- And also works with any servlet container, as Tomcat
- Other features
- HSQLDB database included
- jChart library for charts rendering
- GeoIP library included for resolving country from IP
- Application manager for starting and stopping applications remotely
- Support for MD5 passwords
- Integration with jEdit
- Console application with load test tool
- Overload detection
- Perfect for developing or integrating with web services
If you fall from a tree, leave your rage on the branches.
Perhaps you are tired of a long day working and you just need to relax. Check out Sudoku if you want to have some fun. Enjoy !