JBoss Seam Next Generation Integration Framework. www.melihsakarya.com melih.sakarya@gmail.com



Similar documents
JSF Melih Sakarya. Java Server Faces PrimeFaces

Recommended JSF Enhancements

JSF (Java Server Faces) Melih Sakarya

How To Write A Web Framework In Java

Rapid Application Development. and Application Generation Tools. Walter Knesel

Web Anwendungen Entwickeln mit JSF, Spring und Tomcat

OUR COURSES 19 November All prices are per person in Swedish Krona. Solid Beans AB Kungsgatan Göteborg Sweden

CrownPeak Java Web Hosting. Version 0.20

Framework Adoption for Java Enterprise Application Development

JBoss JEE5 with EJB3.0 on NonStop. JAVA SIG, San Jose

Getting Started Guide. Version 1.8

Web Development in Java Live Demonstrations (Live demonstrations done using Eclipse for Java EE 4.3 and WildFly 8)

Preface. Motivation for this Book

JAVA/J2EE DEVELOPER RESUME

OXAGILE RESUMES SUMMARY OF QUALIFICATIONS TECHNICAL SKILLS SENIOR JAVA SOFTWARE ENGINEER

White Paper: 1) Architecture Objectives: The primary objective of this architecture is to meet the. 2) Architecture Explanation

OpenShift is FanPaaStic For Java EE. By Shekhar Gulati Promo Code JUDCON.IN

Enterprise Java Web Application Frameworks & Sample Stack Implementation

RESIN APPLICATION SERVER JAVA EE 6 WEB PROFILE

Java EE 6 development with Eclipse, Netbeans, IntelliJ and GlassFish. Ludovic Champenois Oracle Corporation

Developing modular Java applications

Portals, Portlets & Liferay Platform

The Java EE 6 Platform. Alexis Moussine-Pouchkine GlassFish Team

JBOSS ENTERPRISE APPLICATION PLATFORM MIGRATION GUIDELINES

Managed Beans II Advanced Features

<Insert Picture Here> Hudson Security Architecture. Winston Prakash. Click to edit Master subtitle style

EBA Procurement Procedure for the Supply of Website Services 2016: Annex 1 System Architecture Document SYSTEM ARCHITECTURE DOCUMENT

APAC WebLogic Suite Workshop Oracle Parcel Service Overview. Jeffrey West Application Grid Product Management

PL/SQL. JSP Java Script. Struts JSF EJB 2.1. Hibernate. JBoss RichFaces EJB 3

ActiveVOS Server Architecture. March 2009

Enterprise Application Development In Java with AJAX and ORM

Case Study. Web Application for Financial & Economic Data Analysis Brainvire Infotech Pvt. Ltd Page 1 of 1

GlassFish. Developing an Application Server in Open Source

Evaluating Presentation Layer Development Frameworks for EJB Applications in J2EE Architecture

ENGINEER - DEVELOPER ADVANCED JAVA. 28 years old - 7 years of experience

Spring 3.1 to 3.2 in a Nutshell. Sam Brannen Senior Software Consultant

What s new in Spring 3.1?

JBoss EntErprisE ApplicAtion platform migration guidelines

Java EE 6 Development with NetBeans 7

This presentation will provide a brief introduction to Rational Application Developer V7.5.

JBoss Enterprise Middleware. The foundation of your open source middleware reference architecture

Application Security

Building Web Services with Apache Axis2

Supporting Multi-tenancy Applications with Java EE

JBoss Enterprise Middleware

applications. JBoss Enterprise Application Platform

JSR-303 Bean Validation

ROBERTO GAMARRA Av. San Vicente de Paul 660, Bo. San José, Ciudad del Este, Alto Paraná 7000, Mobile:

PRIMEFACES MOBILE USER S GUIDE

Oracle WebLogic Foundation of Oracle Fusion Middleware. Lawrence Manickam Toyork Systems Inc

Web and Enterprise Applications Developer Track

Developer s Guide. Version 1.8

Getting Started with JBoss Developer Studio. ISBN: Publication date: April 2008

The end. Carl Nettelblad

Web Development in Java Part I

How to make a good Software Requirement Specification(SRS)

Programma corso di formazione J2EE

