Presentation is loading. Please wait.

Presentation is loading. Please wait.

Tutorial on Science Gateways, Roma, 04.06.2013 Riccardo Rotondo Web Application Development Introduction to application servers, web applications and portlets.

Similar presentations


Presentation on theme: "Tutorial on Science Gateways, Roma, 04.06.2013 Riccardo Rotondo Web Application Development Introduction to application servers, web applications and portlets."— Presentation transcript:

1 Tutorial on Science Gateways, Roma, 04.06.2013 Riccardo Rotondo Web Application Development Introduction to application servers, web applications and portlets

2 Riccardo Rotondo Tutorial on Science Gateways, Roma, 04.06.2013 Outline  Scenario  Use Case  Portlet Develop  Hostname porltlet  Catania Grid Engine API

3 Scenario Riccardo Rotondo Tutorial on Science Gateways, Roma, 04.06.2013 GRID CLOUD JSR 168/268 Catania Science Gateway Framework Local Cluster

4 Web enviroment  Application Server (Glassfish)  Web application working as Portlet Container (Liferay)  Portlet (a custom application designed under users needs) Riccardo Rotondo Tutorial on Science Gateways, Roma, 04.06.2013 JSR 168/268

5 What is an application server?  A software framework designed to host applications running in a web environment  Most of them contains a service layer model  A set of API is available for the developers to access the application server’s functionalities  As long as the management of the environment is demanded to the application server, developers can focus on the business logic. Riccardo Rotondo Tutorial on Science Gateways, Roma, 04.06.2013

6 Most popular application servers Riccardo Rotondo Tutorial on Science Gateways, Roma, 04.06.2013 http://plumbr.eu/blog/most-popular-application-servers

7 What is a web application?  An application accessed over a network  Analogy with “common” applications  User interact with them through a web-browser  A web applications can offer thousands of services: Liferay is a web-application Riccardo Rotondo Tutorial on Science Gateways, Roma, 04.06.2013

8 Liferay (www.liferay.com)www.liferay.com  Highly-configurable, scalable, open source portal framework;  Compatible with JSR 168/286 standards and based on modern web 2.0 technologies;  Liferay services currently used:  Portal;  CMS & WCM;  Collaboration and “social” software Riccardo Rotondo Tutorial on Science Gateways, Roma, 04.06.2013

9 Liferay Plugins  Portlets  Themes  Layouts  Hooks  Exts Riccardo Rotondo Tutorial on Science Gateways, Roma, 04.06.2013

10 What is Porltet ?  Defined in the Java Specification Request (JSR 168/286)  A porlet is a web component able to set a frame portion of a web page.  Differently from Servlet it needs a Porltlet Container to allow the user to interact with it.  Standard Portlet can be deployed in any Porlet Container in case they will use standard libray. Riccardo Rotondo Tutorial on Science Gateways, Roma, 04.06.2013

11 Generic Porlets Life Cycle Riccardo Rotondo End of Services? NOYES Tutorial on Science Gateways, Roma, 04.06.2013

12 Generic Porltlets Interface Method Class GenericPortlets { init (PortletConfig); processAction (ActionRequest, ActionResponse); render (RenderRequest, RenderResponse); destroy(); doView (Request, Response); doEdit (Reuqest, Response); doHelp (Request, Response); } Riccardo Rotondo Tutorial on Science Gateways, Roma, 04.06.2013

13 Portlet Mode  A porltet works in three different states.  View Mode: generate a markup ( a portion of a web page);  Edit Mode: allow portlet customisation and setting preferences.  Help Mode: explains portlet functionalities. Riccardo Rotondo Tutorial on Science Gateways, Roma, 04.06.2013

14 doEdit() Action Request Riccardo Rotondo Action Request processAction() Render Request view.jsp doView() edit.jsp Action Request processAction() Render Request edit.jsp view.jsp Tutorial on Science Gateways, Roma, 04.06.2013

15 Render Request Riccardo Rotondo Render Request view.jsp doView() view2.jsp Tutorial on Science Gateways, Roma, 04.06.2013

16 Portlets  Standard JSR168/286  Interaction between jsp pages and java code  JSP uses <form… statements to send parameters to Java code  Java code extends class GenericPortlet overriding methods:  Init, doView, doHelp, doEdit, processAction  Java code uses 2 Classes to exchange data from/to JSPs Riccardo Rotondo JSP pageJava code Application Server (Glassfish) <jsp:useBean <jsp:useBean Class Extends GenericPortlet … Class Extends GenericPortlet … Tutorial on Science Gateways, Roma, 04.06.2013

17 Portlet files (root) build.xml docroot/ WEB_INF/ css/ images/ js/ jsp_page_1.jsp … jsp_page_n.jsp Riccardo Rotondo Used by ‘ ant ’ to compile and deploy the portlet Define here JSP’s styles JSP image files Tutorial on Science Gateways, Roma, 04.06.2013 JavaScript files Portlet JSP pages

18 Portlet files (docroot) WEB_INF/ glassfish-web.xml web.xml lib/ Job/ liferay-display.xml liferay-plugin-package.properties liferay-portlet.xml portlet.xml src/ /code.java tld/ Riccardo Rotondo Used to define database and other resources settings Jar Library directory (local scope) Job files (Custom dir) Portlet configuration files Portlet configuration files Java source files XML structure file Tutorial on Science Gateways, Roma, 04.06.2013

19 Riccardo Rotondo

20 Building environment  Get Liferay with Glassfish  Customising Liferay installation (database connection)  Get Liferay plug-in SDK  Configuring Netbeans (optional) Riccardo Rotondo Tutorial on Science Gateways, Roma, 04.06.2013

21 Deploying first portlet  Understanding ant scripts  Creating “hello world” portlet  Understanding portlet files  Compiling porltet  Deploying porlet  Understading portlet management on the server Riccardo Rotondo Tutorial on Science Gateways, Roma, 04.06.2013

22 References  Liferay: https://www.liferay.comhttps://www.liferay.com  Liferay Bundles: https://www.liferay.com/downloads/liferay- portal/available-releases https://www.liferay.com/downloads/liferay- portal/available-releases  Liferay Plugin SDK: https://www.liferay.com/downloads/liferay- portal/additional-files https://www.liferay.com/downloads/liferay- portal/additional-files  Netbeans: https://netbeans.orghttps://netbeans.org  Netbeans liferay plugin: https://contrib.netbeans.org/portalpack/ https://contrib.netbeans.org/portalpack/ Riccardo Rotondo Tutorial on Science Gateways, Roma, 04.06.2013

23 Questions ? Riccardo Rotondo Tutorial on Science Gateways, Roma, 04.06.2013


Download ppt "Tutorial on Science Gateways, Roma, 04.06.2013 Riccardo Rotondo Web Application Development Introduction to application servers, web applications and portlets."

Similar presentations


Ads by Google