Re: Reactjs for Plone UI Toolbar
Timo Stollenwerk <tisto-z4DKO/[email protected]>
| Newsgroups | gmane.comp.web.zope.plone.devel |
|---|---|
| Message-ID | <[email protected]> |
Am 29.05.2014 21:04, schrieb plone-developers: > >> Timo Stollenwerk <tisto-z4DKO/[email protected]> hat am 29. Mai 2014 um 18:56 > geschrieben: >> >> >> 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. > ReactJS is not about templating. ReactJS has a tranform processor with a > JavaScript XML syntax (JSX). > Please, get a feel on what ReactJS is all about reading this: > http://facebook.github.io/react/docs/thinking-in-react.html > (it really takes 5 minutes: > https://signalvnoise.com/posts/3124-give-it-five-minutes) I plan to look more deeply into React this weekend to get a better idea of how it works and compares with Angular. I also found a somehow direct comparions between React and Angular when building a todo app: http://www.benmccann.com/blog/todo-mvc-angular-vs-react/ This is not very deep but it gives you a first idea... >> 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. > I fully agree. IMHO Plone should be able to deliver content in a > framework agnostic way. Allowing developers/designers to plug on a > layer/api. > Havng to learn lots of technologies (TAL, ZCML, viewlets, portlets, etc. > etc.) has been in the past a PITA for most of the new developers coming > to Plone. This is actually what I like and what scares me at the same time when working on the (experimental) Angular front-end for Plone. The amount of technologies that a JS front-end replaces is astonishing. My feeling is that working with Plone in the future will be a lot easier for integrators (at least if we choose the right js framework ;)). On the other hand, as a community we will have to re-implement a lot of things in JS that used to be on the back-end. >> 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. > That's right. As for now, it looks like discussing about frameworks and > technologies in a quite academical way. > What about first put a list of requirements and then find the > framework(s) that best fit the requirements? +100 The question for me right now is are we talking about a future JS-only front-end for Plone (Plone 6 or 7) or are we taking about Plone 5 and the current version of mockup? Timo ------------------------------------------------------------------------------ Time is money. Stop wasting it! Get your web API in 5 minutes. www.restlet.com/download http://p.sf.net/sfu/restlet