SlideShare a Scribd company logo
Pick	
  Your	
  Java	
  EE	
  Front	
  End	
  
JavaServer	
  Faces	
  or	
  Model-­‐View-­‐Controller	
  
Manfred	
  Riem	
  
Principal	
  Member	
  of	
  Staff	
  
@mnriem	
  
Copyright	
  ©	
  2015,	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |	
  
Copyright	
  ©	
  2015,	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |	
  
Safe	
  Harbor	
  Statement	
  
The	
  following	
  is	
  intended	
  to	
  outline	
  our	
  general	
  product	
  direcQon.	
  It	
  is	
  intended	
  for	
  
informaQon	
  purposes	
  only,	
  and	
  may	
  not	
  be	
  incorporated	
  into	
  any	
  contract.	
  It	
  is	
  not	
  a	
  
commitment	
  to	
  deliver	
  any	
  material,	
  code,	
  or	
  funcQonality,	
  and	
  should	
  not	
  be	
  relied	
  upon	
  
in	
  making	
  purchasing	
  decisions.	
  The	
  development,	
  release,	
  and	
  Qming	
  of	
  any	
  features	
  or	
  
funcQonality	
  described	
  for	
  Oracle’s	
  products	
  remains	
  at	
  the	
  sole	
  discreQon	
  of	
  Oracle.	
  
4	
  
Copyright	
  ©	
  2015,	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |	
  
Program	
  Agenda	
  
What	
  is	
  currently	
  available?	
  
JSF	
  2.3	
  
MVC	
  1.0	
  
How	
  to	
  contribute	
  
Closing	
  remarks	
  
1	
  
2	
  
3	
  
4	
  
5	
  
5	
  
Copyright	
  ©	
  2015,	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |	
  
Program	
  Agenda	
  
What	
  is	
  currently	
  available?	
  
JSF	
  2.3	
  
MVC	
  1.0	
  
How	
  to	
  contribute	
  
Closing	
  remarks	
  
1	
  
2	
  
3	
  
4	
  
5	
  
6	
  
Copyright	
  ©	
  2015,	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |	
  
What	
  is	
  currently	
  available?	
  
•  Glassfish	
  4.1	
  
– Reference	
  implementaQon	
  of	
  JavaEE	
  7,	
  which	
  includes	
  JSF	
  2.2.	
  
•  WLS	
  12.2.1	
  
– Coming	
  soon	
  
•  Other	
  vendors	
  
– Some	
  have	
  already	
  released	
  
– Some	
  have	
  announced	
  when	
  they	
  are	
  going	
  to	
  be	
  available	
  
7	
  
Copyright	
  ©	
  2015,	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |	
  
What	
  is	
  currently	
  available	
  (cont.)	
  ?	
  
•  JSF	
  2.2	
  
– Resource	
  library	
  contracts	
  
– Stateless	
  views	
  
– CSRF	
  protecQon	
  
– File	
  upload	
  
– Faces	
  flows	
  
8	
  
Copyright	
  ©	
  2015,	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |	
   9	
  
<f:view	
  contracts=“#{contractBean.contract}”>	
  
	
  
	
  	
  <ui:composition	
  template=“/template.xhtml”>	
  
	
  
	
  	
  	
  	
  <ui:define	
  name=“content”>	
  
	
  	
  	
  	
  	
  	
  main	
  content	
  
	
  	
  	
  	
  </ui:define>	
  
	
  
	
  	
  	
  	
  <ui:define	
  name=“footer”>	
  
	
  	
  	
  	
  	
  	
  footer	
  info	
  
	
  	
  	
  	
  </ui:define>	
  
	
  
	
  	
  </ui:composition>	
  
	
  
</f:view>	
  
JSF	
  2.2	
  Resource	
  library	
  contracts	
  (using	
  HTML	
  page)	
  
Copyright	
  ©	
  2015,	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |	
   10	
  
@SessionScoped	
  
@Named(“contractBean”}	
  
Public	
  class	
  ContractBean	
  {	
  
	
  
	
  	
  	
  private	
  String	
  contract	
  
	
  
	
  	
  	
  public	
  String	
  getContract()	
  {	
  
	
  	
  	
  	
  	
  this.contract	
  =	
  contract;	
  
	
  	
  	
  }	
  
}	
  
JSF	
  2.2	
  Resource	
  library	
  contracts	
  (Java	
  code)	
  
Copyright	
  ©	
  2015,	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |	
  
JSF	
  2.2	
  Resource	
  library	
  contracts	
  (filesystem	
  layout)	
  
•  contracts	
  
– layout1	
  
•  css	
  
– layout.css	
  
•  header.xhtml	
  
– layout2	
  
•  template.xhtml	
  
11	
  
Copyright	
  ©	
  2015,	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |	
   12	
  
<f:view	
  transient=“true”>	
  
	
  
	
  	
  <ui:composition	
  template=“/template.xhtml”>	
  
	
  
	
  	
  	
  	
  <ui:define	
  name=“content”>	
  
	
  	
  	
  	
  	
  	
  main	
  content	
  
	
  	
  	
  	
  </ui:define>	
  
	
  
	
  	
  	
  	
  <ui:define	
  name=“footer”>	
  
	
  	
  	
  	
  	
  	
  footer	
  info	
  
	
  	
  	
  	
  </ui:define>	
  
	
  
	
  	
  </ui:composition>	
  
	
  
</f:view>	
  
JSF	
  2.2	
  Stateless	
  Views	
  
Copyright	
  ©	
  2015,	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |	
  
JSF	
  2.2	
  Stateless	
  Views	
  (cont.)	
  
•  A	
  view	
  is	
  considered	
  stateless	
  if	
  the	
  transient	
  adribute	
  is	
  set	
  to	
  true,	
  
however:	
  
– Stateless	
  means	
  that	
  NO	
  view	
  state	
  will	
  be	
  kept	
  
– CDI	
  /	
  JSF	
  managed	
  beans	
  can	
  sQll	
  exist	
  
– View	
  scoped	
  beans	
  acts	
  like	
  Request	
  scoped	
  beans	
  
13	
  
Copyright	
  ©	
  2015,	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |	
  
JSF	
  2.2	
  Faces	
  Flows	
  
•  A	
  flow	
  is	
  a	
  collecQon	
  of	
  resources	
  that	
  represent	
  a	
  specific	
  flow	
  of	
  pages,	
  it	
  
can	
  contain	
  or	
  use:	
  
– HTML	
  files	
  
– CSS	
  files	
  
– Java	
  Beans	
  
– Resource	
  Library	
  contracts	
  
14	
  
Copyright	
  ©	
  2015,	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |	
   15	
  
<f:view>	
  
	
  
	
  	
  <h:form	
  enctype=“multipart/form-­‐data”>	
  
	
  	
  
	
  <h:inputFile	
  value=“#{fileUploadBean.uploadedFile}”>	
  
	
  </h:inputFile>	
  
	
  
	
  <h:commandButton	
  value=“Submit”/>	
  
	
  
	
  	
  </h:form>	
  
	
  
