Re: Reactjs for Plone UI Toolbar
Timo Stollenwerk <tisto-z4DKO/[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.devel |
|---|---|
| Message-ID | <[email protected]> |
Am 28.05.2014 22:18, schrieb Nathan Van Gheem:
> For any decent size JavaScript application, you need to do templating in
> JavaScript. Using plain jquery $('<ul><li>blah</li></ul>') to generate
> nodes is very slow.
I looked into reactjs recently and lost interest immediately when I read
that it uses inline js string templates mixing HTML and JS. This is a
deal breaker in my opinion.
AngularJS for instance shows how to do it right. Instead of implementing
the 1000th JS templating language, it just uses HTML directly (you can
even use inline js if you want, which I think is wrong, but react is
forcing people the "wrong" way which is really really bad IMO).
Another concert regarding react is that I don't think a best-of-breed
approach really fits Plone well. Choosing a combination of backbone,
reactjs, mockup etc. is much harder for people to learn than just
choosing one framework that does it all, like Angular. Telling people
they have to learn one single (well documented and widely used)
framework is much better and much more attractive than telling them they
have to learn 3 or 4 different js component frameworks which might be
replaced in the future. A full feature framework is also much less
likely to change (or to be abandoned) than smaller more focused projects.
My feeling is that JS projects move in a way too fast manner and this
will hurt us in the mid/long term, if we are not able to follow fast
enough (think about how long it took us to move to jquery and start with
mockup). We will not make Plone a leader in the JS community (at least
not in the short/mid-term).
Comparing Angular to other frameworks so far always led me to the
conclusion that Angular offers a much cleaner and easier to use solution
(js templating vs HTML, require js vs. dependency injection,
two-way-binding vs. one-way or manual binding, etc.).
> We're using React for docs in them mockup project and underscore
> templates(with jquery $('<html>') magic) basically everywhere else. We
> want to eventually d to using React. This has been in discussion...
Maybe I missed something but I was not aware that the inclusion of
reactjs was really discussed in the core developer community or ever
mentioned in a PLIP. Maybe we should start to discuss this more openly.
Cheers,
Timo
------------------------------------------------------------------------------
Time is money. Stop wasting it! Get your web API in 5 minutes.
www.restlet.com/download
http://p.sf.net/sfu/restlet