SlideShare una empresa de Scribd logo
1 de 61
Descargar para leer sin conexión
ENTERPRISE JAVA
                             &
                            SOA


                                   Mert ÇALIŞKAN



                                    Doğu Akdeniz
                                     Üniversitesi



                            26.03.2012
Friday, March 23, 12
Me?
              • Mert ÇALIŞKAN
              • Was working for a
                          Defence Contractor...kind’a boring...
              • Now Lead SOA Architect @ T2
              • Open Source Software (OSS) Advocate
                       Founder and Committer for OS Projects
              • Member of Apache Software Foundation
                       OpenLogic Expert Community

Friday, March 23, 12
TO JAVA ?   OR NOT ?



     Come to the Dark Side..!


Friday, March 23, 12
Agenda


                       • History of Java
                       • Enterprise Java - mesir and its ingredients
                       • SOA, from principles to its elements
                       • Ways to make a better career in/with Java
                       • Q &A


Friday, March 23, 12
YOU KNOW THIS TRANS-ATLANTIC?




Friday, March 23, 12
• RMS Titanic
                  sank in North Atlantic Ocean
                  on 15 April, 1912 on maiden voyage

                  So Eventually Everything Dies...!
                  Cool analogy, right? :)


          • You, Me, All of Us...
          • Companies, Technologies...
          • Key point is: You should avoid not making it like
                  Titanic, which sunk in 2hrs and 40 minutes...!

Friday, March 23, 12
Where it all began...
                              Founded February 24, 1982
                              Sold to Oracle January 27, 2010
                              for $7.4 billion..!
           Sun was mainly selling Hardware, but they also
           working on computer software like Java, MySQL and
           NFS..


    Founded in 1977 by Larry Ellison and a couple of
    clever guys, their motivation is to compete with IBM’s
    System R, which was a relational database.
Friday, March 23, 12
History of JAVA

            • Java Language Project started in June 1991
                       (James Gosling and his fellas)
            • Running byteCode on Java Virtual Machine
            • WORA (Write Once, Run Anywhere)
            • First started with applets in the WEB world
            • With the dawn of Java Enterprise Edition,
                       Servlets made their way to rule the world.


                                                        The Duke
Friday, March 23, 12
Editions of JAVA

      •       Java Card: applets on smart cards (sim cards)

      •       Micro Edition (ME): mobile phones + set-top boxes

      •       Standard Edition (SE): Cool Software Platform

      •       Enterprise Edition (EE): Oracle’s Enterprise Computing
              Platform

      •       JavaFX: Aim was RIA (looks dead to me)

      •       PersonalJava (discontinued) : Java edition for mobile and
              embedded systems based on Java 1.1.8




Friday, March 23, 12
James Gosling... was the
                          FATHER of Java



            Age: 68



                                                            Age: 57
                                           $$$ makes you look
                                                   younger..!
                                           Larry Ellison...
                                              is the new BOSS
Friday, March 23, 12
CHRONOLOGY OF JAVA SE
              JDK 1.0
       January 23, 1996

                                 JDK 1.1               Introducing
                             February 19, 1997   Abstract Window Toolkit

                   Swing was on Board            J2SE 1.2
                                             December 8, 1998

                                        HotSpot JVM             J2SE 1.3
                                                              May 8, 2000
     reg-ex, Java Web Start                   J2SE 1.4
      embedded XML parser                  February 6, 2002

                           J2SE 1.5           New Cool Language Features
                       September 30, 2004 Generics, AutoBoxing, var-args & etc...
Friday, March 23, 12
CHRONOLOGY OF JAVA SE
                                       Renamed to Java SE instead of
                       Java SE 6       J2SE from now on.
              December 11, 2006        Support for running scripting lang.
                                       like Rhino.

                                                   Multi-Catch in Exceptions
                                   Java SE 7        String in switch (finally!)
                                   July 28, 2011
                                                   more cools features in the
                                                               lang...


            Best is yet to come..!                       Java SE 8
       lambda expressions... closures...                Summer, 2013

Friday, March 23, 12
Enterprise JAVA

             • Java EE = Java Enterprise Edition
             • Extends Java SE
                       javax.faces.*           UI + JSF Related Stuff
                javax.servlet.*             Handling HTTP invocations
          javax.enterprise.inject.*        CDI, Like Spring depedency Inj.
                        javax.ejb.*                    EJB Stuff
             javax.validation.*                    Bean Validation
           javax.persistence.*                        Persistency
           javax.transaction.*                  Stuff for transactions
                        javax.jms.*                Messaging Stuff

Friday, March 23, 12
CHRONOLOGY OF JAVA EE

                       J2EE 1.2         J2EE 1.3            J2EE 1.4
            December 12, 1999           Sept. 12, 2001     Nov. 11, 2003
                       Servlet 2.2      Servlet 2.3        Servlet 2.4


         JSP             JAX-WS         Java EE 5        Servlet 2.5
         EJB             JAX-RS        May 11, 2006
        JMS               JAX-B
         JTA                JPA
        JAAS               JSTL
                                        Java EE 6        Servlet 3.0
         JSF             any many    December 10, 2009
          EL              more...

Friday, March 23, 12
How to choose the frameworks for WEB dev?

           • Compatible with Model View Controller pattern
           • Quality & Competency of “The Stack”
           • Performance & Scalability
           • Learning Curve & Development Speed !
                            don’t let cutting edge turn into bleeding edge...


           •       Community Factor & Open Source support
                   (forums-mailing lists & etc.)




Friday, March 23, 12
Which stack to choose?
                                UI                              Controller/Dep.Inj.
                          JSF        Struts                   Spring          Guice         HiveMind

      Spring MVC                WebWork        ZK               picoContainer          XWork

             Wicket              Tapestry      GWT
                                                              Model/Persistence Layer
                       Echo3       Cocoon      Vaadin
                                                                   Hibernate          iBatis

                   Integration                                             Toplink      KODO

    Apache CXF                  Apache Axis2              IDE                 EclipseLink

                                                    Eclipse     IntelliJ
                       Spring WS
                                                                 IDEA
                                                JDeveloper
                                                              NetBEANS
