Fork me on GitHub

so... other question related to Neo4J... I want to build a (simple) photo-library with a web front end. Use the JS api for Neo4J or do all the work on the back end?


what would you advice?


I do wonder if using cljs means that it is a good idea to write a lot more in the browser now. Is there less need for a back end for the front end if the front end can use a good language? (with apologies to javascript)


I suppose the greater network delay still means you might want something closer to your data doing filtering if your backend services don't have good interfaces for it.


I was wondering about that recently.... at work here we build a web site for a client and there is a react frontend, but it could have been 99% backend with just links to the back end to do stuff and next to no JS needed IMHO.


if you don't need much interactivity then server side rendering is a good idea


Definitely! And CLJC means that you can try to write very similar code (possibly the same code) for your frontend and backend. But yeah I am of the idea that you shouldn't do stuff client-side if there is no need. I think at work we'll be reworking public pages (i.e. logged out versions) into JS-less bits. That helps a lot with SEO too! 😄


@helios so why no big things on the client side? I can think that accessibility might be a bit harder and some people turn off js, but other than that?


the compiled js could be small and cached. If you have good rest interfaces on the data coming back then they can be cached as well.


seo can be solved with pre-rendering proxies


it's no longer such as big deal I believe


Didn't say necessarily not big things on the client-side, but avoiding to overcomplicate things when not needed 😄


Personally I am in favor of not doing anything related to the front-end on the servers anymore, makes everybody's job easier


i.e. low interactivity


Then sure. I guess if the UI is very simple and unlikely to change a lot why not


I suspect that sometimes things are done on the frontend mainly because you can. And I do like CLJC... we recently had a case where there were lots of front end calculations... and then the customer wanted to get an Excel export functionality as well.. and suddenly all the JS code had to be duplicated in Java again. Big fail IMO.


We're now starting to experiment with re-frame in the backend too, so we can use (most of) the same code for SSR and Client-side 😄


I'm not sure the "don't do things on the client" necessarily makes sense if the same team/people are using cljc for both front and back end.


in that case it makes sense... I agree... but if it is two different languages?