Skip to main content

Posts

Showing posts from October, 2011

RIP Dennis Ritchie

Dennis Ritchie died last week. While Steve Jobs had a great influence in my past years (I have only recently become an Apple customer/fan) my first experiences with Ritchie's (and Kernigan) go back  to my university days and are forever linked to my first baby steps with Slackware linux, fvwm and tcp-ip. I miss those days as anyone misses his/hers youth. So long Dennis and thanks for all the segfaults!

Grails ajax login from a Sproutcore app

Warning : this post is a work in progress. Full source code for both Sproutcore and Grails  parts can be found at my github account  https://github.com/unicolet . All the Sproutcore examples that I've found so far only show how to fetch data from different backends, but there is unfortunately very little material on authentication. In my case I'm hooking up to a Java backend written in  Grails  with authentication being provided by by Spring Security . The grails spring-security-core plugin documentation already incorporates  Ajax logins so the server-side code is already in place. We only have to apply one small tweak to make it work with Sproutcore. Prerequisites: Grails, Sproutcore > 1.6 with Statecharts. The statechart in the figure illustrates the states and transitions we plan to handle. Authentication Let's start with authenticating the user. We will deal with reconnecting the session later. Assuming you have a basic Grails app with spring-securi