Software Development Interactief Centrum voor gerichte Training en Studie Edisonweg 14c, 1821 BN Alkmaar T:

Workshop for WebLogic introduces new tools in support of Java EE 5.0 standards. The support for Java EE5 includes the following technologies:

Migration and Developer Productivity Solutions Retargeting IT for Emerging Business Needs

An introduction to creating JSF applications in Rational Application Developer Version 8.0

JBoss SOAP Web Services User Guide. Version: M5

THE OPEN SOURCE DEVELOPER REPORT

Web Applications. For live Java training, please see training courses at

1. Introduction 1.1 Methodology

Operations and Monitoring with Spring

Internet Engineering: Web Application Architecture. Ali Kamandi Sharif University of Technology Fall 2007

DHANE Amir. Professional Experiences. Objectives. Senior Java/J2EE Developer/ SOA Architect. SOA Architect Since January 2014

JVA-122. Secure Java Web Development

Java/J2EE or Web Developer. Formal Education. Technical knowledge. Spoken Languages

How to Easily Integrate BIRT Reports into your Web Application

Professional Profile Studies Senior Engineer October September 1998 Computer Engineering University of Deusto - Bizkaia (Spain)

JHU/EP Server Originals of Slides and Source Code for Examples:

Instant Chime for IBM Sametime Installation Guide for Apache Tomcat and Microsoft SQL

A Comparative Study of Web Development Technologies Using Open Source and Proprietary Software

JBS-102: Jboss Application Server Administration. Course Length: 4 days

SAP NetWeaver Opens SAP ERP world. Amedeo Prodi SAP Italia

Converting Java EE Applications into OSGi Applications

This training is targeted at System Administrators and developers wanting to understand more about administering a WebLogic instance.

Reporting and JSF. Possibilities, solutions, challenges. Slide 1. Copyright 2009, Andy Bosch,

LEAD JAVA/J2EE DEVELOPER/ARCHITECT CONSULTANT RESUME PITTSBURGH PA

The Oracle Fusion Development Platform

Beginning POJOs. From Novice to Professional. Brian Sam-Bodden

Java Enterprise Security. Stijn Van den Enden

CSI 2132 Lab 8. Outline. Web Programming JSP 23/03/2012

HPC Portal Development Platform with E-Business and HPC Portlets

<Insert Picture Here> GlassFish v3 - A Taste of a Next Generation Application Server

2012 LABVANTAGE Solutions, Inc. All Rights Reserved.

UBS Training Course Catalog

Advanced OpenEdge REST/Mobile Security

Introduction to Apache Roller. Matt Raible Apache Roller Committer June 2007

IBM Rational Web Developer for WebSphere Software Version 6.0

Transcription:

JBoss Seam Next Generation Integration Framework Melih Sakarya www.melihsakarya.com melih.sakarya@gmail.com

Seam Framework JSF JPA EJB 3.0 Ajax RichFaces A4J Drools itext PDF JFreeChart Facelet Security SSL Web Servis Pojo IoC JBPM Hibernate Groovy Javascript Hibernate Localization Asynchronous Remoting Testing GWT Hibernate Search Mail Captcha JBoss Cache

Seam Framework Red Hat Exadel JBoss Hibernate Gavin King (Proje lideri)

Neden Seam Tümleşik bir yapı Hızlı ve kolay geliştirme ortamı (JBoss Tools) Açık kaynak Ücretsiz (LGPL) Kolay entegrasyon (Spring, IceFaces, PrimeFaces...) Ücretsiz geliştirme araçları (JBoss Tools) Kolay test edilebilirlik Farkli ortamlarda deployment desteği

Spring 1.0

Spring 2.0

Seam 2.0

Geliştirme ortamı Eclipse JBoss Tools Java 1.5 ve üzeri J2EE 1.5 ve üzeri

Geliştirme ortamımızı kuralım http://www.melihsakarya.com/2008/11/jbossseam-gelistirme-ortami-kurulumu/

Desteklediği Ortamlar JBoss AS Websphere AS OC4J Weblogic Tomcat...

Seam-gen Bizim için hazırlanan proje ortamı Code generation DB oriented code generation

Örnek projemizi oluşturalım