Friday, March 23, 12
THE STACK of
                             VIEW
                                             MAVEN
                       JSF
                                                      ECLIPSE
                         MYFACES
                         ORCHESTRA             Apache CXF



                                                 MODEL
                       CONTROLLER
                                                          JPA
                                              HIBERNATE
                       SPRING                  H.SEARCH
                                                   H.VALIDATOR
                             with SecuRITY
                                             ENVERS



Friday, March 23, 12
• It’s nothing new!
                                not “yet another java framework”
                       • It’s a stack demonstration with OSS
                       • Released on 01.2009
                       • http://code.google.com/p/mesir
                       • 2000+ downloads
                       • Simple Stupid Model
                         AddressBook                        Contact
                       id                               id
                                        1        0..*
                       text                             name
                       creationDate                     email
                       contacts                         phone

Friday, March 23, 12
Code walk-through with DEMO




Friday, March 23, 12
SOA
                       Service Oriented Architecture
                         Not SOAP...!




                                    Ok, maybe it is...

Friday, March 23, 12
WHAT SOA IS ?



               • Stands for Service Oriented Architecture
               • Software Architecture where the whole
                       information system is regarded as a collection
                       of services interoperated and used freely
                       through a common interface (the service bus)
                       independent of hardware.




Friday, March 23, 12
WHAT SOA IS NOT ?

            • It’s NOT a technical standard
            • It’s NOT a technology
            • It’s NOT a concrete architecture,
                                        but it leads to one.


            • An application that uses web services is SOA
                       (so wrong!)




Friday, March 23, 12
AIM OF SOA ?


               • To INTEGRATE..!
               • Services should interact, they        must exchange
                       information...
               • Obey the Architectural
                       Principles...!




Friday, March 23, 12
ARCHITECTURAL PRINCIPLES

               • Loose Coupling
                       Minimize dependencies between
                       each other, just aware of each
                       other...


               • Service Contract
                       A set of technical data along
                       with business information

                                XML      WS
                        WSDL                     SLA
                               Schema   Policy



Friday, March 23, 12
ARCHITECTURAL PRINCIPLES

         • ServiceBlocks on top of
           Service
                   Abstraction

                 each other to build Service
                 Oriented Environment

                             Composite Services
             Level of
            Abstraction       Business Services

                            Infrastructure Services

       • Service Reusability
               Positioning services as reusable
               enterprise resources
Friday, March 23, 12
Service Composability

           • To re-use the capability of a service to build up
                   composed services

                          A Big Problem



               Small      Small     Small     Small        Small problems
              Problem    Problem   Problem   Problem   collectively represent a
                                                             big problem
               Small      Small     Small     Small
              Problem    Problem   Problem   Problem




Friday, March 23, 12
Service Composability
        Small           Small     Small     Small         Small     Small       Small     Small
       Problem         Problem   Problem   Problem       Problem   Problem     Problem   Problem




             A           B         C         D             E           F         G         H

           Solution Logic that each address to solve a problem
                                                            C

          Big                               A                              F
        Problem
         Solved
                                       B             E             D            G         H

Friday, March 23, 12
Service Discoverability



               • Descriptive services that can be accessed via
                       discovery mechanisms
               • Increase the service re-use...
               • Services defined with WSDL and registered to
                       services registry
               • Next Step could be: WADL
                       Web Application Description Language

Friday, March 23, 12
ARCHITECTURAL ARTIFACTS

                  4 main artifacts that are used to shape up SOA


                  XML is used to define the data
                  SOAP is used to transfer the data
                  WSDL is used to define the service
                  UDDI is used to list the available services



Friday, March 23, 12
XML
                • EXtensible Markup Language
                • To transport and store data
                         (unlike HTML, which is just to display the data)

                • Created by W3C (World Wide Web Consortium)
                        123456 Mr, Mert, Caliskan, Ogretmenler
                        Cad. No 6/A, , Cankaya, Ankara, 06300,
                        Turkey

                       Any idea what this comma separated stuff is?

Friday, March 23, 12
XML

       Decompose the data...


       <order>
         <orderNo>123456</orderNo>
         <shipTo>
           <name>Mr Mert Caliskan</name>
           <address>Ogretmenler Cad. No 6/A, Cankaya, Ankara, 06300, Turkey</address>
         </shipTo>
       </order>




Friday, March 23, 12
XML         Cool but it got more
     makes more sense now?
                                              gibberish than before?
     <order>
     ! <orderNo>123456</orderNo>
     ! <shipTo>                                     how do we validate
     ! !      <name>
     ! ! !       <title>Mr</title>
                                                 this bulk load of string?
     ! ! !       <firstName>Mert</firstName>
     ! !      </name>
     ! !      <address>
     ! ! !       <addressLine1>Ogretmenler Cad. No 6/A</addressLine1>
     ! ! !       <addressLine2></addressLine2>
     ! ! !       <county>Cankaya</country>
     ! ! !       <city>Ankara</zip>
     ! ! !       <zip>06500</zip>
     ! ! !       <country>Turkey</country>
     ! !      </address>
     ! </shipTo>
     </order>

Friday, March 23, 12
XSD
       • XML Schema Daefinition
      <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
             xmlns="http://rubiconred.com/obay/xsd/common"
             targetNamespace="http://rubiconred.com/obay/xsd/common"
             elementFormDefault="qualified or unqualified">

        <xsd:element name="address" type="tAddress"/>
        <xsd:complexType name="tAddress">
            <xsd:sequence>
               <xsd:element name="addressLine1" type="xsd:string"/>
                    <xsd:element name="addressLine2" type="xsd:string"/>
                    <xsd:element name="city" type="xsd:string"/>
                    <xsd:element name="state" type="xsd:string"/>
                    <xsd:element name="zip" type="xsd:string"/>
                    <xsd:element name="country" type="xsd:string"/>
               </xsd:sequence>
            </xsd:complexType>
      </xsd:schema>


Friday, March 23, 12
SOAP
                • Simple Object Access Protocol
                • Cross platform (platform independent) remote
                       calls (usually over HTTP) with XML messages
                • Could be done also with SMTP (a.k.a. emailing)
                                      Envelope                     optional
                                                                   required
                                                                   (one or
                                                                    more)
                             Header                 Body



                                          Content          Fault

Friday, March 23, 12
WSDL
            •          Web Service Definition Language / XML Based
            •          Describes the Point of Contact for Service Provider
            •          Defines
                         Structure of messages
                         Physical location of service


            •          No need to generate the WSDL, server is doing that
                       for us...



