Posted 06 Feb 2014. Tagged: scala, spray and slick

After a first brush with Scala during the Stripe CTF earlier this year, I have have been trying to find an opportunity to dive deeper. Yesterday saw a post on HN about delete.im. Cloning their basic functionality seemed like a neat project to test out some of the cool Scala libraries I have stumbled upon. Notably spray and Slick.

While getting started I ran into a couple of issues with dependencies in eclipse. The following sbt commands fixed these:

> reload
> eclipse with-source=true

I am still very far from groking Scala, but so far it has been a pretty fun experience. You can track my progress on github.

Posted 04 Feb 2014. Tagged: js and angularjs

I have recently have had the pleasure to work with Angular.js. The first couple of hours were mostly spend trying to wrap my head around an existing code base and an unfamiliar framework. Over the weekend I had a chance to read up on the documentation. I took some notes on best practices:

Modules

Break up your application/features into multiple modules:

Controllers

Do not use Controllers for:

Services

The purpose of the service factory function is to generate the single object, or function, that represents the service to the rest of the application. That object, or function, will then be injected into any component (controller, service, filter or directive) that specifies a dependency on the service.

Dependency Injection

Use the inline DI annotation:

someModule.factory('greeter', ['$window', function(renamed$window) {
    ...
}]);

Directives

Other Notes:

Conventions

newer posts older posts