Looking for JavaScript Book Recommendations?

One of the fundamental principles of SproutCore is “embrace JavaScript”.  Most web developers spend a lot of time trying to find ways to avoid learning JavaScript when in fact JavaScript is one of the most powerful, widely distributed languages in the world.  It is worth learning how to use it right!

Anteaya created a new page on the wiki today for JavaScript book recommendations and we’ve added a good one so far.  If you are interested in JavaScript, take a look at the wiki page and check them out.  If you have read some good books on JavaScript that you’d like to recommend, please take a moment to add a review + link here.  You’ll be helping other developers attain a greater level of happiness on the web.

 

SproutCore Meetup Group

Howdy SproutCore-ers.  We have just created a meetup group on Meetup.com specifically for SproutCore.  We are calling it the Founder’s Club, since it is based in Sunnyvale, and the fact that Charles will be there.

And, for the first meetup, we plan on having some giveaways.

Introducing the SproutCore Wiki

One of the things we haven’t spent nearly enough time on yet is documentation.  How do you get started with the build tools?  How do you talk to a back-end server?  These many other questions could be answered by members of the SproutCore community if only there were a centralized place to keep it.

Well now there is with the SproutCore Wiki.  The wiki is editable by anyone with a Github account and I have posted some editorial guidelines to help everyone make sure they use the wiki in a consistent way.

And there’s one other thing…a lot of times users of an open source project like SproutCore would like a way to propose a new feature.  We need a good way to keep track of these proposals and to allow the community to update them as a group.  Wiki’s are well suited for this, so the wiki includes a special section where you can post proposals.

If you have an idea for a new feature or change to the framework you would like to float to the community, here is a great way to get it incorporated:

  1. Write up your proposal for a new feature and add it as a page to the wiki.  Describe the motivation for your proposal, describe the API’s etc.
  2. Post a message to the Google Group requesting feedback from the community and open a ticket at lighthouse requesting it be added.
  3. From here a couple of things could happen.  People might help to improve the idea, or we might all love it so much that we decide to do it.  At this point, the ticket in lighthouse will be used to track its progress as people work on the concept and it eventually gets adopted into the mainline source.

The new wiki is up right now.  If you have been working on a tutorial to share, please add it here.  I’ll link to new tutorials when they are posted from this blog to keep everyone informed.  Thanks everyone for participating, you make SproutCore a great platform to work with.

 

A Podcast with Charles Jolley by Ajaxian

Ajaxian, a community of “Ajax”-ians , just posted a podcast that features Charles Jolley in an interview about SproutCore, recorded up in Palo Alto.  Give it a listen here - http://ajaxian.com/archives/audible-ajax-episode-27-sproutcore-with-charles-jolley

MacBreak the SproutCore Edition

MacBreak weekly presented a in-depth analysis of SproutCore and what it means to the internet community.

http://thisweekintech.com/mbw94

Many of the conclusions are very insightful and right on and the rest make for a terrific story.

SproutCore TextMate Bundle

I just published the very beginnings of a new TextMate bundle for SproutCore written by our very own Joshua Dickens.  Way to go Josh!

Right now the bundle has only a few helper commands but its open source, so add more and we’ll take em.  I’d LOVE to see some inline help hookups here. :-)