Friday, March 23, 12
What Does WSDL Look Like?
  <definitions name="EndorsementSearch"
    targetNamespace="http://namespaces.snowboard-info.com"
    xmlns:es="http://www.snowboard-info.com/EndorsementSearch.wsdl"
    xmlns:esxsd="http://schemas.snowboard-info.com/EndorsementSearch.xsd"
    xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
    xmlns="http://schemas.xmlsoap.org/wsdl/">

    <!-- omitted types section with content model schema info -->
    <message name="GetEndorsingBoarderRequest">
      <part name="body" element="esxsd:GetEndorsingBoarder"/>
    </message>

    <message name="GetEndorsingBoarderResponse">
      <part name="body" element="esxsd:GetEndorsingBoarderResponse"/>
    </message>
                                                                                Your Eyes Hurt, aren’t they?
    <portType name="GetEndorsingBoarderPortType">
      <operation name="GetEndorsingBoarder">
        <input message="es:GetEndorsingBoarderRequest"/>
        <output message="es:GetEndorsingBoarderResponse"/>
        <fault message="es:GetEndorsingBoarderFault"/>
      </operation>
    </portType>

    <binding name="EndorsementSearchSoapBinding"
             type="es:GetEndorsingBoarderPortType">
      <soap:binding style="document"
                    transport="http://schemas.xmlsoap.org/soap/http"/>
      <operation name="GetEndorsingBoarder">
        <soap:operation
          soapAction="http://www.snowboard-info.com/EndorsementSearch"/>
        <input>
          <soap:body use="literal"
            namespace="http://schemas.snowboard-info.com/EndorsementSearch.xsd"/>
        </input>
        <output>
          <soap:body use="literal"
            namespace="http://schemas.snowboard-info.com/EndorsementSearch.xsd"/>
        </output>
        <fault>
          <soap:body use="literal"
            namespace="http://schemas.snowboard-info.com/EndorsementSearch.xsd"/>
        </fault>
      </operation>
    </binding>

    <service name="EndorsementSearchService">
      <documentation>snowboarding-info.com Endorsement Service</documentation>
      <port name="GetEndorsingBoarderPort"
            binding="es:EndorsementSearchSoapBinding">
        <soap:address location="http://www.snowboard-info.com/EndorsementSearch"/>
      </port>
    </service>
  </definitions>


Friday, March 23, 12
What Does WSDL Look Like?
                                                                                     optional
                                                                                     required
                                             Service                                 (one or
                                            Description                               more)



         Type                  Message      PortType             Binding           Service
                                                        relates with


                       contains input and
                                                                       knows its
                        output message      Operation                               Port


                                                                                   Endpoint



Friday, March 23, 12
ReST
                                                   Representational
                                                   e
        • Resource Identification through           State
                URI
                                                   Transfer
         • Resource: Any "Thing", Anything
                 you would want to point to.

         • Representation: Serializable description of resource
                 could be images (jpg, png), XML or JSON data

         • via HTTP Methods
                       GET / PUT / POST / DELETE

Friday, March 23, 12
ReST Example
             Requirement: Give me the employee with id: 1234

             Old School WS Method Invocation:

                   Employee employeeWS.getEmployee(Long id)


             Cool ReST way:
                   GET /myApp/employees/1234 HTTP/1.1


Friday, March 23, 12
ReST Example
             Response in JSON:
             {
                 "employee": {
                 "id": "481",
                 "name": "Mert",
                 "lastname": "Caliskan",
                 "roles": [
                          "SOA Architect",
                          "Lazy Developer",
                          "Coding Monkey"
                 ]
             }


Friday, March 23, 12
ReST... Final Words...

             ReST is handy, simple to integrate with.
             But,
             Not solving real world problems like Security,
             Transactions and etc. (WS-* are still in need)
             Documentation is still needed for resources,
             representations... (no WSDL remember?)

                       Fact: Everything we do over HTTP is "ReST"...!



Friday, March 23, 12
ReST is just CRUD

         • You can expose your DB on WEB :)
         • Simple & Stupid...
                            HTTP      SQL     CRUD
                            POST    INSERT    Create
                             GET    SELECT     Read
                             PUT    UPDATE    Update
                           DELETE   DELETE    Delete


Friday, March 23, 12
Public WS and ReST to play around
             http://www.service-repository.com
                       Weather Services
                       Google Questions
                       Movies and many more...

             For ReST, check out:




Friday, March 23, 12
Create WS with Annotations

          • @WebService()
                  Marks a Java class as implementing a Web Service.


          • @WebMethod(operationName = "add")
                  Customizes a method that is exposed as a Web
                  Service operation.


          • @WebParam(name = "type")
                  Customizes the parameters of the Operation.


Friday, March 23, 12
DEMO

                • Let’s create a couple of Services with
                       JAX-WS (SOAP based) &
                       JAX-RS (REST based)
                • JAX-WS
                • JAX-RS       } Reference Implementations

Friday, March 23, 12
WEB SERVICES
           •           Functionality packaged as a single unit exposed to
                       network

           •           WSDL (Web Service Definition Language) / XML based

           •           WSDL 1.1 and WSDL 2.0 versions

                                            Service
                                            Registry


                              Find                           Publish

                         Service                              Service
                        Requestor       Bind + Invoke        Producer
Friday, March 23, 12
many vendors out there,
                       so standardization needs to be done..!




Friday, March 23, 12
THE WS-* STANDARDS
                        WS-Addressing                     WS-MakeConnection
                    WS-AtomicTransaction                    WS-Management
                           WS-BPEL                       WS-Management Catalog
                        WS-BaseFaults                     WS-MetadataExchange
                     WS-BaseNotification                      WS-Notification
                   WS-BrokeredNotification                       WS-Policy
                     WS-BusinessActivity                   WS-PolicyAssertions
                           WS-CAF                         WS-PolicyAttachment
                           WS-CDL                            WS-Provisioning
                            WS-CF                        WS-RM Policy Assertion
                      WS-Choreography                         WS-Reliability
                         WS-Context                       WS-ReliableMessaging
                      WS-Coordination                         WS-Resource
                        WS-Discovery                  WS-Resource Framework (WSRF)
                       WS-Enumeration                     WS-ResourceLifetime
                         WS-Eventing                     WS-ResourceProperties
                        WS-Federation                     WS-ResourceTransfer
             WS-Federation Active Requestor Profile       WS-SecureConversation
             WS-Federation Passive Requestor Profile           WS-Security
                         WS-Fragment                        WS-SecurityPolicy
                        WS-Inspection                       WS-ServiceGroup


