JavaServer Faces 2.0ä»æ§ã®ã¡ã¢
JSF2.0ã®åæ¡ãå ¬éããã¦ãã¾ã(https://javaserverfaces-spec-public.dev.java.net/proposals/JSF-2_0-draft.html)ãä»ã®ã¨ãããJSFã®Spec Leadããã£ã¦ããEd Burnsæ°ã®ããã°ã«åºã¦ããã ãã§ãJCPã®ãµã¤ãã«ç¾ãããã®ã¯4æã«ãªã£ã¦ãã(ã¨ãã£ã¦ãããã§ãã)ã¨ããç¶æ ã§ãããã ããã¼ããããã«ããã¨JCPããPublic Reviewããã¦ã³ãã¼ãã§ããã®ã¯æ¥å¹´(!)ã®2æã3æã®äºå®ãªã®ã§ãä»æ§ãåºã¾ãã ãã§ãããªãæéããããããã§ããã¨ãããããã©ããªå¤æ´ãããã®ããç§ãç解ããç¯å²ã§ã¡ã¢ãã¦ãããã¨æãã¾ãã
ä»æ§ãä½ã£ã¦ããä¸ã®äººãèãã¦ãããã¨ã¯
- çç£æ§ãããããã¨
- ã¡ã³ããã³ã¹ãç°¡åã«ãããã¨
- production lifetimeã®ã¨ãããã¨ãªã®ã§Webã¢ããªéçºã®å¹çã¢ããããª
- Ajaxãå©ç¨ããã¯ã©ã¤ã¢ã³ããç°¡åã«ã¤ãããããã«ãããã¨
- JavaScriptãä¸å使ããªãã¦ãåçã®ã¯ã©ã¤ã¢ã³ããã¤ãããããã«ãããã¨
- ã¢ã¸ã¥ã¼ã«åãé²ãã¦JSF"ãã¬ã¼ã ã¯ã¼ã¯"ãä»ã®ã¯ã©ã¤ã¢ã³ãç¨ãã¼ã«ããµã¼ããµã¤ããã¼ã«ã¨çµã¿åããã¦ä½¿ããããã«ãããã¨
- ã¤ã¾ããJSPãããªãã¦ãJSFãã¬ã¼ã ã¯ã¼ã¯ã使ããããã«ããã¨ãããã¨ã®ãããªãå ·ä½çã«ã¯æ¸ãã¦ããªãã®ã§ãããJSF Viewã使ããªãã¨ãã¦ããªã¯ã¨ã¹ãå¦çã®ã©ã¤ããµã¤ã¯ã«ã¯ä½¿ã価å¤ãããã¨è¨ã£ã¦ããã®ã§ãä»ã®ã¨ããã§ã¹ã¯ãªããè¨èªã®ãµãã¼ãã®è©±ãåºã¦ããã®ã§ã
- Java Persistent APIãåãå ¥ãã¦ç°¡åã«ãã¼ã¿ã表示ã§ããããã«ãããã¨
ã¨ãããã¨ã®ããã§ãã
ããã«æ°ä»æ§ã§å¿ è¦ã¨ã¿ãªããã¦ããå 容ã¯Ease of Development, New Features and Fixes, Runtime Performance and Scalability, Technology Adoptionã®4ã¤ã®åãããã¦ãã¾ãã
Ease of Development
ããã¯JSFã®ã¨ããããã¯Java EEãç®æãã¦ãããã¨ã§ãJava EEã®ä¸é¨ã¨ãªãJSFãããã«å¾ãããã ããã§ããåè£ã«ããã£ã¦ããã®ã¯
- "zero configuration"ã®ãã声ã®ãã¨ãfaces-config.xmlãweb.xmlãç¡ããã¦ãã¢ããã¼ã·ã§ã³ã§ã¾ããªã
- ã¨ã©ã¼ã¡ãã»ã¼ã¸ãã©ãã§èµ·ããã©ã®ãããªã¨ã©ã¼ããããããã«æ¹è¯ãã¦éçºå¹çãã¢ãããã
- ãã£ãã©ã«ãã®ä¾å¤å¦çãæä¾ãã
- JSFã³ã³ãã¼ãã³ããèªåã§ä½ã£ãã¨ãã¦ãJSPã¿ã°ãã³ãã©ã¾ã§ä½ããªãã¦ããããã«ãã
- ã¢ããã¼ã·ã§ã³ãå©ç¨ãã¦ãã¤ãããã¯ã«ã³ã³ãã¼ãã³ããããã²ã¼ã·ã§ã³ã«ã¼ã«ãæå®ã§ããããã«ãã
- Declarative Renderers(?) ãã¡ãã¡out.println()ããããªãã¦ãããRenderers
- Facelets, JSFTamplating, Tilesãæ¡ãå ¥ãã
- CRUDã使ãã¢ããªã±ã¼ã·ã§ã³ããããç°¡åã«ã¤ãããããã«ãã
ã§ããããã«ã³ã³ããå´ã®æ¹è¯ã¨ãã¦
- deployment stepãç¡ããã¦ãã¢ããªã±ã¼ã·ã§ã³å®è¡æã§ãJSFã¢ããªã±ã¼ã·ã§ã³ãä¿®æ£ã§ããããã«ãã
- WARã®æ§æããããããããã
ãããããã¦ãã¾ãã
New Features and Fixes
ãã®æ¹è¯ã¯JSFå©ç¨è
ã®å£°ãåãå
¥ãã¦è¡ãããã¨ã®ãã¨ã§ããåè£ã¯ä»¥ä¸ã
- ãªã¯ã¨ã¹ãå¦çã®ã©ã¤ããµã¤ã¯ã«ãAjaxã«å¯¾å¿ããã
- Ajaxå©ç¨æã«ã³ã³ãã¼ãã³ãããªã¼ãé¨åçã«ãã©ãã¼ã¹ã§ããããã«ãã
- ããã¯ãã¼ã¯å¯¾å¿ã®JSFã«ãã
- ã¯ã©ã¤ã¢ã³ãå´ãinter-componentã¨form-levelããªãã¼ã·ã§ã³ã§ããããã«ãã(?)(JSR-303ã®ããªãã¼ã·ã§ã³ãé©ç¨ãã)
- ã³ã³ãã¼ãã³ãã«é¢é£ä»ãããã¦ããstaticãªãªã½ã¼ã¹(ç»åãã¹ã¿ã¤ã«ã·ã¼ããJavaScripãªã©)ã«ã¯ãã£ãã©ã«ãã®ãã±ã¼ã·ã§ã³ãæå®ã§ããããã«ãã
- Calendar, Tree, Tab View, Captcha, Login Panel, File Uploadãªã©ãStandard HTML RenderKitã«è¿½å ãã
- "Lost Update"ã"Duplicate Button Press"ã«å¯¾å¿ã§ããããã¿ãæä¾ãã
- ã¨ãããã¼ã¸ã表示ãããã¨ãã«åæã«å®è¡ãããã¢ã¯ã·ã§ã³ãæå®ã§ããããã«ãã(ã§ããã°Ajaxçµç±ã§)
- ãã¼ã·ã¹ãã³ããªãã¼ã¿ãç°¡åã«åç §ã§ããããã«ãã
Runtime Performance and Scalability
JSFãã¬ã¼ã ã¯ã¼ã¯ã«æ©è½ãæ¡ãå
¥ãã¦ããããã§ããããã«ããã¨ããã©ã¼ãã³ã¹ãè½ã¡ãã ããããæ¹åãå¿
è¦ã ããã©ãå®è£
ã¨ã®å
¼ãåããããããã¾ã 決ã¾ããªãããã ããã§ããåè£ã¯ä»¥ä¸ã
- ã³ã³ãã¼ãã³ãã®ç¶æ ãä¿åããã復帰ããããããã®ã¯å ¨é¨ã§ãªãã¦ä¸é¨ã ãã«ãã
- ã¹ãã¼ãã¬ã¹ãªUIã³ã³ãã¼ãã³ãã®ç¶æ ä¿åã®ãã£ãã©ã«ããã¿ãªãã
- ã¤ãã³ãå¦çã¨ãã¼ã¸éã§ã®ã³ã³ãã¼ãã³ãã®ããã¨ããã§ããã ãã¯ã©ã¤ã¢ã³ãå´ã«ãã£ã¦ãã
- ãã£ãã·ã³ã°ãããã¨ã§ã¬ã³ããªã³ã°å¦çãã·ã³ãã«ã«ãã
- PhaseListenerã§å®ç¾ããã¦ããã¤ã³ã¿ã¼ã»ãã¿ãæ¹è¯ãã¦ãã©ã®ãªã¯ã¨ã¹ããPhaseListenerã®å¯¾è±¡ã«ãªãã®ããæ£ç¢ºã«æå®ã§ããããã«ãã
Technology Adoption
JSFã使ã£ã¦ãããããããããå¢ããããã«JSFã«è²ã
ãªæ©è½ã追å ããããã§ããåè£ã¯ä»¥ä¸ã
- ã¯ã©ã¤ã¢ã³ãå´ã®ã©ã¤ããµã¤ã¯ã«ã追å ãã¦ãã©ãã°ï¼ãããããmaster-detail(?)ããµããã¤ã¢ãã°ã«å¯¾å¿ãã
- JSFã®æ©è½ã®ä¸é¨ã ããJava EEã®ã¢ããªã±ã¼ã·ã§ã³ã§ä½¿ããããã«ãã
- JSFããRESTãå©ç¨ãã¦ãªã½ã¼ã¹ãåç §ã§ããããã«ãã
- RSS/Atomã«å¯¾å¿ãã
- REST(JSR311)ããµãã¼ããã
- JSFã®ã©ã®ã¬ãã«ã§ãã¹ã¯ãªããã£ã³ã°ãã§ããããã«ãã¦ãã¹ã¯ãªããè¨èªã使ã£ã¦JSFã®ã¢ããªã±ã¼ã·ã§ã³ãä½ããããã«ãã
- ã³ãã³ãã©ã¤ã³ã¤ã³ã¿ãã§ã¼ã¹ã決ãã
- ãã¼ã¸éã§ã®å¤ã®åã渡ãããµãã¼ããã¦ãDialog,Conversation,Scope,Flashãå©ç¨ããããã®æ¨æºã決ãã
- ã³ã³ãã¼ãã³ãã§Skinningã¨Themeingããµãã¼ããã
ãã以å¤ã§ã¯JSFã§å©ç¨ããAjaxã®I18N, L10Nãµãã¼ããåç §å®è£ ã®ã©ã¤ã»ã³ã¹ãCDDLããGPLv2ã«å¤ãããã¨ãªã©ãããã¾ããã
ä»æ§ã決ããã«ããã£ã¦èæ ®ããæ¢åã®æè¡ã«ã¯
- The Open Ajax Alliance
- Apace Shale
- Project Dynamic Faces
- Ajax4JSF
- Tapestry 5
- MyFaces Trinidad, MyFaces Tomahowkã¨MyFaces Tobagoã®ä¸é¨
- Facelets
- Project jMaki
- Project Phobos
- Spring Web Flowã¨Spring Frameworkã®DI
ã¨ããªãã®é ç®ãããããã¦ãã¾ããã
ãã£ã¨è¦ãã¨ããã§ã¯ãJSF 2.0ã¯ããªãå¤ãããããªæãã§ããã§ããããªã使ããããã«ãªãããã§ãããã®ã§ãæå¾ ã§ããããããã¾ãããç¹ã«ãä½åº¦ãã¹ã¯ãªããè¨èªå¯¾å¿ã¨è¨ã£ã¦ããç¹ã¯æ³¨ç®ãããã§ããããããJSPã¨JSFãåé¢ããã¦ãRuby on JSFãªçµåããããããã®ã§ã¯ãªããã¨æãã¾ãã