SC.Benchmark

by Evin

While we work on tuning we obviously how many tools provided by the browsers profilers but sometimes you have to throw your own benchmarks in to get to the core of the problem, enter SC.Benchmark.

It’s really easy to use:

SC.Benchmark.start('SomeIdentifier');
//<your slow code>
SC.Benchmark.end('SomeIdentifiter');

then from the console: SC.Benchmark.report(‘SomeIdentifer’);

There’s lots more that this can do but I thought this would be helpful
enjoy!

Nested Records in Sproutcore

by Evin

On the project that I am working on, we created this construct called Nested Records. I have just ported it over to the Sproutcore framework. It is extremely useful for data models that use a nested structure. These include most document based database systems like CouchDB and Persevere. These databases and subsequent APIs sometimes need to be configured to make them more Sproutcore-friendly and, now with the new Nested Records, it should be much more easy to create APIs and data structures that make more sense. These nested records can be n-levels and polymophic so that it is a highly flexible framework.

Read the rest of this entry »

Basic View API (part 2)

by Evin

In part 2, we will discuss some more advanced concepts in the View API like composite views. We will talk a little bit about the mechanics of how to create childViews as a part of the View API. Creating child views is a very important aspect of creating Sproutcore applications. You will probably do this more often in the code than you will be creating totally custom views. Also you will use them when you architect your application to create different views of the application.

Read the rest of this entry »

Basic View API (part 1)

by Evin

We will talk about some of the fundamental elements of the View API and use this knowledge to build an advanced composite view. The Sproutcore View API in 1.0 is very impressive and has a lot of power behind it, but with all that power it can sometime be very intimidating to understand where to start or what it all means when you use properties or functions. I will try to break down the basic elements of the View API in to the following categories: Invoking Methods, Properties, and Functions. There will be an example to follow and I am assuming that you have created a project called MyApp. We will be making a very simple application that will show a blog post with the ability to do some actions on the post like make the post a favorite or the author a favorite…

Read the rest of this entry »

Sproutcore Blogsphere

by Evin

I just want to give a shout out to some guys who are on my team who are blogging some cool stuff.

Mike Cohen (frozencanuck)

Mike just joined our team a just few weeks ago. He is learning Sproutcore from scratch and doing a great job. He is posting some beginner tutorials about what he is learning from the team. It is great to see through his eyes the stuff that can be confusing and he is writing some posts on the following:

Josh Holt

Josh is another member of our team that is doing a little more advanced stuff. He is taking the Root Controller Paradigm and expanding on it to do some dynamic calculations. It is a good read on the relationships of properties in objects and between objects when trying to get the data that you need for your views. You can find his post here

Great Work Guys!

Root Controller Paradigm

by Evin

In this blog post, I will spend some time talking about using the power of bindings in the controller layer with the Root Controller Paradigm. This is a really powerful paradigm where you do most of your work in one controller and then let the bindings cascade all the data through a controller chain. This provides several points to bind your view layer in order to present the data in whatever way that your want. I will also touch on adding search functionality that you can use. For the purposes of example, I will be constructing an example controller layer that you would use to build an iTunes-like library application…

Read the rest of this entry »

Composite Views

by Evin

In my last post on bindings, I talked about Rule #2 (The ‘-Path’ Convention) which started a bit of buzz on when and why it is used. First off, it is a naming convention that my team and I have come up with to deal with passing binding paths around in a composite view. A composite view is just a custom view that is made up of using other views in some special way. Composite Views are a great organizational construct but they can be easily misused…

Read the rest of this entry »

Bindings Unleashed

by Evin

Bindings are one of the most important aspects of Sproutcore. Bindings give us the ability to do complex UI interactions with very little code. They have turned tedious and error-prone code to update the interface a thing of the past. It now becomes a simple setup and configuration task to wire up things to be automatically updated. They are incredibly powerful, but can be easily confusing and misused.

Read the rest of this entry »

Chromium

by Evin

I guess I’m a little late to the party but you can get daily builds of Chromium for the mac. Pretty cool

Building Sproutcore Apps with Statecharts (part 2)

by Evin

OK, What is it really look like…

So you might be reading the last post and got excited want to try it in one of your own applications. Then, the Reality Fairy drops by to seed doubt and you say, ‘Great, but what does it look like in real life’. So we have created an example application to show how it is done. First, we will start with the statecharts. This is a very simple application of a contact address book.

Read the rest of this entry »