PHOBOS Javascript Engine - PowerPoint PPT Presentation

About This Presentation
Title:

PHOBOS Javascript Engine

Description:

Used by NetBeans. Supports multiple scripting languages. Focuses ... Users can add a number of different prebuilt AJAX or javascript models such ... Netbeans ... – PowerPoint PPT presentation

Number of Views:32
Avg rating:3.0/5.0
Slides: 13
Provided by: danielr150
Category:

less

Transcript and Presenter's Notes

Title: PHOBOS Javascript Engine


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
    controllers 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/
Write a Comment
User Comments (0)
About PowerShow.com