1 / 12

PHOBOS Javascript Engine

PHOBOS Javascript Engine. By Daniel Reeves. What is Phobos?. Lightweight application framework for Java Used by NetBeans Supports multiple scripting languages Focuses mainly on JavaScript Can be put in any servlet container. Architecture Overview. Why Use Phobos?.

Mia_John
Télécharger la présentation

PHOBOS Javascript Engine

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. PHOBOS Javascript Engine By Daniel Reeves

  2. What is Phobos? • Lightweight application framework for Java • Used by NetBeans • Supports multiple scripting languages • Focuses mainly on JavaScript • Can be put in any servlet container

  3. Architecture Overview

  4. Why Use Phobos? • Universal to most scripting languages • Auto generates a skeletal web application for the user to create • Users can add a number of different prebuilt AJAX or javascript models such as jMaki and Dojo • Easy to use URL mapping • Multilingual- JSR-223-based

  5. Setting up Phobos • Netbeans module Addon • Uses predefined libraries and setups to initialize the web application structure. • Defines any additional class structure elements for the web application (CSS files)

  6. How it Works • At the first page request, index.js redirects and creates the controller for the application. • The controller defines all the methods within the controller’s javaScript file • The controller then renders the web application through the show() method • Show() renders the embedded Javascript file in the application, which defines what the user sees. • The application rerenders when POST is called.

  7. Index.js • library.httpserver.sendRedirect(library.httpserver.makeUrl("/list/show"));

  8. Show() • library.view.render({view: "list.ejs", layout: "layout.ejs"});

  9. Example: Calculator

  10. Using AJAX with Phobos • Phobos can easily do AJAX xhr requests • Example: AJAX List

  11. Questions?

  12. Resources • Project Phobos- https://phobos.dev.java.net/

More Related