SlideShare a Scribd company logo
1 of 38
Download to read offline
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 MVCJohn 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 tutorialsRaghavan 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 2015Edward 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 MVCyuvalb
 
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 MVCJosh 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
 
JavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFacesJavaOne - 10 Tips for Java EE 7 with PrimeFaces
JavaOne - 10 Tips for Java EE 7 with PrimeFacesMert Çalışkan
 
Spring - Part 3 - AOP
Spring - Part 3 - AOPSpring - Part 3 - AOP
Spring - Part 3 - AOPHitesh-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-SideReza Rahman
 
Java EE 8: On the Horizon
Java EE 8:  On the HorizonJava EE 8:  On the Horizon
Java EE 8: On the HorizonJosh Juneau
 
Testdrive AngularJS with Spring 4
Testdrive AngularJS with Spring 4Testdrive AngularJS with Spring 4
Testdrive AngularJS with Spring 4Oliver 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 CloudArun 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 minutesArun 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.0Michael 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.0Michael Fons
 
JSF (ADF) Case Studies Presentation
JSF (ADF) Case Studies PresentationJSF (ADF) Case Studies Presentation
JSF (ADF) Case Studies PresentationMichael Fons
 
JSF (ADF) Case Studies Paper
JSF (ADF) Case Studies PaperJSF (ADF) Case Studies Paper
JSF (ADF) Case Studies PaperMichael Fons
 
Libraries Yes! Place-based Advocacy campaign
Libraries Yes! Place-based Advocacy campaignLibraries Yes! Place-based Advocacy campaign
Libraries Yes! Place-based Advocacy campaignDebra 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 OkinawaTakashi Ito
 
Apic dc api deep dive
Apic dc api deep dive Apic dc api deep dive
Apic dc api deep dive Cisco DevNet
 
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 ArchitectureJavaDayUA
 
112815 java ee8_davidd
112815 java ee8_davidd112815 java ee8_davidd
112815 java ee8_daviddTakashi Ito
 
Spring Boot Loves K8s
Spring Boot Loves K8sSpring Boot Loves K8s
Spring Boot Loves K8sVMware Tanzu
 
Batch Applications for the Java Platform
Batch Applications for the Java PlatformBatch Applications for the Java Platform
Batch Applications for the Java PlatformSivakumar 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 7Bruno Borges
 
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 @ OsakaTakashi 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-phpapp01Frank 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 7Max 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
 

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

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLScyllaDB
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebUiPathCommunity
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...Fwdays
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Mattias Andersson
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubKalema Edgar
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxhariprasad279825
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machinePadma Pradeep
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsRizwan Syed
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticscarlostorres15106
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piececharlottematthew16
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsMark Billinghurst
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024Lorenzo Miniero
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024Stephanie Beckett
 
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
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostZilliz
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clashcharlottematthew16
 
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
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyAlfredo García Lavilla
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsMemoori
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationRidwan Fadjar
 

Recently uploaded (20)

Developer Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQLDeveloper Data Modeling Mistakes: From Postgres to NoSQL
Developer Data Modeling Mistakes: From Postgres to NoSQL
 
Dev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio WebDev Dives: Streamline document processing with UiPath Studio Web
Dev Dives: Streamline document processing with UiPath Studio Web
 
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks..."LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
"LLMs for Python Engineers: Advanced Data Analysis and Semantic Kernel",Oleks...
 
Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?Are Multi-Cloud and Serverless Good or Bad?
Are Multi-Cloud and Serverless Good or Bad?
 
Unleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding ClubUnleash Your Potential - Namagunga Girls Coding Club
Unleash Your Potential - Namagunga Girls Coding Club
 
Artificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptxArtificial intelligence in cctv survelliance.pptx
Artificial intelligence in cctv survelliance.pptx
 
Install Stable Diffusion in windows machine
Install Stable Diffusion in windows machineInstall Stable Diffusion in windows machine
Install Stable Diffusion in windows machine
 
Scanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL CertsScanning the Internet for External Cloud Exposures via SSL Certs
Scanning the Internet for External Cloud Exposures via SSL Certs
 
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmaticsKotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
Kotlin Multiplatform & Compose Multiplatform - Starter kit for pragmatics
 
Story boards and shot lists for my a level piece
Story boards and shot lists for my a level pieceStory boards and shot lists for my a level piece
Story boards and shot lists for my a level piece
 
Human Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR SystemsHuman Factors of XR: Using Human Factors to Design XR Systems
Human Factors of XR: Using Human Factors to Design XR Systems
 
SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024SIP trunking in Janus @ Kamailio World 2024
SIP trunking in Janus @ Kamailio World 2024
 
What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024What's New in Teams Calling, Meetings and Devices March 2024
What's New in Teams Calling, Meetings and Devices March 2024
 
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
 
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage CostLeverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
Leverage Zilliz Serverless - Up to 50X Saving for Your Vector Storage Cost
 
Powerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time ClashPowerpoint exploring the locations used in television show Time Clash
Powerpoint exploring the locations used in television show Time Clash
 
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
 
Commit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easyCommit 2024 - Secret Management made easy
Commit 2024 - Secret Management made easy
 
AI as an Interface for Commercial Buildings
AI as an Interface for Commercial BuildingsAI as an Interface for Commercial Buildings
AI as an Interface for Commercial Buildings
 
My Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 PresentationMy Hashitalk Indonesia April 2024 Presentation
My Hashitalk Indonesia April 2024 Presentation
 

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