Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our User Agreement and Privacy Policy.

Slideshare uses cookies to improve functionality and performance, and to provide you with relevant advertising. If you continue browsing the site, you agree to the use of cookies on this website. See our Privacy Policy and User Agreement for details.

Who I am. What _are_ Objective-C and Cocoa? First, a walk down memory lane.

Objective-C was really popularised by NeXT on their NeXTSTEP OS. Note that there&amp;#x2019;s never been a language standard, but Apple owns all trademarks and drives the language definition. GCC support on other platforms plays catch-up. Next: what exactly is MVC?

Objective-C was really popularised by NeXT on their NeXTSTEP OS. Note that there&amp;#x2019;s never been a language standard, but Apple owns all trademarks and drives the language definition. GCC support on other platforms plays catch-up. Next: what exactly is MVC?

Objective-C was really popularised by NeXT on their NeXTSTEP OS. Note that there&amp;#x2019;s never been a language standard, but Apple owns all trademarks and drives the language definition. GCC support on other platforms plays catch-up. Next: what exactly is MVC?

Objective-C was really popularised by NeXT on their NeXTSTEP OS. Note that there&amp;#x2019;s never been a language standard, but Apple owns all trademarks and drives the language definition. GCC support on other platforms plays catch-up. Next: what exactly is MVC?

Objective-C was really popularised by NeXT on their NeXTSTEP OS. Note that there&amp;#x2019;s never been a language standard, but Apple owns all trademarks and drives the language definition. GCC support on other platforms plays catch-up. Next: what exactly is MVC?

Objective-C was really popularised by NeXT on their NeXTSTEP OS. Note that there&amp;#x2019;s never been a language standard, but Apple owns all trademarks and drives the language definition. GCC support on other platforms plays catch-up. Next: what exactly is MVC?

Objective-C was really popularised by NeXT on their NeXTSTEP OS. Note that there&amp;#x2019;s never been a language standard, but Apple owns all trademarks and drives the language definition. GCC support on other platforms plays catch-up. Next: what exactly is MVC?

Well, we know it&amp;#x2019;s Model-View-Controller, I put that on the first slide. But what does each level do?

Next: into the sample.

Well, we know it&amp;#x2019;s Model-View-Controller, I put that on the first slide. But what does each level do?

Next: into the sample.

Well, we know it&amp;#x2019;s Model-View-Controller, I put that on the first slide. But what does each level do?

Next: into the sample.

Well, we know it&amp;#x2019;s Model-View-Controller, I put that on the first slide. But what does each level do?

Next: into the sample.

Well, we know it&amp;#x2019;s Model-View-Controller, I put that on the first slide. But what does each level do?

Next: into the sample.

Well, we know it&amp;#x2019;s Model-View-Controller, I put that on the first slide. But what does each level do?

Next: into the sample.

Well, we know it&amp;#x2019;s Model-View-Controller, I put that on the first slide. But what does each level do?

Next: into the sample.

Well, we know it&amp;#x2019;s Model-View-Controller, I put that on the first slide. But what does each level do?

Next: into the sample.

Well, we know it&amp;#x2019;s Model-View-Controller, I put that on the first slide. But what does each level do?

Next: into the sample.

Well, we know it&amp;#x2019;s Model-View-Controller, I put that on the first slide. But what does each level do?

Next: into the sample.

Well, we know it&amp;#x2019;s Model-View-Controller, I put that on the first slide. But what does each level do?

Next: into the sample.

I could do 45 of these in one session - it&amp;#x2019;s a shame there&amp;#x2019;s no market.

So we can see how Interface Builder works, but haven&amp;#x2019;t designed an MVC app at all. FAIL. Next: see what does really count as a model.

So we can see how Interface Builder works, but haven&amp;#x2019;t designed an MVC app at all. FAIL. Next: see what does really count as a model.

So we can see how Interface Builder works, but haven&amp;#x2019;t designed an MVC app at all. FAIL. Next: see what does really count as a model.

So we can see how Interface Builder works, but haven&amp;#x2019;t designed an MVC app at all. FAIL. Next: see what does really count as a model.

So we can see how Interface Builder works, but haven&amp;#x2019;t designed an MVC app at all. FAIL. Next: see what does really count as a model.

Brief description of the message-sending syntax and Objective-C 2.0 properties. Just enough so that the code samples make sense.

Brief description of the message-sending syntax and Objective-C 2.0 properties. Just enough so that the code samples make sense.

Brief description of the message-sending syntax and Objective-C 2.0 properties. Just enough so that the code samples make sense.

Brief description of the message-sending syntax and Objective-C 2.0 properties. Just enough so that the code samples make sense.

The only model object we really have is the URL. Let&amp;#x2019;s see how we can factor that out into an MVC design. Next: class view.

So, we&amp;#x2019;ve separated things out, but that model object isn&amp;#x2019;t really used. The Controller is just filling it in out of a sense of duty. Next: move onto fixing the URL field, but discuss delegates first.

So, we&amp;#x2019;ve separated things out, but that model object isn&amp;#x2019;t really used. The Controller is just filling it in out of a sense of duty. Next: move onto fixing the URL field, but discuss delegates first.

