Download presentation
Presentation is loading. Please wait.
Published byCecil Pitts Modified over 9 years ago
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.http server.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/
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.