</f:view>	
  
	
  
JSF	
  2.2	
  File	
  Upload	
  
Copyright	
  ©	
  2015,	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |	
   16	
  
@RequestScoped	
  
@Named(“fileUploadBean”}	
  
Public	
  class	
  FileUploadBean	
  {	
  
	
  	
  
	
  	
  	
  	
  private	
  Part	
  uploadedFile;	
  
	
  
	
  	
  	
  	
  public	
  Part	
  getUploadedFile()	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  return	
  uploadedFile;	
  
	
  	
  	
  	
  }	
  
	
  
	
  	
  	
  	
  public	
  void	
  setUploadedFile(Part	
  uploadedFile)	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  this.uploadedFile	
  =	
  uploadedFile;	
  
	
  	
  	
  	
  }	
  
}	
  
JSF	
  2.2	
  File	
  Upload	
  (Java	
  code)	
  
Copyright	
  ©	
  2015,	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |	
  
Program	
  Agenda	
  
What	
  is	
  currently	
  available?	
  
JSF	
  2.3	
  
MVC	
  1.0	
  
How	
  to	
  contribute	
  
QuesQons	
  and	
  Answers	
  
1	
  
2	
  
3	
  
4	
  
5	
  
17	
  
Copyright	
  ©	
  2015,	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |	
  
What	
  is	
  on	
  the	
  table	
  for	
  JSF	
  2.3?	
  
•  Tie	
  up	
  the	
  loose	
  ends	
  
– SpecificaQon	
  clarificaQons	
  
– CDI	
  alignment	
  
•  Ease	
  of	
  use	
  e.g.	
  @Inject	
  FacesContext	
  
•  @Inject	
  into	
  Validators,	
  Converters,	
  etc.	
  
– HtmlInputHidden	
  is	
  
ClientBehaviorHolder	
  
•  Small	
  scale	
  new	
  features	
  
•  JSON	
  ajax	
  component	
  rendering	
  
•  Stateless	
  enhancements	
  
•  GET	
  enhancements	
  
•  Adopt-­‐a-­‐JSR	
  
18	
  
Copyright	
  ©	
  2015,	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |	
   19	
  
@FacesConverter(forClass	
  =	
  InjectConverterItem.class,	
  managed	
  =	
  true)	
  
public	
  class	
  InjectConverter	
  implements	
  Converter	
  {	
  
	
  
	
  	
  	
  	
  public	
  InjectConverter()	
  {	
  
	
  	
  	
  	
  }	
  
	
  
	
  	
  	
  	
  @Override	
  
	
  	
  	
  	
  public	
  Object	
  getAsObject(FacesContext	
  context,	
  UIComponent	
  component,	
  String	
  value)	
  	
  	
  	
  	
  
	
  	
  	
  	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  return	
  value;	
  
	
  	
  	
  	
  }	
  
	
  
	
  	
  	
  	
  @Override	
  
	
  	
  	
  	
  public	
  String	
  getAsString(FacesContext	
  context,	
  UIComponent	
  component,	
  Object	
  value)	
  	
  
	
  	
  	
  	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  return	
  value.toString();	
  
	
  	
  	
  	
  }	
  
}	
  
JSF	
  2.3	
  Converter	
  injecQon	
  (CDI	
  managed	
  converter)	
  
Copyright	
  ©	
  2015,	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |	
   20	
  
@FacesValidator(value	
  =	
  "injectValidator",	
  isDefault	
  =	
  false,	
  managed	
  =	
  true)	
  
public	
  class	
  InjectValidator	
  implements	
  Validator	
  {	
  
	
  
	
  	
  	
  	
  public	
  InjectValidator()	
  {	
  
	
  	
  	
  	
  }	
  
	
  
	
  	
  	
  	
  @Override	
  
	
  	
  	
  	
  public	
  void	
  validate(FacesContext	
  context,	
  UIComponent	
  component,	
  	
  
	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  	
  Object	
  value)	
  throws	
  ValidatorException	
  {	
  
	
  	
  	
  	
  }	
  
}	
  
	
  
JSF	
  2.3	
  Validator	
  injecQon	
  (CDI	
  managed	
  converter)	
  
Copyright	
  ©	
  2015,	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |	
   21	
  
@Named(value	
  =	
  "injectSessionMapBean")	
  
@ApplicationScoped	
  
public	
  class	
  InjectSessionMap2Bean	
  implements	
  Serializable	
  {	
  
	
  
	
  	
  	
  	
  @Inject	
  
	
  	
  	
  	
  @SessionMap	
  
	
  	
  	
  	
  private	
  Map<String,	
  Object>	
  sessionMap;	
  
	
  
	
  	
  	
  	
  public	
  String	
  getValue()	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  sessionMap.put("key",	
  "value");	
  
	
  	
  	
  	
  	
  	
  	
  	
  return	
  sessionMap.toString();	
  
	
  	
  	
  	
  }	
  
}	
  
	
  
JSF	
  2.3	
  Session	
  Map	
  injecQon	
  
Copyright	
  ©	
  2015,	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |	
   22	
  
@Named(value="injectFacesContextBean")	
  
@RequestScoped	
  
public	
  class	
  InjectFacesContextBean	
  {	
  
	
  
	
  	
  	
  	
  @Inject	
  
	
  	
  	
  	
  FacesContext	
  context;	
  
	
  
	
  	
  	
  	
  public	
  String	
  getValue()	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  return	
  context.toString();	
  
	
  	
  	
  	
  }	
  
}	
  
	
  
JSF	
  2.3	
  Faces	
  Context	
  injecQon	
  
Copyright	
  ©	
  2015,	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |	
  
JSF	
  2.3	
  Other	
  EG	
  contribuQons	
  
•  Support	
  for	
  more	
  data	
  types	
  on	
  ui:repeat	
  and	
  h:dataTable	
  
•  @FacesDataModel	
  allow	
  generic	
  types	
  
•  Your	
  contribuQon?	
  
Some	
  done,	
  some	
  in	
  progress	
  
23	
  
Copyright	
  ©	
  2015,	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |	
  
Program	
  Agenda	
  
What	
  is	
  currently	
  available?	
  
JSF	
  2.3	
  
MVC	
  1.0	
  
How	
  to	
  contribute	
  
Closing	
  remarks	
  
1	
  
2	
  
3	
  
4	
  
5	
  
24	
  
Copyright	
  ©	
  2015,	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |	
  
Where	
  are	
  we	
  at?	
  
•  The	
  first	
  Early	
  Dran	
  has	
  been	
  published	
  
•  Our	
  first	
  Milestone	
  release	
  is	
  available	
  
•  Our	
  road	
  map	
  is	
  aligning	
  with	
  the	
  JavaEE	
  8	
  roadmap	
  
•  We	
  are	
  requiring	
  JAX-­‐RS	
  as	
  we	
  build	
  on	
  top	
  of	
  it	
  
•  We	
  are	
  requiring	
  Java	
  8	
  
