Vojtěch Jína
wallacepolsom
tumblr dot com
ojovivo

izzy's playlists!

Discoholic 🪩
KIROKAZE

❣ Chile in a Photography ❣
todays bird
I'd rather be in outer space 🛸
PUT YOUR BEARD IN MY MOUTH
we're not kids anymore.

roma★
Peter Solarz
almost home
Lint Roller? I Barely Know Her
Game of Thrones Daily

PR's Tumblrdome
𓃗

No title available
d e v o n

seen from United States

seen from Malaysia
seen from United States
seen from United Kingdom

seen from Mexico

seen from T1

seen from United States

seen from Italy

seen from Sweden

seen from United States
seen from France
seen from United Kingdom

seen from Norway

seen from Belgium
seen from Türkiye

seen from Türkiye
seen from United States
seen from United Kingdom
seen from United States
seen from France
@jsdavo-bb10dev
Vojtěch Jína
Words
firefox, chrome, explorer, phantom, zombie, cheerio, flowerbox, mocha, jasmine, karma, cordova, testacular, ripple, jasmine-headless-webkit, cucubmer, casperjs, ember, angular, hudson, jenkins, semaphore, chimera, selenium, browserling, browserstack, testling, windmill, chromedriver, webdriver, firefox-driver, sahi, slimer, webkit, gecko, blink, qunit, team-city, bamboo, qnx, watir, travis, xvfb,
A fresh approach to unit and integration testing.
JSDOM, A Test Harness
Over the last few days, I've made a few mistakes and been reminded not to reinvent the wheel.
I thought that bootstrapping a DOM would be simple, despite explicit warnings. I also didn't search hard enough for a pre-built solution, or a starting point at least.
I've found some interesting stuff now though:
https://github.com/ember-backstop-book/EmberTrackr https://github.com/fuseelements/ember-brunch-skeleton http://brunch.io/
Now, a quick lunch and then back to work.
Simple Integration Testing
Don't use Jenkins-CI, or Hudson, or any of the other over-complicated rubbish.
Set up a server in the cloud somewhere, install an SSH daemon like OpenSSH server and then `git push` to it and run this program:
https://github.com/ryankee/concrete
Too easy!
UPDATE: actually, it looks like Concrete is a bit out-of-date, I'll need to fork it.
Testing with Jasmine and Literate Coffeescript
As I have written before, test-driven-development is good.
What's lacking though, is a bit of a demo, a simple example to use as a starting point.
So that's what I've made. It's on GitHub and should be self explanatory.
https://github.com/jsdavo/jasmine-node-litcoffee-example
Ember JS
Why Ember? Why a framework at all?
http://emberjs.com
Well, I can think of two good reasons.
The first is best described as 'unknown unknowns' by Yehuda Katz. There are actually lots of bits and pieces that one can neglect to consider at the outset. It turns out that there will be lots of little surprises (in any kind of development). A framework takes care of (at least) some of these.
The second reason is related. It's that you don't have to write as much documentation. As a consequence of not re-inventing the wheel, you don't have to document how you did it! Avoid this technical debt, your colleagues will appreciate it.
Ember is a good choice because it works well with Rails. Once again, it's a good idea to stick with the pack. Ember's abstraction may not be as good as the Angular JS project, but it doesn't really matter.
It's just a matter of having some framework as a starting point.
HTML-5 Apps
"With BlackBerry there are always options".
So how does one make a HTML-5 app on Blackberry 10 platform?
Should I use Cordova, PhoneGap, Appcelerator, Sencha Touch, Qt/Cascades, jQuery Mobile? What about Core Native, what is that? What is Adobe Air? Why not Java/Android?
Then when you go to try them out, there are a few different flavours of the Software Developers' Kit, which is confusing.
And then, Cordova 3.0 has been released, which pretty much makes WebWorks redundant.
Then there's the PhoneGap project, which has Cordova 3.0 at its core. PhoneGap sounds good... they even have an online compilation service run by Adobe. Oh wait, you mean it supports BlackBerry, but not BlackBerry 10? Oh bummer.
I suggest staying away from PhoneGap and WebWorks, just use the open-source core project: Cordova (http://cordova.apache.org).
You'll need NodeJS v0.10 (http://nodejs.org) and then use NPM to handle packages (sweet!). More about this later on.
Whatever you do, don't try create a Cascades app with a WebView, and then put your HTML-5 assets in the WebView, and then try and write your own native extensions.
The Cordova framework exists for a reason: boilerplate. Don't reinvent the wheel.
The latest release of Cordova 3.0 is really good. Read about it on their blog: http://cordova.apache.org/blog/releases/2013/07/23/cordova-3.html. Read about Brian Leroux, the project lead: https://twitter.com/brianleroux.
Let me know how you go, ping me on Twitter @jsdavo.
Issue Tracking
Honestly, Launchpad.net and JIRA make me appreciate the effort that went into designing GitHub, especially Issues.
https://issues.apache.org/jira/browse/CB-4403
WebWorks, Cordova, PhoneGap
They are all very similar.
At the core of PhoneGap is Cordova. At the core of WebWorks is an old version of Cordova. Both PhoneGap and Cordova are NodeJS modules distributed on NPM.
PhoneGap is a nice idea... but Adobe's online build service doesn't support the BlackBerry 10 (QNX) platform as a target.
To target the latest BlackBerry platform, you need the Native SDK toolchain (not the WebWorks toolchain!).
I'll write a bit more about this later on.
jasmine - DOM-less simple JavaScript testing framework
I'd like to gather together how you are testing ember apps and turn it into "The Ember Testing Story". I'm also going to add tests into ember-tools generators and want to do it in a blessed path. I seek righteousness in all things, brethren and sisters. Here's my current setup for my app: For Unit tests: I build my app into a single file with ember-tools, which uses browserbuild (commonjs). I then use testacular + jasmine and load my full application.js into the test suite. I m...
Great work from Research In Motion.
Apache Cordova 3.0
What a great framework! I really admire the work done here by Brian Leroux (http://brian.io/) and his team.
http://cordova.apache.org/blog/releases/2013/07/23/cordova-3.html
I particularly like the way that version 3.0 has moved towards a light-weight core and a smart module system much like NodeJS Package Manager.
Test Driven Development
Writing tests first is hard. It takes a bit of thought and good tooling. It seems to me that web-development has a large ecosystem of frameworks, libraries and tools. I may be wrong, but I don't think such a thing really exists for C++ development with the Qt framework (a popular user-interface library for cross-platform apps: desktop, Symbian and Blackberry 10).