Seam User Interface Seçenekleri Facelet JSF RI PrimeFaces Richfaces Ice Faces My Faces...

JSF-Facelet ve Seam Template desteği Kolay ve yetenekli EL (Expression Language) RichFaces Theme desteği

Seam Component @name( ornek )

Seam Context Event context Stateless context Session context Conversation context Application context Page context Business Process context

EJB 3.0 Stateful Stateles Message Driven Bean

EJB tanımı @Name("loginAction") @Stateless public class LoginAction implements Login {... }

JPA Annotation ile deklarasyon @Entity @Id...

CRUD Operasyonları Insert Update Delete Select

IoC (Inversion of Control) Injection Outjection Bijection

Ajax desteği A4J (Ajax for JSF) RichFaces

Seam JSF kontrolleri <h:selectonemenu value="#{kullanici.sehir}"> <s:selectitems value="#{sehir.resultlist}" var="sehir" label="#{sehir.adi}" /> <s:convertentity /> </h:selectonemenu>

Seam JSF kontrolleri <s:div rendered="#{kullanici.yetki == 1}"> admin alani </s:div>

Caching <s:cache key="blog-#{blog.id}"> <div class="blogentry"> <h3>#{blog.baslik}</h3> <div> <s:formattedtext value="#{blog.icerik}"/> </div> </div> </s:cache>

Caching public void post() {... entitymanager.persist(blogentry); pojocache.remove("anasayfa", "blog-" + blog.getid() ); }

EL (Expression Language) <h:commandbutton action="#{kullaniciaction.sil(kullanici)}" value="sil"/>

File upload <s:fileupload> <h:form enctype="multipart/form-data"> <s:fileupload id="picture" data="#{kayit.resim}" accept="image/png" contenttype="#{kayit.resimcontenttype}" />

Security - authentication <security:identity authenticate-method= "#{authenticator.authenticate}"/>

Authentication @Name("authenticator") public class Authenticator{ @In Identity identity; public boolean authenticate() { if(identity.getusername().equals("admin") && identity.getpassword().equals("123456")){ identity.addrole("admin"); return true; } else return false; } }

Security <h:outputtext value="test" rendered="#{not ide ntity.loggedin}"> <h:outputlink action="#{reports.listmanagerre ports}" rendered="#{s:hasrole('manager')}"> Yönetici </h:outputlink>

Security @Restrict("#{s:hasRole('admin')}") public void delete() {... }

Security public void deletecustomer() { Identity.instance().checkRestriction("#{s:hasPermission('customer ','delete',selectedcustomer)}"); }

PDF <p:document xmlns:p="http://jboss.com/products/seam/pdf" title="hello"> <p:chapter number="1"> <p:title><p:paragraph>hello</p:paragraph></p:title> <p:paragraph>hello </p:paragraph> </p:chapter> <p:chapter number="2"> <p:title><p:paragraph>goodbye</p:paragraph></p:title> <p:paragraph>goodbye.</p:paragraph> </p:chapter> </p:document>

PDF Components.xml <pdf:document-store use-extensions="true" error-page="/pdfmissing.seam" /> xmlns:pdf=http://jboss.com/products/seam/pdf http://jboss.com/products/seam/pdf http://jboss.com/products/seam/pdf-2.0.xsd

PDF web.xml <servlet> <servlet-name>document Store Servlet</servlet-name> <servlet-class>org.jboss.seam.pdf.documentstoreservlet</servlet- class> </servlet> <servlet-mapping> <servlet-name>document Store Servlet</servlet-name> <url-pattern>*.pdf</url-pattern> </servlet-mapping>

PDF WEB-INF\lib\ itext.jar

Grafik Chart WEB-INF\lib jfreechart.jar jcommon.jar

Grafik Chart <p:piechart title= Parite" circular="false" direction="anticlockwise" startangle="30" labelgap="0.1" labellinkpaint="red"> <p:series key="prices"> <p:data key="2003" columnkey="2003" value="7.36" /> <p:data key="2004" columnkey="2004" value="11.50" /> <p:data key="2005" columnkey="2005" value="34.625" /> <p:data key="2006" columnkey="2006" value="76.30" /> <p:data key="2007" columnkey="2007" value="85.05" /> </p:series> </p:piechart>