•  We	
  have	
  integrated	
  mulQple	
  contribuQons	
  from:	
  
– our	
  EG	
  members	
  	
  
– external	
  contributors	
  
	
  
25	
  
Copyright	
  ©	
  2015,	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |	
   26	
  
@Path("book")	
  
public	
  class	
  BookController	
  {	
  
	
  	
  	
  	
  	
  
	
  	
  	
  	
  @Inject	
  
	
  	
  	
  	
  private	
  Catalog	
  catalog;	
  
	
  
	
  	
  	
  	
  @Inject	
  
	
  	
  	
  	
  private	
  Models	
  models;	
  
	
  
	
  	
  	
  	
  @GET	
  
	
  	
  	
  	
  @Controller	
  
	
  	
  	
  	
  @Produces("text/html")	
  
	
  	
  	
  	
  @Path("view1/{id}")	
  
	
  	
  	
  	
  public	
  String	
  view1(@PathParam("id")	
  String	
  id)	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  models.put("book",	
  catalog.getBook(id));	
  
	
  	
  	
  	
  	
  	
  	
  	
  return	
  "book.xhtml";	
  
	
  	
  	
  	
  }	
  
}	
  
	
  
MVC	
  1.0	
  Controller	
  example	
  (Controller	
  code)	
  
Copyright	
  ©	
  2015,	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |	
   27	
  
public	
  class	
  Book	
  {	
  
	
  
	
  	
  	
  	
  private	
  String	
  title;	
  
	
  
	
  	
  	
  	
  public	
  String	
  getTitle()	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  return	
  title;	
  
	
  	
  	
  	
  }	
  
	
  
	
  	
  	
  	
  public	
  void	
  setTitle(String	
  title)	
  {	
  
	
  	
  	
  	
  	
  	
  	
  	
  this.title	
  =	
  title;	
  
	
  	
  	
  	
  }	
  
}	
  
MVC	
  1.0	
  Controller	
  example	
  (Book	
  class)	
  
Copyright	
  ©	
  2015,	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |	
   28	
  
<html	
  xmlns:h=http://xmlns.jcp.org/jsf/html>	
  
...	
  	
  
	
  
	
  	
  <h1>Book	
  information</h1>	
  
	
  	
  <p>#{book.title}</p>	
  
	
  
	
  
...	
  
</html>	
  
	
  	
  	
  
MVC	
  1.0	
  Controller	
  example	
  (HTML	
  page)	
  
Copyright	
  ©	
  2015,	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |	
  
Standard	
  ViewEngines	
  
•  JSP	
  
•  Facelets	
  
29	
  
Copyright	
  ©	
  2015,	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |	
  
ViewEngine	
  contribuQons,	
  supported	
  by	
  community	
  
•  AsciiDoc	
  
•  Freemarker	
  
•  Handlebars	
  
•  JSR	
  223	
  
– Groovy	
  
– Nashorn	
  
•  Mustache	
  
•  Thymeleaf	
  
•  Velocity	
  
30	
  
Copyright	
  ©	
  2015,	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |	
  
Enabling	
  ViewEngine	
  extensions	
  
•  Maven	
  users	
  include	
  the	
  extension	
  dependency	
  
– E.g.	
  for	
  Velocity	
  
•  	
  <dependency>	
  
	
  <groupId>com.oracle.ozark.ext</groupId>	
  
	
  <arQfactId>ozark-­‐velocity</arQfactId>	
  
	
  <version>x.y.z</version>	
  
	
  <scope>compile</scope>	
  
</dependency>	
  
•  Use	
  the	
  correct	
  extension	
  for	
  the	
  enabled	
  view	
  engine	
  
– E.g.	
  for	
  Velocity	
  
•  Velocity	
  have	
  a	
  .vm	
  extension	
  
•  Non-­‐maven	
  users	
  have	
  to	
  include	
  the	
  JARs	
  manually	
  
31	
  
Copyright	
  ©	
  2015,	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |	
  
Program	
  Agenda	
  
What	
  is	
  currently	
  available?	
  
JSF	
  2.3	
  
MVC	
  1.0	
  
How	
  to	
  contribute	
  
Closing	
  remarks	
  
1	
  
2	
  
3	
  
4	
  
5	
  
32	
  
Copyright	
  ©	
  2015,	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |	
  
How	
  to	
  contribute	
  to	
  JSF	
  2.3	
  
•  Join	
  the	
  users@jsf-­‐spec.java.net	
  mailing	
  list	
  and	
  comment	
  
•  ParQcipate	
  in	
  the	
  Adopt-­‐a-­‐JSR	
  program	
  (JUGs)	
  
•  	
  Test	
  out	
  milestones	
  /	
  snapshots	
  from	
  the	
  RI	
  website	
  	
  
