The pragmatic web development framework

Skip to the Pragmatach Site

What is it?

Pragmatach is a simple J2EE framework intended to provide server-side support for B2C web applications

The Need

Pragmatach was written to address real-world needs that are important to B2C site developers


  • Pragmatach is based on the MVC paradigm
  • Applications consist of simple annotated controller classes

Auto generated

10 minutes or less to get a skeleton project started

Pragmatach provides a maven archetype which generates a fully functional skeleton


Applications need to be maintained

  • Maintainable with commodity developer skills
  • Server-side code is Java
  • No need to find Groovy, GSP, or Scala programmers
  • Sites are built and deployed via Maven


Server side support for web applications should be simple

  • Full-featured web frameworks are not necessary to support simple B2C sites
  • Pragmatach is just a couple small jar files that implement a servlet


Web programmers prefer to communicate via JSON to their servers

Pragmatach implements simple GET and POST of JSON and XML to Controllers

Real world - friendly

Running applications need to be operated and debugged at runtime

Pragamatach provides a secure, web-based console to allow runtime operation and debugging of applications

Built-in manageability via JMX


Needs vary from application to application

Pragamatach provides a modular API for plugging in new functionality


Pragmatach imposes no client-side restrictions

  • Use the JS & CSS frameworks you need
  • Multiple server-side templating languages supported

Example HTML Controller


@View(view = "index.html")
public class IndexController extends FreemarkerController {
   private String message = "Hello World";

   @Route(uri = "/")
   public Response render() throws PragmatachException {
      return super.render();

Example HTML Template


Example JSON Controller

public class AcceptPostController extends JSONController {
   private String message;

   @Route(uri = "/acceptpost", method =
   public Response acceptJSONpost() throws PragmatachException {
         return super.render();
      } catch (final Exception e) {
         throw new PragmatachException("Exception in showFeed", e);

Trying it: step 1

Build a skeleton using the Maven Archetype


Trying it: step 2

run it

mvn clean package jetty:run