Saturday, August 22, 2009
Attending
JSConf 2009 was a real eye-opener for me: there are a lot of people using JavaScript in really interesting ways to do phenomenal things inside and outside of the browser. Projects like Phonegap, Titanium, CouchDB, SproutCore, and Cappuccino have the potential to transform many aspects of computing or at least point the way to some new paradigms.
To keep the conversation going, this led me to propose one talk and one panel for SXSW 2010:
Building Rich Web Apps with SproutCoreThe JavaScript Applications RenaissanceIf those sound intriguing, please consider voting at the above links, or better yet leave a comment expressing your support.
There are several other JavaScript related talks that I hope you will check out as well:
http://panelpicker.sxsw.com/ideas/index/4/q:javascriptLabels: Javascript, sproutcore, sxsw
Monday, April 27, 2009
On Saturday I gave an "Introduction to SproutCore" talk at
JSConf, the world's first all-JavaScript conference. It was a great conference and highly recommended. Videos will be posted over the next several weeks. For now, for those interested, my slides are below.
Labels: Javascript, jsconf, sproutcore
Friday, April 17, 2009
I'm teaching a three-hour tutorial at
RailsConf 2009 on SproutCore and Rails, called "Building Next Generation Web Apps with Rails and SproutCore". Since three hours isn't a whole lot of time, I wanted to post some things that students can do to prepare to get the most out of the training.
See you in Las Vegas!
Prerequisites
We'll use the
stable release of SproutCore (0.9.23) although I plan to address what's different about the 1.0 API which is currently in alpha testing. So to be able to work in the tutorial, you'll need recent versions of Ruby and RubyGems.
Follow these directions to install SproutCore.
Note that the SproutCore gem depends on merb-core (>= 0.9.9), erubis, rubigen, and mongrel.
Before the tutorial starts, you must be able to view localhost:4020. If that works, you know everything installed correctly.
This may go without saying, but you also need to have Rails 2.3.x installed. Specifically you should be able to load the Rails startup page on your development machine at http://localhost:3000/.
Recommended Reading
The most helpful wiki articles to read include:
Labels: railsconf, sproutcore
Sunday, October 19, 2008
Bryan Liles took a great (but long)
video of my recent presentation on SproutCore at
B'More on Rails. A lot of my introductory material is adapted from the
SproutCore blog especially
this post from Charles Jolley.
This is a great technology that I'm having a lot of fun learning. Standby for more blog posts about it!
Labels: sproutcore
Tuesday, August 12, 2008
Recently I've started to build a new, rich user interface for
OtherInbox using
SproutCore, which has been very enjoyable. One thing that was not enjoyable was properly configuring my development environment.
In production, you'll usually deploy your SproutCore app as a static file, so all you have to do is arrange for your users to hit that URL (which out of the box is configured as /static, but could be anything).
In development mode, though, you want to be regenerating your client on the fly by serving it dynamically from sc-server. To use your app, you talk to http://localhost:4020, and if you want your client to communicate with a backend server, you configure the "proxy" setting in sc-config. Thus when the Sproutcore server gets a request for "/gadgets", it proxies that request to your local development server.
For some kinds of apps, this works well. For OtherInbox though, everything the Sproutcore app does requires you to be signed-in and have an active session with the Rails application server. This caused all kinds of cookie problems, probably because of same origin policy (e.g. my Rails app running at otherinbox.dev was issuing cookies that were somehow getting mangled by the proxying process).
<VirtualHost *:80>
ProxyPass /app http://localhost:4020/other_inbox/
ProxyPassReverse /app http://localhost:4020/other_inbox
ProxyPass /static http://localhost:4020/static/
ProxyPassReverse /static http://localhost:4020/static
ProxyPass / http://localhost:3000/
ProxyPassReverse / http://localhost:3000
ProxyPreserveHost on
</VirtualHost>
See how that works? When I load http://otherinbox.dev/app in the browser, Apache proxies that request to sc-server, which dynamically generates my Sproutcore client app.
When components of that app make requests for other parts of Sproutcore, using the /static URL, Apache also proxies those back to sc-server.
When the app makes requests for anything else, those requests get proxied by Apache to the Mongrel I have running the Rails code. Because my Sproutcore app is making REST calls to the backend, this ensures that anything the Sproutcore app asks for from my server gets proxied properly, in this case to localhost:3000.
As soon as I did this, all of the cookie issues were done. You'll also have to add some application-specific code about how you want to force logins if the user is not already signed-in. In our code, I just check for a logged-in cookie, and if it's not there, we open up the URL for a signin window.
Labels: rails, sproutcore