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.
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:
A service module
A directive module
A filter module
An application level module which depends on the above modules, and
contains any initialization code.
Controllers
Do not use Controllers for:
DOM manipulation - Use directives instead.
Input formatting — Use form controls instead.
Output filtering — Use filters instead.
Sharing stateless or stateful code across controllers — Use
services instead.
Managing the life-cycle of other components (for example, to create
service instances).
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.