Web Interface » History » Version 1
Luke Murphey, 04/09/2010 04:30 PM
1 | 1 | Luke Murphey | h1. Web Interface |
---|---|---|---|
2 | 1 | Luke Murphey | |
3 | 1 | Luke Murphey | h2. Web UI Stack |
4 | 1 | Luke Murphey | |
5 | 1 | Luke Murphey | The web-interface is provided by a integrated web-server. Below is a description of the stack: |
6 | 1 | Luke Murphey | |
7 | 1 | Luke Murphey | * Web-server: Jetty |
8 | 1 | Luke Murphey | * Page generator: internal classes at source:trunk/src/net/lukemurphey/nsia/web/views |
9 | 1 | Luke Murphey | * Templating engine: Freemarker |
10 | 1 | Luke Murphey | |
11 | 1 | Luke Murphey | h2. How the Web-Interface is Generated |
12 | 1 | Luke Murphey | |
13 | 1 | Luke Murphey | # Jetty web-server receives request |
14 | 1 | Luke Murphey | # Jetty executes the relevant servlet |
15 | 1 | Luke Murphey | ** GraphServlet provides charts and graphs (see source:/trunk/src/net/lukemurphey/nsia/web/GraphServlet.java) |
16 | 1 | Luke Murphey | ** MediaServlet provides images, stylesheets, and other static content (see source:/trunk/src/net/lukemurphey/nsia/web/MediaServlet.java) |
17 | 1 | Luke Murphey | ** WebConsoleServlet provides the web-page structure (see source:/trunk/src/net/lukemurphey/nsia/web/WebConsoleServlet.java) |
18 | 1 | Luke Murphey | # WebConsoleServlet processes the middleware which provides the login banner, checks for authentication, etc. (see source:/trunk/src/net/lukemurphey/nsia/web/middleware) |
19 | 1 | Luke Murphey | # WebConsoleServlet executes the views associated with the URL. The views are listed in the StandardViewList class (see source:/trunk/src/net/lukemurphey/nsia/web/StandardViewList.java). |
20 | 1 | Luke Murphey | # View provides the web-page content and returns true. Otherwise, the WebConsoleServlet provides an error message indicating that now view accepted the URL (and posts an HTTP code 404). |
21 | 1 | Luke Murphey | |
22 | 1 | Luke Murphey | |
23 | 1 | Luke Murphey | h2. Relevant Classes |
24 | 1 | Luke Murphey | |
25 | 1 | Luke Murphey | The web-interface is generated by a series of classes that sub-class source:/trunk/src/net/lukemurphey/nsia/web/View.java. The classes that are used to render the web-interface are available under source:trunk/src/net/lukemurphey/nsia/web/views and must be registered with the StandardViewList class. The web pages are rendered using freemarker templates. The templates are available under source:trunk/src/net/lukemurphey/nsia/web/templates. |
26 | 1 | Luke Murphey | |
27 | 1 | Luke Murphey | Below are links to the namespaces and classes involved with generating the web-interface: |
28 | 1 | Luke Murphey | |
29 | 1 | Luke Murphey | * Standard view list: source:/trunk/src/net/lukemurphey/nsia/web/StandardViewList.java |
30 | 1 | Luke Murphey | * Namespace that contains the view classes: source:/trunk/src/net/lukemurphey/nsia/web/views |
31 | 1 | Luke Murphey | * Namespace that contains the templates: source:trunk/src/net/lukemurphey/nsia/web/templates |
32 | 1 | Luke Murphey | * Standard middleware list: source:/trunk/src/net/lukemurphey/nsia/web/StandardMiddlewareList.java |