SlideShare a Scribd company logo
1 of 65
Download to read offline
17-C-5
     Developers Summit 2011
Developers Summit 2011
Developers Summit 2011
Developers Summit 2011
Simple
          Object
               	
Portable Service Abstraction	



     Developers Summit 2011
Developers Summit 2011
Developers Summit 2011
Developers Summit 2011
Developers Summit 2011
Developers Summit 2011
Developers Summit 2011
Developers Summit 2011
Developers Summit 2011
Application
                 	


   Framework
           	


Middle Ware
          	


  OS
   	


H/W
  	



          Developers Summit 2011
Roo/Grails
                       	
	
                                      	

                Spring
                     	


                Servlet
                            	
               	


                 JVM
                   	
     	




          Developers Summit 2011
vSphere	
                                App
                                  	

           App
             	
                                                   App
                                                     	


       vCloud	
                                                          Other Cloud	

App
  	
                                                          App
                                                            	

                               App
                                 	




                          Developers Summit 2011
Force.com                         Your Java App
 Platform
 Services                    Spring & Tomcat
                             VMware vCloud
                             VMware vSphere
    Force.com
     Database




    Developers Summit 2011
Your Java App
                                         Scaling(              ) and Load-
                                         balancing(               ) as a
                                         service
                                         Monitoring(    ) and diagnostics(   )
                                         as a service




                                                          &
          Force.com Database



                                    	


                           Developers Summit 2011
GWT
      	
                                Hyperic

                                                  	

  GAE/J

      Spring
          	




               Developers Summit 2011
Developers Summit 2011
SUSE Linux
             	

      vCloud
           	

     vSphere
           	




Developers Summit 2011
App
                   	
App
  	
                            App
                                  	




        Linux
            	

       vCloud
            	

       vSphere
             	




           Developers Summit 2011
Developers Summit 2011
Developers Summit 2011
Web     Service	
    Data Access	


                              JPA
                            Hibernate
          Spring               JDBC     HSQLDB	

      Spring tc Server




            Developers Summit 2011
@Controller
@RequestMapping("/login.form")
public class LoginController {
  private LoginService loginService;
  @Autowired
  public void setLoginService(LoginService loginService) {
    this.loginService = loginService;
  }
  ...
  @RequestMapping(method = RequestMethod.GET)                                   appContext-web.xml	
  public String setupForm(ModelMap model) {
                                                   <?xml version="1.0" encoding="UTF-8"?>
    if (loginService.isLogin()) {
                                                   <beans ...>
        model.addAttribute("login", loginService.getLoginUser());
        return loginService.getWelcomePage();       <context:component-scan
    } else {                                         base-package="sample.spring.mvc.web" />
                                                    <bean id="messageSource"
        model.addAttribute("login", new LoginBean());
        return loginService.getLoginPage();          class="org.springframework.context.support.
    }                                                   ResourceBundleMessageSource">
  }                                                  <property name="basename" value="messages" />
  …
}
                                                    </bean>
                                          </beans>
                                     Developers Summit 2011
<%@ page language="java" contentType="text/html; charset=Shift_JIS"
   pageEncoding="Shift_JIS" isELIgnored="false" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
<title>Login Page</title>
</head>
<body>
<h1>Login!</h1>
<form:form modelAttribute="login">
<table>
                                                                                  appContext-view.xml	
 <tr>                                           <?xml version="1.0" encoding="UTF-8"?>
   <td>Login Name:</td>
   <td>                                         <beans:beans ...>
     <form:input path="loginname"/>              <annotation-driven />
     <font color="red"><form:errors path="loginname"/></font>
   </td>
                                                 <resources mapping="/resources/**" location="/resources/" />
 </tr>                                           <beans:bean
 ....
 <tr>
                                                  class="org.springframework.web.servlet.view.
                                                    InternalResourceViewResolver">
   <td colspan="2"><input type="submit" name="Login" value="Login"></td>
 </tr>                                            <beans:property name="prefix" value="/WEB-INF/views/" />
</table>
</form:form>                                      <beans:property name="suffix" value=".jsp" />
</body>                                          </beans:bean>
</html>login.jsp	
                   </beans:beans>
                                         Developers Summit 2011
@Service("loginService")
public class LoginServiceImpl implements LoginService {
  @Autowired
  private MemberDao memberDao;
  public void setMemberDao(MemberDao memberDao) {
            this.memberDao = memberDao;
  }

    @Transactional(readOnly=true)
    public boolean login(String loginname, String password) {                     appContext-service.xml	
               List<LoginBean> beans = memberDao.findByLoginname(loginname);
                                                       <?xml version="1.0" encoding="UTF-8"?>
               if (beans.size() > 0) {                 <beans …>
                            LoginBean bean = beans.get(0);
                                                        <context:annotation-config/>
         if (bean.getPassword() != null &&              <context:component-scan
                            bean.getPassword().equals(password)) {
                                                          base-package="sample.spring.mvc.service"/>
             loginManager.setLoginUser(bean);
             return true;                               <bean id="loginManager" scope="session"
         }                                                  class="sample.spring.mvc.service.LoginManager">
               }                                          <aop:scoped-proxy/>
      return false;                                     </bean>
    }                                                  </beans>
}
                                        Developers Summit 2011
@Repository("memberDao")
public class MemberDaoImpl implements MemberDao {
 @PersistenceContext                                                                          appContext-dao.xml	
 EntityManager em;      <?xml version="1.0" encoding="UTF-8"?>
                               <beans…	
                                 <context:annotation-config/>
    public List<LoginBean> findByLoginname(String loginname) {
                                 <context:component-scan base-package="sample.spring.mvc.dao"/>
      Query query = em.createQuery(
                                 <bean id="entityManagerFactory"
                                     class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
       "SELECT l FROM LoginBean l WHERE l.loginname = value="sample" />
                                  <property name="persistenceUnitName" :loginname");
      query.setParameter("loginname", loginname); ref="dataSource"/>
                                  <property name="dataSource"
                                  <property name="jpaVendorAdapter">
      return query.getResultList(); <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter">
    }                                <property name="showSql" value="true" />
                                    </bean>
}                                 </property>
                                 </bean>
                                 <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource">
                                 <property name="driverClassName" value="org.hsqldb.jdbcDriver"/>
                                 <property name="url" value="jdbc:hsqldb:hsql://localhost/"/>
                                 <property name="username" value="sa"/>
                                 <property name="password" value=""/>
                                 </bean>
                                 <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager">
                                  <property name="entityManagerFactory" ref="entityManagerFactory"/>
                                 </bean>
                                 <tx:annotation-driven transaction-manager="transactionManager"/>
                               </beans>
                                               Developers Summit 2011
@Entity
@Table(name="member")
public class LoginBean implements Serializable {
  public LoginBean() {}
  @Id
  @GeneratedValue                 <?xml version="1.0" encoding="UTF-8"?>
  private Long id;                <persistence …>
  @Column(unique=true)             <persistence-unit name="sample"
  private String loginname;           transaction-type="RESOURCE_LOCAL">
                                    <provider>org.hibernate.ejb.HibernatePersistence</provider>
  private String password;
                                    <class>sample.spring.mvc.bean.LoginBean</class>
  @Column(name="name")              <exclude-unlisted-classes>false</exclude-unlisted-classes>
  private String nickname;          <properties>
  …                                   <property name="hibernate.dialect"
}                                        value="org.hibernate.dialect.HSQLDialect" />
                                       </properties>
                                      </persistence-unit>
                                     </persistence>

