SlideShare a Scribd company logo
1 of 33
Download to read offline
IPT – Intellectual Products & Technologies
Trayan Iliev, http://iproduct.org/
BG OUG Meeting – Pravetz
November 20, 2015
Slide 1
Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0
Unported License
Expected New APIs in Java™ EE 8: MVC 1.0
Trayan Iliev
IPT – Intellectual Products & Technologies
e-mail: tiliev@iproduct.org
web: http://iproduct.org
Oracle®, Java™ and JavaScript™ are trademarks or registered trademarks of Oracle and/or its affiliates.
Other names may be trademarks of their respective owners.
IPT – Intellectual Products & Technologies
Trayan Iliev, http://iproduct.org/
BG OUG Meeting – Pravetz
November 20, 2015
Slide 2
Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0
Unported License
About
Trayan Iliev
IPT – Intellectual Products &
Technologies
IT Education Company
specialized in Java™,
Java EE / Web and
JavaScript trainings
Oracle®, Java™ and JavaScript™ are trademarks or registered trademarks of Oracle and/or its affiliates.
Other names may be trademarks of their respective owners.
IPT – Intellectual Products & Technologies
Trayan Iliev, http://iproduct.org/
BG OUG Meeting – Pravetz
November 20, 2015
Slide 3
Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0
Unported License
Disclaimer
All information presented in this document and all supplementary
materials and programming code represent only my personal opinion
and current understanding and has not received any endorsement or
approval by IPT - Intellectual Products and Technologies or any third
party. It should not be taken as any kind of advice, and should not be
used for making any kind of decisions with potential commercial impact.
The information and code presented may be incorrect or incomplete.
It is provided "as is", without warranty of any kind, express or implied,
including but not limited to the warranties of merchantability, fitness for a
particular purpose and non-infringement. In no event shall the author or
copyright holders be liable for any claim, damages or other liability,
whether in an action of contract, tort or otherwise, arising from, out of or
in connection with the information, materials or code presented or the
use or other dealings with this information or programming code.
IPT – Intellectual Products & Technologies
Trayan Iliev, http://iproduct.org/
BG OUG Meeting – Pravetz
November 20, 2015
Slide 4
Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0
Unported License
Agenda (1)
Lets try it first: IPT Polling Demo MVC 1.0 (+ JAX-RS, CDI, BV)
Expected novelties in Java EE 8: CDI 2.0, JAX-RS 2.1, Web
tier: HTTP/2 support, JSON Binding (JSONB), JSON
Processing (JSON-P), Server Sent Events (SSE)
JSR 371: Model-View-Controller (MVC 1.0) Specification
What MVC exactly means?
Why another MVC web framework?
Action vs. component based frameworks – MVC vs. JSF
MVC integrationon within JEE 7/8 stack: JAX-RS, CDI and BV
Bootstrapping using javax.ws.rs.core.Application
IPT – Intellectual Products & Technologies
Trayan Iliev, http://iproduct.org/
BG OUG Meeting – Pravetz
November 20, 2015
Slide 5
Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0
Unported License
Agenda (2)
Model-View-Controller interplay and standard annotations:
@Controller, @View
Observable controller matching, view engine selection, and
redirection CDI events
Bean Validation integration and exception mapping
Security related features – prevention of Cross Site Request
Forgery (CSRF) and Cross-site scripting (XSS) attacks
Supported view template frameworks: JSP, Facelets,
Freemarker, Handlebars, Jade, Mustache, Velocity, Thymeleaf
MVC 1.0 RI – project Ozark (https://ozark.java.net/)
IPT – Intellectual Products & Technologies
Trayan Iliev, http://iproduct.org/
BG OUG Meeting – Pravetz
November 20, 2015
Slide 6
Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0
Unported License
Question 1
How many people know what is
REST?
Lets try it first: IPT Polling Demo MVC 1.0
(MVC 1.0, JAX-RS, CDI, BeanValidation)
IPT – Intellectual Products & Technologies
Trayan Iliev, http://iproduct.org/
BG OUG Meeting – Pravetz
November 20, 2015
Slide 7
Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0
Unported License
Overall Architecture of JEE 8 MVC 1.0
IPT – Intellectual Products & Technologies
Trayan Iliev, http://iproduct.org/
BG OUG Meeting – Pravetz
November 20, 2015
Slide 8
Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0
Unported License
Multilayer Architecture of IPT Polling Demo
JPA Entities
JPA Controllers (CRUD, find/All/Range)
REST Resource Controllers MVC Controllers
JAX-RS Filters & Interceptors
View Engines - JSP,
Facelets, Freemarker,
Handlebars, Jade, Mustache,
Velocity, Thymeleaf
Client
Client
.JAVA
...
JSON/XML:HTTP/HTTPS
HTML: HTTP
IPT – Intellectual Products & Technologies
Trayan Iliev, http://www.iproduct.org/
BG OUG Meeting – Pravetz
November 20, 2015
Slide 9
Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0
Unported License
Some Expected Novelties in Java™ EE 8 (1)
Java EE 8 (JSR 366) is expected to bring many enhancements
boosting productivity of web & enterprise developers, Java SE 8
Important note: Most Java EE 8 specifications (including MVC
1.0) are in early draft stage, and are subject to major changes
based on open community process
JSR 365: Contexts and Dependency Injection for JavaTM
(CDI) 2.0
Standard way to bootstrap a CDI container in Java SE and to use
CDI Core features with pure SE applications
Enhancements: events (ordering, synchronous & asynchronous),
@Startup, AOP (interceptors, decorators), open SPI for 3rd party
extensions, SE contexts, lightweight container & modularity
Others ? – Apache Deltaspike, @Transactional ?
IPT – Intellectual Products & Technologies
Trayan Iliev, http://www.iproduct.org/
BG OUG Meeting – Pravetz
November 20, 2015
Slide 10
Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0
Unported License
Some Expected Novelties in Java™ EE 8 (2)
JSR 370: Java™ API for RESTful Web Services (JAX-RS 2.1)
Specification - HATEOS support, non-blocking IO (NIO), and
reactive programming enhancements, as well as better CDI
integration.
Web tier: Servlet 4.0 HTTP/2 support, JSON Binding (JSONB) and
JSON Processing (JSON-P – including JSOP Patch & JSON
Pointer), Server Sent Events (SSE), and a new MCV 1.0 action-
based web development framework (to be discussed in more details)
JSR 375: JavaTM EE Security API - holistic security for cloud/PaaS
applications, user & role management/services, password aliasing,
authorization: application-based rules method interceptor annotation
And much more: Java EE Management API (JSR 373) – REST
based, JSF 2.3 (JSR 372), JMS 2.1 (JSR 368), Web Socket, JCache
IPT – Intellectual Products & Technologies
Trayan Iliev, http://www.iproduct.org/
BG OUG Meeting – Pravetz
November 20, 2015
Slide 11
Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0
Unported License
JSR 371: Model-View-Controller (MVC 1.0)
Two types of web tier frameworks – component vs. action based
Component based frameworks – Controller provided by framework:
JSF, Wicket, Tapestry, JBoss Seam (not active), Apache Click (retired)
MVC 1.0 builds on experience with other action-oriented frameworks
– Struts, Spring MVC, VRaptor, Play, etc.
Why another MVC? → 5-th most wanted feature according to Java
EE 8 Community Survey
https://blogs.oracle.com/theaquarium/entry/java_ee_8_survey_final
Provides standard, view specification neutral way to build web apps
Based on existing Java™ EE technologies like CDI andJAX-RS,
integrates well with other APIs like Bean Validation (BV)
Simpler to learn than component oriented frameworks like JSF
Reference Implementation available – project Ozark (
https://ozark.java.net/, https://github.com/spericas/ozark)
IPT – Intellectual Products & Technologies
Trayan Iliev, http://www.iproduct.org/
BG OUG Meeting – Pravetz
November 20, 2015
Slide 12
Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0
Unported License
MVC 1.0 Main Features
Model-View-Controller interplay and standard annotations -
@Controller, @View, (no @Model?)
Bootstrapping using javax.ws.rs.core.Application
Observable controller matching, view engine selection, and
redirection CDI events
Bean Validation integration and exception mapping
Security related features – prevention of Cross Site Request Forgery
(CSRF) & Cross-site scripting (XSS) attacks: @CsrfValid method
level anntoation, validates CSRF token (hidden field or header)
Multiple view specification technologies – JSP and Facelets at core,
but also Freemarker, Handlebars, Jade, Mustache, Velocity,
Thymeleaf as extensions – RI project Ozark (https://ozark.java.net/).
Note: The specification is still in early draft stage, and is subject to
change.
IPT – Intellectual Products & Technologies
Trayan Iliev, http://iproduct.org/
BG OUG Meeting – Pravetz
November 20, 2015
Slide 13
Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0
Unported License
MVC Comes in Different Flavors
What is the difference between
following patterns:
Model-View-Controller (MVC)
Model-View-ViewModel (MVVM)
Model-View-Presenter (MVP)
http://csl.ensm-douai.fr/noury/uploads/20/ModelViewController.mp3
IPT – Intellectual Products & Technologies
Trayan Iliev, http://iproduct.org/
BG OUG Meeting – Pravetz
November 20, 2015
Slide 14
Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0
Unported License
MVC Comes in Different Flavors - 2
MVC
MVVM
MVP
Sources:https://en.wikipedia.org/wiki/Model_View_ViewModel#/media/File:MVVMPattern.png,
https://en.wikipedia.org/wiki/Model%E2%80%93view
%E2%80%93presenter#/media/File:Model_View_Presenter_GUI_Design_Pattern.png
License: CC BY-SA 3.0, Authors:Ugaya40, Daniel.Cardenas
IPT – Intellectual Products & Technologies
Trayan Iliev, http://iproduct.org/
BG OUG Meeting – Pravetz
November 20, 2015
Slide 15
Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0
Unported License
Web MVC Interactions Sequence Diagram
IPT – Intellectual Products & Technologies
Trayan Iliev, http://iproduct.org/
BG OUG Meeting – Pravetz
November 20, 2015
Slide 16
Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0
Unported License
Code available @ GitHub:
https://github.com/iproduct/BGOUG_Polling_Demo_MVC
IPT – Intellectual Products & Technologies
Trayan Iliev, http://iproduct.org/
BG OUG Meeting – Pravetz
November 20, 2015
Slide 17
Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0
Unported License
IPT – Intellectual Products & Technologies
Trayan Iliev, http://www.iproduct.org/
BG OUG Meeting – Pravetz
November 20, 2015
Slide 18
Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0
Unported License
Multilayer Architecture of IPT Polling Demo
JPA Entities
JPA Controllers (CRUD, find/All/Range)
REST Resource Controllers MVC Controllers
JAX-RS Filters & Interceptors
View Engines - JSP,
Facelets, Freemarker,
Handlebars, Jade, Mustache,
Velocity, Thymeleaf
Client
Client
.JAVA
...
JSON/XML:HTTP/HTTPS
HTML: HTTP
IPT – Intellectual Products & Technologies
Trayan Iliev, http://www.iproduct.org/
BG OUG Meeting – Pravetz
November 20, 2015
Slide 19
Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0
Unported License
IPT Polling Demo MVC 1.0 Data Architecture
How many people know what is
REST?
IPT – Intellectual Products & Technologies
Trayan Iliev, http://www.iproduct.org/
BG OUG Meeting – Pravetz
November 20, 2015
Slide 20
Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0
Unported License
IPT Polling Demo MVC 1.0 Data Architecture
How many people know what is
REST?
Under implementation
IPT – Intellectual Products & Technologies
Trayan Iliev, http://www.iproduct.org/
BG OUG Meeting – Pravetz
November 20, 2015
Slide 21
Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0
Unported License
Model Entities: Poll
@Entity
@XmlRootElement
@XmlAccessorType(javax.xml.bind.annotation.XmlAccessType.FIELD)
public class Poll implements Serializable {
@TableGenerator(name = "poll_gen", pkColumnValue = "poll_id", ...)
@Id @NotNull
@GeneratedValue(strategy = GenerationType.TABLE, generator = "poll_gen")
private Long id;
@Enumerated(EnumType.ORDINAL)
private PollStatus status = PollStatus.CREATED;
private String title;
private String question;
@Temporal(TemporalType.TIMESTAMP) @NotNull
private Date start;
@Temporal(TemporalType.TIMESTAMP) @NotNull
private Date end;
@OneToMany(cascade = {CascadeType.ALL}, targetEntity = Alternative.class,
mappedBy = "poll", fetch = EAGER )
private List<Alternative> alternatives;
. . .
IPT – Intellectual Products & Technologies
Trayan Iliev, http://www.iproduct.org/
BG OUG Meeting – Pravetz
November 20, 2015
Slide 22
Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0
Unported License
Controller Anatomy: RootController
@Controller
@Path("/")
@RequestScoped
public class RootController {
@Inject
Models models;
@Inject
PollJPAController pollController;
@GET
public String showHomePage() {
models.put("polls", pollController.findPollEntities(24, 0)); //latest 24 polls
return "home.jsp";
}
}
The path controller is bound to
Models provided by controller to the View
OR @Named annotation could be used on Model class
JAX-RS web method annotation mapping
The View to be presented next
(all views are by default in /WEB-INF/views)
IPT – Intellectual Products & Technologies
Trayan Iliev, http://www.iproduct.org/
BG OUG Meeting – Pravetz
November 20, 2015
Slide 23
Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0
Unported License
More Features: PollsController (1)
@Controller
@Path("/polls")
@RequestScoped
public class PollsController {
@Inject Models models;
@Inject ErrorsBean errors;
@Inject AlternativeJPAController alternativeController;
@Inject PollJPAController pollController;
@Inject VoteJPAController voteController;
@GET
@Path("/add")
@View("add_poll.jsp")
public void addPoll() {}
The path controller is bound to
Dependencies - CDI Injected
Alternative way for returning next View
IPT – Intellectual Products & Technologies
Trayan Iliev, http://www.iproduct.org/
BG OUG Meeting – Pravetz
November 20, 2015
Slide 24
Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0
Unported License
More Features: PollsController (2)
@POST
@Path("/add")
public String postPollWithAlternatives(
@NotNull @Size(min=1, max=45) @FormParam("title") String title,
@NotNull @Size(min=1, max=80) @FormParam("question") String question,
@Pattern(regexp="d{4}-d{2}-d{2}") @FormParam("from") String from,
@Pattern(regexp="d{4}-d{2}-d{2}") @FormParam("to") String to,
@FormParam("alternatives") String alternatives) {
...
try {
fromDate = sdf.parse(from);
} catch (ParseException e) {
errors.getMessages().add("Invalid From date.");
valid = false;
}
. . .
Bean Validation annotations
on parameters
@Named errors bean available to views
IPT – Intellectual Products & Technologies
Trayan Iliev, http://www.iproduct.org/
BG OUG Meeting – Pravetz
November 20, 2015
Slide 25
Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0
Unported License
More Features: PollsController (3)
List<String> parsedAlternatives = Arrays.asList(alternatives.split("|"))
.stream().map(s -> s.trim()).filter(s -> s.length() > 0)
.collect(Collectors.toList());
if (valid) {
try {
Poll poll = new Poll(title, question, fromDate, toDate);
pollController.create(poll); List<Alternative> altList = new ArrayList<>();
for (int i = 0; i < parsedAlternatives.size(); i++) {
Alternative alt = new Alternative(parsedAlternatives.get(i), i + 1, poll);
alternativeController.create(poll.getId(), alt);
}
} catch (ConstraintViolationException ex) {
ex.getConstraintViolations().stream().forEach(
(ConstraintViolation cv) → {errors.getMessages().add(cv.getMessage());});
valid = false;
}
…
Persist poll with parsed alternatives
Present ConstraintViolations to the view
IPT – Intellectual Products & Technologies
Trayan Iliev, http://www.iproduct.org/
BG OUG Meeting – Pravetz
November 20, 2015
Slide 26
Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0
Unported License
More Features: PollsController (4)
@GET //@DELETE should be better but not well supported by html form
@Path("/{pollId}/delete")
public String deletePoll(@PathParam("pollId") Long pollId) {
System.out.println("!!!!!!!!!DELETE Poll with ID = " + pollId);
try {
pollController.destroy(pollId);
} catch (Exception ex) {
errors.getMessages().add("Error deleting poll.");
Logger.getLogger(PollsController.class.getName()).log(Level.SEVERE,
null, ex);
}
return "redirect:/polls/manage";
}
JAX-RS path parameter URI template
Easy way for making redirect with MVC 1.0
IPT – Intellectual Products & Technologies
Trayan Iliev, http://www.iproduct.org/
BG OUG Meeting – Pravetz
November 20, 2015
Slide 27
Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0
Unported License
Views [JSP]: browse_polls.jsp (fragment)
<c:forEach items="${polls}" var="p" varStatus="status">
<%-- Poll summary panel --%>
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-3">
<div class="panel panel-default">
<div class="panel-heading">
<h3 class="panel-title"><c:out value="${p.title}"/></h3>
</div>
<div class="panel-body">
<div class="panel-question"><c:out value="${p.question}"/></div>
<a href="${p.id}" class="thumbnail img-rounded">
<canvas id="canvas${status.count}" class="chart-area" width="150"
height="150" data-chart='[<c:forEach items="${p.alternatives}" var="alt"
varStatus="altStatus"><c:if test="${not altStatus.first}">,</c:if>{"label":"${alt.text}","value":
${fn:length(alt.votes)}}</c:forEach>]' >
</canvas>
<div class="poll-legend pull-right"><%-- legend here --%></div>
</a>
...
</c:forEach>
. . .
IPT – Intellectual Products & Technologies
Trayan Iliev, http://www.iproduct.org/
BG OUG Meeting – Pravetz
November 20, 2015
Slide 28
Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0
Unported License
Views [Velocity]: browse_polls_velocity.vm
#foreach( $poll in $polls )
<div class="col-xs-12 col-sm-6 col-md-4 col-lg-3">
<div class="panel panel-default">
<div class="panel-heading"><h3 class="panel-title">$poll.title</h3>
</div>
<div class="panel-body">
<div class="panel-question">$poll.question"/></div>
<a href="$poll.id" class="thumbnail img-rounded">
#set( $count = 1 )
<canvas id="canvas${status.count}" class="chart-area" width="150"
height="150" data-chart='[#foreach( $alt in $poll.alternatives )#if( $count > 1 ),#end
{"label":"$alt.text","value":$alt.votes.size()}#set( $count = $count + 1 )#end]' >
</canvas>
<div class="poll-legend pull-right"></div>
</a>
. . .
#end
IPT – Intellectual Products & Technologies
Trayan Iliev, http://www.iproduct.org/
BG OUG Meeting – Pravetz
November 20, 2015
Slide 29
Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0
Unported License
MVC Application Class: Poll
@ApplicationPath("/app")
public class BGOUGDemoApplication extends Application {
@Override
public Set<Class<?>> getClasses() {
final Set<Class<?>> set = new HashSet<>();
set.add(RootController.class);
set.add(PollsController.class);
set.add(AlternativesResource.class);
set.add(PollsResource.class);
set.add(VotesResource.class);
set.add(JAXBContextResolver.class);
set.add(WebApplicationExceptionMapper.class);
set.add(ClientErrorExceptionMapper.class);
set.add(ConstraintViolationExceptionMapper.class);
return set;
}
}
IPT – Intellectual Products & Technologies
Trayan Iliev, http://www.iproduct.org/
BG OUG Meeting – Pravetz
November 20, 2015
Slide 30
Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0
Unported License
More Examples? – Lets See the Demo Project
Code @ GitHub:
https://github.com/iproduct/BGOUG_Polling_Demo_MVC
IPT – Intellectual Products & Technologies
Trayan Iliev, http://iproduct.org/
BG OUG Meeting – Pravetz
November 20, 2015
Slide 31
Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0
Unported License
Want to Learn More ...
Welcome to IPT trainings (http://iproduct.org/):
High Performance Reactive Programming with JAVA 8 and
JavaScript
Java™ + JS Web Programming: Servlet 3.1,HTTP, JSP, JSF 2.2
AJAX, JSON, WebSocket, JAX-RS REST Services, Angular JS
Java™ Enterprise Technologies (Java EE 7) – EJB 3.2, JSF 2.2,
JAX-RS 2.0, Web Services, WebSocket, JMS, CDI, Bean
Validation, JPA, JTA, Batch and Concurrency
Java™ Portlet Development with JSR 286: Portlet 2.0 API &
Liferay® - JSP, Spring MVC, JSF & AJAX Portlets
Programming with Java™ 8 - 3 modules
Oracle®, Java™ and JavaScript™ are trademarks or registered trademarks of Oracle and/or its affiliates.
Liferay® is a registered trademark of Liferay, Inc. Other names may be trademarks of their respective owners.
IPT – Intellectual Products & Technologies
Trayan Iliev, http://www.iproduct.org/
BG OUG Meeting – Pravetz
November 20, 2015
Slide 32
Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0
Unported License
References
JSR 371: Model-View-Controller (MVC 1.0) Specification –
https://jcp.org/en/jsr/detail?id=371
Reference Implementation available – project Ozark (https://ozark.java.net/,
https://github.com/spericas/ozark)
JSR 365: Contexts and Dependency Injection for JavaTM (CDI) 2.0 –
https://www.jcp.org/en/jsr/detail?id=365
JSR 370: Java™ API for RESTful Web Services (JAX-RS 2.1) Specification
– https://www.jcp.org/en/jsr/detail?id=370
R. Rahman, What's Coming in Java EE 8 –
http://www.slideshare.net/reza_rahman/javaee8
R. Fielding, Architectural Styles and the Design of Networkbased Software
Architectures, PhD Thesis, University of California, Irvine, 2000
Fielding's blog discussing REST – http://roy.gbiv.com/untangled/2008/rest-
apis-must-be-hypertext-driven
IPT – Intellectual Products & Technologies
Trayan Iliev, http://iproduct.org/
BG OUG Meeting – Pravetz
November 20, 2015
Slide 33
Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0
Unported License
Thanks for Your Attention!
Questions?

More Related Content

Viewers also liked

Continuous Delivery Applied
Continuous Delivery AppliedContinuous Delivery Applied
Continuous Delivery AppliedExcella
 
Intelligent DevOps - Driving Continuous Delivery by Harnessing the Power of A...
Intelligent DevOps - Driving Continuous Delivery by Harnessing the Power of A...Intelligent DevOps - Driving Continuous Delivery by Harnessing the Power of A...
Intelligent DevOps - Driving Continuous Delivery by Harnessing the Power of A...CA Technologies
 
Li liq liqui liquibase
Li liq liqui liquibaseLi liq liqui liquibase
Li liq liqui liquibaseYoram Michaeli
 
Liquibase – a time machine for your data
Liquibase – a time machine for your dataLiquibase – a time machine for your data
Liquibase – a time machine for your dataNeev Technologies
 
JSR 375 Segurança em Java EE 8
JSR 375 Segurança em Java EE 8JSR 375 Segurança em Java EE 8
JSR 375 Segurança em Java EE 8Helder da Rocha
 
Reactive Java Robotics and IoT - IPT Presentation @ Voxxed Days 2016
Reactive Java Robotics and IoT - IPT Presentation @ Voxxed Days 2016Reactive Java Robotics and IoT - IPT Presentation @ Voxxed Days 2016
Reactive Java Robotics and IoT - IPT Presentation @ Voxxed Days 2016Trayan Iliev
 
Reactive Java Robotics IoT - jPrime 2016
Reactive Java Robotics IoT - jPrime 2016Reactive Java Robotics IoT - jPrime 2016
Reactive Java Robotics IoT - jPrime 2016Trayan Iliev
 
IPT High Performance Reactive Java BGOUG 2016
IPT High Performance Reactive Java BGOUG 2016IPT High Performance Reactive Java BGOUG 2016
IPT High Performance Reactive Java BGOUG 2016Trayan Iliev
 
Java EE 8 Adopt a JSR : JSON-P 1.1 & MVC 1.0
Java EE 8 Adopt a JSR : JSON-P 1.1 & MVC 1.0Java EE 8 Adopt a JSR : JSON-P 1.1 & MVC 1.0
Java EE 8 Adopt a JSR : JSON-P 1.1 & MVC 1.0David Delabassee
 
Gráficos Vetoriais na Web com SVG
Gráficos Vetoriais na Web com SVGGráficos Vetoriais na Web com SVG
Gráficos Vetoriais na Web com SVGHelder da Rocha
 
Javaland 2016 - Flyway vs. LiquiBase - Battle der Datenbankmigrationstools
Javaland 2016 - Flyway vs. LiquiBase - Battle der DatenbankmigrationstoolsJavaland 2016 - Flyway vs. LiquiBase - Battle der Datenbankmigrationstools
Javaland 2016 - Flyway vs. LiquiBase - Battle der DatenbankmigrationstoolsStephan Kaps
 
Ericsson Networks Software 15B
Ericsson Networks Software 15BEricsson Networks Software 15B
Ericsson Networks Software 15BEricsson
 
Liquibase & Flyway @ Baltic DevOps
Liquibase & Flyway @ Baltic DevOpsLiquibase & Flyway @ Baltic DevOps
Liquibase & Flyway @ Baltic DevOpsAndrei Solntsev
 
config_mini link
config_mini linkconfig_mini link
config_mini linkAmir Moradi
 
Java & JavaScipt Reactive Robotics and IoT 2016 @ jProfessionals
Java & JavaScipt Reactive Robotics and IoT 2016 @ jProfessionalsJava & JavaScipt Reactive Robotics and IoT 2016 @ jProfessionals
Java & JavaScipt Reactive Robotics and IoT 2016 @ jProfessionalsTrayan Iliev
 
Continuous DB Changes Delivery With Liquibase
Continuous DB Changes Delivery With LiquibaseContinuous DB Changes Delivery With Liquibase
Continuous DB Changes Delivery With LiquibaseAidas Dragūnas
 
Java EE 8 Recipes
Java EE 8 RecipesJava EE 8 Recipes
Java EE 8 RecipesJosh Juneau
 

Viewers also liked (20)

Continuous Delivery Applied
Continuous Delivery AppliedContinuous Delivery Applied
Continuous Delivery Applied
 
Intelligent DevOps - Driving Continuous Delivery by Harnessing the Power of A...
Intelligent DevOps - Driving Continuous Delivery by Harnessing the Power of A...Intelligent DevOps - Driving Continuous Delivery by Harnessing the Power of A...
Intelligent DevOps - Driving Continuous Delivery by Harnessing the Power of A...
 
Li liq liqui liquibase
Li liq liqui liquibaseLi liq liqui liquibase
Li liq liqui liquibase
 
Liquibase – a time machine for your data
Liquibase – a time machine for your dataLiquibase – a time machine for your data
Liquibase – a time machine for your data
 
MVC 1.0 / JSR 371
MVC 1.0 / JSR 371MVC 1.0 / JSR 371
MVC 1.0 / JSR 371
 
HTML5 Media Elements
HTML5 Media ElementsHTML5 Media Elements
HTML5 Media Elements
 
JSR 375 Segurança em Java EE 8
JSR 375 Segurança em Java EE 8JSR 375 Segurança em Java EE 8
JSR 375 Segurança em Java EE 8
 
Reactive Java Robotics and IoT - IPT Presentation @ Voxxed Days 2016
Reactive Java Robotics and IoT - IPT Presentation @ Voxxed Days 2016Reactive Java Robotics and IoT - IPT Presentation @ Voxxed Days 2016
Reactive Java Robotics and IoT - IPT Presentation @ Voxxed Days 2016
 
Reactive Java Robotics IoT - jPrime 2016
Reactive Java Robotics IoT - jPrime 2016Reactive Java Robotics IoT - jPrime 2016
Reactive Java Robotics IoT - jPrime 2016
 
IPT High Performance Reactive Java BGOUG 2016
IPT High Performance Reactive Java BGOUG 2016IPT High Performance Reactive Java BGOUG 2016
IPT High Performance Reactive Java BGOUG 2016
 
Java EE 8 Adopt a JSR : JSON-P 1.1 & MVC 1.0
Java EE 8 Adopt a JSR : JSON-P 1.1 & MVC 1.0Java EE 8 Adopt a JSR : JSON-P 1.1 & MVC 1.0
Java EE 8 Adopt a JSR : JSON-P 1.1 & MVC 1.0
 
Liquibase
LiquibaseLiquibase
Liquibase
 
Gráficos Vetoriais na Web com SVG
Gráficos Vetoriais na Web com SVGGráficos Vetoriais na Web com SVG
Gráficos Vetoriais na Web com SVG
 
Javaland 2016 - Flyway vs. LiquiBase - Battle der Datenbankmigrationstools
Javaland 2016 - Flyway vs. LiquiBase - Battle der DatenbankmigrationstoolsJavaland 2016 - Flyway vs. LiquiBase - Battle der Datenbankmigrationstools
Javaland 2016 - Flyway vs. LiquiBase - Battle der Datenbankmigrationstools
 
Ericsson Networks Software 15B
Ericsson Networks Software 15BEricsson Networks Software 15B
Ericsson Networks Software 15B
 
Liquibase & Flyway @ Baltic DevOps
Liquibase & Flyway @ Baltic DevOpsLiquibase & Flyway @ Baltic DevOps
Liquibase & Flyway @ Baltic DevOps
 
config_mini link
config_mini linkconfig_mini link
config_mini link
 
Java & JavaScipt Reactive Robotics and IoT 2016 @ jProfessionals
Java & JavaScipt Reactive Robotics and IoT 2016 @ jProfessionalsJava & JavaScipt Reactive Robotics and IoT 2016 @ jProfessionals
Java & JavaScipt Reactive Robotics and IoT 2016 @ jProfessionals
 
Continuous DB Changes Delivery With Liquibase
Continuous DB Changes Delivery With LiquibaseContinuous DB Changes Delivery With Liquibase
Continuous DB Changes Delivery With Liquibase
 
Java EE 8 Recipes
Java EE 8 RecipesJava EE 8 Recipes
Java EE 8 Recipes
 

Similar to Java EE 8 MVC Framework Overview

Novelties in Java EE 7: JAX-RS 2.0 + IPT REST HATEOAS Polling Demo @ BGOUG Co...
Novelties in Java EE 7: JAX-RS 2.0 + IPT REST HATEOAS Polling Demo @ BGOUG Co...Novelties in Java EE 7: JAX-RS 2.0 + IPT REST HATEOAS Polling Demo @ BGOUG Co...
Novelties in Java EE 7: JAX-RS 2.0 + IPT REST HATEOAS Polling Demo @ BGOUG Co...Trayan Iliev
 
IPT angular2 typescript SPA 2016
IPT angular2 typescript SPA 2016IPT angular2 typescript SPA 2016
IPT angular2 typescript SPA 2016Trayan Iliev
 
JavaOne2015報告会 in Okinawa
JavaOne2015報告会 in OkinawaJavaOne2015報告会 in Okinawa
JavaOne2015報告会 in OkinawaTakashi Ito
 
WebRTC with Java
WebRTC with JavaWebRTC with Java
WebRTC with Javaamithap07
 
Nitesh_Sr._Java_developer_Lead
Nitesh_Sr._Java_developer_Lead Nitesh_Sr._Java_developer_Lead
Nitesh_Sr._Java_developer_Lead Nitesh Dasari
 
Get Hip with JHipster - GIDS 2019
Get Hip with JHipster - GIDS 2019Get Hip with JHipster - GIDS 2019
Get Hip with JHipster - GIDS 2019Matt Raible
 
Finally, EE Security API JSR 375
Finally, EE Security API JSR 375Finally, EE Security API JSR 375
Finally, EE Security API JSR 375Alex Kosowski
 
Service Testing. WTF Does This API Do
Service Testing. WTF Does This API Do	Service Testing. WTF Does This API Do
Service Testing. WTF Does This API Do Globant
 
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020Matt Raible
 
Silverlight And .Net Ria Services – Building Lob And Business Applications Wi...
Silverlight And .Net Ria Services – Building Lob And Business Applications Wi...Silverlight And .Net Ria Services – Building Lob And Business Applications Wi...
Silverlight And .Net Ria Services – Building Lob And Business Applications Wi...rsnarayanan
 
Jakarta EE and MicroProfile Tech Talk
Jakarta EE and MicroProfile Tech TalkJakarta EE and MicroProfile Tech Talk
Jakarta EE and MicroProfile Tech TalkJosh Juneau
 
java training institute course class indore
java training institute course class indorejava training institute course class indore
java training institute course class indoreFuture Multimedia
 
S02 hybrid app_and_gae_restful_architecture_v2.0
S02 hybrid app_and_gae_restful_architecture_v2.0S02 hybrid app_and_gae_restful_architecture_v2.0
S02 hybrid app_and_gae_restful_architecture_v2.0Sun-Jin Jang
 
Seattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js WorkshopSeattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js WorkshopJimmy Guerrero
 
D22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksD22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksSunil Patil
 
D22 portlet development with open source frameworks
D22 portlet development with open source frameworksD22 portlet development with open source frameworks
D22 portlet development with open source frameworksSunil Patil
 
Building Rich Applications with Appcelerator
Building Rich Applications with AppceleratorBuilding Rich Applications with Appcelerator
Building Rich Applications with AppceleratorMatt Raible
 

Similar to Java EE 8 MVC Framework Overview (20)

Novelties in Java EE 7: JAX-RS 2.0 + IPT REST HATEOAS Polling Demo @ BGOUG Co...
Novelties in Java EE 7: JAX-RS 2.0 + IPT REST HATEOAS Polling Demo @ BGOUG Co...Novelties in Java EE 7: JAX-RS 2.0 + IPT REST HATEOAS Polling Demo @ BGOUG Co...
Novelties in Java EE 7: JAX-RS 2.0 + IPT REST HATEOAS Polling Demo @ BGOUG Co...
 
IPT angular2 typescript SPA 2016
IPT angular2 typescript SPA 2016IPT angular2 typescript SPA 2016
IPT angular2 typescript SPA 2016
 
JavaOne2015報告会 in Okinawa
JavaOne2015報告会 in OkinawaJavaOne2015報告会 in Okinawa
JavaOne2015報告会 in Okinawa
 
WebRTC with Java
WebRTC with JavaWebRTC with Java
WebRTC with Java
 
Nitesh_Sr._Java_developer_Lead
Nitesh_Sr._Java_developer_Lead Nitesh_Sr._Java_developer_Lead
Nitesh_Sr._Java_developer_Lead
 
Get Hip with JHipster - GIDS 2019
Get Hip with JHipster - GIDS 2019Get Hip with JHipster - GIDS 2019
Get Hip with JHipster - GIDS 2019
 
ASP.NET MVC 3
ASP.NET MVC 3ASP.NET MVC 3
ASP.NET MVC 3
 
Finally, EE Security API JSR 375
Finally, EE Security API JSR 375Finally, EE Security API JSR 375
Finally, EE Security API JSR 375
 
Service Testing. WTF Does This API Do
Service Testing. WTF Does This API Do	Service Testing. WTF Does This API Do
Service Testing. WTF Does This API Do
 
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020
Choose Your Own Adventure with JHipster & Kubernetes - Utah JUG 2020
 
Silverlight And .Net Ria Services – Building Lob And Business Applications Wi...
Silverlight And .Net Ria Services – Building Lob And Business Applications Wi...Silverlight And .Net Ria Services – Building Lob And Business Applications Wi...
Silverlight And .Net Ria Services – Building Lob And Business Applications Wi...
 
Jakarta EE and MicroProfile Tech Talk
Jakarta EE and MicroProfile Tech TalkJakarta EE and MicroProfile Tech Talk
Jakarta EE and MicroProfile Tech Talk
 
java training institute course class indore
java training institute course class indorejava training institute course class indore
java training institute course class indore
 
S02 hybrid app_and_gae_restful_architecture_v2.0
S02 hybrid app_and_gae_restful_architecture_v2.0S02 hybrid app_and_gae_restful_architecture_v2.0
S02 hybrid app_and_gae_restful_architecture_v2.0
 
Oracle JET overview
Oracle JET overviewOracle JET overview
Oracle JET overview
 
Seattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js WorkshopSeattle StrongLoop Node.js Workshop
Seattle StrongLoop Node.js Workshop
 
Real-Time Web Applications with ASP.NET WebAPI and SignalR
Real-Time Web Applications with ASP.NET WebAPI and SignalRReal-Time Web Applications with ASP.NET WebAPI and SignalR
Real-Time Web Applications with ASP.NET WebAPI and SignalR
 
D22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source FrameworksD22 Portlet Development With Open Source Frameworks
D22 Portlet Development With Open Source Frameworks
 
D22 portlet development with open source frameworks
D22 portlet development with open source frameworksD22 portlet development with open source frameworks
D22 portlet development with open source frameworks
 
Building Rich Applications with Appcelerator
Building Rich Applications with AppceleratorBuilding Rich Applications with Appcelerator
Building Rich Applications with Appcelerator
 

More from Trayan Iliev

Making Machine Learning Easy with H2O and WebFlux
Making Machine Learning Easy with H2O and WebFluxMaking Machine Learning Easy with H2O and WebFlux
Making Machine Learning Easy with H2O and WebFluxTrayan Iliev
 
Rapid Web API development with Kotlin and Ktor
Rapid Web API development with Kotlin and KtorRapid Web API development with Kotlin and Ktor
Rapid Web API development with Kotlin and KtorTrayan Iliev
 
IPT Reactive Java IoT Demo - BGOUG 2018
IPT Reactive Java IoT Demo - BGOUG 2018IPT Reactive Java IoT Demo - BGOUG 2018
IPT Reactive Java IoT Demo - BGOUG 2018Trayan Iliev
 
Learning Programming Using Robots - Sofia University Conference 2018
Learning Programming Using Robots - Sofia University Conference 2018 Learning Programming Using Robots - Sofia University Conference 2018
Learning Programming Using Robots - Sofia University Conference 2018 Trayan Iliev
 
Active Learning Using Connected Things - 2018 (in Bulgarian)
Active Learning Using Connected Things - 2018 (in Bulgarian)Active Learning Using Connected Things - 2018 (in Bulgarian)
Active Learning Using Connected Things - 2018 (in Bulgarian)Trayan Iliev
 
Spring 5 Webflux - Advances in Java 2018
Spring 5 Webflux - Advances in Java 2018Spring 5 Webflux - Advances in Java 2018
Spring 5 Webflux - Advances in Java 2018Trayan Iliev
 
Fog Computing - DEV.BG 2018
Fog Computing - DEV.BG 2018Fog Computing - DEV.BG 2018
Fog Computing - DEV.BG 2018Trayan Iliev
 
Microservices with Spring 5 Webflux - jProfessionals
Microservices  with Spring 5 Webflux - jProfessionalsMicroservices  with Spring 5 Webflux - jProfessionals
Microservices with Spring 5 Webflux - jProfessionalsTrayan Iliev
 
Reactive Microservices with Spring 5: WebFlux
Reactive Microservices with Spring 5: WebFlux Reactive Microservices with Spring 5: WebFlux
Reactive Microservices with Spring 5: WebFlux Trayan Iliev
 
What's new in java 9?
What's new in java 9?What's new in java 9?
What's new in java 9?Trayan Iliev
 
NGRX Apps in Depth
NGRX Apps in DepthNGRX Apps in Depth
NGRX Apps in DepthTrayan Iliev
 
Stream Processing with CompletableFuture and Flow in Java 9
Stream Processing with CompletableFuture and Flow in Java 9Stream Processing with CompletableFuture and Flow in Java 9
Stream Processing with CompletableFuture and Flow in Java 9Trayan Iliev
 
React HOCs, Context and Observables
React HOCs, Context and ObservablesReact HOCs, Context and Observables
React HOCs, Context and ObservablesTrayan Iliev
 
Reactive robotics io_t_2017
Reactive robotics io_t_2017Reactive robotics io_t_2017
Reactive robotics io_t_2017Trayan Iliev
 

More from Trayan Iliev (14)

Making Machine Learning Easy with H2O and WebFlux
Making Machine Learning Easy with H2O and WebFluxMaking Machine Learning Easy with H2O and WebFlux
Making Machine Learning Easy with H2O and WebFlux
 
Rapid Web API development with Kotlin and Ktor
Rapid Web API development with Kotlin and KtorRapid Web API development with Kotlin and Ktor
Rapid Web API development with Kotlin and Ktor
 
IPT Reactive Java IoT Demo - BGOUG 2018
IPT Reactive Java IoT Demo - BGOUG 2018IPT Reactive Java IoT Demo - BGOUG 2018
IPT Reactive Java IoT Demo - BGOUG 2018
 
Learning Programming Using Robots - Sofia University Conference 2018
Learning Programming Using Robots - Sofia University Conference 2018 Learning Programming Using Robots - Sofia University Conference 2018
Learning Programming Using Robots - Sofia University Conference 2018
 
Active Learning Using Connected Things - 2018 (in Bulgarian)
Active Learning Using Connected Things - 2018 (in Bulgarian)Active Learning Using Connected Things - 2018 (in Bulgarian)
Active Learning Using Connected Things - 2018 (in Bulgarian)
 
Spring 5 Webflux - Advances in Java 2018
Spring 5 Webflux - Advances in Java 2018Spring 5 Webflux - Advances in Java 2018
Spring 5 Webflux - Advances in Java 2018
 
Fog Computing - DEV.BG 2018
Fog Computing - DEV.BG 2018Fog Computing - DEV.BG 2018
Fog Computing - DEV.BG 2018
 
Microservices with Spring 5 Webflux - jProfessionals
Microservices  with Spring 5 Webflux - jProfessionalsMicroservices  with Spring 5 Webflux - jProfessionals
Microservices with Spring 5 Webflux - jProfessionals
 
Reactive Microservices with Spring 5: WebFlux
Reactive Microservices with Spring 5: WebFlux Reactive Microservices with Spring 5: WebFlux
Reactive Microservices with Spring 5: WebFlux
 
What's new in java 9?
What's new in java 9?What's new in java 9?
What's new in java 9?
 
NGRX Apps in Depth
NGRX Apps in DepthNGRX Apps in Depth
NGRX Apps in Depth
 
Stream Processing with CompletableFuture and Flow in Java 9
Stream Processing with CompletableFuture and Flow in Java 9Stream Processing with CompletableFuture and Flow in Java 9
Stream Processing with CompletableFuture and Flow in Java 9
 
React HOCs, Context and Observables
React HOCs, Context and ObservablesReact HOCs, Context and Observables
React HOCs, Context and Observables
 
Reactive robotics io_t_2017
Reactive robotics io_t_2017Reactive robotics io_t_2017
Reactive robotics io_t_2017
 

Recently uploaded

Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio, Inc.
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...harshavardhanraghave
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfjoe51371421
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number SystemsJheuzeDellosa
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...MyIntelliSource, Inc.
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...kellynguyen01
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideChristina Lin
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)OPEN KNOWLEDGE GmbH
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...stazi3110
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...gurkirankumar98700
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackVICTOR MAESTRE RAMIREZ
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Intelisync
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...ICS
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataBradBedford3
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Modelsaagamshah0812
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...soniya singh
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityNeo4j
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about usDynamic Netsoft
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software DevelopersVinodh Ram
 

Recently uploaded (20)

Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed DataAlluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
Alluxio Monthly Webinar | Cloud-Native Model Training on Distributed Data
 
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
Reassessing the Bedrock of Clinical Function Models: An Examination of Large ...
 
why an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdfwhy an Opensea Clone Script might be your perfect match.pdf
why an Opensea Clone Script might be your perfect match.pdf
 
What is Binary Language? Computer Number Systems
What is Binary Language?  Computer Number SystemsWhat is Binary Language?  Computer Number Systems
What is Binary Language? Computer Number Systems
 
Exploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the ProcessExploring iOS App Development: Simplifying the Process
Exploring iOS App Development: Simplifying the Process
 
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
Try MyIntelliAccount Cloud Accounting Software As A Service Solution Risk Fre...
 
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
Short Story: Unveiling the Reasoning Abilities of Large Language Models by Ke...
 
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop SlideBuilding Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
Building Real-Time Data Pipelines: Stream & Batch Processing workshop Slide
 
Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)Der Spagat zwischen BIAS und FAIRNESS (2024)
Der Spagat zwischen BIAS und FAIRNESS (2024)
 
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
Building a General PDE Solving Framework with Symbolic-Numeric Scientific Mac...
 
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
(Genuine) Escort Service Lucknow | Starting ₹,5K To @25k with A/C 🧑🏽‍❤️‍🧑🏻 89...
 
Cloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStackCloud Management Software Platforms: OpenStack
Cloud Management Software Platforms: OpenStack
 
Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)Introduction to Decentralized Applications (dApps)
Introduction to Decentralized Applications (dApps)
 
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
The Real-World Challenges of Medical Device Cybersecurity- Mitigating Vulnera...
 
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer DataAdobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
Adobe Marketo Engage Deep Dives: Using Webhooks to Transfer Data
 
Unlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language ModelsUnlocking the Future of AI Agents with Large Language Models
Unlocking the Future of AI Agents with Large Language Models
 
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
Russian Call Girls in Karol Bagh Aasnvi ➡️ 8264348440 💋📞 Independent Escort S...
 
EY_Graph Database Powered Sustainability
EY_Graph Database Powered SustainabilityEY_Graph Database Powered Sustainability
EY_Graph Database Powered Sustainability
 
DNT_Corporate presentation know about us
DNT_Corporate presentation know about usDNT_Corporate presentation know about us
DNT_Corporate presentation know about us
 
Professional Resume Template for Software Developers
Professional Resume Template for Software DevelopersProfessional Resume Template for Software Developers
Professional Resume Template for Software Developers
 

Java EE 8 MVC Framework Overview

  • 1. IPT – Intellectual Products & Technologies Trayan Iliev, http://iproduct.org/ BG OUG Meeting – Pravetz November 20, 2015 Slide 1 Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License Expected New APIs in Java™ EE 8: MVC 1.0 Trayan Iliev IPT – Intellectual Products & Technologies e-mail: tiliev@iproduct.org web: http://iproduct.org Oracle®, Java™ and JavaScript™ are trademarks or registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
  • 2. IPT – Intellectual Products & Technologies Trayan Iliev, http://iproduct.org/ BG OUG Meeting – Pravetz November 20, 2015 Slide 2 Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License About Trayan Iliev IPT – Intellectual Products & Technologies IT Education Company specialized in Java™, Java EE / Web and JavaScript trainings Oracle®, Java™ and JavaScript™ are trademarks or registered trademarks of Oracle and/or its affiliates. Other names may be trademarks of their respective owners.
  • 3. IPT – Intellectual Products & Technologies Trayan Iliev, http://iproduct.org/ BG OUG Meeting – Pravetz November 20, 2015 Slide 3 Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License Disclaimer All information presented in this document and all supplementary materials and programming code represent only my personal opinion and current understanding and has not received any endorsement or approval by IPT - Intellectual Products and Technologies or any third party. It should not be taken as any kind of advice, and should not be used for making any kind of decisions with potential commercial impact. The information and code presented may be incorrect or incomplete. It is provided "as is", without warranty of any kind, express or implied, including but not limited to the warranties of merchantability, fitness for a particular purpose and non-infringement. In no event shall the author or copyright holders be liable for any claim, damages or other liability, whether in an action of contract, tort or otherwise, arising from, out of or in connection with the information, materials or code presented or the use or other dealings with this information or programming code.
  • 4. IPT – Intellectual Products & Technologies Trayan Iliev, http://iproduct.org/ BG OUG Meeting – Pravetz November 20, 2015 Slide 4 Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License Agenda (1) Lets try it first: IPT Polling Demo MVC 1.0 (+ JAX-RS, CDI, BV) Expected novelties in Java EE 8: CDI 2.0, JAX-RS 2.1, Web tier: HTTP/2 support, JSON Binding (JSONB), JSON Processing (JSON-P), Server Sent Events (SSE) JSR 371: Model-View-Controller (MVC 1.0) Specification What MVC exactly means? Why another MVC web framework? Action vs. component based frameworks – MVC vs. JSF MVC integrationon within JEE 7/8 stack: JAX-RS, CDI and BV Bootstrapping using javax.ws.rs.core.Application
  • 5. IPT – Intellectual Products & Technologies Trayan Iliev, http://iproduct.org/ BG OUG Meeting – Pravetz November 20, 2015 Slide 5 Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License Agenda (2) Model-View-Controller interplay and standard annotations: @Controller, @View Observable controller matching, view engine selection, and redirection CDI events Bean Validation integration and exception mapping Security related features – prevention of Cross Site Request Forgery (CSRF) and Cross-site scripting (XSS) attacks Supported view template frameworks: JSP, Facelets, Freemarker, Handlebars, Jade, Mustache, Velocity, Thymeleaf MVC 1.0 RI – project Ozark (https://ozark.java.net/)
  • 6. IPT – Intellectual Products & Technologies Trayan Iliev, http://iproduct.org/ BG OUG Meeting – Pravetz November 20, 2015 Slide 6 Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License Question 1 How many people know what is REST? Lets try it first: IPT Polling Demo MVC 1.0 (MVC 1.0, JAX-RS, CDI, BeanValidation)
  • 7. IPT – Intellectual Products & Technologies Trayan Iliev, http://iproduct.org/ BG OUG Meeting – Pravetz November 20, 2015 Slide 7 Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License Overall Architecture of JEE 8 MVC 1.0
  • 8. IPT – Intellectual Products & Technologies Trayan Iliev, http://iproduct.org/ BG OUG Meeting – Pravetz November 20, 2015 Slide 8 Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License Multilayer Architecture of IPT Polling Demo JPA Entities JPA Controllers (CRUD, find/All/Range) REST Resource Controllers MVC Controllers JAX-RS Filters & Interceptors View Engines - JSP, Facelets, Freemarker, Handlebars, Jade, Mustache, Velocity, Thymeleaf Client Client .JAVA ... JSON/XML:HTTP/HTTPS HTML: HTTP
  • 9. IPT – Intellectual Products & Technologies Trayan Iliev, http://www.iproduct.org/ BG OUG Meeting – Pravetz November 20, 2015 Slide 9 Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License Some Expected Novelties in Java™ EE 8 (1) Java EE 8 (JSR 366) is expected to bring many enhancements boosting productivity of web & enterprise developers, Java SE 8 Important note: Most Java EE 8 specifications (including MVC 1.0) are in early draft stage, and are subject to major changes based on open community process JSR 365: Contexts and Dependency Injection for JavaTM (CDI) 2.0 Standard way to bootstrap a CDI container in Java SE and to use CDI Core features with pure SE applications Enhancements: events (ordering, synchronous & asynchronous), @Startup, AOP (interceptors, decorators), open SPI for 3rd party extensions, SE contexts, lightweight container & modularity Others ? – Apache Deltaspike, @Transactional ?
  • 10. IPT – Intellectual Products & Technologies Trayan Iliev, http://www.iproduct.org/ BG OUG Meeting – Pravetz November 20, 2015 Slide 10 Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License Some Expected Novelties in Java™ EE 8 (2) JSR 370: Java™ API for RESTful Web Services (JAX-RS 2.1) Specification - HATEOS support, non-blocking IO (NIO), and reactive programming enhancements, as well as better CDI integration. Web tier: Servlet 4.0 HTTP/2 support, JSON Binding (JSONB) and JSON Processing (JSON-P – including JSOP Patch & JSON Pointer), Server Sent Events (SSE), and a new MCV 1.0 action- based web development framework (to be discussed in more details) JSR 375: JavaTM EE Security API - holistic security for cloud/PaaS applications, user & role management/services, password aliasing, authorization: application-based rules method interceptor annotation And much more: Java EE Management API (JSR 373) – REST based, JSF 2.3 (JSR 372), JMS 2.1 (JSR 368), Web Socket, JCache
  • 11. IPT – Intellectual Products & Technologies Trayan Iliev, http://www.iproduct.org/ BG OUG Meeting – Pravetz November 20, 2015 Slide 11 Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License JSR 371: Model-View-Controller (MVC 1.0) Two types of web tier frameworks – component vs. action based Component based frameworks – Controller provided by framework: JSF, Wicket, Tapestry, JBoss Seam (not active), Apache Click (retired) MVC 1.0 builds on experience with other action-oriented frameworks – Struts, Spring MVC, VRaptor, Play, etc. Why another MVC? → 5-th most wanted feature according to Java EE 8 Community Survey https://blogs.oracle.com/theaquarium/entry/java_ee_8_survey_final Provides standard, view specification neutral way to build web apps Based on existing Java™ EE technologies like CDI andJAX-RS, integrates well with other APIs like Bean Validation (BV) Simpler to learn than component oriented frameworks like JSF Reference Implementation available – project Ozark ( https://ozark.java.net/, https://github.com/spericas/ozark)
  • 12. IPT – Intellectual Products & Technologies Trayan Iliev, http://www.iproduct.org/ BG OUG Meeting – Pravetz November 20, 2015 Slide 12 Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License MVC 1.0 Main Features Model-View-Controller interplay and standard annotations - @Controller, @View, (no @Model?) Bootstrapping using javax.ws.rs.core.Application Observable controller matching, view engine selection, and redirection CDI events Bean Validation integration and exception mapping Security related features – prevention of Cross Site Request Forgery (CSRF) & Cross-site scripting (XSS) attacks: @CsrfValid method level anntoation, validates CSRF token (hidden field or header) Multiple view specification technologies – JSP and Facelets at core, but also Freemarker, Handlebars, Jade, Mustache, Velocity, Thymeleaf as extensions – RI project Ozark (https://ozark.java.net/). Note: The specification is still in early draft stage, and is subject to change.
  • 13. IPT – Intellectual Products & Technologies Trayan Iliev, http://iproduct.org/ BG OUG Meeting – Pravetz November 20, 2015 Slide 13 Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License MVC Comes in Different Flavors What is the difference between following patterns: Model-View-Controller (MVC) Model-View-ViewModel (MVVM) Model-View-Presenter (MVP) http://csl.ensm-douai.fr/noury/uploads/20/ModelViewController.mp3
  • 14. IPT – Intellectual Products & Technologies Trayan Iliev, http://iproduct.org/ BG OUG Meeting – Pravetz November 20, 2015 Slide 14 Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License MVC Comes in Different Flavors - 2 MVC MVVM MVP Sources:https://en.wikipedia.org/wiki/Model_View_ViewModel#/media/File:MVVMPattern.png, https://en.wikipedia.org/wiki/Model%E2%80%93view %E2%80%93presenter#/media/File:Model_View_Presenter_GUI_Design_Pattern.png License: CC BY-SA 3.0, Authors:Ugaya40, Daniel.Cardenas
  • 15. IPT – Intellectual Products & Technologies Trayan Iliev, http://iproduct.org/ BG OUG Meeting – Pravetz November 20, 2015 Slide 15 Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License Web MVC Interactions Sequence Diagram
  • 16. IPT – Intellectual Products & Technologies Trayan Iliev, http://iproduct.org/ BG OUG Meeting – Pravetz November 20, 2015 Slide 16 Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License Code available @ GitHub: https://github.com/iproduct/BGOUG_Polling_Demo_MVC
  • 17. IPT – Intellectual Products & Technologies Trayan Iliev, http://iproduct.org/ BG OUG Meeting – Pravetz November 20, 2015 Slide 17 Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License
  • 18. IPT – Intellectual Products & Technologies Trayan Iliev, http://www.iproduct.org/ BG OUG Meeting – Pravetz November 20, 2015 Slide 18 Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License Multilayer Architecture of IPT Polling Demo JPA Entities JPA Controllers (CRUD, find/All/Range) REST Resource Controllers MVC Controllers JAX-RS Filters & Interceptors View Engines - JSP, Facelets, Freemarker, Handlebars, Jade, Mustache, Velocity, Thymeleaf Client Client .JAVA ... JSON/XML:HTTP/HTTPS HTML: HTTP
  • 19. IPT – Intellectual Products & Technologies Trayan Iliev, http://www.iproduct.org/ BG OUG Meeting – Pravetz November 20, 2015 Slide 19 Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License IPT Polling Demo MVC 1.0 Data Architecture How many people know what is REST?
  • 20. IPT – Intellectual Products & Technologies Trayan Iliev, http://www.iproduct.org/ BG OUG Meeting – Pravetz November 20, 2015 Slide 20 Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License IPT Polling Demo MVC 1.0 Data Architecture How many people know what is REST? Under implementation
  • 21. IPT – Intellectual Products & Technologies Trayan Iliev, http://www.iproduct.org/ BG OUG Meeting – Pravetz November 20, 2015 Slide 21 Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License Model Entities: Poll @Entity @XmlRootElement @XmlAccessorType(javax.xml.bind.annotation.XmlAccessType.FIELD) public class Poll implements Serializable { @TableGenerator(name = "poll_gen", pkColumnValue = "poll_id", ...) @Id @NotNull @GeneratedValue(strategy = GenerationType.TABLE, generator = "poll_gen") private Long id; @Enumerated(EnumType.ORDINAL) private PollStatus status = PollStatus.CREATED; private String title; private String question; @Temporal(TemporalType.TIMESTAMP) @NotNull private Date start; @Temporal(TemporalType.TIMESTAMP) @NotNull private Date end; @OneToMany(cascade = {CascadeType.ALL}, targetEntity = Alternative.class, mappedBy = "poll", fetch = EAGER ) private List<Alternative> alternatives; . . .
  • 22. IPT – Intellectual Products & Technologies Trayan Iliev, http://www.iproduct.org/ BG OUG Meeting – Pravetz November 20, 2015 Slide 22 Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License Controller Anatomy: RootController @Controller @Path("/") @RequestScoped public class RootController { @Inject Models models; @Inject PollJPAController pollController; @GET public String showHomePage() { models.put("polls", pollController.findPollEntities(24, 0)); //latest 24 polls return "home.jsp"; } } The path controller is bound to Models provided by controller to the View OR @Named annotation could be used on Model class JAX-RS web method annotation mapping The View to be presented next (all views are by default in /WEB-INF/views)
  • 23. IPT – Intellectual Products & Technologies Trayan Iliev, http://www.iproduct.org/ BG OUG Meeting – Pravetz November 20, 2015 Slide 23 Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License More Features: PollsController (1) @Controller @Path("/polls") @RequestScoped public class PollsController { @Inject Models models; @Inject ErrorsBean errors; @Inject AlternativeJPAController alternativeController; @Inject PollJPAController pollController; @Inject VoteJPAController voteController; @GET @Path("/add") @View("add_poll.jsp") public void addPoll() {} The path controller is bound to Dependencies - CDI Injected Alternative way for returning next View
  • 24. IPT – Intellectual Products & Technologies Trayan Iliev, http://www.iproduct.org/ BG OUG Meeting – Pravetz November 20, 2015 Slide 24 Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License More Features: PollsController (2) @POST @Path("/add") public String postPollWithAlternatives( @NotNull @Size(min=1, max=45) @FormParam("title") String title, @NotNull @Size(min=1, max=80) @FormParam("question") String question, @Pattern(regexp="d{4}-d{2}-d{2}") @FormParam("from") String from, @Pattern(regexp="d{4}-d{2}-d{2}") @FormParam("to") String to, @FormParam("alternatives") String alternatives) { ... try { fromDate = sdf.parse(from); } catch (ParseException e) { errors.getMessages().add("Invalid From date."); valid = false; } . . . Bean Validation annotations on parameters @Named errors bean available to views
  • 25. IPT – Intellectual Products & Technologies Trayan Iliev, http://www.iproduct.org/ BG OUG Meeting – Pravetz November 20, 2015 Slide 25 Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License More Features: PollsController (3) List<String> parsedAlternatives = Arrays.asList(alternatives.split("|")) .stream().map(s -> s.trim()).filter(s -> s.length() > 0) .collect(Collectors.toList()); if (valid) { try { Poll poll = new Poll(title, question, fromDate, toDate); pollController.create(poll); List<Alternative> altList = new ArrayList<>(); for (int i = 0; i < parsedAlternatives.size(); i++) { Alternative alt = new Alternative(parsedAlternatives.get(i), i + 1, poll); alternativeController.create(poll.getId(), alt); } } catch (ConstraintViolationException ex) { ex.getConstraintViolations().stream().forEach( (ConstraintViolation cv) → {errors.getMessages().add(cv.getMessage());}); valid = false; } … Persist poll with parsed alternatives Present ConstraintViolations to the view
  • 26. IPT – Intellectual Products & Technologies Trayan Iliev, http://www.iproduct.org/ BG OUG Meeting – Pravetz November 20, 2015 Slide 26 Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License More Features: PollsController (4) @GET //@DELETE should be better but not well supported by html form @Path("/{pollId}/delete") public String deletePoll(@PathParam("pollId") Long pollId) { System.out.println("!!!!!!!!!DELETE Poll with ID = " + pollId); try { pollController.destroy(pollId); } catch (Exception ex) { errors.getMessages().add("Error deleting poll."); Logger.getLogger(PollsController.class.getName()).log(Level.SEVERE, null, ex); } return "redirect:/polls/manage"; } JAX-RS path parameter URI template Easy way for making redirect with MVC 1.0
  • 27. IPT – Intellectual Products & Technologies Trayan Iliev, http://www.iproduct.org/ BG OUG Meeting – Pravetz November 20, 2015 Slide 27 Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License Views [JSP]: browse_polls.jsp (fragment) <c:forEach items="${polls}" var="p" varStatus="status"> <%-- Poll summary panel --%> <div class="col-xs-12 col-sm-6 col-md-4 col-lg-3"> <div class="panel panel-default"> <div class="panel-heading"> <h3 class="panel-title"><c:out value="${p.title}"/></h3> </div> <div class="panel-body"> <div class="panel-question"><c:out value="${p.question}"/></div> <a href="${p.id}" class="thumbnail img-rounded"> <canvas id="canvas${status.count}" class="chart-area" width="150" height="150" data-chart='[<c:forEach items="${p.alternatives}" var="alt" varStatus="altStatus"><c:if test="${not altStatus.first}">,</c:if>{"label":"${alt.text}","value": ${fn:length(alt.votes)}}</c:forEach>]' > </canvas> <div class="poll-legend pull-right"><%-- legend here --%></div> </a> ... </c:forEach> . . .
  • 28. IPT – Intellectual Products & Technologies Trayan Iliev, http://www.iproduct.org/ BG OUG Meeting – Pravetz November 20, 2015 Slide 28 Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License Views [Velocity]: browse_polls_velocity.vm #foreach( $poll in $polls ) <div class="col-xs-12 col-sm-6 col-md-4 col-lg-3"> <div class="panel panel-default"> <div class="panel-heading"><h3 class="panel-title">$poll.title</h3> </div> <div class="panel-body"> <div class="panel-question">$poll.question"/></div> <a href="$poll.id" class="thumbnail img-rounded"> #set( $count = 1 ) <canvas id="canvas${status.count}" class="chart-area" width="150" height="150" data-chart='[#foreach( $alt in $poll.alternatives )#if( $count > 1 ),#end {"label":"$alt.text","value":$alt.votes.size()}#set( $count = $count + 1 )#end]' > </canvas> <div class="poll-legend pull-right"></div> </a> . . . #end
  • 29. IPT – Intellectual Products & Technologies Trayan Iliev, http://www.iproduct.org/ BG OUG Meeting – Pravetz November 20, 2015 Slide 29 Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License MVC Application Class: Poll @ApplicationPath("/app") public class BGOUGDemoApplication extends Application { @Override public Set<Class<?>> getClasses() { final Set<Class<?>> set = new HashSet<>(); set.add(RootController.class); set.add(PollsController.class); set.add(AlternativesResource.class); set.add(PollsResource.class); set.add(VotesResource.class); set.add(JAXBContextResolver.class); set.add(WebApplicationExceptionMapper.class); set.add(ClientErrorExceptionMapper.class); set.add(ConstraintViolationExceptionMapper.class); return set; } }
  • 30. IPT – Intellectual Products & Technologies Trayan Iliev, http://www.iproduct.org/ BG OUG Meeting – Pravetz November 20, 2015 Slide 30 Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License More Examples? – Lets See the Demo Project Code @ GitHub: https://github.com/iproduct/BGOUG_Polling_Demo_MVC
  • 31. IPT – Intellectual Products & Technologies Trayan Iliev, http://iproduct.org/ BG OUG Meeting – Pravetz November 20, 2015 Slide 31 Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License Want to Learn More ... Welcome to IPT trainings (http://iproduct.org/): High Performance Reactive Programming with JAVA 8 and JavaScript Java™ + JS Web Programming: Servlet 3.1,HTTP, JSP, JSF 2.2 AJAX, JSON, WebSocket, JAX-RS REST Services, Angular JS Java™ Enterprise Technologies (Java EE 7) – EJB 3.2, JSF 2.2, JAX-RS 2.0, Web Services, WebSocket, JMS, CDI, Bean Validation, JPA, JTA, Batch and Concurrency Java™ Portlet Development with JSR 286: Portlet 2.0 API & Liferay® - JSP, Spring MVC, JSF & AJAX Portlets Programming with Java™ 8 - 3 modules Oracle®, Java™ and JavaScript™ are trademarks or registered trademarks of Oracle and/or its affiliates. Liferay® is a registered trademark of Liferay, Inc. Other names may be trademarks of their respective owners.
  • 32. IPT – Intellectual Products & Technologies Trayan Iliev, http://www.iproduct.org/ BG OUG Meeting – Pravetz November 20, 2015 Slide 32 Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License References JSR 371: Model-View-Controller (MVC 1.0) Specification – https://jcp.org/en/jsr/detail?id=371 Reference Implementation available – project Ozark (https://ozark.java.net/, https://github.com/spericas/ozark) JSR 365: Contexts and Dependency Injection for JavaTM (CDI) 2.0 – https://www.jcp.org/en/jsr/detail?id=365 JSR 370: Java™ API for RESTful Web Services (JAX-RS 2.1) Specification – https://www.jcp.org/en/jsr/detail?id=370 R. Rahman, What's Coming in Java EE 8 – http://www.slideshare.net/reza_rahman/javaee8 R. Fielding, Architectural Styles and the Design of Networkbased Software Architectures, PhD Thesis, University of California, Irvine, 2000 Fielding's blog discussing REST – http://roy.gbiv.com/untangled/2008/rest- apis-must-be-hypertext-driven
  • 33. IPT – Intellectual Products & Technologies Trayan Iliev, http://iproduct.org/ BG OUG Meeting – Pravetz November 20, 2015 Slide 33 Licensed under the Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License Thanks for Your Attention! Questions?