Yegor256 Jpages Save Abandoned

Experimental Java OOP Web Framework

Project README

EO principles respected here We recommend IntelliJ IDEA

Build Status License Hits-of-Code

jPages is an experimental prototype of a web framework, which respects all possible principles of true object-oriented design. More about it in this blog post and in this webinar.

This is how you start a web app:

Thread thread = new Thread(
  () -> {
    App app = new App(
      new Page() {
        @Override
        public Page with(String name, String value) {
            if (value.equals("/")) {
              return new TextPage("Hello, world!");
            }
            return new TextPage("Not found!");
        }
        @Override
        public Output via(Output output) {
          return output.with("X-Body", "Not found");
        }
      }
    );
    try {
      app.start(8080);
    } catch (Exception ex) {
      System.out.println(ex.getMessage());
      throw new IllegalStateException(ex);
    }
  }
);
thread.setDaemon(true);
thread.start();

Do you want to contribute? Submit a pull request.

Open Source Agenda is not affiliated with "Yegor256 Jpages" Project. README Source: yegor256/jpages
Stars
38
Open Issues
1
Last Commit
1 year ago
License
MIT

Open Source Agenda Badge

Open Source Agenda Rating