Friday, March 23, 12
THE STANDARDS
                        WS-Addressing                     WS-MakeConnection
                    WS-AtomicTransaction                    WS-Management
                           WS-BPEL                       WS-Management Catalog
                        WS-BaseFaults                     WS-MetadataExchange
                     WS-BaseNotification                      WS-Notification
                   WS-BrokeredNotification                       WS-Policy
                     WS-BusinessActivity                   WS-PolicyAssertions



                                              48
                           WS-CAF                         WS-PolicyAttachment
                           WS-CDL                            WS-Provisioning
                            WS-CF                        WS-RM Policy Assertion
                      WS-Choreography                         WS-Reliability
                         WS-Context                       WS-ReliableMessaging
                      WS-Coordination                         WS-Resource
                        WS-Discovery                  WS-Resource Framework (WSRF)
                       WS-Enumeration                     WS-ResourceLifetime
                         WS-Eventing                     WS-ResourceProperties
                        WS-Federation                     WS-ResourceTransfer
             WS-Federation Active Requestor Profile       WS-SecureConversation
             WS-Federation Passive Requestor Profile           WS-Security
                         WS-Fragment                        WS-SecurityPolicy
                        WS-Inspection                       WS-ServiceGroup


Friday, March 23, 12
UDDI
                • Universal Discovery and Directory Interface
                • Started in early 2000s
                • XML based Service Discovery Protocol
                • Think of it as yellow pages
                • Included in the WS-I standard
                • Not widely adopted as hoped, Microsoft
                       removed it from Windows Server OS.
                • OSS implementation: juddi.apache.org
Friday, March 23, 12
Career in JAVA
             • Participate in Open Source
                       Be a Contributor / or better, be a Committer
             • Learn the Language from inside out...
             • Oracle Certifications are one way to go
                 Java SE 7 Programmer
         Java EE6 Web Component Developer
      Java EE6 Enterprise JavaBeans Developer
       Java EE6 Java Persistence API Developer
           Java EE6 Web Services Developer
             Java EE 5 Enterprise Architect

Friday, March 23, 12
To be a Leader



                         Experience           Communication

                                      Knowledge

                       Professionalism            Creativity




Friday, March 23, 12
To be a Leader

                           Know broad... Know deep...

                         Experience           Communication

                                      Knowledge

                       Professionalism            Creativity

      If you know .NET, go ahead and learn Java. If you
      know Java move to Objective-C, Scala & etc.
      Know you stuff very well...
Friday, March 23, 12
To be a Leader

                       Stay Current... Use your knowledge...


                         Experience             Communication

                                      Knowledge

                       Professionalism              Creativity



                         Practice... Practice... Practice...

Friday, March 23, 12
To be a Leader

                                Be Open-Minded...


                         Experience           Communication

                                      Knowledge

                       Professionalism            Creativity


             Listen to people’s thoughts.. They’re more valuable
             than you think..You CANNOT know everything..!
Friday, March 23, 12
To be a Leader

                                Reject the status quo...


                           Experience           Communication

                                        Knowledge

                         Professionalism            Creativity


                       Don’t be a rebellion but don’t kill the
                              rebellion inside you...
Friday, March 23, 12
To be a Leader
                       Take and accept the responsibility...


                         Experience           Communication

                                      Knowledge

                       Professionalism            Creativity



                           Make it all in a classy way...

Friday, March 23, 12
Resume Preparation

           • People skim resumes... So make
                       it to the point as much as
                       possible
           • It’s not what you know.
                       It’s what you’ve done with
                       what you know...
           • Keep it short
                       1 to 3 sentences, 1 to 3 pages
                       at most


Friday, March 23, 12
To sum up on career...
          • You are the one that will be building
                  your OWN career.
          • Work for your employer and work for yourself
                  also...
          • Take the time to build your skills:
                  your knowledge, your communication skills, your
                  experience
          • And don’t kill the child inside you, make it creative
                  as always...
          • Act Professional, because you have to be a ONE..!
Friday, March 23, 12
To sum up...

           • JAVA is still HOT TOPIC...
           • Oracle is investing on Java so best is yet to come.
           • SOA is not a hype anymore, big vendors are
                       taking parts in the market with cool tools..
           • Take a leap,
                              dive into Java,
                                    build your career on it.



Friday, March 23, 12
Teşekkürler..!
                            mert@t2.com.tr

                       http://www.jroller.com/mert
                                 @mertcal


Friday, March 23, 12

Más contenido relacionado

Más de Mert Çalışkan

MicroProfile for MicroServices
MicroProfile for MicroServicesMicroProfile for MicroServices
MicroProfile for MicroServicesMert Çalışkan
 
jDays2015 - JavaEE vs. Spring Smackdown
jDays2015 - JavaEE vs. Spring SmackdownjDays2015 - JavaEE vs. Spring Smackdown
jDays2015 - JavaEE vs. Spring SmackdownMert Çalışkan
 
BMO - Intelligent Projects with Maven
BMO - Intelligent Projects with MavenBMO - Intelligent Projects with Maven
BMO - Intelligent Projects with MavenMert Çalışkan
 
Intelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulIntelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulMert Çalışkan
 
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFacesJavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFacesMert Çalışkan
 
Gelecex - Maven ile Akilli Projeler
Gelecex - Maven ile Akilli ProjelerGelecex - Maven ile Akilli Projeler
Gelecex - Maven ile Akilli ProjelerMert Çalışkan
 
Jdc 2010 - Maven, Intelligent Projects
Jdc 2010 - Maven, Intelligent ProjectsJdc 2010 - Maven, Intelligent Projects
Jdc 2010 - Maven, Intelligent ProjectsMert Çalışkan
 
Enterprise Java Web Application Frameworks Sample Stack Implementation
Enterprise Java Web Application Frameworks   Sample Stack ImplementationEnterprise Java Web Application Frameworks   Sample Stack Implementation
Enterprise Java Web Application Frameworks Sample Stack ImplementationMert Çalışkan
 