                                                                             persistence.xml	

                                     Developers Summit 2011
Developers Summit 2011
Developers Summit 2011
Developers Summit 2011
Developers Summit 2011
Web       Service	
    Data Access	


                                JPA
                              Datanucleus Web
                                                API	
            Spring              Connector               Force.com
                                                        Database	
  Spring tc Server on VMForce




              Developers Summit 2011
@Controller
@RequestMapping("/login.form")
public class LoginController {
  private LoginService loginService;
  @Autowired
  public void setLoginService(LoginService loginService) {
    this.loginService = loginService;
  }
  ...
  @RequestMapping(method = RequestMethod.GET)                                   appContext-web.xml	
  public String setupForm(ModelMap model) {
                                                   <?xml version="1.0" encoding="UTF-8"?>
    if (loginService.isLogin()) {
                                                   <beans ...>
        model.addAttribute("login", loginService.getLoginUser());
        return loginService.getWelcomePage();       <context:component-scan
    } else {                                         base-package="sample.spring.mvc.web" />
                                                    <bean id="messageSource"
        model.addAttribute("login", new LoginBean());
        return loginService.getLoginPage();          class="org.springframework.context.support.
    }                                                   ResourceBundleMessageSource">
  }                                                  <property name="basename" value="messages" />
  …
}
                                                    </bean>
                                          </beans>
                                     Developers Summit 2011
<%@ page language="java" contentType="text/html; charset=Shift_JIS"
   pageEncoding="Shift_JIS" isELIgnored="false" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
<title>Login Page</title>
</head>
<body>
<h1>Login!</h1>
<form:form modelAttribute="login">
<table>
                                                                                  appContext-view.xml	
 <tr>                                           <?xml version="1.0" encoding="UTF-8"?>
   <td>Login Name:</td>
   <td>                                         <beans:beans ...>
     <form:input path="loginname"/>              <annotation-driven />
     <font color="red"><form:errors path="loginname"/></font>
   </td>
                                                 <resources mapping="/resources/**" location="/resources/" />
 </tr>                                           <beans:bean
 ....
 <tr>
                                                  class="org.springframework.web.servlet.view.
                                                    InternalResourceViewResolver">
   <td colspan="2"><input type="submit" name="Login" value="Login"></td>
 </tr>                                            <beans:property name="prefix" value="/WEB-INF/views/" />
</table>
</form:form>                                      <beans:property name="suffix" value=".jsp" />
</body>                                          </beans:bean>
</html>login.jsp	
                   </beans:beans>
                                         Developers Summit 2011
@Service("loginService")
public class LoginServiceImpl implements LoginService {
  @Autowired
  private MemberDao memberDao;
  public void setMemberDao(MemberDao memberDao) {
            this.memberDao = memberDao;
  }

    @Transactional(readOnly=true)
    public boolean login(String loginname, String password) {                     appContext-service.xml	
               List<LoginBean> beans = memberDao.findByLoginname(loginname);
                                                       <?xml version="1.0" encoding="UTF-8"?>
               if (beans.size() > 0) {                 <beans …>
                            LoginBean bean = beans.get(0);
                                                        <context:annotation-config/>
         if (bean.getPassword() != null &&              <context:component-scan
                            bean.getPassword().equals(password)) {
                                                          base-package="sample.spring.mvc.service"/>
             loginManager.setLoginUser(bean);
             return true;                               <bean id="loginManager" scope="session"
         }                                                  class="sample.spring.mvc.service.LoginManager">
               }                                          <aop:scoped-proxy/>
      return false;                                     </bean>
    }                                                  </beans>
}
                                        Developers Summit 2011
@Repository("memberDao")
public class MemberDaoImpl implements MemberDao {
 @PersistenceContext
 EntityManager em;

    public List<LoginBean> findByLoginname(String loginname) {
      Query query = em.createQuery(                                          appContext-dao.xml	
       "SELECT l FROM LoginBean l WHERE l.loginname = :loginname");
                      <?xml version="1.0" encoding="UTF-8"?>
                      <beans ...>
      query.setParameter("loginname", loginname);
                       <context:annotation-config/>
      return query.getResultList();
                       <context:component-scan base-package="sample.spring.mvc.dao"/>
    }                  <bean id="entityManagerFactory"
}                         class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
                       <property name="persistenceUnitName" value="sample" />
                      </bean>
                      <bean id="transactionManager"
                          class="org.springframework.orm.jpa.JpaTransactionManager">
                       <property name="entityManagerFactory" ref="entityManagerFactory"/>
                      </bean>
                      <tx:annotation-driven transaction-manager="transactionManager"/>
                     </beans>

                                       Developers Summit 2011
@Entity
@Table(name="member")
public class LoginBean implements Serializable {
                  ID
  public LoginBean() {}
                   String      <?xml version="1.0" encoding="UTF-8" standalone="no"?>