HTML Grafik Chart <p:piechart title= Parite" circular="false" direction="anticlockwise" startangle="30" labelgap="0.1" labellinkpaint="red"> <p:series key="prices"> <p:data key="2003" columnkey="2003" value="7.36" /> <p:data key="2004" columnkey="2004" value="11.50" /> <p:data key="2005" columnkey="2005" value="34.625" /> <p:data key="2006" columnkey="2006" value="76.30" /> <p:data key="2007" columnkey="2007" value="85.05" /> </p:series> </p:piechart>

Remoting Seam componentlerine client side erişim sağlar DWR benzeri bir mimari sunar Javascript ile erişim yapabilirsiniz

Remoting <script type="text/javascript" src="seam/resource/remoting/resource/remote.js"></script> <s:remote include="test"/>

Remoting <script type="text/javascript"> //<![CDATA[ function deneme() { var name = prompt("adınız Nedir?"); Seam.Component.getInstance("test").demo(deneme,demoCallback); } function deneme(result) { alert(result); } // ]]> </script>

Remoting @Stateless @Name("test") public class TestAction implements Test { } public String demo(string isim){ } return "adınız = " + isim;

Remoting @Local public interface Test { @WebRemote public String demo(string isim); }

Seam Validation public class Adres { private String sehir; private String postakodu; @NotNull @Length(max=30) public String getsehir() { return sehir; } public void setsehir(string sehir) { this.sehir = sehir; } } @NotNull @Length(max=6) @Pattern("^\d*$") public String getpostakodu() { return postakodu; } public void setpostakodu(string postakodu) { this.postakodu = postakodu; }

Mail <m:message xmlns="http://www.w3.org/1999/xhtml" xmlns:m="http://jboss.com/products/seam/mail" xmlns:h="http://java.sun.com/jsf/html"> <m:from name="melih Sakarya" address="melih.sakarya@gmail.com" /> <m:to name="#{kullanici.ad} #{kullanici.soyad}">#{kullanici.mail}</m:to> <m:subject>deneme mesaji</m:subject> <m:body> <p>merhaba #{kullanici.ad},</p> <p>bu mail seam ile gonderilmistir. <a href="http://www.melihsakarya.com">www.melihsakarya.com</a></p> </m:body> </m:message>

Mail Configuration components.xml <components xmlns="http://jboss.com/products/seam/components" xmlns:core="http://jboss.com/products/seam/core" xmlns:mail="http://jboss.com/products/seam/mail"> <mail:mail-session host="smtp.testsite.com.tr" password="123456" port="25" username="msakarya" /> </components>

Mail facelet rendering @In(create=true) private Renderer renderer; public void gonder() { try { renderer.render("/mailornek.xhtml"); facesmessages.add("email basari ile gonderildi"); } catch (Exception e) { facesmessages.add("mesaj gonderilemedi: " + e.getmessage()); } }

Birden çok kişiye gönderim <ui:repeat value="#{tumkulanicilar} var="kullanici"> <m:to name="#{kullanici.ad} #{kullanici.soyad}" address="#{kullanici.mail}" /> </ui:repeat>

Birden çok mail gönderimi <ui:repeat value="#{kullanicilar}" var="k"> <m:message> <m:from name="#{gonderen.ad} #{gonderen.soyad}">#{gonderen.mail}</m:from> <m:to name="#{k.ad}">#{k.adres}</m:to>... </m:message> </ui:repeat>

Alternatif mail <m:body> <f:facet name="alternative"> Bu maili okuyamıyorsanız www.melihsakarya.com adresini ziyaret ediniz. </f:facet> </m:body>

Mail Attachment <m:attachment value="#{kullanici.foto}" contenttype="image/png" filename="foto.jpg"/>

Birden çok dosya <ui:repeat value="#{kullanicilar}" var="kullanici"> <m:attachment value="#{kullanici.foto}" contenttype="image/jpeg" filename="#{kullanici.ad}_#{kullanici.soyad}.jpg"/> </ui:repeat>

Mail Pdf Attachment <m:attachment filename="test.pdf"> <p:document> test test test </p:document> </m:attachment>

Diğer email özellikleri Mail okuma Farklı header lar ekleme Internationalisation Templating

Son Teşekkürler