Ramiro Franco

Appending Parent and Child Views Using Ember After Dom Ready

Written on Sunday July 22, 2012 at 7:04 a.m.

For some reason I can't seem to find any guides on how to implement new views in Ember after the dom is loaded. You'd think that this would be a pretty frequent task for people aggregating their data without using the ember-data thing. At this point, I've figured it out so I decided to write a few quick samples to help other people get this relatively easy task accomplished. Please note, these samples are all in CoffeeScript, you'll have to translate to javascript as necessary.

First off, setup your Container. I like to set this right after my app to make sure it's available:

This will attach the main ember container to your content, simple enough right?

Next we'll want to create a view for whatever object / array we have going for us. Personally I love using the Ember Array controllers, which we won't go into detail here, but are super useful for collections. Also, you'll want to make sure your view is already setup. I like using the ember-rails gem because it makes sprocket integration easy. So we setup our super simple view:

Now we've got our parent container, and our view, how do we make it appear? Well, I ended up handling this with my controller, so in my controller I have this tidbit:

Now it's up to you to find out where and how you want to execute that, I'm doing it after loading my data successfully.

That's it! that should get your child view to load in parent container in Ember. I know there's bits and pieces left out ( especially data handling ), but I figure most people these days are probably handling data in Ember their own way, but if you want help on that, just let me know!

Chrome vs Safari on iOS 5

Written on Friday June 29, 2012 at 4:47 a.m.

As anyone who's interested in this topic already knows, Google has created a port of Chrome for iOS designed to work on the iPhone and on the iPad.

I did a little bit of testing today, hoping to see what the primary differences in rendering were and found that they were largely the same. Primarily because they are both using iOS's webkit rendering. This is actually a good thing, it helps to speed up the app and it keeps web pages consistent on the device.

Where they differ, is the javascript implementation. Chrome has a reputation for having a very fast javascription engine, but some preliminary testing shows that at least on iOS, Safari is a clear winner in terms of speed. A quick benchmark of dom render time using jQuery, Mootools, and Dojo clearly shows that Safari outpaces Chrome.

I love the Chrome UI, and I'm a big fan of the synchronization, but the speed benefits on Safari might actually keep me from making the switch.

Update Turns out, Google isn't going to use their own rendering or javascript engine, and Apple has restricted direct access to their javascript engine posting security concerns, which causes it to run slower in third party apps like Chrome.

Long Evenings.

Written on Saturday April 28, 2012 at 12:53 a.m.

I've been working more than I probably should, again. With committing hours to multiple contractors on top of my usual work at CrowdCompass, and my own private projects. I feel like I have way more time to projects and work than actual time available for probably the next month or so.

I have been able to schedule a few moments in from time to time. I started my FFXIV account back up and I love all the changes they've made to the game, and recently I through a huge birthday bash for myself that was a rousing success.

The festivities involved a signature cocktail, the French 75, which Angela helped me pick up supplies for. We had sushi, cheese, charcuterie for snacking around the house. We had a bunch of great music videos on the big tv. My friends came together to get me some amazing gifts, and we all celebrated the night away. It was a probably one of the better parties I have had and possibly one of the best I will have.

Busy Bees.

Written on Friday March 30, 2012 at 11:50 p.m.

I've been busy for what really feels like forever. I don't think I've had a real break from working in what has to be three weeks at this point. Don't get me wrong, I love my job, and as far as life situations go, having "too much work" is definitely on the lower end of the suck-scale, but I really do need to take a break soon.

I've mainly been working on a single project for CrowdCompass that involves using Ember.js and Rails. I'm loving the product that's coming out of this. I have great design mock ups from my co-worker Kevin, and amazing back-end support from Matt and Sean so with any luck, this will be finished soon and I'll finally have the time to start up some RPG or MMORPG.

A Brand New Beat

Written on Thursday March 8, 2012 at 3:53 p.m.

As of now, I'm the happy owner of a pair of Lady Gaga's Heartbeats 2.0 head phones, and very happily so. The quality is beyond that of my sony headphones, they are comfortable ( and very adjustable, with 8 different ear pieces to select from ), and best of all, they look bad ass.

I managed to chip a tooth on Sunday, and now I find myself looking to pay for 2 crowns on my teeth ASAP, with another couple of crowns coming soon after.

My old PS3 also died out on me, so I had to replace that too. Not a serious issue or anything, but upsetting non-the-less. Though I did manage to take care of that right away and the newer-slim model heats my apartment up at least 2 degrees (Fahrenheit) less than the old one did, and is much quiter.