jsr372-experts@javaserverfaces-spec-public.java.net

[jsr372-experts] Re: JS implementation of JSF

From: Oleg Varaksin <ovaraksin_at_googlemail.com>
Date: Wed, 25 Mar 2015 21:57:21 +0100

Funny stuff, Cagatay. Congrats. But I'm not sure if server-side concepts
are really good on the client-side. Are you sure we need a JSF like
client-side framework? I'm not sure if "client-side" JSF can beat e.g.
AngularJS with concepts such as Dependency Injection, Templating,
Scopes, Providers, Filters, etc. And last but not least - with a huge
contributor community behind this framework. By the way, CamelCase
directives can be used with colon. So you can write <p:inputtext
value=${...} .../> in AngularJS (old JSP like data binding is valid in
AnhularJS 2.0).

Anyway, it was interesting to see this "crazy" concept, although I can
stil not understand attempts to convert server-side web frameworks to
the client-side ones. I'm curious where you will end up. Simple try it
to see if it has success. Good luck.

Am 19.03.2015 um 21:49 schrieb Cagatay Civici:
> Hi,
>
> Mostly for fun, I’m working on a crazy but interesting concept that
> implements the core idea of JSF on client side. Main parts of JSF like
> beans, components, el and lifecycle are all javascript objects.
>
> I’ve done a proof of concept implementation today as well, jsfiddle is at;
>
> http://jsfiddle.net/cagataycivici/r7gxsmy7/
>
> Basically view part (counterpart of JSF xhtml view) is;
>
> <body>
>
> <div id="main" class="container”>
> <p-inputtext value="#{testModel.person.name}" class="form-control"
> placeholder="Enter name"></p-inputtext>
>
> <p-button value="Click Me" process="main"
> listener="#{testModel.handleClick}" class="btn btn-default"></p-button>
>
> <p-outputtext value="#{testModel.person.name}"></p-outputtext>
> </div>
>
> </body>
>
> and the model part (counterpart of JSF managed bean);
>
> PrimeJS.model({name:'testModel'}, Class.extend({
>
> init: function() {
> this.person = {
> name: null
> };
> },
> handleClick: function() {
> alert('Hello ' + this.person.name);
> }
> })
> );
>
> I’m not sure if I’ll pursue this, as I’ve mentioned it is a proof of
> concept for fun but I’d really like to hear your opinions.
>
> Regards,
>
> Cagatay Civici
> PrimeFaces Lead
> PrimeTek Informatics
> www.primefaces.org
>