  @Id                       	
 <persistence ...>
                                <persistence-unit name="sample">
  @GeneratedValue(strategy = GenerationType.IDENTITY)
                                 <provider>org.datanucleus.jpa.PersistenceProviderImpl</provider>
  private String id;             <properties>
                                  <property name="datanucleus.Optimistic" value="false"/>
  @Column(unique=true)            <property name="datanucleus.datastoreTransactionDelayOperations" value="true"/>
  private String loginname;       <property name="sfdcConnectionName" value="DefaultSFDCConnection"/>
  private String password;        <property name="datanucleus.ConnectionURL"
                                         value="sfdc:https://xxx.salesforce.com/services/Soap/u/20.0"/>
  //@Column(name="name")          <property name="datanucleus.ConnectionUserName" value="xxx@xxx.com"/>
  private String nickname;        <property name="datanucleus.ConnectionPassword" value="xxxx"/>
  ...                             <property name="datanucleus.autoCreateSchema" value="false"/>
                                  <property name="datanucleus.autoCreateTables" force.com API
                                                                                     value="true"/>
}                                 <property name="datanucleus.autoCreateColumns" value="false"/>
                                  <property name="datanucleus.autoCreateConstraints" value="false"/>
                                                                                                        	
                       	
              <property name="datanucleus.validateTables" value="false"/>
                                       <property name="datanucleus.validateConstraints" value="false"/>
                                       <property name="datanucleus.jpa.addClassTransformer" value="false"/>
                                      </properties>
                                     </persistence-unit>
                                    </persistence>
                                            Developers Summit 2011                               persistence.xml
Developers Summit 2011
Developers Summit 2011
VMForce
 Extension
       	




             Developers Summit 2011
Developers Summit 2011
URL
                                	




                         	


                                     	




Developers Summit 2011
Developers Summit 2011
Developers Summit 2011
Developers Summit 2011
Web   Service	
   Data Access	


                           JPA
                         Datanucleus

        Spring             Connector




          Google AppEngine             BigTable	


         Developers Summit 2011
@Controller
@RequestMapping("/login.form")
public class LoginController {
  private LoginService loginService;
  @Autowired
  public void setLoginService(LoginService loginService) {
    this.loginService = loginService;
  }
  ...
  @RequestMapping(method = RequestMethod.GET)                                   appContext-web.xml	
  public String setupForm(ModelMap model) {
                                                   <?xml version="1.0" encoding="UTF-8"?>
    if (loginService.isLogin()) {
                                                   <beans ...>
        model.addAttribute("login", loginService.getLoginUser());
        return loginService.getWelcomePage();       <context:component-scan
    } else {                                         base-package="sample.spring.mvc.web" />
                                                    <bean id="messageSource"
        model.addAttribute("login", new LoginBean());
        return loginService.getLoginPage();          class="org.springframework.context.support.
    }                                                   ResourceBundleMessageSource">
  }                                                  <property name="basename" value="messages" />
  …
}
                                                    </bean>
                                          </beans>
                                     Developers Summit 2011
<%@ page language="java" contentType="text/html; charset=Shift_JIS"
   pageEncoding="Shift_JIS" isELIgnored="false" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS">
<title>Login Page</title>
</head>
<body>
<h1>Login!</h1>
<form:form modelAttribute="login">
<table>
                                                                                  appContext-view.xml	
 <tr>                                           <?xml version="1.0" encoding="UTF-8"?>
   <td>Login Name:</td>
   <td>                                         <beans:beans ...>
     <form:input path="loginname"/>              <annotation-driven />
     <font color="red"><form:errors path="loginname"/></font>
   </td>
                                                 <resources mapping="/resources/**" location="/resources/" />
 </tr>                                           <beans:bean
 ....
 <tr>
                                                  class="org.springframework.web.servlet.view.
                                                    InternalResourceViewResolver">
   <td colspan="2"><input type="submit" name="Login" value="Login"></td>
 </tr>                                            <beans:property name="prefix" value="/WEB-INF/views/" />
</table>
</form:form>                                      <beans:property name="suffix" value=".jsp" />
</body>                                          </beans:bean>
</html>login.jsp	
                   </beans:beans>
                                         Developers Summit 2011
<?xml version="1.0" encoding="utf-8" standalone="no"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>xxx</application>
<version>2</version>
<sessions-enabled>true</sessions-enabled> 	
</appengine-web-app>
                                           appengine-web.xml	
                                	




                           Developers Summit 2011
@Service("loginService")
public class LoginServiceImpl implements LoginService {
  @Autowired
  private MemberDao memberDao;
  public void setMemberDao(MemberDao memberDao) {
            this.memberDao = memberDao;
  }

    @Transactional(readOnly=true)
    public boolean login(String loginname, String password) {                     appContext-service.xml	
               List<LoginBean> beans = memberDao.findByLoginname(loginname);
                                                       <?xml version="1.0" encoding="UTF-8"?>
               if (beans.size() > 0) {                 <beans …>
                            LoginBean bean = beans.get(0);
                                                        <context:annotation-config/>
         if (bean.getPassword() != null &&              <context:component-scan
                            bean.getPassword().equals(password)) {
                                                          base-package="sample.spring.mvc.service"/>
             loginManager.setLoginUser(bean);
             return true;                               <bean id="loginManager" scope="session"
         }                                                  class="sample.spring.mvc.service.LoginManager">
               }                                          <aop:scoped-proxy/>
      return false;                                     </bean>
    }                                                  </beans>
}
                                        Developers Summit 2011
@Repository("memberDao")
public class MemberDaoImpl implements MemberDao {
 @PersistenceContext
 EntityManager em;

    public List<LoginBean> findByLoginname(String loginname) {
      Query query = em.createQuery(                                           appContext-dao.xml	
       "SELECT l FROM LoginBean l WHERE l.loginname = :loginname");
                      <?xml version="1.0" encoding="UTF-8"?>
                      <beans ...>
      query.setParameter("loginname", loginname);
                       <context:annotation-config/>
      return query.getResultList();
                       <context:component-scan base-package="sample.spring.mvc.dao"/>
    }                  <bean id="entityManagerFactory"
}                         class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean">
                       <property name="persistenceUnitName" value="sample" />
                      </bean>
                      <bean id="transactionManager"
                          class="org.springframework.orm.jpa.JpaTransactionManager">
                       <property name="entityManagerFactory" ref="entityManagerFactory"/>
                      </bean>
                      <tx:annotation-driven transaction-manager="transactionManager"/>
                     </beans>

                                       Developers Summit 2011
@Entity
@Table(name="member")                                                           AppEngine
public class LoginBean implements Serializable {                                     JPA
 public LoginBean() {}                                                                   	

