JavaServer Faces
JavaServer Faces software | |
---|---|
![]() | |
Genere | Framework per applicazioni web (non in lista) |
Sviluppatore | Eclipse Foundation |
Ultima versione | 2.2.5 (Mojarra Reference Implementation) (8 gennaio 2014) |
Sistema operativo | Multipiattaforma |
Linguaggio | Java |
Licenza | Eclipse Public License 2.0 e GPL linking exception (licenza libera) |
Sito web | [1] |
JavaServer Faces (JSF) è una tecnologia Java, basata sul design pattern architetturale Model-View-Controller (MVC), il cui scopo è quello di semplificare lo sviluppo dell'interfaccia utente (UI) di una applicazione Web; può quindi essere considerata un framework per componenti lato server di interfaccia utente.
È descritta da un documento di specifiche (JSR 127) alla cui stesura hanno partecipato aziende quali IBM, Oracle Corporation, Siemens e Sun Microsystems. È interessante osservare che uno dei principali artefici di questa tecnologia è Craig R. McClanahan, dipendente Sun e creatore del popolare framework Struts. Di JavaServer Faces esistono alcune implementazioni: oltre a quella Sun, detta Reference Implementation (RI), si possono citare le implementazioni di Apache e di Oracle (Oracle ADF).
Cenni alla struttura
Il funzionamento del framework JSF si basa su un file di configurazione XML (faces-config.xml
) in cui vengono definite le viste (sostanzialmente pagine JSP che sfruttano la taglibrary faces) e i controllori. Le singole implementazioni sfruttano una servlet di base FacesServlet
o un filtro il cui mapping è normalmente /faces/*
o *.faces
.
La FacesServlet
deve essere registrata nel file XML (web.xml
) della web application.
Critiche
Nel Technology Radar del Gennaio 2014, ThoughtWorks ha scritto[1]:
Teams seem to choose JSF because it is a J2EE standard without really evaluating whether the programming model suits them. We think JSF is flawed because it tries to abstract away HTML, CSS and HTTP, exactly the reverse of what modern web frameworks do. JSF , like ASP.NET webforms, attempts to create statefulness on top of the stateless protocol HTTP and ends up causing a whole host of problems involving shared server-side state. We are aware of the improvements in JSF 2.0, but think the model is fundamentally broken. We recommend teams use simple frameworks and embrace and understand web technologies including HTTP, HTML and CSS.»
In pratica, ThoughtWorks consiglia di evitare questa tecnologia, in quanto cerca di astrarre su cose (HTML, CSS ed HTTP) sui cui non è il caso di astrarre e che gli altri framework non astraggono.
Note
- ^ January 2014 Technology Radar (PDF), su thoughtworks.fileburst.com. URL consultato il 30 gennaio 2014.
Collegamenti esterni
- Sito ufficiale
- JSR 127.
- Implementazione di Apache
- Implementazione di Sun
- Implementazione di Oracle
- Suite di componenti jsf basati su jQuery
- Generatore Applicazioni Web basate su Seam, EJB3, JSF
- Comparativa delle principali implementazioni JSF
Controllo di autorità | GND (DE) 4780730-1 |
---|