SlideShare a Scribd company logo
© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0,
remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license
Building Server-Side Eclipse
based Web applications
Part 1 – Basics
Technical Sessions – Short Talks, 2007-06-27
2© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0,
remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license
The presenters
Jochen Hiller
Business Operation Systems, Germany
jo.hiller@googlemail.com
Based on materials contributed by Jochen Hiller, Simon Kaegi, Martin Lippert,
Gunnar Wagenknecht for EclipseCon 2007 tutorials
Gunnar Wagenknecht
Truition, Germany
gunnar@wagenknecht.org
Eclipse Committer
3© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0,
remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license
What is Server-Side Eclipse (SSE)?
Recognition... that many of the features that have made RCP
successful are equally applicable in server-side contexts.
• Standardized component model (OSGi)
• Pervasive extensibility – Extension Registry
• Runtime provisioning
Integration... with existing server-side infrastructure and technologies
• J2EE Application Servers
• Servlets and JSPs
• Application Frameworks
• ...
Jeff McAffer stated at EclipseCon 2007, Equinox BOF (03/06/2007):
Server-Side Eclipse is a concept, a marketing name, to illustrate
possible usage scenarios (like RCP).
4© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0,
remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license
What is SSE from an OSGi perspective?
• An OSGi implementation (Equinox)
• Different HttpService implementation(s) (Equinox)
• Embedded Jetty
• ServletBridge with JavaEE Web Container
• Enhanced Http Support (Equinox)
• Declarative contribution to HttpService
• JSP Support
• Additional adapter helpers
• Extensive Toolset (Eclipse PDE)
• Development tooling
• Deployment support
5© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0,
remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license
What motivates developers to use SSE?
Server-Side Eclipse
JavaTM EE
application
RCP
application
+ component model
+ use 3rd party plugins
Web developer
+ server support
+ re-use plugins
+ distributed
applications
RCP developer
application
framework
+ component model
• modular
• flexible
• dynamic
Infrastructure developer
6© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0,
remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license
What is the OSGi HttpService?
• HttpService is part of OSGi v4
component specification
• Provides HttpService based
on Servlet 2.1 spec
• Key concepts:
• HttpService
• Servlets, Resources
• HttpContext
• Unified URI space
• Focused on small,
embedded devices
/* © Copyright OSGi Alliance */
package org.osgi.service.http;
public interface HttpService {
public HttpContext createDefaultHttpContext();
public void registerResources(String alias,
String name,
HttpContext context)
throws NamespaceException;
public void registerServlet(String alias,
Servlet servlet,
Dictionary initparams,
HttpContext context)
throws ServletException, NamespaceException;
public void unregister(String alias);
}
public interface HttpContext {
public String getMimeType(String name);
public URL getResource(String name);
public boolean handleSecurity(
HttpServletRequest request,
HttpServletResponse response)
throws IOException;
}
7© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0,
remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license
HttpRegistry extension point
• Provides a declarative alternative to using the HttpService directly in
code.
• [httpcontexts] – supports creation of a basic parameterized HttpContext
or user-defined HttpContext
• [servlets] – provides the equivalent symantics of the
HttpService.registerServlet(...) call.
• [resources] – provides the equivalent symantics of the
HttpService.registerResource(...) call.
• One difference: registration lifecycle
• Follows Eclipse extension point approach è not dynamic
• resolve/unresolve vs. start/stop
8© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0,
remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license
HttpRegistry extension point – example
<!-- © Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corp.; All rights reserved. This source code is
made available under the terms of the Eclipse Public License, v1.0. -->
<?xml version="1.0" encoding="UTF-8"?>
<?eclipse version="3.2"?>
<plugin>
<extension point="org.eclipse.equinox.http.registry.httpcontexts">
<httpcontext id="root-context">
<resource-mapping
path="/WebContent">
</resource-mapping >
</httpcontext>
</extension>
<extension point="org.eclipse.equinox.http.registry.resources">
<resource
alias="/sample"
base-name="/"
httpcontextId="root-context"/>
</extension>
<extension point="org.eclipse.equinox.http.registry.servlets">
<servlet
alias="/sample/hello"
class=„sample.HelloServlet"
httpcontextId="root-context" />
<serviceSelector filter="(http.port=8080)" />
</extension>
</plugin>
HttpContext maps to resources
Register resources for URL
Register servlets for URL
Filter for specific HttpService
9© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0,
remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license
Deployment scenarios of Server-Side Eclipse
• Equinox embedding
a HttpService
• e.g. based on Jetty
• Application Server running
an embedded Equinox
• Bridging aspect is referred
to as the Servletbridge
• Isolation between multiple
web applications/Equinox
instances
Source: Jeff McAffer, Eclipse Summit Europe, Server-Side Symposium, Oct 12nd 2006
10© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0,
remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license
Demo
• Servlet Sample
• Http Service Tracker
• Stop / start bundles
• Service Tracker vs. Http Registry
© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0,
remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license
Building Server-Side Eclipse
based Web applications
Part 2 – User Interfaces
Technical Sessions – Short Talks, 2007-06-27
12© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0,
remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license
Different approaches for Server-Side UI‘s
• Java EE standards
• Based on Java EE technologies (JSP, Struts, …)
• Proposal for RSP-UI from Infonoia and others
• See: http://www.eclipse.org/proposals/rsp/
• Rich AJAX Platform
• Accepted as Eclipse technology project
• RCP styled development approach
• See: http://www.eclipse.org/rap/
• Google Web Toolkit
• Client-centric UI approach
• See: http://code.google.com/webtoolkit/
Java EE
RAP
GWT
13© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0,
remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license
Java EE vs. the OSGi HttpService (1)
• Dynamic Registration
• Replaces web deployment descriptor (e.g. web.xml)
• Dynamic registration supports register/unregister of resources/servlets
• Code based: tied to START/STOP lifecycle
• e.g. during BundleActivator.start()
• Declaration based: tied to RESOLVED/UNRESOLVED lifecycle
• e.g. using Equinox HttpRegistry
• Other options: Declarative services, OSGi-Spring
• URL mapping differences
• alias roughly equivalent to <url-mapping>
• No more than one registration per alias (worth planning, use relative URLs)
• No welcome-file support (Mapping from / to /index.html)
• No support for extension mappings
14© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0,
remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license
Java EE vs. the OSGi HttpService (2)
• HttpContext
• Maps 1:1 to a ServletContext
• MIME type retrieval, resource
retrieval, authentication
• Whats missing:
• getNamedDispatcher,
• getResourcePaths
• getInitParameters (*),
• “Context Path” (*)
• Servlets and Filters: Whats missing:
• Filter(*), HttpSessionListener’s,
ServletContextListener’s(*), ServletRequestListener’s
(*) Workarounds available: Wrapper technique.
See org.eclipse.equinox.http.helper[s] in Equinox Incubator (not API yet)
/* © Copyright OSGi Alliance */
package org.osgi.service.http;
public interface HttpContext {
public String getMimeType(String name);
public URL getResource(String name);
public boolean handleSecurity(
HttpServletRequest request,
HttpServletResponse response)
throws IOException;
}
/* Supported in Equinox (via Reflection). */
public Set getResourcePaths (String path);
15© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0,
remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license
Equinox JSP Support
• Use {path}/*.jsp style alias for JSPs.
• JSP lookup consistent with OSGi HttpService resource registration
• Provides JSP support for Help / UA in the Eclipse 3.3 SDK
• Work with RSP-UI to provide further framework integrations
• JSP Tag Library Discovery supported along bundle classpath
• Supported under the Servletbridge…
• Allows for portable pre-compiled JSPs
• Provided by: org.eclipse.equinox.jsp.jasper.JspServlet
• public JspServlet(Bundle bundle,
String bundleResourcePath, String alias)
• JSP Extension Registry Support provided
16© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0,
remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license
What is Rich AJAX Platform (RAP)?
Brings Eclipse RCP based development style to Web 2.0 era
RAP is:
• An Eclipse technology project (proposed by Inoopract and others)
• Java based UI / AJAX development
• Using RAP Widget Toolkit (RWT), subset of SWT API
• Based on JavaScript client-side framework (qooxdoo)
• Eclipse Workbench concept extended for the web
• incl. Session support
• API compliant with SWT, JFace, Workbench, extension point namespaces
See also:
• http://www.eclipse.org/rap/
• Active community, great interest
17© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0,
remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license
What are the RAP components?
• qooxdoo: underlying client-side JavaScript framework
• RWT: RAP Widget Toolkit (migrated from W4T), subset of SWT
• JFace, Workbench: RAP based implementations of Eclipse RCP
Equinox
Operating System
Jetty
Per-
spectives
Views
RWT
Workbench
qooxdoo
Editors Application plugins
RAP
Server-Side Eclipse
Update
Manager
...
Launcher
JFace
W4T
Workbench
RAP
core.
jobs
core.
runtime
core.
commands
Eclipse Core Plugins
18© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0,
remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license
The Google Web Toolkit (GWT)
• Build AJAX apps in the Java language
• Embed components in existing HTML
• Full desktop app clones
• Apache 2.0 license
• Vibrant community
19© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0,
remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license
Deploying as Eclipse Server-Side
Bundles
• One GWT module à Two OSGi bundles
• Server-side bundle
• RPC service implementation
• Exposed using org.eclipse.equinox.http.registry.servlets
• Client-side bundle
• Compiled GWT code (Java + JavaScript) together with HTML, style
sheets, images, etc.
• Exposed using org.eclipse.equinox.http.registry.resources
20© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0,
remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license
Demo
• PlanetEclipse – FeedReader demo
• RAP FeedReader
• GWT FeedReader
• Starting / stopping bundles using Knopflerfish console
• Install new bundles
21© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0,
remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license
For more information...
EclipseCon 2007 Short tutorials:
http://www.eclipsecon.org/2007/index.php?page=sub/&id=3607
http://www.eclipsecon.org/2007/index.php?page=sub/&id=3719
Project hub:
http://www.eclipse.org/equinox/server
Newsgroup:
news://news.eclipse.org/eclipse.technology.equinox
Dev Mailing List:
equinox-dev@eclipse.org
Thank-you
22© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0,
remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license
Legal Notices
• Java and all Java-based trademarks are trademarks of Sun Microsystems,
Inc. in the United States, other countries, or both
• Microsoft, Windows, Windows NT, and the Windows logo are trademarks of
Microsoft Corporation in the United States, other countries, or both.
• Linux is a registered trademark of Linus Torvalds in the United States, other
countries, or both.
• Other company, product, or service names may be trademarks or service
marks of others

More Related Content

What's hot (20)

PDF
Construire une « data fabric » pour les environnements edge
Open Source Experience
 
PDF
Running Spring Boot Applications as GraalVM Native Images
VMware Tanzu
 
PPTX
Open Source Licensing: Types, Strategies and Compliance
All Things Open
 
PPTX
Introduction to KubeSphere and its open source ecosystem
KubeSphere
 
PPTX
PKS Networking with NSX-T: You Focus on your App, We'll Take Care of the Rest!
VMware Tanzu
 
PDF
DEEP: a user success story
EOSC-hub project
 
PPTX
Meetups - The Oracle Ace Way
Phil Wilkins
 
PDF
Introduction to Reactive Streams and Reactor 2.5
Stéphane Maldini
 
PPTX
Tycho Tutorial EclipseCon 2013
jsievers
 
PDF
#bigwhale: An Unexpected Journey into Containerization @ Lockheed Martin - Pa...
Docker, Inc.
 
PDF
Le projet MORPHEMIC – Adaptation des ressources de cloud computing selon une ...
Open Source Experience
 
PDF
It’s 2021. Why are we -still- rebooting for patches? A look at Live Patching.
All Things Open
 
PDF
How to develop your first cloud-native Applications with Java
Niklas Heidloff
 
PPTX
12 Factor App
Erkan Erol
 
PDF
Introduction to cloud-native application development: with Heroku and Spring ...
Roberto Casadei
 
PDF
Curated "Cloud Design Patterns" for Call Center Platforms
Alejandro Rios Peña
 
PDF
PKS is Not JAK8sP (Just Another Kubernetes Platform)
VMware Tanzu
 
PDF
Using Clocker with Project Calico - Running Production Workloads in the Cloud
Andrew Kennedy
 
PDF
Best Practices for (Enterprise) OSGi applications - Tim Ward
mfrancis
 
PDF
Secrets of Successful Digital Transformers
VMware Tanzu
 
Construire une « data fabric » pour les environnements edge
Open Source Experience
 
Running Spring Boot Applications as GraalVM Native Images
VMware Tanzu
 
Open Source Licensing: Types, Strategies and Compliance
All Things Open
 
Introduction to KubeSphere and its open source ecosystem
KubeSphere
 
PKS Networking with NSX-T: You Focus on your App, We'll Take Care of the Rest!
VMware Tanzu
 
DEEP: a user success story
EOSC-hub project
 
Meetups - The Oracle Ace Way
Phil Wilkins
 
Introduction to Reactive Streams and Reactor 2.5
Stéphane Maldini
 
Tycho Tutorial EclipseCon 2013
jsievers
 
#bigwhale: An Unexpected Journey into Containerization @ Lockheed Martin - Pa...
Docker, Inc.
 
Le projet MORPHEMIC – Adaptation des ressources de cloud computing selon une ...
Open Source Experience
 
It’s 2021. Why are we -still- rebooting for patches? A look at Live Patching.
All Things Open
 
How to develop your first cloud-native Applications with Java
Niklas Heidloff
 
12 Factor App
Erkan Erol
 
Introduction to cloud-native application development: with Heroku and Spring ...
Roberto Casadei
 
Curated "Cloud Design Patterns" for Call Center Platforms
Alejandro Rios Peña
 
PKS is Not JAK8sP (Just Another Kubernetes Platform)
VMware Tanzu
 
Using Clocker with Project Calico - Running Production Workloads in the Cloud
Andrew Kennedy
 
Best Practices for (Enterprise) OSGi applications - Tim Ward
mfrancis
 
Secrets of Successful Digital Transformers
VMware Tanzu
 

Similar to Building Server-Side Eclipse based Web applications - Jochen Hiller, Principal Architect, Business Operation Systems, Germany (20)

ODP
Introduction To The Eclipse Platform
ciukes
 
PPTX
Eclipse Overview
Lars Vogel
 
PDF
Eclipse E4 Open Social Gadgetsvrs3
Lars Vogel
 
PDF
Part 1 implementing a simple_web_service
krishmdkk
 
PDF
112815 java ee8_davidd
Takashi Ito
 
PDF
JavaEE6 my way
Nicola Pedot
 
PPT
"Eclipse Application Development" at GNUnify 07
KetanPadegaonkar
 
PPTX
Writing simple web services in java using eclipse editor
Santosh Kumar Kar
 
PPT
Eclipse Banking Day in Copenhagen - Eclipse RCP as an Application Platform
Tonny Madsen
 
PPT
javagruppen.dk - e4, the next generation Eclipse platform
Tonny Madsen
 
PDF
Part 2 generating a client_from_wsdl
krishmdkk
 
PPTX
OpenCloudNative-BeJUG.pptx
EmilyJiang23
 
PPT
Eclipse 2011 Hot Topics
Lars Vogel
 
PPT
Eclipse Training - Introduction
Luca D'Onofrio
 
PDF
Java EE 6 : Paving The Path For The Future
IndicThreads
 
PDF
Using OSGi technology in Eclipse - BJ Hargrave, IBM, for Jeff McAffer, IBM
mfrancis
 
PPTX
Ntg web services
Farag Zakaria
 
PPT
IDA - Fra forretningside til bundlinie: Eclipse følger dig hele vejen
Tonny Madsen
 
PDF
Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...
Nuxeo
 
PDF
Eclipse plug in development
Martin Toshev
 
Introduction To The Eclipse Platform
ciukes
 
Eclipse Overview
Lars Vogel
 
Eclipse E4 Open Social Gadgetsvrs3
Lars Vogel
 
Part 1 implementing a simple_web_service
krishmdkk
 
112815 java ee8_davidd
Takashi Ito
 
JavaEE6 my way
Nicola Pedot
 
"Eclipse Application Development" at GNUnify 07
KetanPadegaonkar
 
Writing simple web services in java using eclipse editor
Santosh Kumar Kar
 
Eclipse Banking Day in Copenhagen - Eclipse RCP as an Application Platform
Tonny Madsen
 
javagruppen.dk - e4, the next generation Eclipse platform
Tonny Madsen
 
Part 2 generating a client_from_wsdl
krishmdkk
 
OpenCloudNative-BeJUG.pptx
EmilyJiang23
 
Eclipse 2011 Hot Topics
Lars Vogel
 
Eclipse Training - Introduction
Luca D'Onofrio
 
Java EE 6 : Paving The Path For The Future
IndicThreads
 
Using OSGi technology in Eclipse - BJ Hargrave, IBM, for Jeff McAffer, IBM
mfrancis
 
Ntg web services
Farag Zakaria
 
IDA - Fra forretningside til bundlinie: Eclipse følger dig hele vejen
Tonny Madsen
 
Creating Large Scale Software Platforms with OSGi and an Extension Point Mode...
Nuxeo
 
Eclipse plug in development
Martin Toshev
 
Ad

More from mfrancis (20)

PDF
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
mfrancis
 
PDF
OSGi and Java 9+ - BJ Hargrave (IBM)
mfrancis
 
PDF
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
mfrancis
 
PDF
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
mfrancis
 
PDF
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
mfrancis
 
PDF
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
mfrancis
 
PDF
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
mfrancis
 
PDF
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
mfrancis
 
PDF
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
mfrancis
 
PDF
OSGi CDI Integration Specification - Ray Augé (Liferay)
mfrancis
 
PDF
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
mfrancis
 
PDF
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
mfrancis
 
PDF
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
mfrancis
 
PDF
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
mfrancis
 
PDF
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
mfrancis
 
PDF
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
mfrancis
 
PDF
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
mfrancis
 
PDF
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
mfrancis
 
PDF
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
mfrancis
 
PDF
How to connect your OSGi application - Dirk Fauth (Bosch)
mfrancis
 
Eclipse Modeling Framework and plain OSGi the easy way - Mark Hoffman (Data I...
mfrancis
 
OSGi and Java 9+ - BJ Hargrave (IBM)
mfrancis
 
Simplify Web UX Coding using OSGi Modularity Magic - Paul Fraser (A2Z Living)
mfrancis
 
OSGi for the data centre - Connecting OSGi to Kubernetes - Frank Lyaruu
mfrancis
 
Remote Management and Monitoring of Distributed OSGi Applications - Tim Verbe...
mfrancis
 
OSGi with Docker - a powerful way to develop Java systems - Udo Hafermann (So...
mfrancis
 
A real world use case with OSGi R7 - Jurgen Albert (Data In Motion Consulting...
mfrancis
 
OSGi Feature Model - Where Art Thou - David Bosschaert (Adobe)
mfrancis
 
Migrating from PDE to Bndtools in Practice - Amit Kumar Mondal (Deutsche Tele...
mfrancis
 
OSGi CDI Integration Specification - Ray Augé (Liferay)
mfrancis
 
How OSGi drives cross-sector energy management - Jörn Tümmler (SMA Solar Tech...
mfrancis
 
Improved developer productivity thanks to Maven and OSGi - Lukasz Dywicki (Co...
mfrancis
 
It Was Twenty Years Ago Today - Building an OSGi based Smart Home System - Ch...
mfrancis
 
Popular patterns revisited on OSGi - Christian Schneider (Adobe)
mfrancis
 
Integrating SLF4J and the new OSGi LogService 1.4 - BJ Hargrave (IBM)
mfrancis
 
OSG(a)i: because AI needs a runtime - Tim Verbelen (imec)
mfrancis
 
Flying to Jupiter with OSGi - Tony Walsh (ESA) & Hristo Indzhov (Telespazio V...
mfrancis
 
MicroProfile, OSGi was meant for this - Ray Auge (Liferay)
mfrancis
 
Prototyping IoT systems with a hybrid OSGi & Node-RED platform - Bruce Jackso...
mfrancis
 
How to connect your OSGi application - Dirk Fauth (Bosch)
mfrancis
 
Ad

Recently uploaded (20)

PPTX
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
PDF
TrustArc Webinar - Navigating Data Privacy in LATAM: Laws, Trends, and Compli...
TrustArc
 
PPTX
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
PPTX
Agile Chennai 18-19 July 2025 | Workshop - Enhancing Agile Collaboration with...
AgileNetwork
 
PPTX
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
PDF
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
PDF
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
PDF
introduction to computer hardware and sofeware
chauhanshraddha2007
 
PDF
Brief History of Internet - Early Days of Internet
sutharharshit158
 
PPTX
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
PDF
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
PDF
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
PDF
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
PPTX
Farrell_Programming Logic and Design slides_10e_ch02_PowerPoint.pptx
bashnahara11
 
PDF
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
PPTX
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
PDF
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
PPTX
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
PDF
Generative AI vs Predictive AI-The Ultimate Comparison Guide
Lily Clark
 
PDF
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 
What-is-the-World-Wide-Web -- Introduction
tonifi9488
 
TrustArc Webinar - Navigating Data Privacy in LATAM: Laws, Trends, and Compli...
TrustArc
 
IT Runs Better with ThousandEyes AI-driven Assurance
ThousandEyes
 
Agile Chennai 18-19 July 2025 | Workshop - Enhancing Agile Collaboration with...
AgileNetwork
 
Introduction to Flutter by Ayush Desai.pptx
ayushdesai204
 
The Future of Mobile Is Context-Aware—Are You Ready?
iProgrammer Solutions Private Limited
 
Structs to JSON: How Go Powers REST APIs
Emily Achieng
 
introduction to computer hardware and sofeware
chauhanshraddha2007
 
Brief History of Internet - Early Days of Internet
sutharharshit158
 
Agile Chennai 18-19 July 2025 Ideathon | AI Powered Microfinance Literacy Gui...
AgileNetwork
 
GDG Cloud Munich - Intro - Luiz Carneiro - #BuildWithAI - July - Abdel.pdf
Luiz Carneiro
 
Make GenAI investments go further with the Dell AI Factory
Principled Technologies
 
How Open Source Changed My Career by abdelrahman ismail
a0m0rajab1
 
Farrell_Programming Logic and Design slides_10e_ch02_PowerPoint.pptx
bashnahara11
 
A Strategic Analysis of the MVNO Wave in Emerging Markets.pdf
IPLOOK Networks
 
OA presentation.pptx OA presentation.pptx
pateldhruv002338
 
Responsible AI and AI Ethics - By Sylvester Ebhonu
Sylvester Ebhonu
 
AI in Daily Life: How Artificial Intelligence Helps Us Every Day
vanshrpatil7
 
Generative AI vs Predictive AI-The Ultimate Comparison Guide
Lily Clark
 
Tea4chat - another LLM Project by Kerem Atam
a0m0rajab1
 

Building Server-Side Eclipse based Web applications - Jochen Hiller, Principal Architect, Business Operation Systems, Germany

  • 1. © Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license Building Server-Side Eclipse based Web applications Part 1 – Basics Technical Sessions – Short Talks, 2007-06-27
  • 2. 2© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license The presenters Jochen Hiller Business Operation Systems, Germany [email protected] Based on materials contributed by Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht for EclipseCon 2007 tutorials Gunnar Wagenknecht Truition, Germany [email protected] Eclipse Committer
  • 3. 3© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license What is Server-Side Eclipse (SSE)? Recognition... that many of the features that have made RCP successful are equally applicable in server-side contexts. • Standardized component model (OSGi) • Pervasive extensibility – Extension Registry • Runtime provisioning Integration... with existing server-side infrastructure and technologies • J2EE Application Servers • Servlets and JSPs • Application Frameworks • ... Jeff McAffer stated at EclipseCon 2007, Equinox BOF (03/06/2007): Server-Side Eclipse is a concept, a marketing name, to illustrate possible usage scenarios (like RCP).
  • 4. 4© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license What is SSE from an OSGi perspective? • An OSGi implementation (Equinox) • Different HttpService implementation(s) (Equinox) • Embedded Jetty • ServletBridge with JavaEE Web Container • Enhanced Http Support (Equinox) • Declarative contribution to HttpService • JSP Support • Additional adapter helpers • Extensive Toolset (Eclipse PDE) • Development tooling • Deployment support
  • 5. 5© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license What motivates developers to use SSE? Server-Side Eclipse JavaTM EE application RCP application + component model + use 3rd party plugins Web developer + server support + re-use plugins + distributed applications RCP developer application framework + component model • modular • flexible • dynamic Infrastructure developer
  • 6. 6© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license What is the OSGi HttpService? • HttpService is part of OSGi v4 component specification • Provides HttpService based on Servlet 2.1 spec • Key concepts: • HttpService • Servlets, Resources • HttpContext • Unified URI space • Focused on small, embedded devices /* © Copyright OSGi Alliance */ package org.osgi.service.http; public interface HttpService { public HttpContext createDefaultHttpContext(); public void registerResources(String alias, String name, HttpContext context) throws NamespaceException; public void registerServlet(String alias, Servlet servlet, Dictionary initparams, HttpContext context) throws ServletException, NamespaceException; public void unregister(String alias); } public interface HttpContext { public String getMimeType(String name); public URL getResource(String name); public boolean handleSecurity( HttpServletRequest request, HttpServletResponse response) throws IOException; }
  • 7. 7© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license HttpRegistry extension point • Provides a declarative alternative to using the HttpService directly in code. • [httpcontexts] – supports creation of a basic parameterized HttpContext or user-defined HttpContext • [servlets] – provides the equivalent symantics of the HttpService.registerServlet(...) call. • [resources] – provides the equivalent symantics of the HttpService.registerResource(...) call. • One difference: registration lifecycle • Follows Eclipse extension point approach è not dynamic • resolve/unresolve vs. start/stop
  • 8. 8© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license HttpRegistry extension point – example <!-- © Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corp.; All rights reserved. This source code is made available under the terms of the Eclipse Public License, v1.0. --> <?xml version="1.0" encoding="UTF-8"?> <?eclipse version="3.2"?> <plugin> <extension point="org.eclipse.equinox.http.registry.httpcontexts"> <httpcontext id="root-context"> <resource-mapping path="/WebContent"> </resource-mapping > </httpcontext> </extension> <extension point="org.eclipse.equinox.http.registry.resources"> <resource alias="/sample" base-name="/" httpcontextId="root-context"/> </extension> <extension point="org.eclipse.equinox.http.registry.servlets"> <servlet alias="/sample/hello" class=„sample.HelloServlet" httpcontextId="root-context" /> <serviceSelector filter="(http.port=8080)" /> </extension> </plugin> HttpContext maps to resources Register resources for URL Register servlets for URL Filter for specific HttpService
  • 9. 9© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license Deployment scenarios of Server-Side Eclipse • Equinox embedding a HttpService • e.g. based on Jetty • Application Server running an embedded Equinox • Bridging aspect is referred to as the Servletbridge • Isolation between multiple web applications/Equinox instances Source: Jeff McAffer, Eclipse Summit Europe, Server-Side Symposium, Oct 12nd 2006
  • 10. 10© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license Demo • Servlet Sample • Http Service Tracker • Stop / start bundles • Service Tracker vs. Http Registry
  • 11. © Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license Building Server-Side Eclipse based Web applications Part 2 – User Interfaces Technical Sessions – Short Talks, 2007-06-27
  • 12. 12© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license Different approaches for Server-Side UI‘s • Java EE standards • Based on Java EE technologies (JSP, Struts, …) • Proposal for RSP-UI from Infonoia and others • See: http://www.eclipse.org/proposals/rsp/ • Rich AJAX Platform • Accepted as Eclipse technology project • RCP styled development approach • See: http://www.eclipse.org/rap/ • Google Web Toolkit • Client-centric UI approach • See: http://code.google.com/webtoolkit/ Java EE RAP GWT
  • 13. 13© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license Java EE vs. the OSGi HttpService (1) • Dynamic Registration • Replaces web deployment descriptor (e.g. web.xml) • Dynamic registration supports register/unregister of resources/servlets • Code based: tied to START/STOP lifecycle • e.g. during BundleActivator.start() • Declaration based: tied to RESOLVED/UNRESOLVED lifecycle • e.g. using Equinox HttpRegistry • Other options: Declarative services, OSGi-Spring • URL mapping differences • alias roughly equivalent to <url-mapping> • No more than one registration per alias (worth planning, use relative URLs) • No welcome-file support (Mapping from / to /index.html) • No support for extension mappings
  • 14. 14© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license Java EE vs. the OSGi HttpService (2) • HttpContext • Maps 1:1 to a ServletContext • MIME type retrieval, resource retrieval, authentication • Whats missing: • getNamedDispatcher, • getResourcePaths • getInitParameters (*), • “Context Path” (*) • Servlets and Filters: Whats missing: • Filter(*), HttpSessionListener’s, ServletContextListener’s(*), ServletRequestListener’s (*) Workarounds available: Wrapper technique. See org.eclipse.equinox.http.helper[s] in Equinox Incubator (not API yet) /* © Copyright OSGi Alliance */ package org.osgi.service.http; public interface HttpContext { public String getMimeType(String name); public URL getResource(String name); public boolean handleSecurity( HttpServletRequest request, HttpServletResponse response) throws IOException; } /* Supported in Equinox (via Reflection). */ public Set getResourcePaths (String path);
  • 15. 15© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license Equinox JSP Support • Use {path}/*.jsp style alias for JSPs. • JSP lookup consistent with OSGi HttpService resource registration • Provides JSP support for Help / UA in the Eclipse 3.3 SDK • Work with RSP-UI to provide further framework integrations • JSP Tag Library Discovery supported along bundle classpath • Supported under the Servletbridge… • Allows for portable pre-compiled JSPs • Provided by: org.eclipse.equinox.jsp.jasper.JspServlet • public JspServlet(Bundle bundle, String bundleResourcePath, String alias) • JSP Extension Registry Support provided
  • 16. 16© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license What is Rich AJAX Platform (RAP)? Brings Eclipse RCP based development style to Web 2.0 era RAP is: • An Eclipse technology project (proposed by Inoopract and others) • Java based UI / AJAX development • Using RAP Widget Toolkit (RWT), subset of SWT API • Based on JavaScript client-side framework (qooxdoo) • Eclipse Workbench concept extended for the web • incl. Session support • API compliant with SWT, JFace, Workbench, extension point namespaces See also: • http://www.eclipse.org/rap/ • Active community, great interest
  • 17. 17© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license What are the RAP components? • qooxdoo: underlying client-side JavaScript framework • RWT: RAP Widget Toolkit (migrated from W4T), subset of SWT • JFace, Workbench: RAP based implementations of Eclipse RCP Equinox Operating System Jetty Per- spectives Views RWT Workbench qooxdoo Editors Application plugins RAP Server-Side Eclipse Update Manager ... Launcher JFace W4T Workbench RAP core. jobs core. runtime core. commands Eclipse Core Plugins
  • 18. 18© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license The Google Web Toolkit (GWT) • Build AJAX apps in the Java language • Embed components in existing HTML • Full desktop app clones • Apache 2.0 license • Vibrant community
  • 19. 19© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license Deploying as Eclipse Server-Side Bundles • One GWT module à Two OSGi bundles • Server-side bundle • RPC service implementation • Exposed using org.eclipse.equinox.http.registry.servlets • Client-side bundle • Compiled GWT code (Java + JavaScript) together with HTML, style sheets, images, etc. • Exposed using org.eclipse.equinox.http.registry.resources
  • 20. 20© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license Demo • PlanetEclipse – FeedReader demo • RAP FeedReader • GWT FeedReader • Starting / stopping bundles using Knopflerfish console • Install new bundles
  • 21. 21© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license For more information... EclipseCon 2007 Short tutorials: http://www.eclipsecon.org/2007/index.php?page=sub/&id=3607 http://www.eclipsecon.org/2007/index.php?page=sub/&id=3719 Project hub: http://www.eclipse.org/equinox/server Newsgroup: news://news.eclipse.org/eclipse.technology.equinox Dev Mailing List: [email protected] Thank-you
  • 22. 22© Copyright 2007 Jochen Hiller, Simon Kaegi, Martin Lippert, Gunnar Wagenknecht, IBM Corporation; Source code in this presentation is made available under the EPL, v1.0, remainder of the presentation is licensed under Creative Commons Att. Nc Nd 2.5 license Legal Notices • Java and all Java-based trademarks are trademarks of Sun Microsystems, Inc. in the United States, other countries, or both • Microsoft, Windows, Windows NT, and the Windows logo are trademarks of Microsoft Corporation in the United States, other countries, or both. • Linux is a registered trademark of Linus Torvalds in the United States, other countries, or both. • Other company, product, or service names may be trademarks or service marks of others