    @Id                       <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    @GeneratedValue(strategy =<persistence …>
                               GenerationType.IDENTITY)
                              <persistence-unit name="sample">
    private String id;         <provider>org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider</provider>
    //@Column(unique=true)     <properties>
    private String loginname;   <property name="datanucleus.NontransactionalRead" value="true"/>
                                <property name="datanucleus.NontransactionalWrite" value="true"/>
    private String password;    <property name="datanucleus.ConnectionURL" value="appengine"/>
    //@Column(name="name")      <property name="datanucleus.ConnectionUserName" value=""/>
    private String nickname;    <property name="datanucleus.ConnectionPassword" value=""/>
                                <property name="datanucleus.autoCreateSchema" value="false"/>
    ...                         <property name="datanucleus.autoCreateTables" value="true"/>
                           	
}                                      <property name="datanucleus.autoCreateColumns" value="false"/>
                                       <property name="datanucleus.autoCreateConstraints" value="false"/>
                                       <property name="datanucleus.validateTables" value="false"/>
                                       <property name="datanucleus.validateConstraints" value="false"/>
                                       <property name="datanucleus.jpa.addClassTransformer" value="false"/>
                                      </properties>
                                     </persistence-unit>
                                     </persistence>
                                              Developers Summit 2011                                persistence.xml
Developers Summit 2011
Developers Summit 2011
Developers Summit 2011
Developers Summit 2011
Developers Summit 2011
Developers Summit 2011
Developers Summit 2011
Developers Summit 2011
Developers Summit 2011
Developers Summit 2011

More Related Content

What's hot

Boston 2011 OTN Developer Days - Java EE 6
Boston 2011 OTN Developer Days - Java EE 6Boston 2011 OTN Developer Days - Java EE 6
Boston 2011 OTN Developer Days - Java EE 6Arun Gupta
 
Liferay Devcon presentation on Workflow & Dynamic Forms
Liferay Devcon presentation on Workflow & Dynamic FormsLiferay Devcon presentation on Workflow & Dynamic Forms
Liferay Devcon presentation on Workflow & Dynamic FormsWillem Vermeer
 
Java server faces
Java server facesJava server faces
Java server facesowli93
 
Introduction to JSF
Introduction toJSFIntroduction toJSF
Introduction to JSFSoftServe
 
Spring Portlet MVC
Spring Portlet MVCSpring Portlet MVC
Spring Portlet MVCJohn Lewis
 
What You Need To Build Cool Enterprise Applications With JSF
What You Need To Build Cool Enterprise Applications With JSFWhat You Need To Build Cool Enterprise Applications With JSF
What You Need To Build Cool Enterprise Applications With JSFMax Katz
 
Spring MVC
Spring MVCSpring MVC
Spring MVCyuvalb
 
J2EE - JSP-Servlet- Container - Components
J2EE - JSP-Servlet- Container - ComponentsJ2EE - JSP-Servlet- Container - Components
J2EE - JSP-Servlet- Container - ComponentsKaml Sah
 
Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014Lou Sacco
 
Java Server Faces (JSF) - Basics
Java Server Faces (JSF) - BasicsJava Server Faces (JSF) - Basics
Java Server Faces (JSF) - BasicsBG Java EE Course
 
JSF Component Behaviors
JSF Component BehaviorsJSF Component Behaviors
JSF Component BehaviorsAndy Schwartz
 
Training in Android with Maven
Training in Android with MavenTraining in Android with Maven
Training in Android with MavenArcadian Learning
 
Gradle 2.2, 2.3 news #jggug
Gradle 2.2, 2.3 news #jggugGradle 2.2, 2.3 news #jggug
Gradle 2.2, 2.3 news #jggugkyon mm
 
Java EE7 Demystified
Java EE7 DemystifiedJava EE7 Demystified
Java EE7 DemystifiedAnkara JUG
 
Integrating ASP.NET AJAX with SharePoint
Integrating ASP.NET AJAX with SharePointIntegrating ASP.NET AJAX with SharePoint
Integrating ASP.NET AJAX with SharePointRob Windsor
 
Java EE 8 Web Frameworks: A Look at JSF vs MVC
Java EE 8 Web Frameworks: A Look at JSF vs MVCJava EE 8 Web Frameworks: A Look at JSF vs MVC
Java EE 8 Web Frameworks: A Look at JSF vs MVCJosh Juneau
 

What's hot (20)

Boston 2011 OTN Developer Days - Java EE 6
Boston 2011 OTN Developer Days - Java EE 6Boston 2011 OTN Developer Days - Java EE 6
Boston 2011 OTN Developer Days - Java EE 6
 
Jsf Framework
Jsf FrameworkJsf Framework
Jsf Framework
 
Liferay Devcon presentation on Workflow & Dynamic Forms
Liferay Devcon presentation on Workflow & Dynamic FormsLiferay Devcon presentation on Workflow & Dynamic Forms
Liferay Devcon presentation on Workflow & Dynamic Forms
 
Jsf intro
Jsf introJsf intro
Jsf intro
 
Java server faces
Java server facesJava server faces
Java server faces
 
Introduction to JSF
Introduction toJSFIntroduction toJSF
Introduction to JSF
 
Spring Portlet MVC
Spring Portlet MVCSpring Portlet MVC
Spring Portlet MVC
 
What You Need To Build Cool Enterprise Applications With JSF
What You Need To Build Cool Enterprise Applications With JSFWhat You Need To Build Cool Enterprise Applications With JSF
What You Need To Build Cool Enterprise Applications With JSF
 
Spring MVC
Spring MVCSpring MVC
Spring MVC
 
J2EE - JSP-Servlet- Container - Components
J2EE - JSP-Servlet- Container - ComponentsJ2EE - JSP-Servlet- Container - Components
J2EE - JSP-Servlet- Container - Components
 
Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014Meteor Meet-up San Diego December 2014
Meteor Meet-up San Diego December 2014
 
Java Server Faces (JSF) - Basics
Java Server Faces (JSF) - BasicsJava Server Faces (JSF) - Basics
Java Server Faces (JSF) - Basics
 
JSF Component Behaviors
JSF Component BehaviorsJSF Component Behaviors
JSF Component Behaviors
 
Javabeans .pdf
Javabeans .pdfJavabeans .pdf
Javabeans .pdf
 
Training in Android with Maven
Training in Android with MavenTraining in Android with Maven
Training in Android with Maven
 
Gradle 2.2, 2.3 news #jggug
Gradle 2.2, 2.3 news #jggugGradle 2.2, 2.3 news #jggug
Gradle 2.2, 2.3 news #jggug
 
Java EE7 Demystified
Java EE7 DemystifiedJava EE7 Demystified
Java EE7 Demystified
 
Unit 07: Design Patterns and Frameworks (3/3)
Unit 07: Design Patterns and Frameworks (3/3)Unit 07: Design Patterns and Frameworks (3/3)
Unit 07: Design Patterns and Frameworks (3/3)
 
Integrating ASP.NET AJAX with SharePoint
Integrating ASP.NET AJAX with SharePointIntegrating ASP.NET AJAX with SharePoint
Integrating ASP.NET AJAX with SharePoint
 
Java EE 8 Web Frameworks: A Look at JSF vs MVC
Java EE 8 Web Frameworks: A Look at JSF vs MVCJava EE 8 Web Frameworks: A Look at JSF vs MVC
Java EE 8 Web Frameworks: A Look at JSF vs MVC
 

Viewers also liked

Ο κόσμος από ψηλά
Ο κόσμος από ψηλάΟ κόσμος από ψηλά
Ο κόσμος από ψηλάnicodimosnis
 
Bike To Work Slides
Bike To Work SlidesBike To Work Slides
Bike To Work Slidessteverose76
 
Interactive Essay
Interactive EssayInteractive Essay
Interactive Essaysteverose76
 
9. TRIPLE PRODUCTO ESCALAR
9. TRIPLE PRODUCTO ESCALAR9. TRIPLE PRODUCTO ESCALAR
9. TRIPLE PRODUCTO ESCALARedvinogo
 

Viewers also liked (7)

Slideshow
SlideshowSlideshow
Slideshow
 
Signs
SignsSigns
Signs
 
Ο κόσμος από ψηλά
Ο κόσμος από ψηλάΟ κόσμος από ψηλά
Ο κόσμος από ψηλά
 
Bodylanguage
BodylanguageBodylanguage
Bodylanguage
 
Bike To Work Slides
Bike To Work SlidesBike To Work Slides
Bike To Work Slides
 
Interactive Essay
Interactive EssayInteractive Essay
Interactive Essay
 
9. TRIPLE PRODUCTO ESCALAR
9. TRIPLE PRODUCTO ESCALAR9. TRIPLE PRODUCTO ESCALAR
9. TRIPLE PRODUCTO ESCALAR
 

Similar to Spring as a Cloud Platform (Developer Summit 2011 17-C-5)

SpringBootCompleteBootcamp.pptx
SpringBootCompleteBootcamp.pptxSpringBootCompleteBootcamp.pptx
SpringBootCompleteBootcamp.pptxSUFYAN SATTAR
 
Deploying applications to Cloud with Google App Engine
Deploying applications to Cloud with Google App EngineDeploying applications to Cloud with Google App Engine
Deploying applications to Cloud with Google App EngineAlexander Zamkovyi
 
Jsp (java server page)
Jsp (java server page)Jsp (java server page)
Jsp (java server page)Chitrank Dixit
 
PUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBootPUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBootJosué Neis
 
Modular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJSModular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJSGunnar Hillert
 
A Walking Tour of (almost) all of Springdom
A Walking Tour of (almost) all of Springdom A Walking Tour of (almost) all of Springdom
A Walking Tour of (almost) all of Springdom Joshua Long
 
Introduction to using jQuery with SharePoint
Introduction to using jQuery with SharePointIntroduction to using jQuery with SharePoint
Introduction to using jQuery with SharePointRene Modery
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applicationshchen1
 
Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5Tuna Tore
 
springmvc-150923124312-lva1-app6892
springmvc-150923124312-lva1-app6892springmvc-150923124312-lva1-app6892
springmvc-150923124312-lva1-app6892Tuna Tore
 
JavaServer Faces 2.0 - JavaOne India 2011
JavaServer Faces 2.0 - JavaOne India 2011JavaServer Faces 2.0 - JavaOne India 2011
JavaServer Faces 2.0 - JavaOne India 2011Arun Gupta
 
Project Presentation on Advance Java
Project Presentation on Advance JavaProject Presentation on Advance Java
Project Presentation on Advance JavaVikas Goyal
 
Java Web Programming on Google Cloud Platform [1/3] : Google App Engine
Java Web Programming on Google Cloud Platform [1/3] : Google App EngineJava Web Programming on Google Cloud Platform [1/3] : Google App Engine
Java Web Programming on Google Cloud Platform [1/3] : Google App EngineIMC Institute
 
Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010
Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010
Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010Arun Gupta
 

Similar to Spring as a Cloud Platform (Developer Summit 2011 17-C-5) (20)

SpringBootCompleteBootcamp.pptx
SpringBootCompleteBootcamp.pptxSpringBootCompleteBootcamp.pptx
SpringBootCompleteBootcamp.pptx
 
Deploying applications to Cloud with Google App Engine
Deploying applications to Cloud with Google App EngineDeploying applications to Cloud with Google App Engine
Deploying applications to Cloud with Google App Engine
 
Jsp (java server page)
Jsp (java server page)Jsp (java server page)
Jsp (java server page)
 
PUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBootPUC SE Day 2019 - SpringBoot
PUC SE Day 2019 - SpringBoot
 
Modular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJSModular Test-driven SPAs with Spring and AngularJS
Modular Test-driven SPAs with Spring and AngularJS
 
A Walking Tour of (almost) all of Springdom
A Walking Tour of (almost) all of Springdom A Walking Tour of (almost) all of Springdom
A Walking Tour of (almost) all of Springdom
 
Introduction to using jQuery with SharePoint
Introduction to using jQuery with SharePointIntroduction to using jQuery with SharePoint
Introduction to using jQuery with SharePoint
 
JSF 2.0 Preview
JSF 2.0 PreviewJSF 2.0 Preview
JSF 2.0 Preview
 
WebGUI Developers Workshop
WebGUI Developers WorkshopWebGUI Developers Workshop
WebGUI Developers Workshop
 
AJppt.pptx
AJppt.pptxAJppt.pptx
AJppt.pptx
 
Developing Java Web Applications
Developing Java Web ApplicationsDeveloping Java Web Applications
Developing Java Web Applications
 
Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5Java Spring MVC Framework with AngularJS by Google and HTML5
Java Spring MVC Framework with AngularJS by Google and HTML5
 
springmvc-150923124312-lva1-app6892
springmvc-150923124312-lva1-app6892springmvc-150923124312-lva1-app6892
springmvc-150923124312-lva1-app6892
 
JavaServer Faces 2.0 - JavaOne India 2011
JavaServer Faces 2.0 - JavaOne India 2011JavaServer Faces 2.0 - JavaOne India 2011
JavaServer Faces 2.0 - JavaOne India 2011
 
Project Presentation on Advance Java
Project Presentation on Advance JavaProject Presentation on Advance Java
Project Presentation on Advance Java
 
Jsf
JsfJsf
Jsf
 
Java Web Programming on Google Cloud Platform [1/3] : Google App Engine
Java Web Programming on Google Cloud Platform [1/3] : Google App EngineJava Web Programming on Google Cloud Platform [1/3] : Google App Engine
Java Web Programming on Google Cloud Platform [1/3] : Google App Engine
 
Resthub
ResthubResthub
Resthub
 
Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010
Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010
Servlets 3.0 - Asynchronous, Extensibility, Ease-of-use @ JavaOne Brazil 2010
 
Spring Boot
Spring BootSpring Boot
Spring Boot
 

Recently uploaded

Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Manik S Magar
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .Alan Dix
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch TuesdayIvanti
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Scott Andery
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesKari Kakkonen
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPathCommunity
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsNathaniel Shimoni
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024BookNet Canada
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxLoriGlavin3
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demoHarshalMandlekar2
 
Fact vs. Fiction: Autodetecting Hallucinations in LLMs
Fact vs. Fiction: Autodetecting Hallucinations in LLMsFact vs. Fiction: Autodetecting Hallucinations in LLMs
Fact vs. Fiction: Autodetecting Hallucinations in LLMsZilliz
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Strongerpanagenda
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 3652toLead Limited
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...AliaaTarek5
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 

Recently uploaded (20)

Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!Anypoint Exchange: It’s Not Just a Repo!
Anypoint Exchange: It’s Not Just a Repo!
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .From Family Reminiscence to Scholarly Archive .
From Family Reminiscence to Scholarly Archive .
 
2024 April Patch Tuesday
2024 April Patch Tuesday2024 April Patch Tuesday
2024 April Patch Tuesday
 
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
Enhancing User Experience - Exploring the Latest Features of Tallyman Axis Lo...
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Testing tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examplesTesting tools and AI - ideas what to try with some tool examples
Testing tools and AI - ideas what to try with some tool examples
 
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
UiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to HeroUiPath Community: Communication Mining from Zero to Hero
UiPath Community: Communication Mining from Zero to Hero
 
Time Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directionsTime Series Foundation Models - current state and future directions
Time Series Foundation Models - current state and future directions
 
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: BNC CataList - Tech Forum 2024
 
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptxMerck Moving Beyond Passwords: FIDO Paris Seminar.pptx
Merck Moving Beyond Passwords: FIDO Paris Seminar.pptx
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Sample pptx for embedding into website for demo
Sample pptx for embedding into website for demoSample pptx for embedding into website for demo
Sample pptx for embedding into website for demo
 
Fact vs. Fiction: Autodetecting Hallucinations in LLMs
Fact vs. Fiction: Autodetecting Hallucinations in LLMsFact vs. Fiction: Autodetecting Hallucinations in LLMs
Fact vs. Fiction: Autodetecting Hallucinations in LLMs
 
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better StrongerModern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
Modern Roaming for Notes and Nomad – Cheaper Faster Better Stronger
 
Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365Ensuring Technical Readiness For Copilot in Microsoft 365
Ensuring Technical Readiness For Copilot in Microsoft 365
 
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
(How to Program) Paul Deitel, Harvey Deitel-Java How to Program, Early Object...
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 

Spring as a Cloud Platform (Developer Summit 2011 17-C-5)

