mvc 1.0 - by exampledevelopermarch.com/developersummit/2016/report/... · spring mvc around since...
TRANSCRIPT
![Page 1: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/1.jpg)
MVC 1.0 - by Example
Ivar Grimstad Principal Consultant, Cybercom Sweden
JCP Expert Group Member (JSRs 368, 371, 375)
![Page 2: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/2.jpg)
@ivar_grimstad
https://github.com/ivargrimstad
https://www.linkedin.com/in/ivargrimstad
http://lanyrd.com/profile/ivargrimstad/
![Page 3: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/3.jpg)
MVC
![Page 4: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/4.jpg)
Why?
![Page 5: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/5.jpg)
https://java.net/downloads/javaee-spec/JavaEE8_Community_Survey_Results.pdf
![Page 7: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/7.jpg)
JSR 371 - MVC 1.0
![Page 8: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/8.jpg)
JSR 371 Expert Group
![Page 9: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/9.jpg)
Action-based MVC
![Page 10: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/10.jpg)
Controller
Model View
Request
UpdateUpdate
Get
![Page 11: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/11.jpg)
Controller
Model View
Request
UpdateUpdate
Get
Component-based MVC
![Page 12: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/12.jpg)
Controller
Model View
Request
UpdateUpdate
Get
Action-based MVC
![Page 13: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/13.jpg)
Comparable Frameworks
Spring MVC
around since 2005
“Real World” since 2008 (Spring 2.5 onward)
today’s leader in Action-Land
Struts 2
around since 2004 (WebWork 2)
“Real World” since 2007 (Struts 2.0.9 onward)
still widely adopted
![Page 14: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/14.jpg)
Existing Java EE Technologies
![Page 15: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/15.jpg)
Key Decisions
![Page 16: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/16.jpg)
Key Decisions
![Page 17: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/17.jpg)
Build MVC 1.0 on top of JAX-RS
![Page 18: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/18.jpg)
Controllers
![Page 19: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/19.jpg)
publicclassHelloController{
}
Controller
![Page 20: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/20.jpg)
@Path(“hello”)publicclassHelloController{
}
Controller
![Page 21: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/21.jpg)
@Controller@Path(“hello”)publicclassHelloController{
}
Controller
![Page 22: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/22.jpg)
Views
![Page 23: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/23.jpg)
@Controller@Path(“hello”)publicclassHelloController{
}
View
![Page 24: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/24.jpg)
@Controller@Path(“hello”)publicclassHelloController{
@GETpublicStringhello(){return“hello.jsp”;}}
View
![Page 25: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/25.jpg)
@Controller@Path(“hello”)publicclassHelloController{
@GETpublicViewablehello(){returnnewViewable(“hello.jsp”);}}
View
![Page 26: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/26.jpg)
@Controller@Path(“hello”)publicclassHelloController{
@GETpublicResponsehello(){returnResponse.status(OK).entity(“hello.jsp”).build();}}
View
![Page 27: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/27.jpg)
@Controller@Path(“hello”)publicclassHelloController{
@View(“hello.jsp”)@GETpublicvoidhello(){}}
View
![Page 28: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/28.jpg)
@View(“hello.jsp”)@Controller@Path(“hello”)publicclassHelloController{
@GETpublicvoidhello(){}}
View
![Page 29: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/29.jpg)
Models
![Page 30: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/30.jpg)
@Named(“greeting”)@RequestScopedpublicclassGreeting{
privateStringmessage;publicvoidsetMessage(Stringmessage){this.message=message;}
publicvoidgetMessage(){returnmessage;}}
Model
![Page 31: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/31.jpg)
@View(“hello.jsp”)@Controller@Path(“hello”)publicclassHelloController{
@GETpublicvoidhello(){}}
Model
![Page 32: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/32.jpg)
@View(“hello.jsp”)@Controller@Path(“hello”)publicclassHelloController{
@InjectprivateGreetinggreeting;@GETpublicvoidhello(){greeting.setMessage(“HelloBengaluru!”);}}
Model
![Page 33: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/33.jpg)
<%@page contentType=“text/html" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <title>MVC 1.0 Hello Demo</title> </head> <body> <h1>Hello ${greeting.message}</h1> </body> </html>
Model
![Page 34: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/34.jpg)
@View(“hello.jsp”)@Controller@Path(“hello”)publicclassHelloController{
@GETpublicvoidhello(){}}
Model
![Page 35: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/35.jpg)
@View(“hello.jsp”)@Controller@Path(“hello”)publicclassHelloController{
@InjectprivateModelsmodel;@GETpublicvoidhello(){model.put(“message”,“HelloBengaluru!”);}}
Model
![Page 36: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/36.jpg)
<%@page contentType=“text/html" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <title>MVC 1.0 Hello Demo</title> </head> <body> <h1>Hello ${message}</h1> </body> </html>
Model
![Page 37: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/37.jpg)
Validation
![Page 38: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/38.jpg)
@Controller@Path("form")publicclassFormController{
@POSTpublicResponseformPost(@Valid@BeanParamFormDataBeanf){
returnResponse.status(OK).entity(“data.jsp”).build();}}
ConstraintValidationException
@Min, @NotNulletc.
Validation
![Page 39: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/39.jpg)
publicclassFormViolationMapperimplementsExceptionMapper<ConstraintViolationException>{
publicResponsetoResponse(ConstraintViolationExceptione){
//processviolations…
returnResponse.status(BAD_REQUEST).entity(“error.jsp”).build();}}
Validation
![Page 40: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/40.jpg)
@Controller@Path("form")publicclassFormController{
@InjectprivateBindingResultbr;
@POSTpublicResponseformPost(@Valid@BeanParamFormDataBeanf){if(br.isFailed()){returnResponse.status(BAD_REQUEST).entity(“error.jsp”).build();}returnResponse.status(OK).entity(“data.jsp”).build();}}
Allows for MVC Error Handling
Validation
![Page 41: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/41.jpg)
Security
![Page 42: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/42.jpg)
@Controller@Path(“csrf”)publicclassHelloController{
@CsrfValid@POSTpublicResponsepost(@FormParam(“greeting")Stringgreet{}}
Cross Site Request Forgery
![Page 43: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/43.jpg)
<%@page contentType=“text/html" pageEncoding="UTF-8"%> <!DOCTYPE html> <html> <head> <title>MVC 1.0 Hello Demo</title> </head> <body> <form action="csrf" method="post" accept-charset="utf-8"> <input type="submit" value="Click here"/> <input type="hidden" name="${mvc.csrf.name}" value="${mvc.csrf.token}"/> </form> </body> </html>
Cross Site Request Forgery
![Page 44: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/44.jpg)
Scopes
![Page 45: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/45.jpg)
@Named(“greeting”)@RedirectScopedpublicclassGreeting{
privateStringmessage;publicvoidsetMessage(Stringmessage){this.message=message;}
publicvoidgetMessage(){returnmessage;}}
@RedirectScoped
![Page 46: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/46.jpg)
@ControllerpublicclassHelloController{
@InjectprivateGreetinggreeting;@POST@Path(“from”)publicStringhello(){greeting.setMessage(“HelloJavaLand!”);return“redirect:to“;}}
@RedirectScoped
@RequestScoped
@RedirectScoped
![Page 47: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/47.jpg)
@ControllerpublicclassHelloController{
@InjectprivateGreetinggreeting;@POST@Path(“to”)publicStringhello(){return“here.jsp“;}}
Same Bean
@RedirectScoped
![Page 48: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/48.jpg)
Tired of slides?
![Page 49: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/49.jpg)
Show me the real CODE !
![Page 50: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/50.jpg)
Model
ReservationCtlUpdate
confirmation
reservation
OK
Browser
POST
![Page 51: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/51.jpg)
Model
ReservationCtl
Access
Update
ConfirmationCtl
GET
confirmation
reservation
OK
Redirect
Browser
POST
![Page 52: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/52.jpg)
View Engines
![Page 53: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/53.jpg)
Bring Your Own View Engine
![Page 54: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/54.jpg)
publicinterfaceViewEngine{
booleansupports(Stringview);
voidprocessView(ViewEngineContextcontext)throwsViewEngineException;}
ViewEngine
![Page 55: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/55.jpg)
@Priority(OUTRAGEOSLY_HIGH)@ApplicationScopedpublicclassFreemarkerViewEngineextendsViewEngineBase{…
}
ViewEngine
![Page 56: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/56.jpg)
Events
![Page 57: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/57.jpg)
BeforeControllerEventAfterControllerEvent
BeforeProcessViewEventAfterProcessViewEvent
ControllerRedirectEvent
![Page 58: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/58.jpg)
@ApplicationScopedpublicclassEventObserver{
voidonBeforeController(@ObservesBeforeControllerEvente){}voidonAfterController(@ObservesAfterControllerEvente){}}
Events Example
![Page 59: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/59.jpg)
Tool Support
![Page 61: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/61.jpg)
Summary
![Page 62: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/62.jpg)
Action-based MVC
![Page 63: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/63.jpg)
Existing Java EE Technologies
![Page 64: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/64.jpg)
Build MVC 1.0 on top of JAX-RS
![Page 65: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/65.jpg)
Project Page https://java.net/projects/mvc-spec
GitHub https://github.com/mvc-spec
Reference Implementation https://ozark.java.net
![Page 66: MVC 1.0 - by Exampledevelopermarch.com/developersummit/2016/report/... · Spring MVC around since 2005 “Real World” since 2008 (Spring 2.5 onward) today’s leader in Action-Land](https://reader033.vdocuments.site/reader033/viewer/2022050422/5f913bac88113a494745078c/html5/thumbnails/66.jpg)
Samples https://github.com/ivargrimstad/mvc-samples
Blog http://www.agilejava.eu/