Más de Mert Çalışkan (11)

MicroProfile for MicroServices
MicroProfile for MicroServicesMicroProfile for MicroServices
MicroProfile for MicroServices
 
jDays2015 - JavaEE vs. Spring Smackdown
jDays2015 - JavaEE vs. Spring SmackdownjDays2015 - JavaEE vs. Spring Smackdown
jDays2015 - JavaEE vs. Spring Smackdown
 
BMO - Intelligent Projects with Maven
BMO - Intelligent Projects with MavenBMO - Intelligent Projects with Maven
BMO - Intelligent Projects with Maven
 
Intelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest IstanbulIntelligent Projects with Maven - DevFest Istanbul
Intelligent Projects with Maven - DevFest Istanbul
 
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFacesJavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
 
Better Career with Java
Better Career with JavaBetter Career with Java
Better Career with Java
 
Test Infected
Test InfectedTest Infected
Test Infected
 
Gelecex - Maven ile Akilli Projeler
Gelecex - Maven ile Akilli ProjelerGelecex - Maven ile Akilli Projeler
Gelecex - Maven ile Akilli Projeler
 
Jdc 2010 - Maven, Intelligent Projects
Jdc 2010 - Maven, Intelligent ProjectsJdc 2010 - Maven, Intelligent Projects
Jdc 2010 - Maven, Intelligent Projects
 
Fikrim Acik Kodum Acik
Fikrim Acik Kodum AcikFikrim Acik Kodum Acik
Fikrim Acik Kodum Acik
 
Enterprise Java Web Application Frameworks Sample Stack Implementation
Enterprise Java Web Application Frameworks   Sample Stack ImplementationEnterprise Java Web Application Frameworks   Sample Stack Implementation
Enterprise Java Web Application Frameworks Sample Stack Implementation
 

Último

Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAshyamraj55
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfDianaGray10
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024D Cloud Solutions
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8DianaGray10
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdfPedro Manuel
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxMatsuo Lab
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7DianaGray10
 
Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.YounusS2
 
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfIaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfDaniel Santiago Silva Capera
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureEric D. Schabell
 
20230202 - Introduction to tis-py
20230202 - Introduction to tis-py20230202 - Introduction to tis-py
20230202 - Introduction to tis-pyJamie (Taka) Wang
 
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDEADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDELiveplex
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPathCommunity
 
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UbiTrack UK
 
Designing A Time bound resource download URL
Designing A Time bound resource download URLDesigning A Time bound resource download URL
Designing A Time bound resource download URLRuncy Oommen
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Will Schroeder
 
Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Brian Pichman
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxGDSC PJATK
 
NIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopNIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopBachir Benyammi
 

Último (20)

Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPAAnypoint Code Builder , Google Pub sub connector and MuleSoft RPA
Anypoint Code Builder , Google Pub sub connector and MuleSoft RPA
 
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdfUiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
UiPath Solutions Management Preview - Northern CA Chapter - March 22.pdf
 
Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024Artificial Intelligence & SEO Trends for 2024
Artificial Intelligence & SEO Trends for 2024
 
UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8UiPath Studio Web workshop series - Day 8
UiPath Studio Web workshop series - Day 8
 
Nanopower In Semiconductor Industry.pdf
Nanopower  In Semiconductor Industry.pdfNanopower  In Semiconductor Industry.pdf
Nanopower In Semiconductor Industry.pdf
 
Introduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptxIntroduction to Matsuo Laboratory (ENG).pptx
Introduction to Matsuo Laboratory (ENG).pptx
 
UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7UiPath Studio Web workshop series - Day 7
UiPath Studio Web workshop series - Day 7
 
Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.Basic Building Blocks of Internet of Things.
Basic Building Blocks of Internet of Things.
 
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdfIaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
IaC & GitOps in a Nutshell - a FridayInANuthshell Episode.pdf
 
OpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability AdventureOpenShift Commons Paris - Choose Your Own Observability Adventure
OpenShift Commons Paris - Choose Your Own Observability Adventure
 
20230202 - Introduction to tis-py
20230202 - Introduction to tis-py20230202 - Introduction to tis-py
20230202 - Introduction to tis-py
 
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDEADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
ADOPTING WEB 3 FOR YOUR BUSINESS: A STEP-BY-STEP GUIDE
 
201610817 - edge part1
201610817 - edge part1201610817 - edge part1
201610817 - edge part1
 
UiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation DevelopersUiPath Community: AI for UiPath Automation Developers
UiPath Community: AI for UiPath Automation Developers
 
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
UWB Technology for Enhanced Indoor and Outdoor Positioning in Physiological M...
 
Designing A Time bound resource download URL
Designing A Time bound resource download URLDesigning A Time bound resource download URL
Designing A Time bound resource download URL
 
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
Apres-Cyber - The Data Dilemma: Bridging Offensive Operations and Machine Lea...
 
Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )Building Your Own AI Instance (TBLC AI )
Building Your Own AI Instance (TBLC AI )
 
Cybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptxCybersecurity Workshop #1.pptx
Cybersecurity Workshop #1.pptx
 
NIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 WorkshopNIST Cybersecurity Framework (CSF) 2.0 Workshop
NIST Cybersecurity Framework (CSF) 2.0 Workshop
 