  • 1. 17-C-5 Developers Summit 2011
  • 5. Simple Object Portable Service Abstraction Developers Summit 2011
  • 14. Application Framework Middle Ware OS H/W Developers Summit 2011
  • 15. Roo/Grails Spring Servlet JVM Developers Summit 2011
  • 16. vSphere App App App vCloud Other Cloud App App App Developers Summit 2011
  • 17. Force.com Your Java App Platform Services Spring & Tomcat VMware vCloud VMware vSphere Force.com Database Developers Summit 2011
  • 18. Your Java App Scaling( ) and Load- balancing( ) as a service Monitoring( ) and diagnostics( ) as a service & Force.com Database Developers Summit 2011
  • 19. GWT Hyperic GAE/J Spring Developers Summit 2011
  • 21. SUSE Linux vCloud vSphere Developers Summit 2011
  • 22. App App App Linux vCloud vSphere Developers Summit 2011
  • 25. Web Service Data Access JPA Hibernate Spring JDBC HSQLDB Spring tc Server Developers Summit 2011
  • 26. @Controller @RequestMapping("/login.form") public class LoginController { private LoginService loginService; @Autowired public void setLoginService(LoginService loginService) { this.loginService = loginService; } ... @RequestMapping(method = RequestMethod.GET) appContext-web.xml public String setupForm(ModelMap model) { <?xml version="1.0" encoding="UTF-8"?> if (loginService.isLogin()) { <beans ...> model.addAttribute("login", loginService.getLoginUser()); return loginService.getWelcomePage(); <context:component-scan } else { base-package="sample.spring.mvc.web" /> <bean id="messageSource" model.addAttribute("login", new LoginBean()); return loginService.getLoginPage(); class="org.springframework.context.support. } ResourceBundleMessageSource"> } <property name="basename" value="messages" /> … } </bean> </beans> Developers Summit 2011
  • 27. <%@ page language="java" contentType="text/html; charset=Shift_JIS" pageEncoding="Shift_JIS" isELIgnored="false" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS"> <title>Login Page</title> </head> <body> <h1>Login!</h1> <form:form modelAttribute="login"> <table> appContext-view.xml <tr> <?xml version="1.0" encoding="UTF-8"?> <td>Login Name:</td> <td> <beans:beans ...> <form:input path="loginname"/> <annotation-driven /> <font color="red"><form:errors path="loginname"/></font> </td> <resources mapping="/resources/**" location="/resources/" /> </tr> <beans:bean .... <tr> class="org.springframework.web.servlet.view. InternalResourceViewResolver"> <td colspan="2"><input type="submit" name="Login" value="Login"></td> </tr> <beans:property name="prefix" value="/WEB-INF/views/" /> </table> </form:form> <beans:property name="suffix" value=".jsp" /> </body> </beans:bean> </html>login.jsp </beans:beans> Developers Summit 2011
  • 28. @Service("loginService") public class LoginServiceImpl implements LoginService { @Autowired private MemberDao memberDao; public void setMemberDao(MemberDao memberDao) { this.memberDao = memberDao; } @Transactional(readOnly=true) public boolean login(String loginname, String password) { appContext-service.xml List<LoginBean> beans = memberDao.findByLoginname(loginname); <?xml version="1.0" encoding="UTF-8"?> if (beans.size() > 0) { <beans …> LoginBean bean = beans.get(0); <context:annotation-config/> if (bean.getPassword() != null && <context:component-scan bean.getPassword().equals(password)) { base-package="sample.spring.mvc.service"/> loginManager.setLoginUser(bean); return true; <bean id="loginManager" scope="session" } class="sample.spring.mvc.service.LoginManager"> } <aop:scoped-proxy/> return false; </bean> } </beans> } Developers Summit 2011
  • 29. @Repository("memberDao") public class MemberDaoImpl implements MemberDao { @PersistenceContext appContext-dao.xml EntityManager em; <?xml version="1.0" encoding="UTF-8"?> <beans… <context:annotation-config/> public List<LoginBean> findByLoginname(String loginname) { <context:component-scan base-package="sample.spring.mvc.dao"/> Query query = em.createQuery( <bean id="entityManagerFactory" class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> "SELECT l FROM LoginBean l WHERE l.loginname = value="sample" /> <property name="persistenceUnitName" :loginname"); query.setParameter("loginname", loginname); ref="dataSource"/> <property name="dataSource" <property name="jpaVendorAdapter"> return query.getResultList(); <bean class="org.springframework.orm.jpa.vendor.HibernateJpaVendorAdapter"> } <property name="showSql" value="true" /> </bean> } </property> </bean> <bean id="dataSource" class="org.springframework.jdbc.datasource.DriverManagerDataSource"> <property name="driverClassName" value="org.hsqldb.jdbcDriver"/> <property name="url" value="jdbc:hsqldb:hsql://localhost/"/> <property name="username" value="sa"/> <property name="password" value=""/> </bean> <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"> <property name="entityManagerFactory" ref="entityManagerFactory"/> </bean> <tx:annotation-driven transaction-manager="transactionManager"/> </beans> Developers Summit 2011
  • 30. @Entity @Table(name="member") public class LoginBean implements Serializable { public LoginBean() {} @Id @GeneratedValue <?xml version="1.0" encoding="UTF-8"?> private Long id; <persistence …> @Column(unique=true) <persistence-unit name="sample" private String loginname; transaction-type="RESOURCE_LOCAL"> <provider>org.hibernate.ejb.HibernatePersistence</provider> private String password; <class>sample.spring.mvc.bean.LoginBean</class> @Column(name="name") <exclude-unlisted-classes>false</exclude-unlisted-classes> private String nickname; <properties> … <property name="hibernate.dialect" } value="org.hibernate.dialect.HSQLDialect" /> </properties> </persistence-unit> </persistence> persistence.xml Developers Summit 2011
  • 35. Web Service Data Access JPA Datanucleus Web API Spring Connector Force.com Database Spring tc Server on VMForce Developers Summit 2011
  • 36. @Controller @RequestMapping("/login.form") public class LoginController { private LoginService loginService; @Autowired public void setLoginService(LoginService loginService) { this.loginService = loginService; } ... @RequestMapping(method = RequestMethod.GET) appContext-web.xml public String setupForm(ModelMap model) { <?xml version="1.0" encoding="UTF-8"?> if (loginService.isLogin()) { <beans ...> model.addAttribute("login", loginService.getLoginUser()); return loginService.getWelcomePage(); <context:component-scan } else { base-package="sample.spring.mvc.web" /> <bean id="messageSource" model.addAttribute("login", new LoginBean()); return loginService.getLoginPage(); class="org.springframework.context.support. } ResourceBundleMessageSource"> } <property name="basename" value="messages" /> … } </bean> </beans> Developers Summit 2011
  • 37. <%@ page language="java" contentType="text/html; charset=Shift_JIS" pageEncoding="Shift_JIS" isELIgnored="false" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS"> <title>Login Page</title> </head> <body> <h1>Login!</h1> <form:form modelAttribute="login"> <table> appContext-view.xml <tr> <?xml version="1.0" encoding="UTF-8"?> <td>Login Name:</td> <td> <beans:beans ...> <form:input path="loginname"/> <annotation-driven /> <font color="red"><form:errors path="loginname"/></font> </td> <resources mapping="/resources/**" location="/resources/" /> </tr> <beans:bean .... <tr> class="org.springframework.web.servlet.view. InternalResourceViewResolver"> <td colspan="2"><input type="submit" name="Login" value="Login"></td> </tr> <beans:property name="prefix" value="/WEB-INF/views/" /> </table> </form:form> <beans:property name="suffix" value=".jsp" /> </body> </beans:bean> </html>login.jsp </beans:beans> Developers Summit 2011
  • 38. @Service("loginService") public class LoginServiceImpl implements LoginService { @Autowired private MemberDao memberDao; public void setMemberDao(MemberDao memberDao) { this.memberDao = memberDao; } @Transactional(readOnly=true) public boolean login(String loginname, String password) { appContext-service.xml List<LoginBean> beans = memberDao.findByLoginname(loginname); <?xml version="1.0" encoding="UTF-8"?> if (beans.size() > 0) { <beans …> LoginBean bean = beans.get(0); <context:annotation-config/> if (bean.getPassword() != null && <context:component-scan bean.getPassword().equals(password)) { base-package="sample.spring.mvc.service"/> loginManager.setLoginUser(bean); return true; <bean id="loginManager" scope="session" } class="sample.spring.mvc.service.LoginManager"> } <aop:scoped-proxy/> return false; </bean> } </beans> } Developers Summit 2011
  • 39. @Repository("memberDao") public class MemberDaoImpl implements MemberDao { @PersistenceContext EntityManager em; public List<LoginBean> findByLoginname(String loginname) { Query query = em.createQuery( appContext-dao.xml "SELECT l FROM LoginBean l WHERE l.loginname = :loginname"); <?xml version="1.0" encoding="UTF-8"?> <beans ...> query.setParameter("loginname", loginname); <context:annotation-config/> return query.getResultList(); <context:component-scan base-package="sample.spring.mvc.dao"/> } <bean id="entityManagerFactory" } class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> <property name="persistenceUnitName" value="sample" /> </bean> <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"> <property name="entityManagerFactory" ref="entityManagerFactory"/> </bean> <tx:annotation-driven transaction-manager="transactionManager"/> </beans> Developers Summit 2011
  • 40. @Entity @Table(name="member") public class LoginBean implements Serializable { ID public LoginBean() {} String <?xml version="1.0" encoding="UTF-8" standalone="no"?> @Id <persistence ...> <persistence-unit name="sample"> @GeneratedValue(strategy = GenerationType.IDENTITY) <provider>org.datanucleus.jpa.PersistenceProviderImpl</provider> private String id; <properties> <property name="datanucleus.Optimistic" value="false"/> @Column(unique=true) <property name="datanucleus.datastoreTransactionDelayOperations" value="true"/> private String loginname; <property name="sfdcConnectionName" value="DefaultSFDCConnection"/> private String password; <property name="datanucleus.ConnectionURL" value="sfdc:https://xxx.salesforce.com/services/Soap/u/20.0"/> //@Column(name="name") <property name="datanucleus.ConnectionUserName" value="xxx@xxx.com"/> private String nickname; <property name="datanucleus.ConnectionPassword" value="xxxx"/> ... <property name="datanucleus.autoCreateSchema" value="false"/> <property name="datanucleus.autoCreateTables" force.com API value="true"/> } <property name="datanucleus.autoCreateColumns" value="false"/> <property name="datanucleus.autoCreateConstraints" value="false"/> <property name="datanucleus.validateTables" value="false"/> <property name="datanucleus.validateConstraints" value="false"/> <property name="datanucleus.jpa.addClassTransformer" value="false"/> </properties> </persistence-unit> </persistence> Developers Summit 2011 persistence.xml
  • 43. VMForce Extension Developers Summit 2011
  • 45. URL Developers Summit 2011
  • 49. Web Service Data Access JPA Datanucleus Spring Connector Google AppEngine BigTable Developers Summit 2011
  • 50. @Controller @RequestMapping("/login.form") public class LoginController { private LoginService loginService; @Autowired public void setLoginService(LoginService loginService) { this.loginService = loginService; } ... @RequestMapping(method = RequestMethod.GET) appContext-web.xml public String setupForm(ModelMap model) { <?xml version="1.0" encoding="UTF-8"?> if (loginService.isLogin()) { <beans ...> model.addAttribute("login", loginService.getLoginUser()); return loginService.getWelcomePage(); <context:component-scan } else { base-package="sample.spring.mvc.web" /> <bean id="messageSource" model.addAttribute("login", new LoginBean()); return loginService.getLoginPage(); class="org.springframework.context.support. } ResourceBundleMessageSource"> } <property name="basename" value="messages" /> … } </bean> </beans> Developers Summit 2011
  • 51. <%@ page language="java" contentType="text/html; charset=Shift_JIS" pageEncoding="Shift_JIS" isELIgnored="false" %> <%@ taglib prefix="form" uri="http://www.springframework.org/tags/form"%> <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=Shift_JIS"> <title>Login Page</title> </head> <body> <h1>Login!</h1> <form:form modelAttribute="login"> <table> appContext-view.xml <tr> <?xml version="1.0" encoding="UTF-8"?> <td>Login Name:</td> <td> <beans:beans ...> <form:input path="loginname"/> <annotation-driven /> <font color="red"><form:errors path="loginname"/></font> </td> <resources mapping="/resources/**" location="/resources/" /> </tr> <beans:bean .... <tr> class="org.springframework.web.servlet.view. InternalResourceViewResolver"> <td colspan="2"><input type="submit" name="Login" value="Login"></td> </tr> <beans:property name="prefix" value="/WEB-INF/views/" /> </table> </form:form> <beans:property name="suffix" value=".jsp" /> </body> </beans:bean> </html>login.jsp </beans:beans> Developers Summit 2011
  • 52. <?xml version="1.0" encoding="utf-8" standalone="no"?> <appengine-web-app xmlns="http://appengine.google.com/ns/1.0"> <application>xxx</application> <version>2</version> <sessions-enabled>true</sessions-enabled> </appengine-web-app> appengine-web.xml Developers Summit 2011
  • 53. @Service("loginService") public class LoginServiceImpl implements LoginService { @Autowired private MemberDao memberDao; public void setMemberDao(MemberDao memberDao) { this.memberDao = memberDao; } @Transactional(readOnly=true) public boolean login(String loginname, String password) { appContext-service.xml List<LoginBean> beans = memberDao.findByLoginname(loginname); <?xml version="1.0" encoding="UTF-8"?> if (beans.size() > 0) { <beans …> LoginBean bean = beans.get(0); <context:annotation-config/> if (bean.getPassword() != null && <context:component-scan bean.getPassword().equals(password)) { base-package="sample.spring.mvc.service"/> loginManager.setLoginUser(bean); return true; <bean id="loginManager" scope="session" } class="sample.spring.mvc.service.LoginManager"> } <aop:scoped-proxy/> return false; </bean> } </beans> } Developers Summit 2011
  • 54. @Repository("memberDao") public class MemberDaoImpl implements MemberDao { @PersistenceContext EntityManager em; public List<LoginBean> findByLoginname(String loginname) { Query query = em.createQuery( appContext-dao.xml "SELECT l FROM LoginBean l WHERE l.loginname = :loginname"); <?xml version="1.0" encoding="UTF-8"?> <beans ...> query.setParameter("loginname", loginname); <context:annotation-config/> return query.getResultList(); <context:component-scan base-package="sample.spring.mvc.dao"/> } <bean id="entityManagerFactory" } class="org.springframework.orm.jpa.LocalContainerEntityManagerFactoryBean"> <property name="persistenceUnitName" value="sample" /> </bean> <bean id="transactionManager" class="org.springframework.orm.jpa.JpaTransactionManager"> <property name="entityManagerFactory" ref="entityManagerFactory"/> </bean> <tx:annotation-driven transaction-manager="transactionManager"/> </beans> Developers Summit 2011
  • 55. @Entity @Table(name="member") AppEngine public class LoginBean implements Serializable { JPA public LoginBean() {} @Id <?xml version="1.0" encoding="UTF-8" standalone="no"?> @GeneratedValue(strategy =<persistence …> GenerationType.IDENTITY) <persistence-unit name="sample"> private String id; <provider>org.datanucleus.store.appengine.jpa.DatastorePersistenceProvider</provider> //@Column(unique=true) <properties> private String loginname; <property name="datanucleus.NontransactionalRead" value="true"/> <property name="datanucleus.NontransactionalWrite" value="true"/> private String password; <property name="datanucleus.ConnectionURL" value="appengine"/> //@Column(name="name") <property name="datanucleus.ConnectionUserName" value=""/> private String nickname; <property name="datanucleus.ConnectionPassword" value=""/> <property name="datanucleus.autoCreateSchema" value="false"/> ... <property name="datanucleus.autoCreateTables" value="true"/> } <property name="datanucleus.autoCreateColumns" value="false"/> <property name="datanucleus.autoCreateConstraints" value="false"/> <property name="datanucleus.validateTables" value="false"/> <property name="datanucleus.validateConstraints" value="false"/> <property name="datanucleus.jpa.addClassTransformer" value="false"/> </properties> </persistence-unit> </persistence> Developers Summit 2011 persistence.xml