(hdp://javaserverfaces.java.net)	
  and	
  file	
  issues	
  if	
  something	
  is	
  not	
  working	
  
•  Tweet,	
  blog,	
  socialize	
  to	
  raise	
  awareness	
  about	
  JSF	
  2.3	
  
•  Contribute	
  substanQal	
  code	
  
– Step	
  1	
  –	
  Write	
  the	
  code	
  
– Step	
  2	
  –	
  Sign	
  the	
  OCA	
  (Oracle	
  Contributor	
  Agreement)	
  
– Step	
  3	
  –	
  See	
  your	
  contribuQon	
  be	
  accepted	
  and	
  see	
  a	
  tweet	
  announcing	
  it!	
  
33	
  
Copyright	
  ©	
  2015,	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |	
  
How	
  to	
  contribute	
  to	
  MVC	
  1.0	
  
•  Join	
  the	
  users@mvc-­‐spec.java.net	
  mailing	
  list	
  and	
  comment	
  
•  ParQcipate	
  in	
  the	
  Adopt-­‐a-­‐JSR	
  program	
  (JUGs)	
  
•  	
  Test	
  out	
  milestones	
  /	
  snapshots	
  from	
  the	
  RI	
  website	
  	
  
(hdp://ozark.java.net)	
  and	
  file	
  issues	
  if	
  something	
  is	
  not	
  working	
  
•  Tweet,	
  blog,	
  socialize	
  to	
  raise	
  awareness	
  about	
  MVC	
  1.0	
  
•  Contribute	
  substanQal	
  code	
  
– Step	
  1	
  –	
  Write	
  the	
  code	
  
– Step	
  2	
  –	
  Sign	
  the	
  OCA	
  (Oracle	
  Contributor	
  Agreement)	
  
– Step	
  3	
  –	
  See	
  your	
  contribuQon	
  be	
  accepted	
  and	
  see	
  a	
  tweet	
  announcing	
  it!	
  
34	
  
Copyright	
  ©	
  2015,	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |	
  
Program	
  Agenda	
  
What	
  is	
  currently	
  available?	
  
JSF	
  2.3	
  
MVC	
  1.0	
  
How	
  to	
  contribute	
  
Closing	
  remarks	
  
1	
  
2	
  
3	
  
4	
  
5	
  
35	
  
Copyright	
  ©	
  2015,	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |	
  
Closing	
  remarks	
  
•  Picking	
  JSF	
  or	
  MVC	
  is	
  a	
  mader	
  of	
  choice,	
  but	
  please	
  consider	
  this	
  
– JSF	
  	
  
•  Availability	
  of	
  JSF	
  component	
  frameworks	
  which	
  allow	
  you:	
  
– 	
  to	
  deliver	
  a	
  consistent	
  UI	
  across	
  department	
  
– 	
  foster	
  re-­‐use	
  of	
  components	
  
•  Complexity	
  of	
  rendering	
  is	
  hidden	
  from	
  the	
  user	
  
– MVC	
  	
  
•  Standardize	
  an	
  acQon/controller	
  based	
  approach	
  
•  Stays	
  out	
  of	
  your	
  way	
  with	
  respect	
  to	
  rendering	
  	
  
•  Lots	
  of	
  ViewEngines	
  available,	
  new	
  ones	
  easy	
  to	
  integrate	
  
•  JSF	
  and	
  MVC	
  are	
  complementary	
  to	
  each	
  other	
  and	
  they	
  can	
  co-­‐exist!	
  
36	
  
Copyright	
  ©	
  2015,	
  Oracle	
  and/or	
  its	
  affiliates.	
  All	
  rights	
  reserved.	
  	
  |	
  
Safe	
  Harbor	
  Statement	
  
The	
  preceding	
  is	
  intended	
  to	
  outline	
  our	
  general	
  product	
  direcQon.	
  It	
  is	
  intended	
  for	
  
informaQon	
  purposes	
  only,	
  and	
  may	
  not	
  be	
  incorporated	
  into	
  any	
  contract.	
  It	
  is	
  not	
  a	
  
commitment	
  to	
  deliver	
  any	
  material,	
  code,	
  or	
  funcQonality,	
  and	
  should	
  not	
  be	
  relied	
  upon	
  
in	
  making	
  purchasing	
  decisions.	
  The	
  development,	
  release,	
  and	
  Qming	
  of	
  any	
  features	
  or	
  
funcQonality	
  described	
  for	
  Oracle’s	
  products	
  remains	
  at	
  the	
  sole	
  discreQon	
  of	
  Oracle.	
  
37	
  
2015 JavaOne LAD JSF 2.3 & MVC 1.0

More Related Content

What's hot

Spring Portlet MVC
Spring Portlet MVCSpring Portlet MVC
Spring Portlet MVC
John Lewis
 
Spring Web Service, Spring JMS, Eclipse & Maven tutorials
Spring Web Service, Spring JMS, Eclipse & Maven tutorialsSpring Web Service, Spring JMS, Eclipse & Maven tutorials
Spring Web Service, Spring JMS, Eclipse & Maven tutorials
Raghavan Mohan
 
Java EE 7 from an HTML5 Perspective, JavaLand 2015
Java EE 7 from an HTML5 Perspective, JavaLand 2015Java EE 7 from an HTML5 Perspective, JavaLand 2015
Java EE 7 from an HTML5 Perspective, JavaLand 2015
Edward Burns
 
Java EE vs Spring Framework
Java  EE vs Spring Framework Java  EE vs Spring Framework
Java EE vs Spring Framework
Rohit Kelapure
 
Spring MVC
Spring MVCSpring MVC
Spring MVC
yuvalb
 
Ed presents JSF 2.2 and WebSocket to Gameduell.
Ed presents JSF 2.2 and WebSocket to Gameduell.Ed presents JSF 2.2 and WebSocket to Gameduell.
Ed presents JSF 2.2 and WebSocket to Gameduell.
Edward Burns
 
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
Josh Juneau
 
Whats Next for JCA?
Whats Next for JCA?Whats Next for JCA?
Whats Next for JCA?
Fred Rowe
 
JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)
JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)
JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)
Fred Rowe
 
Java EE 6 & Spring: A Lover's Quarrel
Java EE 6 & Spring: A Lover's QuarrelJava EE 6 & Spring: A Lover's Quarrel
Java EE 6 & Spring: A Lover's Quarrel
Mauricio "Maltron" Leal
 
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
Mert Çalışkan
 
Spring - Part 3 - AOP
Spring - Part 3 - AOPSpring - Part 3 - AOP
Spring - Part 3 - AOP
Hitesh-Java
 
Ed presents JSF 2.2 at a 2013 Gameduell Tech talk
Ed presents JSF 2.2 at a 2013 Gameduell Tech talkEd presents JSF 2.2 at a 2013 Gameduell Tech talk
Ed presents JSF 2.2 at a 2013 Gameduell Tech talkEdward Burns
 
Java EE and Spring Side-by-Side
Java EE and Spring Side-by-SideJava EE and Spring Side-by-Side
Java EE and Spring Side-by-Side
Reza Rahman
 
Java EE 8: On the Horizon
Java EE 8:  On the HorizonJava EE 8:  On the Horizon
Java EE 8: On the Horizon
Josh Juneau
 
Testdrive AngularJS with Spring 4
Testdrive AngularJS with Spring 4Testdrive AngularJS with Spring 4
Testdrive AngularJS with Spring 4
Oliver Wahlen
 
Java EE 7 and HTML5: Developing for the Cloud
Java EE 7 and HTML5: Developing for the CloudJava EE 7 and HTML5: Developing for the Cloud
Java EE 7 and HTML5: Developing for the Cloud
Arun Gupta
 
50 New Features of Java EE 7 in 50 minutes
50 New Features of Java EE 7 in 50 minutes50 New Features of Java EE 7 in 50 minutes
50 New Features of Java EE 7 in 50 minutes
Arun Gupta
 
JavaFX 2 - A Java Developer's Guide (San Antonio JUG Version)
JavaFX 2 - A Java Developer's Guide (San Antonio JUG Version)JavaFX 2 - A Java Developer's Guide (San Antonio JUG Version)
JavaFX 2 - A Java Developer's Guide (San Antonio JUG Version)
Stephen Chin
 

What's hot (20)

Spring Portlet MVC
Spring Portlet MVCSpring Portlet MVC
Spring Portlet MVC
 
Spring Web Service, Spring JMS, Eclipse & Maven tutorials
Spring Web Service, Spring JMS, Eclipse & Maven tutorialsSpring Web Service, Spring JMS, Eclipse & Maven tutorials
Spring Web Service, Spring JMS, Eclipse & Maven tutorials
 
Java EE 7 from an HTML5 Perspective, JavaLand 2015
Java EE 7 from an HTML5 Perspective, JavaLand 2015Java EE 7 from an HTML5 Perspective, JavaLand 2015
Java EE 7 from an HTML5 Perspective, JavaLand 2015
 
Java EE vs Spring Framework
Java  EE vs Spring Framework Java  EE vs Spring Framework
Java EE vs Spring Framework
 
Spring MVC
Spring MVCSpring MVC
Spring MVC
 
