Skip to content

Thynix/Winterface

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Winterface seperates logic and template of Freenet's web interface, enforces a better modularization and makes theming easier.

For a more comprehensive description see the Wiki page at FreenetProject.org

Rationale

Current Freenet's web interface FProxy uses HTMLNodes in combination with ToadletServer to deliver HTML-Pages. This has the disadvantage of mixed template and logic which makes it hard to separately make changes to each of them. Moreover debugging and understanding of code can be very exhausting.

Overview

Winterface is delivered as a Fred plugin:

  • It uses Apache Wicket as its component-based web-framework to generate HTML files from templates
  • Jetty (embedded) as a serlvet-container is used to deliver Wicket generated servlets.
  • It should completely replace replace FProxy,ToadletServer and associated Toadlets
  • It ''should'' make it possible to override Templates (HTML files) and design (CSS+JS)

What is to do:

  • Create HTML templates and corresponding Wicket logic for each existing Toadlet
  • Make reusable Wicket component (e.g. Panels) for reusable templates (e.g. Alerts)
  • Eventually add new functionalities

Winterface Workflow

The following is the general workflow of Winterface:

  1. WinterPlugin is started by Fred and it starts Jetty

  2. When Jetty is stated:

    2.1. A WicketFilter is configured to handle Wicket-related requests

    2.2. A resource servlet is configured to handle static resources (WicketFilter fallbacks to this servlet)

    2.3. FreenetWrapper is initiated and put into servlet container

  3. On requests:

    3.1. IPFilter compares remote IP address with allowed addresses in Configuration and blocks the request if necessary

    3.2. A WicketServlet (handled by framework) looks for responsible WinterPage (subclass of WebPage)

    3.3. WinterPage has an associated HTML-Markup and dynamically generates content and returns an HTML page

Components

Wicket uses HTML templates (with its own XML attributes/elements) in order to dynamically manipulate/generate HTML markup. Components follow the MVC pattern and use a model to generate their content. This however causes more amount of code, since the template and logic are strictly separated.

WinterPage

WinterPage is a subclass of WebPage. Each WinterPage corresponds to a Toadlet with the difference, that It has its own Markup, which elements are manipulated upon each request.

Panels

Panels are reusable components with their own markup. Winterface starting page, Dashboard, uses for example various panels.

External License(s)

Icons used for the interface are created by Mark James and released under Creative Commons Attribution 3.0 License

About

Freenet Web Interface

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Java 94.0%
  • CSS 6.0%