Here is what you get right now:

  1. .ob [tab] => [currentText]Observer: function() { }.observes(’currentText’,’
  2. .prop [tab] =>  text: function () { }.property(’text’,'optional2′),
  3. super [tab] => arguments.callee.base.apply(this, arguments)

The last one is particularly helpful since SproutCore implements calling your superclass in the way you can in other languages.  The only catch is you have to use this long, magical incantation above  (arguments.callee.base.apply(this, arguments)).  If you don’t like to remember that, just install the tmbundle, type super[tab], and TextMate will remember for you.

How to Install

Just do the following on the command line in your terminal:

cd ~/Library/Application\ Support/TextMate/Bundles
curl http://github.com/sproutit/sproutcore-tmbundle/tarball/master -o sproutcore-tmbundle.tar
tar -x sproutcore-tmbundle.tar
mv sproutcore-tmbundle SproutCore.tmbundle
rm sproutcore-tmbundle.tar

If you are on Git, there is an even better way.  Do this from your terminal:
w
cd ~/Library/Application\ Support/TextMate/Bundles
git clone git://github.com/sproutit/sproutcore-tmbundle.git SproutCore.tmbundle

Now, when you want to update the bundle to get new features, just do:

cd ~/Library/Application\ Support/TextMate/Bundles/SproutCore.tmbundle
git pull

After you install the bundle (using either method), you will need to restart TextMate…

UPDATE:  August suggests that you can also just choose Bundles -> Bundle Editor -> Reload Bundles so you don’t need to restart TextMate.

 

SproutCore 0.9.10 - Community Release

Since SproutCore receives some attention earlier this week, the community has already really kicked in some great contributions.  I hadn’t planned to roll another release of SproutCore until 1.0, but we received some really excellent patches and I just had to push them out.  So, tonight I pushed SproutCore 0.9.10 to Ruby Gems.  The highlights of this release are:

 

  • Experimental Windows support. Thanks to some fixes posted by typo_pl, the sproutcore build tools reportedly run on Windows now!
  • Rails 2.1 Compatibility.  Rails and Rubigen had a bug in them that caused Rails script/generate to break if the sproutcore gem was installed.  This should never happen, but oh well.  Thanks to some great detective work by Erich Ocean and a number of you on the mailing list, we determined what was causing this problem and found a way to work around it.  SproutCore-0.9.10 no longer breaks your rails.
  • Relative Paths.  By default the sproutcore build tools would generate absolute URL paths for all resources.  This is less likely to break as long as you can control your entire server URL.  But sometimes you can’t do that and you need relative paths so your built applications can be installed anywhere.  Now this is possible thanks to a patch submitted by August Joki.  Just replace your c[:resources_at] config with c[:resources_relative] = true in sc-config.rb and off you go.
  • Lots lots more.  Many bug fixes and minor API improvements in the JavaScript framework itself and other typos reported by many of you over the last few days.  The complete list is below.

To install this release, just open your terminal and type:

sudo gem update sproutcore

Thanks everyone who helped to participate in this release.  If you have been blocked; unable to work with SproutCore because of the Rails or Windows issues above, please give it a try again and let us know how it goes.

-The Happy SproutCore Team

Build Tools Release Notes

* The build tools can now generate bundles with relative paths. Fixes #19

* Fixed minor typos in the generated template files closed #17

* Renamed generators to sc_generators.  This avoids a conflict with Rails 2.1.

* [FIX] Applied bug fixes suggested by typo_pl to make the build tool run on windows.

* [FIX] Changed default language mapping for Japanese from jp to ja.

SproutCore Framework Release Notes

 
- SC.Platform.Firefox now returns 2 for any gecko browser that is not Firefox.

- Fixed typo in ().  Fixes #12

- Fixed #11

- Switch from transitional to strict DTD

- Replacement of window.location to window.location.href.

- Added default src to image_view (static_url(’blank’))

- Fix  for view_helper view that was closing the element.

- sproutcore now treats space as a printable key instead of a function key.

- Added chainability to observer methods.  set(), beginPropertyChanges(), endPropertyChanges() and a whole slew of other methods now return this instead of void or the set value.  This allows method chainings jQuery style such as:    

    contact.beginPropertyChanges()
      .set('firstName', 'Charles')
      .set('lastName', 'Jolley')
    .endPropertyChanges();

- auto select content of textarea when it’s focused: this._isFocused is true for textarea while false for text input in didBecomeFirstRespo

- scrollable#scrollViewToVisible now scrolls up and left.  This corrects a bug with keyboard control that would bust when you move up or left.

- Updated documentation on form

- Use Element instead of element for IE compatability in Element.setClassName()

- Added SC.View#destroy() to remove views from internal caches. insertBefore, removeChild, etc. also now return the view instance so you can chain them.

- Popup menu was setting the width on each of the child menu items in addition to itself. This had a huge performance impact with little ac

- Disabled the current behavior for the menu item view helper which parses the shortcut before inserting it; now it simply passes the passe

- [FIX] Replaced url() calls with static_url() in CSS so that they will work properly in build mode

- Cleanup in drag.js

- Adding href property to ButtonView for bindable functionality on href attributes.

- Properly order drop targets so that nested targets appear first.

 

 

 

Another mention

I was just clued in a moment ago about another set of mentions of SproutCore.

The first by ars technica:

While Adobe and Microsoft try to position their respective plugin technologies as platforms for creating web-based applications, SproutCore can deliver deliver it directly in the browser without any additional downloads. SproutCore: rich web apps in JavaScript, no Flash Needed

The second by the New York Times:

Apple is introducing MobileMe — its set of Web-based applications — using an open source tool for programmers called SproutCore — which is meant to make it easier to make Web pages handle data quickly. Stunts Today for Firefox. Sophisticated Programs Tomorrow

Installing SproutCore on Ubuntu

Ubuntu has taken a stand against making it easy for developers to install libraries using systems like Ruby Gems which can interfere with apt-get, so simply running sudo gem install sproutcore won’t always work.  Never fear, the community is here.

Tim Anderson explains everything you need to do to install sproutcore on Ubuntu.

Dispelling some confusion about SproutCore

whump says:

While SproutCore uses Ruby to generate static HTML and JavaScript files, you are not tied to Ruby or Rails in production.

SproutCore runs in the browser, your production system can use whatever backend you want, as long as it sends JSON to the browser.

This is true, though you could use any format; not just JSON.  JSON is faster though because it is simpler in structure. Most browsers I tested could parse incoming JSON 10x faster than they could setup DOM for XML.

Anyway, whump’s post is a good clarification about using SproutCore with non-ruby backends from someone who has been there.

Read Dispelling Some Confusion About SproutCore