My current twitter avatar

zaccary price

Front-end developer and designer, currently based in Helsinki, Finland

Create a better AngularJS application structure using modules

21 Apr 2014

AngularJS' extensibility is not inherent in it's design, rather it's a feature that must be exploited to ensure efficient development and ease of comprehension. The first move should be to not have any functionality that, at the least, isn't required to be used during the app's initialization. While this is useful from an organizational perspective, it will make things messy when having to refer to the app's root module all the time. What you can do instead is create modules for all the different aspects of Angular. Creating a module for your services, controllers, directives and so forth will not only allow for better organization of your project, but also optimise the use of plugins in the future.

Avoiding mystery: Missing UX in password fields on mobile devices

21 Sep 2013

Mobile keyboard interaction should be a process done as little as possible, when not writing for content such as a text message or the odd email. Keyboards on a mobile device, particularly phones and particularly touch interfaces at that, are clumsy affairs and are almost entirely dependant on the use of auto-correct in some form or another to return the intended result. Such a function is, however, not available in certain cases such as writing a url in the browser and perhaps most frustratingly in forms. Password inputs are by far the most irritating thing to have to deal with on a mobile device, and while lengthy cookie expiration times or applications retaining your login session indefinitely, they are still an unavoidable thing.

Global Scope. Sharing data between controllers in Angular with services

11 Sep 2013

Services in Angular are intended to be injected into controllers, the $scope and $http services are examples of this, and are very powerful and exceptionally useful things when it comes to making larger-scale applications using the framework. Essentially, they work by 'injecting' a collection of functions into a controller to be used when required, which makes for neater and DRYer code over all. Yet, it's not only functions that can be injected in this way, but also static objects. Basically you can have variables in there too which can be referred to and used in exactly the same way as you'd use functions. The advantage with using variables, for lack of a better description, in services is that their scope transcends that of the controller you inject them into. Hence, you can define a variable that can have a 'global' scope within your application.

Automate your workflow. Yeoman, NPM and Bower for easy front-end development

08 Sep 2013

Modern web development has moved on from notepad and simple HTML, it now encompasses a whole wealth of technologies built upon each other to deliver better, neater and faster end-results. Package and dependency management and task automation are the big players that can assist with anything from a small web page to a full blown web-app. I shall describe 4 of my favorite such tools which can provide the groundwork for setting up any kind of web project, with Yeoman setting up a bootstrap project, installing required tools with NPM and code libraries with Bower, then compiling your production version with Grunt.js. It’s really too easy.

Older Newer