--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
We use Angular, and the guys from my team can elaborate here (if they're reading!). I can arrange for a looksie, if of use.
--
Hi Andreas,
I'm part of that team Neil mentioned.
We use Lift 2.6 servers with a Mongo database on the backend, AngularJS and JavaScript on the client.
I have some experience with applications that render server side, and while I think both approaches have its place, I think client side rendering enables you to create more responsive applications.
I agree there is this impedance mismatch between Scala server and JavaScript client, which you also have even if you do just small bits of client code. it's just not that obvious.
For client-server communication we mostly use Resthelper Apis. That means on the server side we have session state and type savety, and as soon as the json data travels back to the client we are in full dynamic land. While I sometimes wish for a compiler to be there and tell me what a type looks like, dynamic JavaScript on the other hand also enables things that you can just dream about in Scala. Want some extra data in that object? Just put it in...
You may also want to look at Dart or Typescript. I'm not sure how well they play with Angular, they are supposed to give you some type safety though.
One other though to throw in the mix. If you just starting to look at client side rendering have a look at ReactJS. After you overcome the initial urge to throw up because you mix code and markup, something we have learned for 20 years not to do, you will start to see how powerful this concept is and how much easier programming becomes.
I hope that helps a bit,
--
--
Lift, the simply functional web framework: http://liftweb.net
Code: http://github.com/lift
Discussion: http://groups.google.com/group/liftweb
Stuck? Help us help you: https://www.assembla.com/wiki/show/liftweb/Posting_example_code
---
You received this message because you are subscribed to the Google Groups "Lift" group.
To unsubscribe from this group and stop receiving emails from it, send an email to liftweb+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
I would also say that having rest apis to give you the data also means you have to write more code to make it secure, not just check that the user has to be authenticated, but also check that the right user has access to the specific resource, so this area takes discipline and whoever does code review needs to make sure you don't end up having apis that anyone can hand craft the url to get someone else's data.Hi Andreas,Refactoring client side code is definitely different than scala, for the past week and a half I worked on a large refactor of our app and it involved both, client and server side changes, like you said, for the server side, it was mostly a matter of shift + F6 over the name of the variable/function and keep sbt in ~compile to make sure it worked as expected, but the client side wasn't too terrible, there it was a matter of find/replace at the root of all the client side code, and paying attention I was skipping the matches that were not supposed to be changed. It helped that I was familiar with the area of the app. And it also helped that we use grunt and jshint to catch some errors (not types though), but typos and stuff like that.
And finally, you mentioned on previous emails that your app has lots of long reports, if you move them to client side, note that you need to be careful and send just the json data you need, it is very easy to end up with several MBs of json going down to the client, and then the client takes several seconds, even minutes to read it all and render it, so while the initial surrounding of the page may load fast, the user's content may take a really long time.
Thanks
Diego