Creative Commons Attribution- NonCommercial-ShareAlike 2.5 License Sakai Programmer's Café Sakai Montreal CRIM Workshop Comparative Display Technologies.

Slides:



Advertisements
Similar presentations
Apache Tomcat as a container for Servlets and JSP
Advertisements

Java Server Pages (JSP)
Apache Struts Technology
A Blackboard Building Block™ Crash Course for Web Developers
An introduction to Java Servlet Programming
18-Jun-15 JSP Java Server Pages Reference: Tutorial/Servlet-Tutorial-JSP.html.
JSP Java Server Pages Reference:
DT228/3 Web Development JSP: Directives and Scripting elements.
Introduction to Servlet & JSP
Comp2513 Java Servlet Basics Daniel L. Silver, Ph.D.
Q: According to Intel, the Pentium conforms to the IEEE standards 754 and 854 for floating point arithmetic. If you fly in aircraft designed using a Pentium,
1 Java Server Pages Can web pages be created specially for each user? What part does Java play?
Introduction to JavaScript. Aim To enable you to write you first JavaScript.
Java Servlets and JSP.
Java Servlets. What Are Servlets? Basically, a java program that runs on the server Basically, a java program that runs on the server Creates dynamic.
Servlet and JSP Programming: An Introduction Spiros Papadimitriou
Gayle J Yaverbaum, PhD Professor of Information Systems Penn State Harrisburg.
UNIT-V The MVC architecture and Struts Framework.
Server-side Technologies
Introduction Servlets and JSP Celsina Bignoli
Overview of JSP Technology. The need of JSP With servlets, it is easy to – Read form data – Read HTTP request headers – Set HTTP status codes and response.
1 An Overview of Presentation Technologies Mark J. Norton – Nolaria Consulting Aaron Zeckoski – Virginia Tech.
M. Taimoor Khan * Java Server Pages (JSP) is a server-side programming technology that enables the creation of dynamic,
Java Omar Rana University of South Asia. Course Overview JAVA  C/C++ and JAVA Comparison  OOP in JAVA  Exception Handling  Streams  Graphics User.
JDeveloper 10g and JavaServer Faces: High-Performance UIs on the Web Avrom Roy-Faderman Senior Programmer May, 2006.
JSP Java Server Pages Softsmith Infotech.
Java support for WWW Babak Esfandiari (sources: Qusay Mahmoud, Roger Impey, textbook)
J2EE training: 1 Course Material Usage Rules PowerPoint slides for use only in full-semester, for-credit courses at degree-granting.
111 Java Servlets Dynamic Web Pages (Program Files) Servlets versus Java Server Pages Implementing Servlets Example: F15 Warranty Registration Tomcat Configuration.
CMPUT 391 – Database Management Systems Department of Computing Science University of Alberta CMPUT 391 Database Management Systems Web based Applications,
Web Server Programming 1. Nuts and Bolts. Premises of Course Provides general introduction, no in-depth training Assumes some HTML knowledge Assumes some.
JAVA SERVER PAGES. 2 SERVLETS The purpose of a servlet is to create a Web page in response to a client request Servlets are written in Java, with a little.
Fall CIS 764 Database Systems Design L8. Web ….
Java Servlets & Java Server Pages Lecture July 2013.
Java Servlets Lec 27. Creating a Simple Web Application in Tomcat.
1 CS122B: Projects in Databases and Web Applications Spring 2015 Notes 03: Web-App Architectures Professor Chen Li Department of Computer Science CS122B.
JSP Fundamentals Elements of a JSP Using Beans with JSP Integrating Servlets and JSP.
Chapter 2 Web app architecture. High-level web app architecture  When a client request coming in and needs servlet to serve dynamic web content, what.
Java server pages. A JSP file basically contains HTML, but with embedded JSP tags with snippets of Java code inside them. A JSP file basically contains.
20-Nov-15introServlets.ppt Intro to servlets. 20-Nov-15introServlets.ppt typical web page – source Hello Hello.
Java Servlets and Java Server Pages Norman White Stern School of Business.
JSP Pages. What and Why of JSP? JSP = Java code imbedded in HTML or XML –Static portion of the page is HTML –Dynamic portion is Java Easy way to develop.
Middleware 3/29/2001 Kang, Seungwoo Lee, Jinwon. Description of Topics 1. CGI, Servlets, JSPs 2. Sessions/Cookies 3. Database Connection(JDBC, Connection.
CSI 3125, Preliminaries, page 1 SERVLET. CSI 3125, Preliminaries, page 2 SERVLET A servlet is a server-side software program, Responds oriented other.
1 Introduction to Servlets. Topics Web Applications and the Java Server. HTTP protocol. Servlets 2.
Basic JSP Celsina Bignoli Problems with Servlets Servlets contain –request processing, –business logic –response generation all lumped.
COMP9321 Web Application Engineering Semester 2, 2015 Dr. Amin Beheshti Service Oriented Computing Group, CSE, UNSW Australia Week 3 1COMP9321, 15s2, Week.
Creative Commons Attribution- NonCommercial-ShareAlike 2.5 License Sakai Programmer's Café Introduction to Reasonable Server Faces Aaron Zeckoski
©SoftMoore ConsultingSlide 1 Overview of Servlets and JavaServer Pages (JSP)
Java Servlets and Java Server Pages
How CGI and Java Servlets are Run By David Stein 14 November 2006.
Java Programming: Advanced Topics 1 Building Web Applications Chapter 13.
Java Server Pages. 2 Servlets The purpose of a servlet is to create a Web page in response to a client request Servlets are written in Java, with a little.
J2EE/Java EE Apache Tomcat v9 IBM Websphere v8 Redhat JBoss EAP v6 Oracle Weblogic v12 Fusion Web Tier ServletsJSPJSF Business Tier JMXJMSEJB.
Bayu Priyambadha, S.Kom. Static content  Web Server delivers contents of a file (html) 1. Browser sends request to Web Server 3. Web Server sends HTML.
10 Copyright © 2004, Oracle. All rights reserved. Building ADF View Components.
JavaScript Invented 1995 Steve, Tony & Sharon. A Scripting Language (A scripting language is a lightweight programming language that supports the writing.
Creative Commons Attribution- ShareAlike 2.5 License Sakai Programmer's Café Sakai Oxford Tetra ELF Workshop Comparative Display Technologies in Sakai.
J2EE vs Python for web development David
CS122B: Projects in Databases and Web Applications Spring 2017
Introduction to Servlets
CS122B: Projects in Databases and Web Applications Winter 2017
Building Web Apps with Servlets
Servlet Fudamentals.
Servlets and Java Server Pages
CS122B: Projects in Databases and Web Applications Winter 2018
Introduction to Servlets
CS122B: Projects in Databases and Web Applications Spring 2018
CS122B: Projects in Databases and Web Applications Winter 2019
Basic servlet structure
Presentation transcript:

Creative Commons Attribution- NonCommercial-ShareAlike 2.5 License Sakai Programmer's Café Sakai Montreal CRIM Workshop Comparative Display Technologies in Sakai Aaron Zeckoski

2 What do we want out of a display technology? Easy to use for the developer Good separation of Code and UI –i.e. easy to use for the UI designer Good integration with Sakai –Portal, widgets, tools, etc…

3 What technologies work Virtually any Java related display technology can work in Sakai There are some caveats –Sakai uses a special Servlet to handle redirects and processing of HTTP request variables –Portal and widget interaction have to be developed for each technology Bottom line: You are better off sticking with the ones that currently work

4 What games are there in town? JSF But there are a few things to consider…

5 Java Servlets Intro modules of Java code that run in a server app to answer client requests HTML is hardcoded in the Java class –It can be pulled from external files though Most more advanced technologies are built on Servlets Sakai uses Servlet API 2.4 URL:

6 Code Snippet package org.java.helloworld; import java.io.*; import javax.servlet.*; import javax.servlet.http.*; public class HelloWorld extends HttpServlet { public void doGet(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException { PrintWriter out = response.getWriter(); out.println("Hello World"); } URL:

7 Java Servlets + Tried and tested technology (1997) Runs on the server instead of on the client like an applet Pure Java code Session tracking via HttpServlet Works fine in Sakai –Café Servlet Hello World sample codeCafé Servlet Hello World sample code

8 Java Servlets - Invented in 1997 for goodness sake! HTML is placed in the Java class Impossible for UI designers to work with Poor separation of UI and Code Development this way is painful and slow compared to more modern methods

9 Java Servlets Final Why would you want to write pure Servlets any more considering the many better options out there? You are going to use Servlets anyway but at least use something along with it Bottom line: Don’t use this unless you just want to put an existing Servlet app into Sakai

10 Velocity Templates Intro Java based template engine Uses “references” to place dynamic content in html pages with # or $ vars –Somewhat similar to PHP or JSP Meant to allow UI designers to work alongside programmers Apache project URL:

11 Code Snippet Velocity Sample Hello $user.name #foreach( $item in $items ) #if ( $itemCheck($item) ) $item.value #end

12 Velocity Templates + Uses “references” to place dynamic content in html template pages –Somewhat similar to PHP or JSP Most used display technology in Sakai –Integration with Sakai is good Ok separation of UI and Code Decent docs and community

13 Velocity Templates - The current Velocity implementation in Sakai is a custom and out of date version Integration with Sakai is OK but not really being worked on much anymore New development in Velocity is discouraged by the community Mostly carried over from CHEF

14 Velocity Templates Final Go for technologies that provide better separation between Code and UI Bottom line: You are better off not using this, only use this if you have existing apps and cannot rewrite them

15 Java Server Pages Intro Dynamic Java web content scripting language –Very similar to PHP JSP pages are compiled into Servlets when accessed Pages are a mixture of HTML, taglib tags, and Code URL:

16 Code Snippet JSP Sample Hello Today is

17 Java Server Pages + Easy to develop in and work with Can be changed without restarting Works fairly well in Sakai –JSP support is available via a cool Servlet by Andrew Thornton (Cambridge) –Used in Rwiki (sorta), XML version Well tested technology with large community Excellent docs and many books

18 Java Server Pages - Mixes code and HTML together –Poor separation of code and UI design Compiled when accessed –This can cause a noticeable delay when accessing a page for the first time Integration with Sakai is poor Has many of the same weaknesses that other scripting languages have

19 Java Server Pages Final JSP support in Sakai is not great yet It is difficult for UI designers Bottom line: Use this if you have existing JSP code, but go for options that provider better separation between UI and Code for new projects

20 Java Server Faces Intro A Java based set of APIs for managing state, handling events, and defining navigation Mostly builds on JSP –Though it can be used without JSPs Includes a custom set of tag libraries Includes error handling, input validation, and internationalization support JSF URL:

21 Code Snippet JSF sample <h:dataTable id=“items" value="#{itemsBean.items}" var=“item"> JSF

22 Java Server Faces + The second most used display technology in Sakai (after Velocity) –Used for the portal and a small number of apps (Gradebook, Assignments, etc…) Integrates well with Sakai –better than any of the other current solutions (for now) MyFaces and Oracle ADF Faces Pretty good docs and books JSF

23 Java Server Faces - Pretty heavyweight and has problems in the current version –These might be fixed in the upcoming version Poor separation of UI design and code High learning curve Difficult to use and not very flexible Poor AJAX/Javascript integration Does not work with browser navigation JSF

24 Java Server Faces Final Most new apps in Sakai are written in this but it is recognized as having many weaknesses High learning curve and difficulty of use means slow development Bottom line: Don’t use this unless you really have to, even if you have existing code JSF

25 Reasonable Server Faces Spring based web programming framework Uses pure XHTML templates, clean separation of UI and Code Lightweight and pure bean programming Works well with AJAX and Javascript URL:

26 Code Snippet RSF sample Hello User Name Today is 1/1/2006 item value here

27 Reasonable Server Faces + Uses pure XHTML templates –Provides clean separation of UI and Code Respects the HTTP request cycle –Back button works! Works well with AJAX and Javascript Sakai integration and features are improving rapidly Good docs and code samples available on the RSF WikiRSF Wiki

28 Reasonable Server Faces - Greater separation of UI and code can require more files and lines of code –This is true of other solutions as well Not used in Sakai core yet but is fully functional in it and integrates somewhat –Some code in Sakai Contrib (rsf gallery)Sakai Contrib Small user community Still in development (also a positive)

29 Reasonable Server Faces Final The only really good separation of UI design and Code available Community support is growing and Sakai integration improving Bottom line: Use of this is recommended for new Sakai apps

30 Summary JSF No plain Servlets Velocity discouraged JSP ok for small stuff JSF is just bad RSF recommended