Ed presents JSF 2.2 and WebSocket to Gameduell.
Ed presents JSF 2.2 and WebSocket to Gameduell.Ed presents JSF 2.2 and WebSocket to Gameduell.
Ed presents JSF 2.2 and WebSocket to Gameduell.
 
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
 
Whats Next for JCA?
Whats Next for JCA?Whats Next for JCA?
Whats Next for JCA?
 
JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)
JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)
JSR 236 Concurrency Utils for EE presentation for JavaOne 2013 (CON7948)
 
Java EE 6 & Spring: A Lover's Quarrel
Java EE 6 & Spring: A Lover's QuarrelJava EE 6 & Spring: A Lover's Quarrel
Java EE 6 & Spring: A Lover's Quarrel
 
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
 
Spring - Part 3 - AOP
Spring - Part 3 - AOPSpring - Part 3 - AOP
Spring - Part 3 - AOP
 
Ed presents JSF 2.2 at a 2013 Gameduell Tech talk
Ed presents JSF 2.2 at a 2013 Gameduell Tech talkEd presents JSF 2.2 at a 2013 Gameduell Tech talk
Ed presents JSF 2.2 at a 2013 Gameduell Tech talk
 
Java EE and Spring Side-by-Side
Java EE and Spring Side-by-SideJava EE and Spring Side-by-Side
Java EE and Spring Side-by-Side
 
Java EE 8: On the Horizon
Java EE 8:  On the HorizonJava EE 8:  On the Horizon
Java EE 8: On the Horizon
 
Testdrive AngularJS with Spring 4
Testdrive AngularJS with Spring 4Testdrive AngularJS with Spring 4
Testdrive AngularJS with Spring 4
 
Java EE 7 and HTML5: Developing for the Cloud
Java EE 7 and HTML5: Developing for the CloudJava EE 7 and HTML5: Developing for the Cloud
Java EE 7 and HTML5: Developing for the Cloud
 
50 New Features of Java EE 7 in 50 minutes
50 New Features of Java EE 7 in 50 minutes50 New Features of Java EE 7 in 50 minutes
50 New Features of Java EE 7 in 50 minutes
 
Brouchure
BrouchureBrouchure
Brouchure
 
JavaFX 2 - A Java Developer's Guide (San Antonio JUG Version)
JavaFX 2 - A Java Developer's Guide (San Antonio JUG Version)JavaFX 2 - A Java Developer's Guide (San Antonio JUG Version)
JavaFX 2 - A Java Developer's Guide (San Antonio JUG Version)
 

Viewers also liked

Decoupling shared code with state that needs to cleared in between uses
Decoupling shared code with state that needs to cleared in between usesDecoupling shared code with state that needs to cleared in between uses
Decoupling shared code with state that needs to cleared in between usesMichael Fons
 
PDF What's new with JSF 2.0
PDF What's new with JSF 2.0PDF What's new with JSF 2.0
PDF What's new with JSF 2.0
Michael Fons
 
What's new and exciting with JSF 2.0
What's new and exciting with JSF 2.0What's new and exciting with JSF 2.0
What's new and exciting with JSF 2.0
Michael Fons
 
JSF (ADF) Case Studies Presentation
JSF (ADF) Case Studies PresentationJSF (ADF) Case Studies Presentation
JSF (ADF) Case Studies Presentation
Michael Fons
 
JSF (ADF) Case Studies Paper
JSF (ADF) Case Studies PaperJSF (ADF) Case Studies Paper
JSF (ADF) Case Studies Paper
Michael Fons
 
Introduction to jsf 2
Introduction to jsf 2Introduction to jsf 2
Introduction to jsf 2
yousry ibrahim
 
Libraries Yes! Place-based Advocacy campaign
Libraries Yes! Place-based Advocacy campaignLibraries Yes! Place-based Advocacy campaign
Libraries Yes! Place-based Advocacy campaign
Debra Askanase
 

Viewers also liked (7)

Decoupling shared code with state that needs to cleared in between uses
Decoupling shared code with state that needs to cleared in between usesDecoupling shared code with state that needs to cleared in between uses
Decoupling shared code with state that needs to cleared in between uses
 
PDF What's new with JSF 2.0
PDF What's new with JSF 2.0PDF What's new with JSF 2.0
PDF What's new with JSF 2.0
 
What's new and exciting with JSF 2.0
What's new and exciting with JSF 2.0What's new and exciting with JSF 2.0
What's new and exciting with JSF 2.0
 
JSF (ADF) Case Studies Presentation
JSF (ADF) Case Studies PresentationJSF (ADF) Case Studies Presentation
JSF (ADF) Case Studies Presentation
 
JSF (ADF) Case Studies Paper
JSF (ADF) Case Studies PaperJSF (ADF) Case Studies Paper
JSF (ADF) Case Studies Paper
 
Introduction to jsf 2
Introduction to jsf 2Introduction to jsf 2
Introduction to jsf 2
 
Libraries Yes! Place-based Advocacy campaign
Libraries Yes! Place-based Advocacy campaignLibraries Yes! Place-based Advocacy campaign
Libraries Yes! Place-based Advocacy campaign
 

Similar to 2015 JavaOne LAD JSF 2.3 & MVC 1.0

JavaOne2015報告会 in Okinawa
JavaOne2015報告会 in OkinawaJavaOne2015報告会 in Okinawa
JavaOne2015報告会 in Okinawa
Takashi Ito
 
Marcin Szałowicz - MySQL Workbench
Marcin Szałowicz - MySQL WorkbenchMarcin Szałowicz - MySQL Workbench
Marcin Szałowicz - MySQL Workbench
Women in Technology Poland
 
Apic dc api deep dive
Apic dc api deep dive Apic dc api deep dive
Apic dc api deep dive
Cisco DevNet
 
MVC 1.0 / JSR 371
MVC 1.0 / JSR 371MVC 1.0 / JSR 371
MVC 1.0 / JSR 371
David Delabassee
 
JDK 10 Java Module System
JDK 10 Java Module SystemJDK 10 Java Module System
JDK 10 Java Module System
Wolfgang Weigend
 
Interactive Java Support to your tool -- The JShell API and Architecture
Interactive Java Support to your tool -- The JShell API and ArchitectureInteractive Java Support to your tool -- The JShell API and Architecture
Interactive Java Support to your tool -- The JShell API and Architecture
JavaDayUA
 
112815 java ee8_davidd
112815 java ee8_davidd112815 java ee8_davidd
112815 java ee8_davidd
Takashi Ito
 
Spring Boot Loves K8s
Spring Boot Loves K8sSpring Boot Loves K8s
Spring Boot Loves K8s
VMware Tanzu
 
Batch Applications for the Java Platform
Batch Applications for the Java PlatformBatch Applications for the Java Platform
Batch Applications for the Java Platform
Sivakumar Thyagarajan
 
OTN Tour 2013: What's new in java EE 7
OTN Tour 2013: What's new in java EE 7OTN Tour 2013: What's new in java EE 7
OTN Tour 2013: What's new in java EE 7
Bruno Borges
 
