Thor HAMMA! OS-X Cocoa UI for Cloud Foundry

So today we’re super excited to release Thor release candidate from the furnaces of the Iron Foundry. We’ve had number of people working not he project and core Objective-C Coder Benjamin van der Veen @bvanderveen (Twitter), @bvanderveen (Github) and site tearing through tests, implementation, refactoring and UI hacking non-stop these last few weeks. I’ll admit, I think he’s slept some, but nobody knows.

With this new release, the features around…  well…  check out the video.

For a more complete list of the features check out Github, Github Issues & the Iron Foundry Blog.

Thor Project Opens Up, Building the Cloud Foundry Ecosystem with the Community

The Iron Foundry Team are big advocates of open source software. We write code across all sorts of languages, just like many of the development shops out there do. Sometimes we’re heavy on the .NET, other times we’re all up in some Java, Ruby on Rails, spooling up a Node.js Application or something else. So keeping with our love of open source and our polyglot nature we’ve created the Thor Project with three distinct apps.

Before jumping into the applications though, a little context for what and where Thor is in the grand scheme of things. We need to roll back to the Cloud Foundry Project to get into that. The Cloud Foundry Project is an open source project built around software for PaaS (Platform as a Service) which can be used to build your own PaaS internally or externally, in a cloud provider or directly on hardware. It’s your choice how, when and where you want to use it. For more context on PaaS check out my previous entry “The Confusions of IaaS, PaaS and SaaS“.

Thor Project

Cocoa for OS-X

Thor Odinson
Thor Odinson, God of Thunder

You know who Thor is right? He’s this mythic Norse God, also known as the God of Thunder. Since we’re all about bringing the hamma we welcomed Thor into our team’s stable of applications. So starting immediately we’ve released Thor into the realms for contributions and fighting the good open source software battle! If you’d like to join the effort, check out the github project and feel free to join us!

Technically, what is the Thor Application? This is a Cocoa Application built for OS-X that is used for managing, deploying and publishing applications to Cloud Foundry enabled and or Iron Foundry extended PaaS Environments.

.NET for Windows 7

The .NET Metro version of the Thor Application is also released via github with a provided installer. We’ve almost taken the same path, except of course for the very different UX and UI queues with Windows 7 and the Metro UX design guidelines.

WinRT for Windows 8

I wasn’t really sure what to call this version. Is it Metro or WinRT or Windows 8 or something else? Anyway, there is a project, it is albeit empty at this point, but it is the project where the Windows 8 version of Thor will go! For now get the Windows 7 version and install it on Windows 8, it won’t have touch interface support and things, but should work just like a regular application on Windows 8.

The Code

To get started with these, generally you’d just clone the repo and do a build, then get started checking out the code. There is one catch, for the OS-X version you’ll want to pull down the sub-modules with the following command.

[sourcecode language=”bash”]
git clone git@github.com:YourForkHere/Thor.git
git submodule update –init –recursive
[/sourcecode]

Once you do that in XCode just make sure to then select the right project as the starting build project.

…then when the application is launched…

Thor Running in OS-X
Thor Running in OS-X

I’ll have more in the coming days and weeks about Thor & Iron Foundry. For now, check out the blog entry on the Iron Foundry Blog and subscribe there for more information.

Thor – Cool Objective-C Bits, Libraries and Code Snippets [[TheSeries alloc] init];

Benjamin Van Der Veen (@bvanderveen) has been working with me to build out the Thor Application  based on Nathan Young’s (@nathanyoung) awesome designs. We’ll be releasing open source real soon. I wanted to cover some of the cool libraries, specific code snippets and such. These are a few of the things that have come in very useful as the coding deluge began.

Reactive Cocoa (AKA Reactive Extensions)

When you need to compose and transform sequences of values (kind of like Reactive Extensions for .NET) this is your library when working in Objective-C land. Reactive Cocoa or “RAC” for short can observe on key values to provide a key value for compliant properties. RAC helps to keep mutability under wraps (which is really really needed in Objective-C), pulls together behaviors and relationships between properties, and helps tremendously with asynchronous actions. The last bit we have a good amount of occurring with Thor since it talks to the Cloud Foundry web service API end points.