So, we&amp;#x2019;ve separated things out, but that model object isn&amp;#x2019;t really used. The Controller is just filling it in out of a sense of duty. Next: move onto fixing the URL field, but discuss delegates first.

So, we&amp;#x2019;ve separated things out, but that model object isn&amp;#x2019;t really used. The Controller is just filling it in out of a sense of duty. Next: move onto fixing the URL field, but discuss delegates first.

So, we&amp;#x2019;ve separated things out, but that model object isn&amp;#x2019;t really used. The Controller is just filling it in out of a sense of duty. Next: move onto fixing the URL field, but discuss delegates first.

Some objects implement a basic behaviour then allow another object to interpose at specific points in the process. This is called delegation in Cocoa. It&amp;#x2019;s a bit like a Template Method, except that the delegate doesn&amp;#x2019;t encapsulate the original object. ObjC messaging means you can implement a subset of the delegate methods.

Some objects implement a basic behaviour then allow another object to interpose at specific points in the process. This is called delegation in Cocoa. It&amp;#x2019;s a bit like a Template Method, except that the delegate doesn&amp;#x2019;t encapsulate the original object. ObjC messaging means you can implement a subset of the delegate methods.

Some objects implement a basic behaviour then allow another object to interpose at specific points in the process. This is called delegation in Cocoa. It&amp;#x2019;s a bit like a Template Method, except that the delegate doesn&amp;#x2019;t encapsulate the original object. ObjC messaging means you can implement a subset of the delegate methods.

Some objects implement a basic behaviour then allow another object to interpose at specific points in the process. This is called delegation in Cocoa. It&amp;#x2019;s a bit like a Template Method, except that the delegate doesn&amp;#x2019;t encapsulate the original object. ObjC messaging means you can implement a subset of the delegate methods.

We can use a delegation point in the loading of a web page in order to get the address that the web view has really gone to. Oh, where&amp;#x2019;s the code to update the text field, though?

If a view (say) binds to a model, then the model is actually replaced by a proxy which posts observer notifications whenever changes are requested. Next: how that works in the browser app.

If a view (say) binds to a model, then the model is actually replaced by a proxy which posts observer notifications whenever changes are requested. Next: how that works in the browser app.

If a view (say) binds to a model, then the model is actually replaced by a proxy which posts observer notifications whenever changes are requested. Next: how that works in the browser app.

If a view (say) binds to a model, then the model is actually replaced by a proxy which posts observer notifications whenever changes are requested. Next: how that works in the browser app.

If a view (say) binds to a model, then the model is actually replaced by a proxy which posts observer notifications whenever changes are requested. Next: how that works in the browser app.

If a view (say) binds to a model, then the model is actually replaced by a proxy which posts observer notifications whenever changes are requested. Next: how that works in the browser app.

So apart from triggering the &amp;#x201C;go&amp;#x201D; operation, the text field and web view are entirely decoupled. The model now has some utility.

Next: bookmarks.

So apart from triggering the &amp;#x201C;go&amp;#x201D; operation, the text field and web view are entirely decoupled. The model now has some utility.

Next: bookmarks.

So apart from triggering the &amp;#x201C;go&amp;#x201D; operation, the text field and web view are entirely decoupled. The model now has some utility.

Next: bookmarks.

So apart from triggering the &amp;#x201C;go&amp;#x201D; operation, the text field and web view are entirely decoupled. The model now has some utility.

Next: bookmarks.

So apart from triggering the &amp;#x201C;go&amp;#x201D; operation, the text field and web view are entirely decoupled. The model now has some utility.

Next: bookmarks.

So apart from triggering the &amp;#x201C;go&amp;#x201D; operation, the text field and web view are entirely decoupled. The model now has some utility.

Next: bookmarks.

Add the bookmarks. No need to change the model, just bind the new UI to a collection of web addresses.

First: NSArrayController manages its content Second: Add bookmark, note how information only passed over the controller layer Third: Bookmark this page, again information flow over controller layer only Next: Qs!

First: NSArrayController manages its content Second: Add bookmark, note how information only passed over the controller layer Third: Bookmark this page, again information flow over controller layer only Next: Qs!

First: NSArrayController manages its content Second: Add bookmark, note how information only passed over the controller layer Third: Bookmark this page, again information flow over controller layer only Next: Qs!

First: NSArrayController manages its content Second: Add bookmark, note how information only passed over the controller layer Third: Bookmark this page, again information flow over controller layer only Next: Qs!

First: NSArrayController manages its content Second: Add bookmark, note how information only passed over the controller layer Third: Bookmark this page, again information flow over controller layer only Next: Qs!

First: NSArrayController manages its content Second: Add bookmark, note how information only passed over the controller layer Third: Bookmark this page, again information flow over controller layer only Next: Qs!

First: NSArrayController manages its content Second: Add bookmark, note how information only passed over the controller layer Third: Bookmark this page, again information flow over controller layer only Next: Qs!

First: NSArrayController manages its content Second: Add bookmark, note how information only passed over the controller layer Third: Bookmark this page, again information flow over controller layer only Next: Qs!

First: NSArrayController manages its content Second: Add bookmark, note how information only passed over the controller layer Third: Bookmark this page, again information flow over controller layer only Next: Qs!