DevRock #01 What's new ASP.net 5
DevRock #01 What's new ASP.net 5DevRock #01 What's new ASP.net 5
DevRock #01 What's new ASP.net 5
Chaowlert Chaisrichalermpol
 
DesktopApps.pptx
DesktopApps.pptxDesktopApps.pptx
DesktopApps.pptx
ssusera47413
 
InterConnect 2016 Java EE 7 Overview (PEJ-5296)
InterConnect 2016 Java EE 7 Overview (PEJ-5296)InterConnect 2016 Java EE 7 Overview (PEJ-5296)
InterConnect 2016 Java EE 7 Overview (PEJ-5296)
Kevin Sutter
 
20160123 java one2015_feedback @ Osaka
20160123 java one2015_feedback @ Osaka20160123 java one2015_feedback @ Osaka
20160123 java one2015_feedback @ Osaka
Takashi Ito
 
JavaOne 2014 BOF4241 What's Next for JSF?
JavaOne 2014 BOF4241 What's Next for JSF?JavaOne 2014 BOF4241 What's Next for JSF?
JavaOne 2014 BOF4241 What's Next for JSF?
Edward Burns
 
Newfeaturesincontext 130911052709-phpapp01
Newfeaturesincontext 130911052709-phpapp01Newfeaturesincontext 130911052709-phpapp01
Newfeaturesincontext 130911052709-phpapp01
Frank Rodriguez
 
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
Max Andersen
 
JavaFX and JEE 7
JavaFX and JEE 7JavaFX and JEE 7
JavaFX and JEE 7Vijay Nair
 
What's new for Apache Flink's Table & SQL APIs?
What's new for Apache Flink's Table & SQL APIs?What's new for Apache Flink's Table & SQL APIs?
What's new for Apache Flink's Table & SQL APIs?
Timo Walther
 
Spring mvc
Spring mvcSpring mvc
Spring mvc
Hamid Ghorbani
 

Similar to 2015 JavaOne LAD JSF 2.3 & MVC 1.0 (20)

JavaOne2015報告会 in Okinawa
JavaOne2015報告会 in OkinawaJavaOne2015報告会 in Okinawa
JavaOne2015報告会 in Okinawa
 
Marcin Szałowicz - MySQL Workbench
Marcin Szałowicz - MySQL WorkbenchMarcin Szałowicz - MySQL Workbench
Marcin Szałowicz - MySQL Workbench
 
Apic dc api deep dive
Apic dc api deep dive Apic dc api deep dive
Apic dc api deep dive
 
MVC 1.0 / JSR 371
MVC 1.0 / JSR 371MVC 1.0 / JSR 371
MVC 1.0 / JSR 371
 
JDK 10 Java Module System
JDK 10 Java Module SystemJDK 10 Java Module System
JDK 10 Java Module System
 
Interactive Java Support to your tool -- The JShell API and Architecture
Interactive Java Support to your tool -- The JShell API and ArchitectureInteractive Java Support to your tool -- The JShell API and Architecture
Interactive Java Support to your tool -- The JShell API and Architecture
 
112815 java ee8_davidd
112815 java ee8_davidd112815 java ee8_davidd
112815 java ee8_davidd
 
Spring Boot Loves K8s
Spring Boot Loves K8sSpring Boot Loves K8s
Spring Boot Loves K8s
 
Batch Applications for the Java Platform
Batch Applications for the Java PlatformBatch Applications for the Java Platform
Batch Applications for the Java Platform
 
OTN Tour 2013: What's new in java EE 7
OTN Tour 2013: What's new in java EE 7OTN Tour 2013: What's new in java EE 7
OTN Tour 2013: What's new in java EE 7
 
DevRock #01 What's new ASP.net 5
DevRock #01 What's new ASP.net 5DevRock #01 What's new ASP.net 5
DevRock #01 What's new ASP.net 5
 
DesktopApps.pptx
DesktopApps.pptxDesktopApps.pptx
DesktopApps.pptx
 
InterConnect 2016 Java EE 7 Overview (PEJ-5296)
InterConnect 2016 Java EE 7 Overview (PEJ-5296)InterConnect 2016 Java EE 7 Overview (PEJ-5296)
InterConnect 2016 Java EE 7 Overview (PEJ-5296)
 
20160123 java one2015_feedback @ Osaka
20160123 java one2015_feedback @ Osaka20160123 java one2015_feedback @ Osaka
20160123 java one2015_feedback @ Osaka
 
JavaOne 2014 BOF4241 What's Next for JSF?
JavaOne 2014 BOF4241 What's Next for JSF?JavaOne 2014 BOF4241 What's Next for JSF?
JavaOne 2014 BOF4241 What's Next for JSF?
 
Newfeaturesincontext 130911052709-phpapp01
Newfeaturesincontext 130911052709-phpapp01Newfeaturesincontext 130911052709-phpapp01
Newfeaturesincontext 130911052709-phpapp01
 
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
Red Hat and Oracle: Delivering on the Promise of Interoperability in Java EE 7
 
JavaFX and JEE 7
JavaFX and JEE 7JavaFX and JEE 7
JavaFX and JEE 7
 
What's new for Apache Flink's Table & SQL APIs?
What's new for Apache Flink's Table & SQL APIs?What's new for Apache Flink's Table & SQL APIs?
What's new for Apache Flink's Table & SQL APIs?
 
Spring mvc
Spring mvcSpring mvc
Spring mvc
 

Recently uploaded

Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
Ana-Maria Mihalceanu
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
Alan Dix
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
nkrafacyberclub
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
Ralf Eggert
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
ControlCase
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
ViralQR
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
DianaGray10
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
RinaMondal9
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
DanBrown980551
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
Safe Software
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
Prayukth K V
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
Sri Ambati
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Product School
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
Guy Korland
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Aggregage
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
Thijs Feryn
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Ramesh Iyer
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
Pierluigi Pugliese
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
ThousandEyes
 

Recently uploaded (20)

Monitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR EventsMonitoring Java Application Security with JDK Tools and JFR Events
Monitoring Java Application Security with JDK Tools and JFR Events
 
Epistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI supportEpistemic Interaction - tuning interfaces to provide information for AI support
Epistemic Interaction - tuning interfaces to provide information for AI support
 
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptxSecstrike : Reverse Engineering & Pwnable tools for CTF.pptx
Secstrike : Reverse Engineering & Pwnable tools for CTF.pptx
 
PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)PHP Frameworks: I want to break free (IPC Berlin 2024)
PHP Frameworks: I want to break free (IPC Berlin 2024)
 
PCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase TeamPCI PIN Basics Webinar from the Controlcase Team
PCI PIN Basics Webinar from the Controlcase Team
 
Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.Welocme to ViralQR, your best QR code generator.
Welocme to ViralQR, your best QR code generator.
 
UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3UiPath Test Automation using UiPath Test Suite series, part 3
UiPath Test Automation using UiPath Test Suite series, part 3
 
Free Complete Python - A step towards Data Science
Free Complete Python - A step towards Data ScienceFree Complete Python - A step towards Data Science
Free Complete Python - A step towards Data Science
 
FIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdfFIDO Alliance Osaka Seminar: Overview.pdf
FIDO Alliance Osaka Seminar: Overview.pdf
 
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
LF Energy Webinar: Electrical Grid Modelling and Simulation Through PowSyBl -...
 
Essentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with ParametersEssentials of Automations: Optimizing FME Workflows with Parameters
Essentials of Automations: Optimizing FME Workflows with Parameters
 
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 previewState of ICS and IoT Cyber Threat Landscape Report 2024 preview
State of ICS and IoT Cyber Threat Landscape Report 2024 preview
 
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
GenAISummit 2024 May 28 Sri Ambati Keynote: AGI Belongs to The Community in O...
 
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
Unsubscribed: Combat Subscription Fatigue With a Membership Mentality by Head...
 
GraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge GraphGraphRAG is All You need? LLM & Knowledge Graph
GraphRAG is All You need? LLM & Knowledge Graph
 
Generative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to ProductionGenerative AI Deep Dive: Advancing from Proof of Concept to Production
Generative AI Deep Dive: Advancing from Proof of Concept to Production
 
Accelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish CachingAccelerate your Kubernetes clusters with Varnish Caching
Accelerate your Kubernetes clusters with Varnish Caching
 
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
Builder.ai Founder Sachin Dev Duggal's Strategic Approach to Create an Innova...
 
By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024By Design, not by Accident - Agile Venture Bolzano 2024
By Design, not by Accident - Agile Venture Bolzano 2024
 
Assuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyesAssuring Contact Center Experiences for Your Customers With ThousandEyes
Assuring Contact Center Experiences for Your Customers With ThousandEyes
 