Enterprise Java and SOA

  • 1. ENTERPRISE JAVA & SOA Mert ÇALIŞKAN Doğu Akdeniz Üniversitesi 26.03.2012 Friday, March 23, 12
  • 2. Me? • Mert ÇALIŞKAN • Was working for a Defence Contractor...kind’a boring... • Now Lead SOA Architect @ T2 • Open Source Software (OSS) Advocate Founder and Committer for OS Projects • Member of Apache Software Foundation OpenLogic Expert Community Friday, March 23, 12
  • 3. TO JAVA ? OR NOT ? Come to the Dark Side..! Friday, March 23, 12
  • 4. Agenda • History of Java • Enterprise Java - mesir and its ingredients • SOA, from principles to its elements • Ways to make a better career in/with Java • Q &A Friday, March 23, 12
  • 5. YOU KNOW THIS TRANS-ATLANTIC? Friday, March 23, 12
  • 6. • RMS Titanic sank in North Atlantic Ocean on 15 April, 1912 on maiden voyage So Eventually Everything Dies...! Cool analogy, right? :) • You, Me, All of Us... • Companies, Technologies... • Key point is: You should avoid not making it like Titanic, which sunk in 2hrs and 40 minutes...! Friday, March 23, 12
  • 7. Where it all began... Founded February 24, 1982 Sold to Oracle January 27, 2010 for $7.4 billion..! Sun was mainly selling Hardware, but they also working on computer software like Java, MySQL and NFS.. Founded in 1977 by Larry Ellison and a couple of clever guys, their motivation is to compete with IBM’s System R, which was a relational database. Friday, March 23, 12
  • 8. History of JAVA • Java Language Project started in June 1991 (James Gosling and his fellas) • Running byteCode on Java Virtual Machine • WORA (Write Once, Run Anywhere) • First started with applets in the WEB world • With the dawn of Java Enterprise Edition, Servlets made their way to rule the world. The Duke Friday, March 23, 12
  • 9. Editions of JAVA • Java Card: applets on smart cards (sim cards) • Micro Edition (ME): mobile phones + set-top boxes • Standard Edition (SE): Cool Software Platform • Enterprise Edition (EE): Oracle’s Enterprise Computing Platform • JavaFX: Aim was RIA (looks dead to me) • PersonalJava (discontinued) : Java edition for mobile and embedded systems based on Java 1.1.8 Friday, March 23, 12
  • 10. James Gosling... was the FATHER of Java Age: 68 Age: 57 $$$ makes you look younger..! Larry Ellison... is the new BOSS Friday, March 23, 12
  • 11. CHRONOLOGY OF JAVA SE JDK 1.0 January 23, 1996 JDK 1.1 Introducing February 19, 1997 Abstract Window Toolkit Swing was on Board J2SE 1.2 December 8, 1998 HotSpot JVM J2SE 1.3 May 8, 2000 reg-ex, Java Web Start J2SE 1.4 embedded XML parser February 6, 2002 J2SE 1.5 New Cool Language Features September 30, 2004 Generics, AutoBoxing, var-args & etc... Friday, March 23, 12
  • 12. CHRONOLOGY OF JAVA SE Renamed to Java SE instead of Java SE 6 J2SE from now on. December 11, 2006 Support for running scripting lang. like Rhino. Multi-Catch in Exceptions Java SE 7 String in switch (finally!) July 28, 2011 more cools features in the lang... Best is yet to come..! Java SE 8 lambda expressions... closures... Summer, 2013 Friday, March 23, 12
  • 13. Enterprise JAVA • Java EE = Java Enterprise Edition • Extends Java SE javax.faces.* UI + JSF Related Stuff javax.servlet.* Handling HTTP invocations javax.enterprise.inject.* CDI, Like Spring depedency Inj. javax.ejb.* EJB Stuff javax.validation.* Bean Validation javax.persistence.* Persistency javax.transaction.* Stuff for transactions javax.jms.* Messaging Stuff Friday, March 23, 12
  • 14. CHRONOLOGY OF JAVA EE J2EE 1.2 J2EE 1.3 J2EE 1.4 December 12, 1999 Sept. 12, 2001 Nov. 11, 2003 Servlet 2.2 Servlet 2.3 Servlet 2.4 JSP JAX-WS Java EE 5 Servlet 2.5 EJB JAX-RS May 11, 2006 JMS JAX-B JTA JPA JAAS JSTL Java EE 6 Servlet 3.0 JSF any many December 10, 2009 EL more... Friday, March 23, 12
  • 15. How to choose the frameworks for WEB dev? • Compatible with Model View Controller pattern • Quality & Competency of “The Stack” • Performance & Scalability • Learning Curve & Development Speed ! don’t let cutting edge turn into bleeding edge... • Community Factor & Open Source support (forums-mailing lists & etc.) Friday, March 23, 12
  • 16. Which stack to choose? UI Controller/Dep.Inj. JSF Struts Spring Guice HiveMind Spring MVC WebWork ZK picoContainer XWork Wicket Tapestry GWT Model/Persistence Layer Echo3 Cocoon Vaadin Hibernate iBatis Integration Toplink KODO Apache CXF Apache Axis2 IDE EclipseLink Eclipse IntelliJ Spring WS IDEA JDeveloper NetBEANS Friday, March 23, 12
  • 17. THE STACK of VIEW MAVEN JSF ECLIPSE MYFACES ORCHESTRA Apache CXF MODEL CONTROLLER JPA HIBERNATE SPRING H.SEARCH H.VALIDATOR with SecuRITY ENVERS Friday, March 23, 12
  • 18. • It’s nothing new! not “yet another java framework” • It’s a stack demonstration with OSS • Released on 01.2009 • http://code.google.com/p/mesir • 2000+ downloads • Simple Stupid Model AddressBook Contact id id 1 0..* text name creationDate email contacts phone Friday, March 23, 12
  • 19. Code walk-through with DEMO Friday, March 23, 12
  • 20. SOA Service Oriented Architecture Not SOAP...! Ok, maybe it is... Friday, March 23, 12
  • 21. WHAT SOA IS ? • Stands for Service Oriented Architecture • Software Architecture where the whole information system is regarded as a collection of services interoperated and used freely through a common interface (the service bus) independent of hardware. Friday, March 23, 12
  • 22. WHAT SOA IS NOT ? • It’s NOT a technical standard • It’s NOT a technology • It’s NOT a concrete architecture, but it leads to one. • An application that uses web services is SOA (so wrong!) Friday, March 23, 12
  • 23. AIM OF SOA ? • To INTEGRATE..! • Services should interact, they must exchange information... • Obey the Architectural Principles...! Friday, March 23, 12
  • 24. ARCHITECTURAL PRINCIPLES • Loose Coupling Minimize dependencies between each other, just aware of each other... • Service Contract A set of technical data along with business information XML WS WSDL SLA Schema Policy Friday, March 23, 12
  • 25. ARCHITECTURAL PRINCIPLES • ServiceBlocks on top of Service Abstraction each other to build Service Oriented Environment Composite Services Level of Abstraction Business Services Infrastructure Services • Service Reusability Positioning services as reusable enterprise resources Friday, March 23, 12
  • 26. Service Composability • To re-use the capability of a service to build up composed services A Big Problem Small Small Small Small Small problems Problem Problem Problem Problem collectively represent a big problem Small Small Small Small Problem Problem Problem Problem Friday, March 23, 12
  • 27. Service Composability Small Small Small Small Small Small Small Small Problem Problem Problem Problem Problem Problem Problem Problem A B C D E F G H Solution Logic that each address to solve a problem C Big A F Problem Solved B E D G H Friday, March 23, 12
  • 28. Service Discoverability • Descriptive services that can be accessed via discovery mechanisms • Increase the service re-use... • Services defined with WSDL and registered to services registry • Next Step could be: WADL Web Application Description Language Friday, March 23, 12
  • 29. ARCHITECTURAL ARTIFACTS 4 main artifacts that are used to shape up SOA XML is used to define the data SOAP is used to transfer the data WSDL is used to define the service UDDI is used to list the available services Friday, March 23, 12
  • 30. XML • EXtensible Markup Language • To transport and store data (unlike HTML, which is just to display the data) • Created by W3C (World Wide Web Consortium) 123456 Mr, Mert, Caliskan, Ogretmenler Cad. No 6/A, , Cankaya, Ankara, 06300, Turkey Any idea what this comma separated stuff is? Friday, March 23, 12
  • 31. XML Decompose the data... <order> <orderNo>123456</orderNo> <shipTo> <name>Mr Mert Caliskan</name> <address>Ogretmenler Cad. No 6/A, Cankaya, Ankara, 06300, Turkey</address> </shipTo> </order> Friday, March 23, 12
  • 32. XML Cool but it got more makes more sense now? gibberish than before? <order> ! <orderNo>123456</orderNo> ! <shipTo> how do we validate ! ! <name> ! ! ! <title>Mr</title> this bulk load of string? ! ! ! <firstName>Mert</firstName> ! ! </name> ! ! <address> ! ! ! <addressLine1>Ogretmenler Cad. No 6/A</addressLine1> ! ! ! <addressLine2></addressLine2> ! ! ! <county>Cankaya</country> ! ! ! <city>Ankara</zip> ! ! ! <zip>06500</zip> ! ! ! <country>Turkey</country> ! ! </address> ! </shipTo> </order> Friday, March 23, 12
  • 33. XSD • XML Schema Daefinition <xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://rubiconred.com/obay/xsd/common" targetNamespace="http://rubiconred.com/obay/xsd/common" elementFormDefault="qualified or unqualified"> <xsd:element name="address" type="tAddress"/> <xsd:complexType name="tAddress"> <xsd:sequence> <xsd:element name="addressLine1" type="xsd:string"/> <xsd:element name="addressLine2" type="xsd:string"/> <xsd:element name="city" type="xsd:string"/> <xsd:element name="state" type="xsd:string"/> <xsd:element name="zip" type="xsd:string"/> <xsd:element name="country" type="xsd:string"/> </xsd:sequence> </xsd:complexType> </xsd:schema> Friday, March 23, 12
  • 34. SOAP • Simple Object Access Protocol • Cross platform (platform independent) remote calls (usually over HTTP) with XML messages • Could be done also with SMTP (a.k.a. emailing) Envelope optional required (one or more) Header Body Content Fault Friday, March 23, 12
  • 35. WSDL • Web Service Definition Language / XML Based • Describes the Point of Contact for Service Provider • Defines Structure of messages Physical location of service • No need to generate the WSDL, server is doing that for us... Friday, March 23, 12
  • 36. What Does WSDL Look Like? <definitions name="EndorsementSearch" targetNamespace="http://namespaces.snowboard-info.com" xmlns:es="http://www.snowboard-info.com/EndorsementSearch.wsdl" xmlns:esxsd="http://schemas.snowboard-info.com/EndorsementSearch.xsd" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns="http://schemas.xmlsoap.org/wsdl/"> <!-- omitted types section with content model schema info --> <message name="GetEndorsingBoarderRequest"> <part name="body" element="esxsd:GetEndorsingBoarder"/> </message> <message name="GetEndorsingBoarderResponse"> <part name="body" element="esxsd:GetEndorsingBoarderResponse"/> </message> Your Eyes Hurt, aren’t they? <portType name="GetEndorsingBoarderPortType"> <operation name="GetEndorsingBoarder"> <input message="es:GetEndorsingBoarderRequest"/> <output message="es:GetEndorsingBoarderResponse"/> <fault message="es:GetEndorsingBoarderFault"/> </operation> </portType> <binding name="EndorsementSearchSoapBinding" type="es:GetEndorsingBoarderPortType"> <soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http"/> <operation name="GetEndorsingBoarder"> <soap:operation soapAction="http://www.snowboard-info.com/EndorsementSearch"/> <input> <soap:body use="literal" namespace="http://schemas.snowboard-info.com/EndorsementSearch.xsd"/> </input> <output> <soap:body use="literal" namespace="http://schemas.snowboard-info.com/EndorsementSearch.xsd"/> </output> <fault> <soap:body use="literal" namespace="http://schemas.snowboard-info.com/EndorsementSearch.xsd"/> </fault> </operation> </binding> <service name="EndorsementSearchService"> <documentation>snowboarding-info.com Endorsement Service</documentation> <port name="GetEndorsingBoarderPort" binding="es:EndorsementSearchSoapBinding"> <soap:address location="http://www.snowboard-info.com/EndorsementSearch"/> </port> </service> </definitions> Friday, March 23, 12
  • 37. What Does WSDL Look Like? optional required Service (one or Description more) Type Message PortType Binding Service relates with contains input and knows its output message Operation Port Endpoint Friday, March 23, 12
  • 38. ReST Representational e • Resource Identification through State URI Transfer • Resource: Any "Thing", Anything you would want to point to. • Representation: Serializable description of resource could be images (jpg, png), XML or JSON data • via HTTP Methods GET / PUT / POST / DELETE Friday, March 23, 12
  • 39. ReST Example Requirement: Give me the employee with id: 1234 Old School WS Method Invocation: Employee employeeWS.getEmployee(Long id) Cool ReST way: GET /myApp/employees/1234 HTTP/1.1 Friday, March 23, 12
  • 40. ReST Example Response in JSON: {     "employee": { "id": "481", "name": "Mert", "lastname": "Caliskan", "roles": [ "SOA Architect", "Lazy Developer", "Coding Monkey" ] } Friday, March 23, 12
  • 41. ReST... Final Words... ReST is handy, simple to integrate with. But, Not solving real world problems like Security, Transactions and etc. (WS-* are still in need) Documentation is still needed for resources, representations... (no WSDL remember?) Fact: Everything we do over HTTP is "ReST"...! Friday, March 23, 12
  • 42. ReST is just CRUD • You can expose your DB on WEB :) • Simple & Stupid... HTTP SQL CRUD POST INSERT Create GET SELECT Read PUT UPDATE Update DELETE DELETE Delete Friday, March 23, 12
  • 43. Public WS and ReST to play around http://www.service-repository.com Weather Services Google Questions Movies and many more... For ReST, check out: Friday, March 23, 12
  • 44. Create WS with Annotations • @WebService() Marks a Java class as implementing a Web Service. • @WebMethod(operationName = "add") Customizes a method that is exposed as a Web Service operation. • @WebParam(name = "type") Customizes the parameters of the Operation. Friday, March 23, 12
  • 45. DEMO • Let’s create a couple of Services with JAX-WS (SOAP based) & JAX-RS (REST based) • JAX-WS • JAX-RS } Reference Implementations Friday, March 23, 12
  • 46. WEB SERVICES • Functionality packaged as a single unit exposed to network • WSDL (Web Service Definition Language) / XML based • WSDL 1.1 and WSDL 2.0 versions Service Registry Find Publish Service Service Requestor Bind + Invoke Producer Friday, March 23, 12
  • 47. many vendors out there, so standardization needs to be done..! Friday, March 23, 12
  • 48. THE WS-* STANDARDS WS-Addressing WS-MakeConnection WS-AtomicTransaction WS-Management WS-BPEL WS-Management Catalog WS-BaseFaults WS-MetadataExchange WS-BaseNotification WS-Notification WS-BrokeredNotification WS-Policy WS-BusinessActivity WS-PolicyAssertions WS-CAF WS-PolicyAttachment WS-CDL WS-Provisioning WS-CF WS-RM Policy Assertion WS-Choreography WS-Reliability WS-Context WS-ReliableMessaging WS-Coordination WS-Resource WS-Discovery WS-Resource Framework (WSRF) WS-Enumeration WS-ResourceLifetime WS-Eventing WS-ResourceProperties WS-Federation WS-ResourceTransfer WS-Federation Active Requestor Profile WS-SecureConversation WS-Federation Passive Requestor Profile WS-Security WS-Fragment WS-SecurityPolicy WS-Inspection WS-ServiceGroup Friday, March 23, 12
  • 49. THE STANDARDS WS-Addressing WS-MakeConnection WS-AtomicTransaction WS-Management WS-BPEL WS-Management Catalog WS-BaseFaults WS-MetadataExchange WS-BaseNotification WS-Notification WS-BrokeredNotification WS-Policy WS-BusinessActivity WS-PolicyAssertions 48 WS-CAF WS-PolicyAttachment WS-CDL WS-Provisioning WS-CF WS-RM Policy Assertion WS-Choreography WS-Reliability WS-Context WS-ReliableMessaging WS-Coordination WS-Resource WS-Discovery WS-Resource Framework (WSRF) WS-Enumeration WS-ResourceLifetime WS-Eventing WS-ResourceProperties WS-Federation WS-ResourceTransfer WS-Federation Active Requestor Profile WS-SecureConversation WS-Federation Passive Requestor Profile WS-Security WS-Fragment WS-SecurityPolicy WS-Inspection WS-ServiceGroup Friday, March 23, 12
  • 50. UDDI • Universal Discovery and Directory Interface • Started in early 2000s • XML based Service Discovery Protocol • Think of it as yellow pages • Included in the WS-I standard • Not widely adopted as hoped, Microsoft removed it from Windows Server OS. • OSS implementation: juddi.apache.org Friday, March 23, 12
  • 51. Career in JAVA • Participate in Open Source Be a Contributor / or better, be a Committer • Learn the Language from inside out... • Oracle Certifications are one way to go Java SE 7 Programmer Java EE6 Web Component Developer Java EE6 Enterprise JavaBeans Developer Java EE6 Java Persistence API Developer Java EE6 Web Services Developer Java EE 5 Enterprise Architect Friday, March 23, 12
  • 52. To be a Leader Experience Communication Knowledge Professionalism Creativity Friday, March 23, 12
  • 53. To be a Leader Know broad... Know deep... Experience Communication Knowledge Professionalism Creativity If you know .NET, go ahead and learn Java. If you know Java move to Objective-C, Scala & etc. Know you stuff very well... Friday, March 23, 12
  • 54. To be a Leader Stay Current... Use your knowledge... Experience Communication Knowledge Professionalism Creativity Practice... Practice... Practice... Friday, March 23, 12
  • 55. To be a Leader Be Open-Minded... Experience Communication Knowledge Professionalism Creativity Listen to people’s thoughts.. They’re more valuable than you think..You CANNOT know everything..! Friday, March 23, 12
  • 56. To be a Leader Reject the status quo... Experience Communication Knowledge Professionalism Creativity Don’t be a rebellion but don’t kill the rebellion inside you... Friday, March 23, 12
  • 57. To be a Leader Take and accept the responsibility... Experience Communication Knowledge Professionalism Creativity Make it all in a classy way... Friday, March 23, 12
  • 58. Resume Preparation • People skim resumes... So make it to the point as much as possible • It’s not what you know. It’s what you’ve done with what you know... • Keep it short 1 to 3 sentences, 1 to 3 pages at most Friday, March 23, 12
  • 59. To sum up on career... • You are the one that will be building your OWN career. • Work for your employer and work for yourself also... • Take the time to build your skills: your knowledge, your communication skills, your experience • And don’t kill the child inside you, make it creative as always... • Act Professional, because you have to be a ONE..! Friday, March 23, 12
  • 60. To sum up... • JAVA is still HOT TOPIC... • Oracle is investing on Java so best is yet to come. • SOA is not a hype anymore, big vendors are taking parts in the market with cool tools.. • Take a leap, dive into Java, build your career on it. Friday, March 23, 12
  • 61. Teşekkürler..! mert@t2.com.tr http://www.jroller.com/mert @mertcal Friday, March 23, 12