An example I snagged from the github site is below. It watches for changes on the username property.

[sourcecode language=”objc”]
[RACAbleSelf(self.username) subscribeNext:^(NSString *newName) {
NSLog(@"%@", newName);
}];
[/sourcecode]

Which serves, as pointed out in the README.md (be sure to read it if you’re going to use the library), as a wrapper around KVO. It goes on to show further sequences on complex actions.

[sourcecode language=”objc”]
[[[[RACAbleSelf(self.username)
distinctUntilChanged]
take:3]
where:^(NSString *newUsername) {
return [newUsername isEqualToString:@"joshaber"];
}]
subscribeNext:^(id _) {
NSLog(@"Hi me!");
}];
[/sourcecode]

For some that write C# all the time this might seem like a “meh” moment. But considering the work that would be needed in Objective-C usually this could take significantly more lines of code, such as setting an observer, using a property or something to watch the value, monitor the non-distinct changes, and then bounce the value of the property for every non-distinct value. Yeah, and it still isn’t done. But anyway, that’s just the icing, the cake is delicious. If you’re in Objective-C land much, it is worth checking out.

Check it out on Github.

Thor Brings the Hamma! Cloud Foundry OS-X, Windows 7 and Windows 8 Interfaces FTW!

One of the things that I do in my work is lead the efforts around creating and leading open source projects. As regular readers may know, I’m big into open source efforts, especially around PaaS. My preferred PaaS offering these days for internal, external and public cloud PaaS is Cloud Foundry (with Iron Foundry for all of my .NET needs). Today the we made the projects official and I’m charging forward with a a great team of people. You’ll be able to use these new user interfaces for Cloud Foundry against Tier 3 Web Fabrics, CloudFoundry.com, Stackato, AppFog and any other company that uses Cloud Foundry at the core and exposes the web service APIs for use!

Thor & Thor.NET

In a couple weeks we’ll be making the github repositories completely public, open sourcing the code & products entirely and looking forward to working with the community to make these tools as awesome as we can. For now, if you’d like to jump into the repositories and see where we are and what we’re up to as we step toward opening them completely, sign up via “early access“. We’ll get you setup on the repo so you can fork, pull and add you’re own signature bits.

Why did we name the project Thor? Well, we’ve been spearheading the Iron Foundry Community efforts for .NET support on Cloud Foundry so we figured we needed someone to bring the hamma to the battle, nobody better than Thor for that!

I’ll have a regular write up of snippets, code and other things I’m working on here so subscribe and give me a follow on Twitter (@adron) and App.net (@adron). Also, for official open source releases of the project check out the Iron Foundry Organization site that has the Iron Foundry downloads, source, Thor and the official Iron Foundry Blog.

OS-X Cocoa Quickie #1 => Make Sure to Have Unit Tests

When starting an Xcode Cocoa Project you should have a testing project that you include. It’s a simple check box on the project creation dialogs.

Keep This Checked! Write Tests!
Keep This Checked! Write Tests!

If for some reason you inherit a project that doesn’t have unit tests, tests, or anything of the sort and need to add a testing project follow these steps. With the project open add a new target as shown below.

Add a New Target to the Project
Add a New Target to the Project

Add a Cocoa Unit Testing Bundle.

Cocoa Touch Unit Testing Bundle
Cocoa Touch Unit Testing Bundle (Click for full window and full size image)

Set the appropriate parameters for your project. Be sure to select the project from the drop down.

Set the product name and be sure to select the correct Project from the drop down. (Click for full window and full size image)
Set the product name and be sure to select the correct Project from the drop down. (Click for full window and full size image)

Once finished adding the testing target, edit the schema. The project will have an additional schema. I personally like to keep them rolled together, so delete the “*Tests” schema and just make sure that the Tests section has the right target listed.

Schema Settings
Schema Settings

If it isn’t listed, as shown in the above dialog, click the + to add the tests project. Select it in the target dialog as shown below.

Adding the test target for the schema
Adding the test target for the schema

Once all that is done then the tests can be executed from the Product -> Test menu option or the shortcut key combo of ⌘U. With the default code that is added to the target project, you’ll end up with one failing test.

Test FAIL!
Test FAIL!

Now write tests!