2015 JavaOne LAD JSF 2.3 & MVC 1.0

  • 1.
  • 2.
  • 3. Pick  Your  Java  EE  Front  End   JavaServer  Faces  or  Model-­‐View-­‐Controller   Manfred  Riem   Principal  Member  of  Staff   @mnriem   Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |  
  • 4. Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   Safe  Harbor  Statement   The  following  is  intended  to  outline  our  general  product  direcQon.  It  is  intended  for   informaQon  purposes  only,  and  may  not  be  incorporated  into  any  contract.  It  is  not  a   commitment  to  deliver  any  material,  code,  or  funcQonality,  and  should  not  be  relied  upon   in  making  purchasing  decisions.  The  development,  release,  and  Qming  of  any  features  or   funcQonality  described  for  Oracle’s  products  remains  at  the  sole  discreQon  of  Oracle.   4  
  • 5. Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   Program  Agenda   What  is  currently  available?   JSF  2.3   MVC  1.0   How  to  contribute   Closing  remarks   1   2   3   4   5   5  
  • 6. Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   Program  Agenda   What  is  currently  available?   JSF  2.3   MVC  1.0   How  to  contribute   Closing  remarks   1   2   3   4   5   6  
  • 7. Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   What  is  currently  available?   •  Glassfish  4.1   – Reference  implementaQon  of  JavaEE  7,  which  includes  JSF  2.2.   •  WLS  12.2.1   – Coming  soon   •  Other  vendors   – Some  have  already  released   – Some  have  announced  when  they  are  going  to  be  available   7  
  • 8. Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   What  is  currently  available  (cont.)  ?   •  JSF  2.2   – Resource  library  contracts   – Stateless  views   – CSRF  protecQon   – File  upload   – Faces  flows   8  
  • 9. Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   9   <f:view  contracts=“#{contractBean.contract}”>        <ui:composition  template=“/template.xhtml”>            <ui:define  name=“content”>              main  content          </ui:define>            <ui:define  name=“footer”>              footer  info          </ui:define>        </ui:composition>     </f:view>   JSF  2.2  Resource  library  contracts  (using  HTML  page)  
  • 10. Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   10   @SessionScoped   @Named(“contractBean”}   Public  class  ContractBean  {          private  String  contract          public  String  getContract()  {            this.contract  =  contract;        }   }   JSF  2.2  Resource  library  contracts  (Java  code)  
  • 11. Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   JSF  2.2  Resource  library  contracts  (filesystem  layout)   •  contracts   – layout1   •  css   – layout.css   •  header.xhtml   – layout2   •  template.xhtml   11  
  • 12. Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   12   <f:view  transient=“true”>        <ui:composition  template=“/template.xhtml”>            <ui:define  name=“content”>              main  content          </ui:define>            <ui:define  name=“footer”>              footer  info          </ui:define>        </ui:composition>     </f:view>   JSF  2.2  Stateless  Views  
  • 13. Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   JSF  2.2  Stateless  Views  (cont.)   •  A  view  is  considered  stateless  if  the  transient  adribute  is  set  to  true,   however:   – Stateless  means  that  NO  view  state  will  be  kept   – CDI  /  JSF  managed  beans  can  sQll  exist   – View  scoped  beans  acts  like  Request  scoped  beans   13  
  • 14. Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   JSF  2.2  Faces  Flows   •  A  flow  is  a  collecQon  of  resources  that  represent  a  specific  flow  of  pages,  it   can  contain  or  use:   – HTML  files   – CSS  files   – Java  Beans   – Resource  Library  contracts   14  
  • 15. Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   15   <f:view>        <h:form  enctype=“multipart/form-­‐data”>        <h:inputFile  value=“#{fileUploadBean.uploadedFile}”>    </h:inputFile>      <h:commandButton  value=“Submit”/>        </h:form>     </f:view>     JSF  2.2  File  Upload  
  • 16. Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   16   @RequestScoped   @Named(“fileUploadBean”}   Public  class  FileUploadBean  {              private  Part  uploadedFile;            public  Part  getUploadedFile()  {                  return  uploadedFile;          }            public  void  setUploadedFile(Part  uploadedFile)  {                  this.uploadedFile  =  uploadedFile;          }   }   JSF  2.2  File  Upload  (Java  code)  
  • 17. Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   Program  Agenda   What  is  currently  available?   JSF  2.3   MVC  1.0   How  to  contribute   QuesQons  and  Answers   1   2   3   4   5   17  
  • 18. Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   What  is  on  the  table  for  JSF  2.3?   •  Tie  up  the  loose  ends   – SpecificaQon  clarificaQons   – CDI  alignment   •  Ease  of  use  e.g.  @Inject  FacesContext   •  @Inject  into  Validators,  Converters,  etc.   – HtmlInputHidden  is   ClientBehaviorHolder   •  Small  scale  new  features   •  JSON  ajax  component  rendering   •  Stateless  enhancements   •  GET  enhancements   •  Adopt-­‐a-­‐JSR   18  
  • 19. Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   19   @FacesConverter(forClass  =  InjectConverterItem.class,  managed  =  true)   public  class  InjectConverter  implements  Converter  {            public  InjectConverter()  {          }            @Override          public  Object  getAsObject(FacesContext  context,  UIComponent  component,  String  value)                  {                  return  value;          }            @Override          public  String  getAsString(FacesContext  context,  UIComponent  component,  Object  value)            {                  return  value.toString();          }   }   JSF  2.3  Converter  injecQon  (CDI  managed  converter)  
  • 20. Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   20   @FacesValidator(value  =  "injectValidator",  isDefault  =  false,  managed  =  true)   public  class  InjectValidator  implements  Validator  {            public  InjectValidator()  {          }            @Override          public  void  validate(FacesContext  context,  UIComponent  component,                            Object  value)  throws  ValidatorException  {          }   }     JSF  2.3  Validator  injecQon  (CDI  managed  converter)  
  • 21. Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   21   @Named(value  =  "injectSessionMapBean")   @ApplicationScoped   public  class  InjectSessionMap2Bean  implements  Serializable  {            @Inject          @SessionMap          private  Map<String,  Object>  sessionMap;            public  String  getValue()  {                  sessionMap.put("key",  "value");                  return  sessionMap.toString();          }   }     JSF  2.3  Session  Map  injecQon  
  • 22. Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   22   @Named(value="injectFacesContextBean")   @RequestScoped   public  class  InjectFacesContextBean  {            @Inject          FacesContext  context;            public  String  getValue()  {                  return  context.toString();          }   }     JSF  2.3  Faces  Context  injecQon  
  • 23. Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   JSF  2.3  Other  EG  contribuQons   •  Support  for  more  data  types  on  ui:repeat  and  h:dataTable   •  @FacesDataModel  allow  generic  types   •  Your  contribuQon?   Some  done,  some  in  progress   23  
  • 24. Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   Program  Agenda   What  is  currently  available?   JSF  2.3   MVC  1.0   How  to  contribute   Closing  remarks   1   2   3   4   5   24  
  • 25. Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   Where  are  we  at?   •  The  first  Early  Dran  has  been  published   •  Our  first  Milestone  release  is  available   •  Our  road  map  is  aligning  with  the  JavaEE  8  roadmap   •  We  are  requiring  JAX-­‐RS  as  we  build  on  top  of  it   •  We  are  requiring  Java  8   •  We  have  integrated  mulQple  contribuQons  from:   – our  EG  members     – external  contributors     25  
  • 26. Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   26   @Path("book")   public  class  BookController  {                    @Inject          private  Catalog  catalog;            @Inject          private  Models  models;            @GET          @Controller          @Produces("text/html")          @Path("view1/{id}")          public  String  view1(@PathParam("id")  String  id)  {                  models.put("book",  catalog.getBook(id));                  return  "book.xhtml";          }   }     MVC  1.0  Controller  example  (Controller  code)  
  • 27. Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   27   public  class  Book  {            private  String  title;            public  String  getTitle()  {                  return  title;          }            public  void  setTitle(String  title)  {                  this.title  =  title;          }   }   MVC  1.0  Controller  example  (Book  class)  
  • 28. Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   28   <html  xmlns:h=http://xmlns.jcp.org/jsf/html>   ...          <h1>Book  information</h1>      <p>#{book.title}</p>       ...   </html>         MVC  1.0  Controller  example  (HTML  page)  
  • 29. Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   Standard  ViewEngines   •  JSP   •  Facelets   29  
  • 30. Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   ViewEngine  contribuQons,  supported  by  community   •  AsciiDoc   •  Freemarker   •  Handlebars   •  JSR  223   – Groovy   – Nashorn   •  Mustache   •  Thymeleaf   •  Velocity   30  
  • 31. Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   Enabling  ViewEngine  extensions   •  Maven  users  include  the  extension  dependency   – E.g.  for  Velocity   •   <dependency>    <groupId>com.oracle.ozark.ext</groupId>    <arQfactId>ozark-­‐velocity</arQfactId>    <version>x.y.z</version>    <scope>compile</scope>   </dependency>   •  Use  the  correct  extension  for  the  enabled  view  engine   – E.g.  for  Velocity   •  Velocity  have  a  .vm  extension   •  Non-­‐maven  users  have  to  include  the  JARs  manually   31  
  • 32. Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   Program  Agenda   What  is  currently  available?   JSF  2.3   MVC  1.0   How  to  contribute   Closing  remarks   1   2   3   4   5   32  
  • 33. Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   How  to  contribute  to  JSF  2.3   •  Join  the  users@jsf-­‐spec.java.net  mailing  list  and  comment   •  ParQcipate  in  the  Adopt-­‐a-­‐JSR  program  (JUGs)   •   Test  out  milestones  /  snapshots  from  the  RI  website     (hdp://javaserverfaces.java.net)  and  file  issues  if  something  is  not  working   •  Tweet,  blog,  socialize  to  raise  awareness  about  JSF  2.3   •  Contribute  substanQal  code   – Step  1  –  Write  the  code   – Step  2  –  Sign  the  OCA  (Oracle  Contributor  Agreement)   – Step  3  –  See  your  contribuQon  be  accepted  and  see  a  tweet  announcing  it!   33  
  • 34. Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   How  to  contribute  to  MVC  1.0   •  Join  the  users@mvc-­‐spec.java.net  mailing  list  and  comment   •  ParQcipate  in  the  Adopt-­‐a-­‐JSR  program  (JUGs)   •   Test  out  milestones  /  snapshots  from  the  RI  website     (hdp://ozark.java.net)  and  file  issues  if  something  is  not  working   •  Tweet,  blog,  socialize  to  raise  awareness  about  MVC  1.0   •  Contribute  substanQal  code   – Step  1  –  Write  the  code   – Step  2  –  Sign  the  OCA  (Oracle  Contributor  Agreement)   – Step  3  –  See  your  contribuQon  be  accepted  and  see  a  tweet  announcing  it!   34  
  • 35. Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   Program  Agenda   What  is  currently  available?   JSF  2.3   MVC  1.0   How  to  contribute   Closing  remarks   1   2   3   4   5   35  
  • 36. Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   Closing  remarks   •  Picking  JSF  or  MVC  is  a  mader  of  choice,  but  please  consider  this   – JSF     •  Availability  of  JSF  component  frameworks  which  allow  you:   –   to  deliver  a  consistent  UI  across  department   –   foster  re-­‐use  of  components   •  Complexity  of  rendering  is  hidden  from  the  user   – MVC     •  Standardize  an  acQon/controller  based  approach   •  Stays  out  of  your  way  with  respect  to  rendering     •  Lots  of  ViewEngines  available,  new  ones  easy  to  integrate   •  JSF  and  MVC  are  complementary  to  each  other  and  they  can  co-­‐exist!   36  
  • 37. Copyright  ©  2015,  Oracle  and/or  its  affiliates.  All  rights  reserved.    |   Safe  Harbor  Statement   The  preceding  is  intended  to  outline  our  general  product  direcQon.  It  is  intended  for   informaQon  purposes  only,  and  may  not  be  incorporated  into  any  contract.  It  is  not  a   commitment  to  deliver  any  material,  code,  or  funcQonality,  and  should  not  be  relied  upon   in  making  purchasing  decisions.  The  development,  release,  and  Qming  of  any  features  or   funcQonality  described  for  Oracle’s  products  remains  at  the  sole  discreQon  of  Oracle.   37