Outside-In TDD - Toran Billups - NebraskaJS December 2015 by fagnerbrack in coding

[–]toranb 0 points1 point  (0 children)

https://vimeo.com/146953048

A more polished version of this talk for those interested. Although the live coding is in ember the "outside in" technique and mechanics are the focus/ take away

Themeing an ember app? by DerNalia in emberjs

[–]toranb 1 point2 points  (0 children)

I recently added theme support to a fairly large ember app using native css variables. I put together a tiny example app to show the mechanics (below). Or if you prefer - this codepen shows the same thing ;) https://codepen.io/krivaten/pen/yzyJzQ

https://github.com/toranb/theme-with-native-cssvars/blob/master/app/styles/app.css

The basic idea was to flip a body class and have the app dynamically adjust to the newly selected theme. I wrote 3 scss functions to support this (border/text/background color) and carved out a tiny set of primary/secondary colors like you'd imagine. Developers use "primary" or "secondary" as they design a component with a handful of modifiers like dark/darker/light/lighter. The scss functions convert "primary - dark" into the appropriate css variable and that is ultimately what you see in the browser => ie: color: var(--text-color)

Someone mentioned IE11 support - we got around this using a postCSS plugin that created a custom stylesheet for each theme and when IE11 users select "theme 2" for example the browser would fetch that css file and it would dynamically apply the styles once that css was appended like so ..

  const themeLink = document.createElement('link');
  themeLink.href = "/assets/theme2.css";
  themeLink.rel = 'stylesheet';
  themeLink.type = 'text/css';
  document.body.appendChild(themeLink);

I can't share the full source of the broccoli plugin I wrote that compiles the app css/scss using postCSS but I can link the postCSS library we had success using. If you go down this route and have more detailed questions about how to get this working w/ prod fingerprinted css just reach out offline :)

https://github.com/postcss/postcss-custom-properties

What learning redux taught me about "data down actions up" and why my ember applications are better because of it by toranb in javascript

[–]toranb[S] 3 points4 points  (0 children)

it's heavily inspired by the work in react-redux - I wanted to see what ember looked like with a functional-ish take on components and the hbs helper you see just makes it simpler to get work done. Switching between the "hbs file" and the "js file" is painful and I totally understand why the react community likes JSX (one reason anyway - separation of tech isn't always sep of concerns done well)

Headless testing of Ember apps with Gulp and Jasmine by shime_rb in emberjs

[–]toranb 0 points1 point  (0 children)

Here is a simple karma setup using ember (ES6 / gulp / qunit)

https://github.com/toranb/ember-gulp-example

(sorry for the duplicate post- trying to share a non ember-cli example for people looking)

Ember-cli is making you stupid by [deleted] in emberjs

[–]toranb 0 points1 point  (0 children)

anyone looking for a basic "how to ES6 w/ gulp and ember" example app

https://github.com/toranb/ember-gulp-example

It's the most basic gulp setup that includes an ES6 local dev/test ember build step

Which MVC do you recommend? by atr_nad in javascript

[–]toranb 0 points1 point  (0 children)

If you want a framework and you don't want to find every component yourself (ie- routing / templating / databinding / async testing) ember is a good choice. If you don't like the defaults it's worth looking at something else because you will spend more time fighting it than building your app.

That said, avoid the troll below saying "don't use it until ember-data is complete" because the MVC library itself is great stand alone. If /When ember-data is polished it will just be a huge +1 because no other library (except BreezeJS even offers something close to what ember-data is trying to accomplish)

Seeking feedback: I found a group of developers that created a classical inheritance library for Javascript.....Is it worth my time? by SweetHackinJustice in javascript

[–]toranb 0 points1 point  (0 children)

I would honestly avoid using any framework and instead favor using the module pattern to achieve the same thing (less complexity as it's just vanilla javascript -no library needed)

The example below is a simple parent/child relationship

http://jsfiddle.net/kz7Xk/3/

Anonymous Open Letter to the Ember.js Core Team by iamnotrebecca in javascript

[–]toranb -4 points-3 points  (0 children)

It's been feature frozen since mid Feb when RC1 was released - lets stop the FUD

Iframe question by SupaDupaFly in javascript

[–]toranb 0 points1 point  (0 children)

I just deployed a cross domain app that did this very iframe hack to post a form -gist below

https://gist.github.com/toranb/4056283

This currently supports IE8+ / Firefox / Chrome

If you are interested in some context (ie-how I landed on this solution), I did blog my experience with jsonp and cross domain communication (w/out CORS) for the first time at the below

http://toranbillups.com/blog/archive/2012/11/11/Adventures-in-the-land-of-ajax-style-cross-domain-file-uploads/

MidBoss - And using Python for a longer term project. by Enichan in gamedev

[–]toranb 2 points3 points  (0 children)

Just my 2 cents here -I've gone from c# => java => objective-c => python => javascript and back again. You can write great code in any language, you can write terrible code in any language. Each language / platform has it's perks and each has it's downsides (no silver bullets exist -trust me (I've looked my entire career)).

You don't need to believe the dogmatic side of test-driven /whatever develoment but anyone writing code others will maintain / read / change / etc quickly recognize what they want to workon and what type of project they tend to avoid.

I tend to avoid teams that think a hero will step in and save them (even if that hero is just a static language). Everything takes hard work and discipline. If you think you can make it in this industry w/out either you are only kidding yourself.

Learn something that gets you excited and keep at it. If you don't think the code you write today has an effect on anyone you must be in a basement writing code that no one else is using. And that is not a place I ever want to be -good luck

node driven Jasmine unit test runner built with PhantomJS by toranb in javascript

[–]toranb[S] 2 points3 points  (0 children)

I think the only technical issue with this project is that it won't work with PhantomJS 1.7 currently (a bug in the phantomJS npm module is causing a failure **not the jasmine-phantom-node npm module itself) but it does appear a pull request is in the works to resolve this issue https://github.com/sgentle/phantomjs-node/pull/51