<?xml version="1.0" encoding="UTF-8" ?>

<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
   
      <title>devalias.net</title>
   
   <link>https://www.devalias.net</link>
   <description>Follow me into the rabbit hole that is my mind and learn about topics including.. security, technology, efficiency, biohacking, health, personal growth and probably a whole lot more.</description>
   <language>en_GB</language>
   <managingEditor> </managingEditor>
   <atom:link href="rss" rel="self" type="application/rss+xml" />
   
	<item>
	  <title>Forming Serverless Clouds with AWS: CloudFormation, SAM, CDK, Amplify</title>
	  <link>/devalias/2018/09/15/forming-serverless-clouds-aws-cloudformation-sam-cdk-amplify/</link>
	  <author>devalias</author>
	  <pubDate>2018-09-15T00:00:00+10:00</pubDate>
	  <guid>/devalias/2018/09/15/forming-serverless-clouds-aws-cloudformation-sam-cdk-amplify/</guid>
	  <description><![CDATA[
	     <p>Recently I have been playing around with a few little side projects, and trying out different ways of getting them IntoTheCloud(tm). If you know me, you know that I'm pretty big on increasing efficiency, reducing boilerplate/time to start, automation, infrastructure as code (IaC), and similar fun things.</p>
<p>With these explorations I have been looking to see how I can go from 'cool project idea' to having a PoC <a href="https://aws.amazon.com/serverless/">serverless</a> application running InTheCloud(tm) with as little time, effort, boilerplate, and ongoing cost required; with the hope that if it is quick/easy enough, and the patterns simple enough, I will actually get around to hacking on more of my side projects (or it will be quicker and cheaper to get clients projects up and running).</p>
<h2><a name="aws"></a>AWS</h2>
<p>For this particular exploration I have been playing around a lot in <a href="https://aws.amazon.com/">AWS</a> (Amazon's Cloud), with a particular focus on <a href="https://aws.amazon.com/serverless/">serverless</a> patterns. As you probably know, AWS is huge, basically runs a good chunk of the internet, and seemingly <a href="https://aws.amazon.com/products/">has a product line for every possible thing you could dream of</a>.</p>
<p>Since I was looking to speed up my 'new project boilerplate', I decided to focus in on the following projects/services:</p>
<ul>
<li><a href="https://aws.amazon.com/cloudformation/">AWS CloudFormation</a> (<a href="#cloudformation">see below</a>)</li>
<li><a href="https://github.com/awslabs/serverless-application-model">AWS Serverless Application Model (SAM)</a> (<a href="#sam">see below</a>)</li>
<li><a href="https://github.com/awslabs/aws-cdk">AWS Cloud Development Kit (CDK)</a> (<a href="#cdk">see below</a>)</li>
<li><a href="https://aws-amplify.github.io/">AWS Amplify</a> (<a href="#amplify">see below</a>)</li>
</ul>
<p>I'll go into a bit more detail on each of these below, but since I saw so much potential crossover/overlap between them, I opened a few issues on their respective repositories. You might find more interesting tips, tricks, and aspects in those threads too:</p>
<ul>
<li><a href="https://github.com/awslabs/aws-sam-cli/issues/663">awslabs/aws-sam-cli#663</a></li>
<li><a href="https://github.com/awslabs/aws-cdk/issues/703">awslabs/aws-cdk#703</a></li>
<li><a href="https://github.com/aws-amplify/amplify-cli/issues/160">aws-amplify/amplify-cli#160</a></li>
</ul>
<h2><a name="cloudformation"></a>AWS CloudFormation</h2>
<blockquote>
<p><a href="https://aws.amazon.com/cloudformation/">AWS CloudFormation</a> provides a common language for you to describe and provision all the infrastructure resources in your cloud environment. CloudFormation allows you to use a simple text file to model and provision, in an automated and secure manner, all the resources needed for your applications across all regions and accounts. This file serves as the single source of truth for your cloud environment.</p>
</blockquote>
<p>Basically, <a href="https://aws.amazon.com/cloudformation/">CloudFormation</a> is a bunch of JSON or YAML that defines all of the AWS resources/projects you want to use, how to configure them, and how to tie it all together. Then you can just push it ToTheCloud(tm), some kind of magic happens while you go make coffee, and you're done. It's AWS's basic Infrastructure as Code (IaC) service.</p>
<p>In reality, CloudFormation templates can VERY quickly get massively out of hand, huge, confusing, and pretty hard to cognitively reason about. It's great as an underlying technology layer.. but it isn't really optimised for human consumption (particularly the JSON format). Thankfully some of the other projects I will talk about a little later aim to solve that human interface problem.</p>
<p>Within CloudFormation there are a few high level concepts that it's good to be aware of:</p>
<ul>
<li><a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/stacks.html">Stack</a>: This ties together all of your resources in an <a href="https://docs.aws.amazon.com/general/latest/gr/rande.html">AWS Region</a> into a single unit.</li>
<li><a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/using-cfn-nested-stacks.html">Nested Stack</a>: A stack created within another stack. Allows you to seperate common patterns into their own templates and tie them all together.</li>
<li><a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/what-is-cfnstacksets.html">StackSet</a>: This ties together multiple Stacks, and allows you to manage them across multiple regions and accounts.</li>
</ul>
<p>Since Stacks by themselves are single region, you can run into some weird problems depending on the services you want to use. For example, when I want to deploy my application in <code>ap-southeast-2</code>, but want to use <a href="https://aws.amazon.com/cloudfront/">AWS CloudFront</a> (<a href="https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/cnames-and-https-requirements.html#https-requirements-aws-region">which runs in <code>us-east-1</code></a>) with a HTTPS certificate issued through <a href="https://aws.amazon.com/certificate-manager/">AWS Certificate Manager</a>, I can't natively do this within a single stack.</p>
<p>There are workarounds such as <a href="https://github.com/awslabs/serverless-application-model/issues/565#issuecomment-419129580">using custom resources</a> to manage the deployment, or <a href="https://github.com/awslabs/serverless-application-model/issues/565#issuecomment-419608229">using a StackSet</a> with <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/outputs-section-structure.html">exported outputs</a> and <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/intrinsic-function-reference-importvalue.html"><code>Fn::ImportValue</code></a> to deploy the related components across different regions; but sometimes it can take a little digging to figure out the best way to do it.</p>
<p>If you're interested in trying the <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/template-custom-resources.html">Custom Resource</a> approach, the following was how one person explained their implementation to me:</p>
<blockquote>
<p>It's a bit complicated due to specifics of ACM certificate issuance. The general way it works is:</p>
<ul>
<li>
<p>CloudFormation creates a custom resource that has the same &quot;signature&quot; as an ACM certificate. It takes the same parameters and has the same return values (Ref and attribute values).</p>
</li>
<li>
<p>The custom resource invokes a Lambda function in the account. This function requests a new certificate from ACM in us-east-1.</p>
</li>
<li>
<p>The Lambda function then sends a message to an SQS queue in the account. This queue is subscribed by the same Lambda function. The queue is effectively a &quot;while&quot; loop to reinvoke the function every 30 seconds to check whether the certificate has been issued.</p>
</li>
<li>
<p>Every time the Lambda function is invoked by the queued message:</p>
<ul>
<li>If the certificate has been issued, the function responds with a success back to CloudFormation with the appropriate return values. The function returns successfully, which removes the message from the SQS queue.</li>
<li>If the certificate issuance failed, the function responds with a failure back to CloudFormation with an appropriate message. The function returns successfully, which removes the message from the SQS queue.</li>
<li>If the certificate is still awaiting verification, the function does nothing and throws an error. The error causes SQS to keep the message in the queue and retry 30 seconds later.</li>
</ul>
</li>
<li>
<p>Meanwhile, the ACM certificate verification occurs (a human approves it via an email sent to the domain owner, or a DNS record is added to the domain to verify the certificate).</p>
</li>
</ul>
</blockquote>
<p>While it is pretty convoluted setup for a single project, I expect that if designed well this could be wrapped up into a simple open source/deployable component that everyone could make use of rather easily. Perhaps something for the <a href="https://aws.amazon.com/serverless/serverlessrepo/">AWS Serverless Application Repository</a> or as a <a href="https://aws.amazon.com/blogs/devops/construct-your-own-launch-stack-url/">Launch Stack Button</a>?</p>
<h2><a name="sam"></a>AWS Severless Application Model (SAM)</h2>
<blockquote>
<p>The <a href="https://docs.aws.amazon.com/lambda/latest/dg/serverless_app.html">AWS Serverless Application Model (AWS SAM)</a> is a model to define serverless applications. AWS SAM is natively supported by AWS CloudFormation and defines simplified syntax for expressing serverless resources. The specification currently covers APIs, Lambda functions and Amazon DynamoDB tables.</p>
</blockquote>
<p>AWS SAM (<a href="https://github.com/awslabs/serverless-application-model">GitHub</a>, <a href="https://github.com/awslabs/serverless-application-model/blob/master/versions/2016-10-31.md">Spec/Usage</a>, <a href="https://github.com/awslabs/serverless-application-model/tree/master/examples">Examples</a>, <a href="https://awslabs.github.io/serverless-application-model/">Site</a>, <a href="https://github.com/awslabs/aws-sam-cli">CLI</a>, <a href="https://github.com/awslabs/aws-sam-cli/tree/master/samcli/local/init/templates">Templates</a>) seems to have come about because using CloudFormation directly was just too verbose and time consuming for some of the more common serverless usecases. By wrapping these cases up in a simplified/abstracted way makes it easier to get started, and therefore more likely for people to use the serverless resources AWS provides. It similarly follows the CloudFormation model of defining your resources in YAML, and uses a <a href="https://pypi.org/project/aws-sam-translator/">translator</a> (<a href="https://github.com/awslabs/serverless-application-model/tree/master/samtranslator">GitHub</a>) to build the raw underlying CloudFormation template.</p>
<p>While AWS SAM seems great for these common usecases, there are definitely areas where you will need to fall back to using native CloudFormation (which you can thankfully use directly within a SAM template). There are also a number of areas where limitations in what SAM allows you to configure means <a href="https://github.com/awslabs/serverless-application-model/issues/566#issuecomment-419311289">you may not be able to use it's simplified abstractions</a>. These are likely to improve over time as <a href="https://github.com/awslabs/serverless-application-model/issues">people run into the issues</a>, and the maintainer team implements/improves features.</p>
<p>What is really nice is just how simple it is to get a new project off the ground:</p>
<ul>
<li>Have a look at <a href="https://github.com/awslabs/aws-sam-cli#get-started">Get Started</a> and <a href="https://github.com/awslabs/aws-sam-cli/blob/develop/docs/installation.rst#using-pip">install/upgrade the CLI</a>: <code>pip install --upgrade aws-sam-cli</code></li>
<li><a href="https://github.com/awslabs/aws-sam-cli/blob/develop/docs/usage.rst">Init your new application</a>: <code>sam init --runtime nodejs8.10 --name foo-app</code>
<ul>
<li>There are MANY supported runtimes (<code>sam init --help</code>).. so choose your favourite: <code>[python3.6|python2.7|python|nodejs6.10|nodejs8.10|nodejs4.3|nodejs|dotnetcore2.0|dotnetcore1.0|dotnetcore|dotnet|go1.x|go|java8|java]</code></li>
</ul>
</li>
<li>Pull down your app dependencies: <code>cd foo-app/hello_world &amp;&amp; npm install</code></li>
<li>Run your API locally (<code>sam local --help</code>): <code>cd ../ &amp;&amp; sam local start-api</code></li>
<li>View your application in all of it's glory: <a href="http://127.0.0.1:3000/hello">http://127.0.0.1:3000/hello</a></li>
</ul>
<p><a name="sam-example"></a>If you have a look at the generated SAM template (<code>template.yaml</code>), you'll see that the entire stack is only ~45 lines (including newlines and comments), with the main function code only taking up ~15 lines. Not bad to get a PoC application running:</p>
<pre lang="yaml"><code>HelloWorldFunction:
  Type: AWS::Serverless::Function
  Properties:
    CodeUri: hello_world/
    Handler: app.lambdaHandler
    Runtime: nodejs8.10
    Environment:
      Variables:
        PARAM1: VALUE
    Events:
      HelloWorld:
        Type: Api
        Properties:
          Path: /hello
          Method: get
</code></pre>
<p>Once we're ready to <a href="https://github.com/awslabs/aws-sam-cli/blob/develop/docs/deploying_serverless_applications.rst">deploy this to the cloud</a>, we have just a couple more commands to run:</p>
<ul>
<li>Make sure our template is valid: <code>sam validate</code></li>
<li>Package any external code and upload to S3 (bucket must already exist): <code>sam package --template-file ./template.yaml --output-template-file ./packaged.yaml --s3-bucket FOO-PKGS-BUCKET</code></li>
<li>Deploy our stack: <code>sam deploy --template-file ./packaged.yaml --stack-name Foo-App --capabilities CAPABILITY_IAM</code></li>
</ul>
<p>Now if you're like me and enjoy writing your backend in <a href="https://golang.org/">Golang</a>, then you may find the default template (<code>sam init --runtime go1.x --name foo-app</code>) a little lacking (eg. no <a href="https://github.com/golang/dep"><code>dep</code></a>, basic Makefile, etc). Thankfully we have the ability to pass a <code>--location</code> flag to tell it to use a different template project.</p>
<p>But how do we know what the template project should look like? Digging into the code we find the <a href="https://github.com/awslabs/aws-sam-cli/blob/6164d6d2e7351a849ad3d79973ac18b8d3d1d371/samcli/local/init/__init__.py#L35"><code>generate_project</code></a> function, which accepts the <code>location</code> parameter. <a href="https://github.com/awslabs/aws-sam-cli/blob/6164d6d2e7351a849ad3d79973ac18b8d3d1d371/samcli/local/init/__init__.py#L68">If the parameter is defined it will be used</a>, otherwise it is looked up in the <a href="https://github.com/awslabs/aws-sam-cli/blob/6164d6d2e7351a849ad3d79973ac18b8d3d1d371/samcli/local/init/__init__.py#L16-L32"><code>RUNTIME_TEMPLATE_MAPPING</code></a>, which links the runtime you specified (eg. <code>go1.x</code>) to the template project to use (eg. <a href="https://github.com/awslabs/aws-sam-cli/blob/6164d6d2e7351a849ad3d79973ac18b8d3d1d371/samcli/local/init/__init__.py#L28"><code>cookiecutter-aws-sam-hello-golang</code></a>). These templates are looked up in the <a href="https://github.com/awslabs/aws-sam-cli/blob/6164d6d2e7351a849ad3d79973ac18b8d3d1d371/samcli/local/init/__init__.py#L13-L14"><code>_templates</code> variable path</a>, which after some digging I managed to <a href="https://github.com/awslabs/aws-sam-cli/tree/6164d6d2e7351a849ad3d79973ac18b8d3d1d371/samcli/local/init/templates">locate in the repo at <code>aws-sam-cli/samcli/local/init/templates/</code></a>. There also appear to be a few more templates on the <a href="https://github.com/aws-samples?utf8=%E2%9C%93&amp;q=cookiecutter&amp;type=&amp;language=">aws-samples GitHub</a>.</p>
<p>Having a look at the <a href="https://github.com/awslabs/aws-sam-cli/tree/6164d6d2e7351a849ad3d79973ac18b8d3d1d371/samcli/local/init/templates/cookiecutter-aws-sam-hello-golang">Golang template project</a>, it appears that these are <a href="https://github.com/audreyr/cookiecutter">Cookiecutter</a> (<a href="https://cookiecutter.readthedocs.io/en/latest/">docs</a>) templates. So to make our own customised SAM Golang starter template, after <a href="https://cookiecutter.readthedocs.io/en/latest/installation.html#install-cookiecutter">installing Cookiecutter</a> (<code>pip install --upgrade cookiecutter</code>), we can copy the <a href="https://github.com/awslabs/aws-sam-cli/tree/master/samcli/local/init/templates/cookiecutter-aws-sam-hello-golang">existing template</a>, <a href="https://cookiecutter.readthedocs.io/en/latest/usage.html#make-your-changes">make our desired changes</a>, and save it somewhere useful for future use (such as GitHub). Then when we want to use it in a new project:</p>
<ul>
<li><code>sam init --runtime go1.x --location gh:0xdevalias/TODO-cookiecutter-aws-sam-golang --name foo-app</code></li>
</ul>
<p>While I haven't abstracted out my patterns into a custom starter template yet, this may be something I end up doing in future, so make sure to <a href="https://github.com/0xdevalias?utf8=%E2%9C%93&amp;tab=repositories&amp;q=cookiecutter-&amp;type=&amp;language=">keep an eye on my GitHub</a>.</p>
<h2><a name="cdk"></a>AWS Cloud Development Kit (CDK)</h2>
<blockquote>
<p>The <a href="https://github.com/awslabs/aws-cdk">AWS Cloud Development Kit (AWS CDK)</a> is an open-source software development framework to define cloud infrastructure in code and provision it through AWS CloudFormation. The CDK integrates fully with AWS services and offers a higher level object-oriented abstraction to define AWS resources imperatively. Using the CDK’s library of infrastructure constructs, you can easily encapsulate AWS best practices in your infrastructure definition and share it without worrying about boilerplate logic. The CDK improves the end-to-end development experience because you get to use the power of modern programming languages to define your AWS infrastructure in a predictable and efficient manner. The CDK is currently available for Java, JavaScript, and TypeScript.</p>
</blockquote>
<p>AWS CDK (<a href="https://github.com/awslabs/aws-cdk">GitHub</a>, <a href="https://github.com/awslabs/aws-cdk/blob/master/CHANGELOG.md">Changelog</a>, <a href="https://awslabs.github.io/aws-cdk/">Site</a>, <a href="https://awslabs.github.io/aws-cdk/reference.html">Reference</a>, Examples: <a href="https://awslabs.github.io/aws-cdk/examples.html">1</a>, <a href="https://github.com/awslabs/aws-cdk/tree/master/examples">2</a>) moves away from directly constructing raw YAML/JSON by hand, and takes more of a 'generator code' approach, providing a development kit of libraries that you can use to describe how your cloud infrastructure should look, connect, and interact. Once it's all defined in code, you can use it to generate the CloudFormation / <a href="https://awslabs.github.io/aws-cdk/refs/_aws-cdk_aws-sam.html">AWS SAM</a> YAML, deploy it to the cloud, and everything else you would come to expect from these sorts of tools.</p>
<p>The CDK is divided up into a number of libraries, with <a href="https://awslabs.github.io/aws-cdk/reference.html">each representing an AWS service</a>. Each of these libraries is broken up into two different levels of <a href="https://awslabs.github.io/aws-cdk/constructs.html">Constructs</a>:</p>
<ul>
<li><a href="https://awslabs.github.io/aws-cdk/cloudformation.html">CloudFormation Resource</a>: low-level constructs that provide a direct, one-to-one, mapping to an AWS CloudFormation resource, as listed in the <a href="https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-template-resource-type-ref.html">AWS CloudFormation Resource Types Reference</a>.</li>
<li><a href="https://awslabs.github.io/aws-cdk/aws-construct-lib.html">AWS Construct Library</a>: handwritten by AWS and come with convenient defaults and additional knowledge about the inner workings of the AWS resources they represent. In general, you will be able to express your intent without worrying about the details too much, and the correct resources will automatically be defined for you.</li>
</ul>
<p>Where possible you should be able to use the higher level constructs to get things done (and these will only get better over time), but it's nice to know that we have an easy way to drop down to the lower-level functionality when we need to. There also appears to be the ability to create new Construct libs (<code>cdk init --list</code>, <a href="https://github.com/awslabs/aws-cdk/tree/master/packages/aws-cdk/lib/init-templates/lib">template</a>), so it's possible you could build your own custom construct abstractions with this. Another area for future exploration.</p>
<p>As is pretty standard by now, you define a <a href="https://awslabs.github.io/aws-cdk/stacks.html">stack</a> which contains all of the features and services you want to use, then configure the <a href="https://awslabs.github.io/aws-cdk/environments.html#environments">environment</a> to define where it should be deployed. You can define multiple stacks within your <a href="https://awslabs.github.io/aws-cdk/apps.html">CDK App</a>, which means we have a nice way to handle cross-region deployments. There is built in support for uploading <a href="https://awslabs.github.io/aws-cdk/assets.html">assets</a> (<a href="https://awslabs.github.io/aws-cdk/refs/_aws-cdk_assets.html#id2">ref</a>) that your application may require (eg. lambda code, etc), as well as <a href="https://awslabs.github.io/aws-cdk/applets.html">applets</a> for running custom code as part of your build (eg. compiling code/assets).</p>
<p><a href="https://awslabs.github.io/aws-cdk/getting-started.html">Getting started</a> with a new project is pretty simple (note: if you don't have default creds configured, make sure to use <code>AWS_PROFILE</code>/<code>--profile</code> <a href="https://github.com/awslabs/aws-cdk/issues/130#issuecomment-421508274">or things will hang</a>):</p>
<ul>
<li><a href="https://awslabs.github.io/aws-cdk/getting-started.html#install-the-command-line-toolkit">Install the CDK CLI</a>: <code>npm install -g aws-cdk</code></li>
<li>Check what templates/languages are available: <code>cdk init --list</code></li>
<li>Init a new app: <code>mkdir foo &amp;&amp; cd foo &amp;&amp; cdk init app --language=typescript</code></li>
<li><a href="https://awslabs.github.io/aws-cdk/getting-started.html#compile-the-code">Compile CDK App Typescript</a>: <code>npm run build</code> (or <code>npm run watch</code> in another terminal)</li>
<li><a href="https://awslabs.github.io/aws-cdk/getting-started.html#list-the-stacks-in-the-app">List the stacks</a>: <code>cdk ls --long</code></li>
<li><a href="https://awslabs.github.io/aws-cdk/getting-started.html#synthesize-an-cfn-template">Synthesize the code to CloudFormation YAML</a>: <code>cdk synth</code> or <code>cdk synth FooStack</code></li>
</ul>
<p>When you're happy and think you're ready to deploy:</p>
<ul>
<li><a href="https://awslabs.github.io/aws-cdk/getting-started.html#preparing-for-deployment">Diff to see changes</a> (and make sure you're still happy): <code>cdk diff</code></li>
<li><a href="https://awslabs.github.io/aws-cdk/getting-started.html#deploying-the-stack">Deploy</a>: <code>cdk deploy</code></li>
</ul>
<p>Following along from our previous <a href="#sam-example">AWS SAM example</a>, we can create an equivalent <a href="https://github.com/awslabs/aws-cdk/issues/716">example SAM function</a> (<a href="https://awslabs.github.io/aws-cdk/refs/_aws-cdk_aws-sam.html">ref</a>) in <code>./bin/foo.ts</code> with code such as the following:</p>
<pre lang="typescript"><code>import sam = require('@aws-cdk/aws-serverless');
import lambda = require('@aws-cdk/aws-lambda');
</code></pre>
<pre lang="typescript"><code>const helloWorld = new sam.cloudformation.FunctionResource(this, &quot;HelloWorldFunction&quot;, {
  codeUri: &quot;hello_world/&quot;,
  handler: &quot;app.lambdaHandler&quot;,
  runtime: lambda.Runtime.NodeJS810.name,
  environment: {
    variables: {
      PARAM1: &quot;VALUE&quot;
    }
  },
  events: {
    HelloWorld: {
      type: &quot;Api&quot;,
      properties: {
        path: &quot;/hello&quot;,
        method: &quot;get&quot;,
      }
    }
  }
});
</code></pre>
<p>Remember you will need to <code>npm install</code> any additional packages you need before you can use them:</p>
<pre><code>npm i @aws-cdk/aws-serverless @aws-cdk/aws-lambda
</code></pre>
<p>Once we compile (<code>npm run build</code>) and synthesize (<code>cdk synth</code>), we can see we end up with equivalent YAML to our <a href="#sam-example">previous SAM example</a>:</p>
<pre lang="yaml"><code>HelloWorldFunction:
  Type: 'AWS::Serverless::Function'
  Properties:
    CodeUri: hello_world/
    Handler: app.lambdaHandler
    Runtime: nodejs8.10
    Environment:
      Variables:
        PARAM1: VALUE
    Events:
      HelloWorld:
        Properties:
          Method: get
          Path: /hello
        Type: Api
</code></pre>
<p>While CDK is <a href="https://aws.amazon.com/blogs/developer/aws-cdk-developer-preview/">quite a new project (Aug 2018)</a>, we can already see that it is quite powerful to work with.</p>
<h2><a name="amplify"></a>Amplify</h2>
<blockquote>
<p><a href="https://aws-amplify.github.io/">Amplify</a> is an open source project which is focused on mobile and web developers building applications. This consists of a library, UI components, and a CLI toolchain. The design follows a category based model allowing developers to perform advanced use cases with declarative client APIs so that they can focus on their application code (e.g. Auth.signIn() or API.graphql()). This allows developers to focus on their business use cases and less time on re-implementing the most common use cases around mobile or web app development (Auth flows, Storage and API interaction, Analytics, etc.) (<a href="https://github.com/aws-amplify/amplify-cli/issues/160#issuecomment-421100213">Source</a>)</p>
</blockquote>
<p><a href="https://aws-amplify.github.io/">AWS Amplify</a> (<a href="https://github.com/aws-amplify">GitHub</a>) combines a number of different complementary aspects to simplify modern mobile and web development:</p>
<ul>
<li><a href="https://github.com/aws-amplify/amplify-cli">CLI</a>: uses AWS CloudFormation and nested stacks to define and provision commonly required backend services and features</li>
<li>Library / <a href="https://aws-amplify.github.io/media/ui_library">UI Components</a>: These appear to be broken down based on platform
<ul>
<li><a href="https://aws-amplify.github.io/amplify-js/media/quick_start?platform=react">Web / JavaScript / React Native</a> (<a href="https://github.com/aws-amplify/amplify-js">GitHub</a>)</li>
<li><a href="https://docs.aws.amazon.com/aws-mobile/latest/developerguide/getting-started.html#ios-swift">iOS</a></li>
<li><a href="https://docs.aws.amazon.com/aws-mobile/latest/developerguide/getting-started.html#android-java">Android</a></li>
</ul>
</li>
</ul>
<p>Of all of the projects I have explored today, this is the one I have the least experience with, so I may not have fully come to understand/appreciate the depth of it yet. In a bit of a difference from the previous projects, this seems to take more of a 'full-stack' approach to solving common application needs.</p>
<p>One of the nice things about the <a href="https://github.com/aws-amplify/amplify-cli">Amplify CLI</a> is how it aims to provide simple menu-driven options for getting everything going:</p>
<ul>
<li><a href="https://github.com/aws-amplify/amplify-cli#install-the-cli">Install the CLI</a>: <code>npm install -g @aws-amplify/cli</code></li>
<li>Init a new project: <code>amplify init</code> and follow the menu choices</li>
</ul>
<pre><code>⇒  amplify init
Note: It is recommended to run this command from the root of your app directory
? Choose your default editor: None
? Choose the type of app that you're building: javascript
Please tell us about your project
? What javascript framework are you using: react
? Source Directory Path:  src
? Distribution Directory Path: build
? Build Command:  npm run-script build
? Start Command: npm run-script start

Using default provider awscloudformation

Initializing project in the cloud...
..snip..
Your project has been successfully initialized and connected to the cloud!
</code></pre>
<ul>
<li>Choose a category (feature) you want to add (<code>amplify --help</code>), and select it: eg. <code>amplify function add</code></li>
</ul>
<pre><code>⇒  amplify function add
Using service: Lambda, provided by: awscloudformation
? Provide a friendly name for your resource to be used as a label for this category in the project: HelloWorld
? Provide the AWS Lambda function name: HelloWorld
? Choose the function template that you want to use: Serverless express function (Integration with Amazon API Gateway)
? Do you want to edit the local lambda function now? false
Successfully added resource HelloWorld locally.
</code></pre>
<p>At this point you should be able to see the generated files in <code>./amplify/backend/function/HelloWorld</code>. Of particular note is the generated CloudFormation JSON (<code>HelloWorld-cloudformation-template.json</code>). While it is nice that it is automatically generated, using the JSON form, and not appearing to leverage SAM means that it ends up being quite a verbose file to cognitively reason about. I believe the intention is that you don't modify this directly (and I read somewhere that even if you do it may be overwritten?). If nothing else, it serves as a decent reference implementation for this kind of feature, that you could then translate back to your preferred method (eg. SAM/CDK).</p>
<p>Digging into the source, it appears these templates are located within the <a href="amplify-category-function">specific subpackage</a> of the CLI, in the <a href="https://github.com/aws-amplify/amplify-cli/tree/master/packages/amplify-category-function/provider-utils/awscloudformation">cloudformation provider</a> (eg. <a href="https://github.com/aws-amplify/amplify-cli/blob/master/packages/amplify-category-function/provider-utils/awscloudformation/cloudformation-templates/lambda-cloudformation-template.json.ejs">the function template used above</a>).</p>
<p>While currently there only appears to be a single 'provider' (<a href="https://github.com/aws-amplify/amplify-cli/tree/master/packages/amplify-provider-awscloudformation"><code>amplify-provider-awscloudformation</code></a>), language around the websites/repos implies that in future they would like to support additional providers, so it <a href="https://github.com/aws-amplify/amplify-cli/issues/171">may be possible to implement CDK</a> and/or SAM into this flow, for a 'best of all worlds' situation.</p>
<p>Implementing the most basic use case (<code>function</code>) as we did above isn't really where Amplify shines. For example, you can add an <a href="https://aws-amplify.github.io/amplify-js/media/authentication_guide">authentication system</a> (<a href="https://aws-amplify.github.io/amplify-js/api/classes/authclass.html">JS Ref</a>) to your backend with just <code>amplify auth add</code>, or a new <a href="https://aws-amplify.github.io/amplify-js/media/api_guide">GraphQL/REST api</a> with <code>amplify api add</code>, and similar simplicity for other common features and patterns.</p>
<p>Moving from the backend infrastructure, Amplify also features libraries and UI components to consume these features in your application. For example, getting up and running with React (<a href="https://aws-amplify.github.io/amplify-js/media/react_guide">1</a>, <a href="https://aws-amplify.github.io/amplify-js/media/quick_start?platform=react">2</a>) can be as simple as:</p>
<pre><code>create-react-app my-app
cd my-app
npm install --save aws-amplify
npm install --save aws-amplify-react

amplify init
</code></pre>
<p>And then a <a href="https://aws-amplify.github.io/amplify-js/media/quick_start#step-4-set-up-your-backend">few little code changes</a> to wire things into place.</p>
<p>As part of all of this, you get access to the <a href="https://aws-amplify.github.io/amplify-js/media/ui_guide">UI Components</a>, which should dramatically reduce the amount of boilerplate wiring up required to make use of these common application patterns.</p>
<p>I feel like I haven't even begun to dive deep enough into the <a href="https://aws-amplify.github.io/amplify-js/api/">frontend JS</a>/<a href="https://aws-amplify.github.io/amplify-js/media/ui_guide">UI component libraries</a> to do them justice, so I will leave that as an excerise to the reader (or a future blog post).</p>
<p>As mentioned in previous sections, this is also quite a new project (<a href="https://aws.amazon.com/blogs/mobile/announcing-aws-amplify-and-the-aws-mobile-cli/">Amplify (Nov 2017)</a>, <a href="https://aws.amazon.com/blogs/mobile/announcing-the-aws-amplify-cli-toolchain/">CLI (Aug 2018)</a>), so I'm sure things are going to get much better as time goes on.</p>
<h2><a name="conclusion"></a>Conclusion</h2>
<p>We explored a number of different AWS serverless friendly projects and options, and how they may be able to be leveraged together synergistically, or to do similar things as each other. This is still an area I am actively exploring, and a lot of the projects are still quite young, so I'm excited to see what improvements and new efficient patterns come out of this! Maybe I will write a more specific follow up blog at some point detailing how I actually end up using some of these technologies in practice.</p>
<h2><a name="where-next"></a>Where Next?</h2>
<p>You could <a href="https://aws.amazon.com/serverless/">learn more about serverless</a> and <a href="https://aws.amazon.com/serverless/build-a-web-app/">build a web app</a>, put together a modern frontend with <a href="https://github.com/facebook/create-react-app">Create React App</a> + <a href="https://redux.js.org/introduction">Redux</a> + <a href="https://redux-saga.js.org/">Redux-Saga</a>, design a serverless Golang backend with <a href="https://aws.amazon.com/sdk-for-go/">AWS SDK for Golang</a> + <a href="https://github.com/gorilla/mux">Gorilla Mux</a> + <a href="https://github.com/awslabs/aws-lambda-go-api-proxy#other-frameworks">AWS Lambda Go Api Proxy</a>, read more about Authentication with <a href="https://aws.amazon.com/cognito/">AWS Cognito</a>, learn about <a href="https://graphql.org/">GraphQL</a>.. so many interesting things out there to learn about and play with!</p>
<p>What are you planning to build? Have any tips or suggestions? A story of how this helped (or hindered) you on a project? I'd love to hear about it in the comments below!</p>

	  ]]></description>
	</item>

	<item>
	  <title>Link Dump: Clearing Out My Todo List</title>
	  <link>/devalias/2017/07/14/link-dump-clearing-out-my-todo-list/</link>
	  <author>devalias</author>
	  <pubDate>2017-07-14T00:00:00+10:00</pubDate>
	  <guid>/devalias/2017/07/14/link-dump-clearing-out-my-todo-list/</guid>
	  <description><![CDATA[
	     <p>I tend to stumble across a lot of interesting things as I travel across the web, and one of my productivity methods is to save the things I don't have time to check out immediately to <a href="https://todoist.com/">Todoist</a>. Unfortunately, time can be short, and life busy, so those 'thats an interesting article', 'i could use that tech thing' and 'that would be cool to blog about' things tend to just build up, and clutter my todo lists in an ever less efficient manner. So today lets clear some of that out!</p>
<p>This post will be a vaguely categorised link dump, and depending on if I remember why I saved it, maybe some notes too.</p>
<p>Looking over everything, there seem to be trends around development, security, privacy, blog/website, docker, tech, automation, branding and general performance/efficiency. Not really surprising when I think about the things that tend to interest me :)</p>
<p>Hope you find something interesting!</p>
<h2>Development</h2>
<ul>
<li><a href="https://www.jetbrains.com/research/devecosystem-2017/">The State of Developer Ecosystem 2017 - Infographic | JetBrains</a></li>
<li><a href="https://insights.stackoverflow.com/survey/2017">Developer Survey Results 2017 - Stackoverflow</a></li>
<li><a href="https://medium.freecodecamp.com/a-roadmap-to-becoming-a-web-developer-in-2017-b6ac3dddd0cf">A roadmap to becoming a web developer in 2017 – freeCodeCamp</a></li>
<li><a href="https://hackernoon.com/how-it-feels-to-learn-javascript-in-2016-d3a717dd577f">How it feels to learn JavaScript in 2016 – Hacker Noon</a></li>
<li><a href="https://mightysignal.com/top-ios-sdks">Most Used SDKs in Top 200 Free iOS Apps | MightySignal - Mobile App &amp; SDK Intelligence for iOS / Android</a></li>
<li>Frontend Package Managers
<ul>
<li><a href="https://yarnpkg.com/en/">Yarn</a>: Package Manager</li>
<li><a href="https://code.facebook.com/posts/1840075619545360">Yarn: A new package manager for JavaScript</a></li>
<li><a href="https://github.com/yarnpkg/yarn">yarnpkg/yarn</a>: Fast, reliable, and secure dependency management.</li>
<li><a href="https://bower.io/blog/2016/using-bower-with-yarn/">Using Bower with Yarn</a>: bower support dropped for now</li>
<li><a href="https://www.slant.co/versus/17851/5094/~yarn_vs_bower">Yarn vs Bower detailed comparison as of 2017 - Slant</a></li>
<li><a href="https://www.slant.co/topics/1488/~front-end-package-managers">13 Best front-end package managers as of 2017 - Slant</a></li>
</ul>
</li>
<li>Frontend JS Languages
<ul>
<li><a href="https://medium.com/front-end-hacking/es2015-vs-elm-vs-typescript-a88dbc5d14d9">ES2015 JavaScript vs. Elm vs. TypeScript – Frontend Weekly – Medium</a></li>
<li><a href="http://mutanatum.com/posts/2017-01-12-Browser-FP-Head-to-Head.html">Selecting a platform - JavaScript vs Elm vs PureScript vs GHCjs vs Scalajs | MutanatuM</a></li>
</ul>
</li>
<li>Code Review
<ul>
<li><a href="https://codacy.com/">Automated code reviews &amp; code analytics | Codacy</a>: Check code style, security, duplication, complexity and coverage on every change while tracking code quality throughout your sprints.</li>
<li><a href="https://codeclimate.com/">Code Climate</a>: Get automated code review for test coverage, complexity, duplication, security, style, and more, and merge with confidence.</li>
</ul>
</li>
<li><a href="http://www.foundweekends.org/conscript/">Conscript — Conscript</a>: Distribution mechanism for Scala apps using Github and Maven repositories as the infrastructure. You can use it to install and update apps similar to APT or Home Brew.</li>
<li><a href="http://www.foundweekends.org/giter8/">Giter8 — Giter8</a>: Command line tool to generate files and directories from templates published on Github or any other git repository</li>
<li><a href="https://github.com/lightbend/paradox">lightbend/paradox</a>: Paradox is a markdown documentation tool for software projects.</li>
<li><a href="https://github.com/sirthias/pegdown/">sirthias/pegdown</a>: A pure-Java Markdown processor based on a parboiled PEG parser supporting a number of extensions</li>
<li><a href="https://ace.c9.io/">Ace - The High Performance Code Editor for the Web</a>
<ul>
<li><a href="https://github.com/ajaxorg/ace">ajaxorg/ace</a>: Ace (Ajax.org Cloud9 Editor)</li>
<li><a href="https://github.com/lyrasoft/ace-markdown-editor">lyrasoft/ace-markdown-editor</a>: A Markdown editor for Joomla CMS</li>
<li><a href="https://ace.c9.io/kitchen-sink.html?doc=Markdown">Ace Kitchen Sink</a></li>
</ul>
</li>
</ul>
<h2>Security</h2>
<ul>
<li>CTF
<ul>
<li><a href="http://www.learn2hack.com.au/">Experience IT - Cyber Security | learn2hack | TAFE</a>: Hands on training for high school students run by industry experts with pathways to tertiary qualifications. This course provides an introduction to defensive and offensive security strategies and tactics and is suitable for high school students aged 15-18.</li>
<li><a href="https://ctf.0ops.net/">0CTF 2017</a></li>
<li><a href="https://legitbs.net/">DEF CON CTF 2017</a></li>
<li><a href="https://github.com/legitbs/quals-2017">legitbs/quals-2017</a></li>
<li><a href="https://github.com/legitbs/quals-2016">legitbs/quals-2016</a>: 2016 DEF CON Qualifier Challenges</li>
<li><a href="https://github.com/legitbs/quals-2015">legitbs/quals-2015</a></li>
<li><a href="https://github.com/legitbs/finals-2014">legitbs/finals-2014</a></li>
<li><a href="https://github.com/legitbs/quals-2014">legitbs/quals-2014</a></li>
<li><a href="https://github.com/legitbs/finals-2013">legitbs/finals-2013</a>: Source for many challenges from DEF CON 21 CTF Finals</li>
<li><a href="https://github.com/legitbs/quals-2013">legitbs/quals-2013</a>: Source for many challenges from DEF CON 21 CTF Qualifier</li>
<li><a href="http://flaws.cloud/">flaws.cloud</a>: Through a series of levels you'll learn about common mistakes and gotchas when using Amazon Web Services (AWS).</li>
<li><a href="https://dook.biz/2017/03/crikeyconctf-2017-koala-gallery-writeup/">CrikeyConCTF 2017 – Koala Gallery Writeup</a></li>
</ul>
</li>
<li>BSides 2017
<ul>
<li><a href="http://buffered.io/posts/bsidescbr-ctf-round-up/">BSidesCBR CTF Round Up | OJ</a></li>
<li><a href="https://github.com/OJ/bsides-2017-ctf-docker">OJ/bsides-2017-ctf-docker</a>: BSidesCBR CTF docker compose files</li>
<li><a href="https://www.rootusers.com/bsides-canberra-2017-ctf-rekt-exfil-write/">BSides Canberra 2017 CTF - Rekt Exfil Write-up - RootUsers</a></li>
</ul>
</li>
<li>Reverse Engineering, etc
<ul>
<li><a href="https://binary.ninja/">binary.ninja</a>: A reverse engineering platform</li>
<li><a href="http://kaitai.io/">Kaitai Struct: declarative binary format parsing language</a> A new way to develop parsers for binary structures.</li>
<li><a href="http://www.hopperapp.com/">Hopper</a>: The macOS and Linux Disassembler</li>
<li><a href="http://cerbero.io/profiler/">Cerbero - Profiler</a>: Cerbero Profiler is a tool designed primarily for malware and forensic analysis.</li>
</ul>
</li>
<li>Recon, DNS, etc
<ul>
<li>find IP ranges, reverse IP lookups, etc</li>
<li>seclists subdomain section</li>
<li><a href="https://abhartiya.wordpress.com/2016/09/20/brutesubs-an-automation-framework-for-running-multiple-subdomain-bruteforcing-tools-in-parallel-via-docker/">Brutesubs – An automation framework for running multiple subdomain bruteforcing tools in parallel via Docker</a></li>
<li><a href="https://github.com/anshumanbh/brutesubs">anshumanbh/brutesubs</a>: An automation framework for running multiple open sourced subdomain bruteforcing tools (in parallel) using your own wordlists via Docker Compose</li>
<li><a href="https://github.com/TheRook/subbrute">TheRook/subbrute</a>: A DNS meta-query spider that enumerates DNS records, and subdomains.</li>
<li><a href="https://github.com/infosec-au/altdns">infosec-au/altdns</a>: Generates permutations, alterations and mutations of subdomains and then resolves them</li>
<li><a href="https://github.com/OJ/gobuster">OJ/gobuster</a>: Directory/file &amp; DNS busting tool written in Go</li>
<li><a href="https://www.apnic.net/manage-ip/using-whois/bulk-access/">Bulk access to whois data – APNIC</a>: apnic offline database</li>
<li><a href="https://github.com/Microsoft/WhoisParsers">Microsoft/WhoisParsers</a>: Download and parse Whois records from bulk whois database dumps of IANA organizations (ARIN, AFRINIC, APNIC, LACNIC, RIPE ). Crawl and parse RWhois records from RFC 2167 ARIN Referral Whois Servers</li>
<li><a href="https://github.com/jhaddix/domain/blob/master/enumall.py">jhaddix/domain enumall</a>: enumall is a refactor of enumall.sh providing a script to identify subdomains using several techniques and tools.</li>
<li><a href="https://bitbucket.org/LaNMaSteR53/recon-ng">LaNMaSteR53 / Recon-ng — Bitbucket</a>: Recon-ng is a full-featured Web Reconnaissance framework written in Python.</li>
<li><a href="http://tools.kali.org/information-gathering/dnsenum">dnsenum | Penetration Testing Tools</a></li>
<li><a href="https://github.com/ChrisTruncer/EyeWitness">ChrisTruncer/EyeWitness</a>: EyeWitness is designed to take screenshots of websites, provide some server header info, and identify default credentials if possible.</li>
</ul>
</li>
<li>Dockerised
<ul>
<li><a href="https://zeltser.com/metasploit-framework-docker-container/">Run Metasploit Framework as a Docker Container Without Installation Pains</a></li>
<li><a href="https://hub.docker.com/r/k0st/alpine-nikto/">k0st/alpine-nikto | DockerHub</a>: Dockerized nikto</li>
<li>docker run --rm -it activeshadow/nikto /bin/bash</li>
<li><a href="https://github.com/kost/docker-webscan">kost/docker-webscan</a>: Dockerized versions of various web security scanning tools and utilities</li>
</ul>
</li>
<li>Frameworks, automation, etc
<ul>
<li><a href="https://github.com/trustedsec/ptf">trustedsec/ptf</a>: The Penetration Testers Framework (PTF) is a way for modular support for up-to-date tools.</li>
<li><a href="http://www.golismero.com/">Golismero Project. The web knife.</a>
<ul>
<li>GoLismero is a free software framework for security testing. It's currently geared towards web security, but it can easily be expanded to other kinds of scans. It can run their own security tests and manage a lot of well known security tools (OpenVas, Wfuzz, SQLMap, DNS recon, robot analyzer...) take their results, feedback to the rest of tools and merge all of results. And all of this automatically.</li>
<li><a href="https://github.com/golismero/golismero">golismero/golismero</a></li>
</ul>
</li>
<li><a href="http://www.spiderfoot.net/">SpiderFoot – Open Source Intelligence Automation</a>
<ul>
<li><a href="https://github.com/smicallef/spiderfoot">smicallef/spiderfoot</a>: SpiderFoot, the open source footprinting and intelligence-gathering tool.</li>
</ul>
</li>
</ul>
</li>
<li><a href="https://bugcrowd.com/vulnerability-rating-taxonomy">Vulnerability Rating Taxonomy | Bugcrowd</a>
<ul>
<li>Bugcrowd’s VRT is a resource outlining Bugcrowd’s baseline priority rating, including certain edge cases, for vulnerabilities that we often see.</li>
<li><a href="https://github.com/bugcrowd/vulnerability-rating-taxonomy">bugcrowd/vulnerability-rating-taxonomy</a></li>
</ul>
</li>
<li><a href="https://www.pastemonitor.com/">PasteMonitor</a>: PasteMonitor watches for keywords you're interested in on Pastebin.</li>
<li><a href="https://requestb.in/">RequestBin — Collect, inspect and debug HTTP requests and webhooks</a></li>
<li><a href="https://github.com/Runscope/requestbin">Runscope/requestbin</a>: Inspect HTTP requests. Debug webhooks.</li>
<li><a href="https://github.com/maurosoria/dirsearch">maurosoria/dirsearch</a>: Web path scanner</li>
<li><a href="https://github.com/ImageTragick/PoCs">ImageTragick/PoCs</a>: Proof of Concepts for CVE-2016–3714 <a href="https://imagetragick.com">https://imagetragick.com</a></li>
<li><a href="https://github.com/malfunkt/hyperfox">malfunkt/hyperfox</a> (<a href="https://hyperfox.org/">web</a>): HTTP/HTTPs MITM proxy and traffic recorder with on-the-fly TLS cert generation</li>
<li><a href="https://github.com/reverse-shell/routersploit">reverse-shell/routersploit</a>: The Router Exploitation Framework</li>
<li><a href="https://breakdev.org/evilginx-advanced-phishing-with-two-factor-authentication-bypass/">Evilginx - Advanced Phishing with Two-factor Authentication Bypass</a></li>
<li><a href="https://medium.com/on-docker/secrets-and-lie-abilities-the-state-of-modern-secret-management-2017-c82ec9136a3d">Secrets and LIE-abilities: The State of Modern Secret Management [2017]</a></li>
<li><a href="https://www.cert.gov.au/vulnerability-disclosures">Vulnerability Disclosures | CERT Australia</a></li>
<li>Where are BURP setttings saved?
<ul>
<li>On OSX it is stored in the com.apple.java.util.prefs.plist under ~/Library/Preferences.</li>
<li>Also, you need to make sure you use the burp-&gt;exit to quit and not the Burp.StartBurp-&gt;Quit (Command-Q) to exit. Otherwise, it will not save the settings.</li>
</ul>
</li>
</ul>
<h2>Privacy</h2>
<ul>
<li><a href="http://www.shellntel.com/blog/2016/3/30/vpn-over-dns-1">VPN over DNS</a></li>
<li><a href="https://www.whonix.org/wiki/Main_Page">Whonix</a>: Whonix is a free desktop operating system (OS) that is specifically designed for advanced security and privacy. Based on Tor, Debian GNU/Linux and the principle of security by isolation, it realistically addresses common attack vectors while maintaining usability.</li>
<li><a href="https://medium.com/@rdsubhas/docker-image-with-tor-privoxy-and-a-process-manager-under-15-mb-c9e344111b61#.csolccvds">Docker image with Tor, Privoxy and a process manager under 15 MB</a></li>
<li><a href="https://blog.jessfraz.com/post/routing-traffic-through-tor-docker-container/">1: How to Route Traffic through a Tor Docker Container</a></li>
<li><a href="https://blog.jessfraz.com/post/running-a-tor-relay-with-docker/">2: Running a Tor relay with Docker</a></li>
<li><a href="https://blog.jessfraz.com/post/tor-socks-proxy-and-privoxy-containers/">3: Tor Socks Proxy and Privoxy Containers</a></li>
<li>Advanced Privacy and Anonymity Using VMs, VPN’s, Tor
<ul>
<li><a href="https://www.ivpn.net/privacy-guides/advanced-privacy-and-anonymity-part-1">Part 1 - Introduction to Series</a></li>
<li><a href="https://www.ivpn.net/privacy-guides/advanced-privacy-and-anonymity-part-2">Part 2 - Basic Setup Using VM's, VPNs and TOR</a></li>
<li><a href="https://www.ivpn.net/privacy-guides/advanced-privacy-and-anonymity-part-3">Part 3 - Planning Advanced VM and VPN Setup</a></li>
<li><a href="https://www.ivpn.net/privacy-guides/advanced-privacy-and-anonymity-part-4">Part 4 - Setting Up Secure Host Machines</a></li>
<li><a href="https://www.ivpn.net/privacy-guides/advanced-privacy-and-anonymity-part-5">Part 5 - Installing VirtualBox and Creating Linux VMs</a></li>
<li><a href="https://www.ivpn.net/privacy-guides/advanced-privacy-and-anonymity-part-6">Part 6 - Creating pfSense 2.2.6 VMs as VPN Clients</a></li>
<li><a href="https://www.ivpn.net/privacy-guides/advanced-privacy-and-anonymity-part-7">Part 7 - Paying Anonymously with Cash and Bitcoins</a></li>
<li><a href="https://www.ivpn.net/privacy-guides/advanced-privacy-and-anonymity-part-8">Part 8 - Creating Nested Chains of VPNs and Tor</a></li>
</ul>
</li>
</ul>
<h2>Blog / Website / Social</h2>
<ul>
<li><a href="https://www.ohow.co/removing-google-analytics-spam/">Ultimate Guide to Blocking and Cleaning Google Analytics Spam and Other Junk Traffic</a></li>
<li><a href="https://later.com/blog/ultimate-guide-to-using-instagram-hashtags/">The Ultimate Guide to Instagram Hashtags in 2017</a></li>
<li><a href="https://staticman.net/docs/">Staticman</a>: I bring user-generated content to static sites</li>
<li>Blog Inspiration
<ul>
<li><a href="http://rhiaro.co.uk/">Amy/Rhiaro | tampering with arrangements</a>: Lots of social web/lifelogging type stuff, seems cool</li>
<li><a href="http://www.savespendsplurge.com/tag/what-i-bought/">What I bought | Save. Spend. Splurge.</a>: Lifelogging type stuff</li>
<li><a href="https://github.com/aarongustafson/aarongustafson.github.io/tree/source">aarongustafson/aarongustafson.github.io</a> (<a href="https://www.aaron-gustafson.com/">web</a>): Web standards &amp; accessibility advocate at Microsoft</li>
</ul>
</li>
<li>Jekyll
<ul>
<li><a href="https://mademistakes.com/articles/using-jekyll-2016/">How I’m Using Jekyll in 2016</a></li>
<li><a href="https://jekyllrb.com/docs/collections/">Jekyll Collections</a>: For writings/etc?</li>
</ul>
</li>
<li>Jekyll Plugins
<ul>
<li><a href="https://github.com/pattex/jekyll-tagging/issues/43#issuecomment-289595438">Generate a /tag/index.html · Issue #43 · pattex/jekyll-tagging</a>: TODO: Implement tag_cloud for my blog</li>
<li><a href="https://github.com/jekyll/jekyll-archives">jekyll/jekyll-archives</a>: Archive pages for your Jekyll tags and categories</li>
<li><a href="https://github.com/pattex/jekyll-tagging">pattex/jekyll-tagging</a>: Jekyll plugin to automatically generate a tag cloud and tag pages.</li>
<li><a href="https://github.com/toshimaru/jekyll-tagging-related_posts">toshimaru/jekyll-tagging-related_posts</a>: Jekyll related_posts function based on tags (works on Jekyll3)</li>
<li><a href="https://github.com/octopress/paginate/">octopress/paginate</a>: A simple paginator for Jekyll sites.</li>
<li><a href="https://github.com/jekyll/jekyll-assets">jekyll/jekyll-assets</a>: Asset pipelines for Jekyll.</li>
<li><a href="https://github.com/robwierzbowski/jekyll-picture-tag">robwierzbowski/jekyll-picture-tag</a>: Easy responsive images for Jekyll.</li>
<li>Jekyll wiki plugin?</li>
</ul>
</li>
<li>GitHub Issues
<ul>
<li><a href="https://github.com/indirect/jekyll-postfiles/issues/6">Make this a ruby gem · Issue #6 · indirect/jekyll-postfiles</a></li>
<li><a href="https://github.com/aarongustafson/jekyll-webmention_io/issues/11">Give rake task the ability to detect and notify pingback endpoints · Issue #11 · aarongustafson/jekyll-webmention_io</a></li>
<li><a href="https://github.com/aarongustafson/jekyll-webmention_io/issues/12">Rake task will download entire file looking for webmention endpoint · Issue #12 · aarongustafson/jekyll-webmention_io</a></li>
</ul>
</li>
<li>Discoverability, etc
<ul>
<li><a href="http://oembed.com/">oEmbed</a>:oEmbed is a format for allowing an embedded representation of a URL on third party sites.</li>
<li><a href="http://pingomatic.com/">Ping-o-Matic!</a>: Ping-O-Matic is a service to update different search engines that your blog has updated.</li>
<li><a href="https://developer.mozilla.org/en-US/docs/Web/RSS/Getting_Started/Syndicating">Syndicating content with RSS</a></li>
</ul>
</li>
<li>Indieweb, etc
<ul>
<li><a href="http://indiewebify.me/">IndieWebify.Me - a guide to getting you on the IndieWeb</a>: We should all own the content we're creating, rather than just posting to third-party content silos.Publish on your own domain, and syndicate out to silos. This is the basis of the &quot;Indie Web&quot; movement.</li>
<li><a href="http://activitystrea.ms">Activity Streams</a>: JSON Activity Streams Spec</li>
<li><a href="http://indiewebcamp.com/backfeed">backfeed - IndieWeb</a>: Backfeed is the process of syndicating interactions on your POSSE copies back (AKA reverse syndicating) to your original posts.</li>
<li><a href="http://indiewebcamp.com/Bridgy">Bridgy - IndieWeb</a>: Bridgy is an open source project and proxy that implements backfeed and POSSE as a service. Bridgy sends webmentions for comments, likes, etc. on Facebook, Twitter, Google+, Instagram, and Flickr.</li>
<li><a href="https://github.com/snarfed/bridgy">snarfed/bridgy</a>: Bridgy pulls comments and likes from social networks back to your web site. You can also use it to publish your posts to those networks.</li>
<li><a href="http://indiewebcamp.com/webmention#Services">Webmention - IndieWeb</a>: Services you can use with Webmention to send copies of your posts to social meda sites (silos), and receive silo-specific interactions as Webmentions on your site!</li>
<li><a href="https://checkmention.appspot.com/">Checkmention</a>: This site lets you test your webmention implementation on your indieweb site, and whether it robustly detects certain types of XSS attacks.</li>
<li><a href="https://github.com/indieweb/mention-client-ruby">indieweb/mention-client-ruby</a>: A Ruby gem for sending webmention (and pingback) notifications</li>
<li><a href="https://www.w3.org/wiki/Socialwg">W3C social working group</a></li>
</ul>
</li>
</ul>
<h2>Docker</h2>
<ul>
<li><a href="https://github.com/Perlence/docker-multi-build">Perlence/docker-multi-build</a>: Concurrent multi-stage Docker builds
<ul>
<li>This is outdated now, it exists in docker core</li>
</ul>
</li>
<li><a href="https://www.iron.io/how-to-cross-compile-go-programs-using-docker/">How to Cross Compile Go Programs using Docker | Iron.io</a></li>
<li><a href="https://hub.docker.com/_/golang/">golang | DockerHub</a></li>
</ul>
<h2>Automation, Scraping, etc</h2>
<ul>
<li><a href="https://hackernoon.com/guide-to-web-automation-889557804453">Guide to Web Automation | Hackernoon</a>
<ul>
<li><a href="https://github.com/peterdemin/web-automation-2017">peterdemin/web-automation-2017</a>: An attempt to cover state of web automation in 2017
<ul>
<li>This GitHub should have a bunch of other projects detailed in some of the (probably closed) issues</li>
</ul>
</li>
</ul>
</li>
<li><a href="https://scrapy.org/">Scrapy</a>: An open source and collaborative framework for extracting the data you need from websites.<br />
In a fast, simple, yet extensible way.</li>
<li><a href="https://github.com/scrapinghub/portia/">scrapinghub/portia</a>: Visual scraping for Scrapy</li>
<li><a href="https://github.com/Netflix/Scumblr">Netflix/Scumblr</a>: Web framework that allows performing periodic syncs of data sources and performing analysis on the identified results</li>
<li><a href="https://home-assistant.io/">Home Assistant</a>: Home Assistant is an open-source home automation platform running on Python 3.</li>
</ul>
<h2>Tech</h2>
<ul>
<li>Tmux
<ul>
<li><a href="https://github.com/jimeh/tmuxifier">jimeh/tmuxifier</a>: Tmuxify your Tmux. Powerful session, window &amp; pane management for Tmux.</li>
<li><a href="https://github.com/tmuxinator/tmuxinator">tmuxinator/tmuxinator</a>: Manage complex tmux sessions easily</li>
</ul>
</li>
<li><a href="https://github.com/dundalek/markmap">dundalek/markmap</a>: Visualize markdown documents as mindmaps
<ul>
<li>Can we use this to make nice markdown mindmap summaries?</li>
</ul>
</li>
<li><a href="https://github.com/donnemartin/haxor-news">donnemartin/haxor-news</a>: Browse Hacker News like a haxor: A Hacker News command line interface (CLI).</li>
<li><a href="https://apple.stackexchange.com/questions/237136/where-does-launchpad-store-folder-information-database-etc">Where does launchpad store folder information? (database, etc?)</a></li>
<li><a href="https://dcos.io/">The Definitive Platform for Modern Apps | DC/OS</a>: DC/OS (the datacenter operating system) is an open-source, distributed operating system based on the Apache Mesos distributed systems kernel.</li>
<li><a href="https://snapcraft.io/">snapcraft - Snaps are universal Linux packages</a>: package linux apps for every linux/server/cloud/device</li>
</ul>
<h2>Branding</h2>
<ul>
<li><a href="https://library.gv.com/the-three-hour-brand-sprint-3ccabf4b768a#.h7s3gqfx8">The Three-Hour Brand Sprint – GV Library</a></li>
<li><a href="https://blog.docker.com/2013/06/announcing-new-docker-style/">Announcing a New Logo and Style for Docker - Docker Blog</a></li>
<li><a href="https://99designs.com.au/logo-design">Logo Design - Get A Custom Logo Design from Professional Logo Designers | 99designs</a></li>
<li><a href="https://99designs.com.au/logo-design/contests/create-cool-open-source-project-logo-219415">Docker - Create cool open-source project logo. | Logo design contest</a></li>
</ul>
<h2>Alfred-esque</h2>
<ul>
<li><a href="http://www.packal.org/workflow/homebrew-and-cask-alfred">Homebrew and Cask for Alfred</a></li>
<li><a href="https://github.com/danielbayerlein/alfred-workflows/tree/master/homebrew">Alfred Workflow for Homebrew (danielbayerlein/alfred-workflows)</a></li>
<li><a href="https://github.com/idpaterson/alfred-wunderlist-workflow">idpaterson/alfred-wunderlist-workflow</a>: Unbelievably fast task entry in Wunderlist with due dates, reminders, and recurrence</li>
<li><a href="https://www.lacona.io/">Lacona</a>: Blazingly fast, blissfully simple, incredibly powerful keyboard-driven commands for your Mac</li>
<li><a href="https://github.com/laconalabs/lacona-cli">laconalabs/lacona-cli</a></li>
<li>Automator services ~/Library/Services</li>
</ul>
<h2>Windows</h2>
<ul>
<li><a href="http://boxstarter.org/">Boxstarter</a>: Repeatable, reboot resilient windows environment installations made easy using Chocolatey packages</li>
<li><a href="https://chocolatey.org/">Chocolatey - The package manager for Windows</a></li>
<li><a href="https://www.nuget.org/">NuGet Gallery | Home</a></li>
</ul>
<h2>MacOS (OSX) on Windows</h2>
<ul>
<li><a href="http://www.apple.com/au/shop/product/MJ2R2ZA/A/magic-trackpad-2">Apple Magic Magic Trackpad 2</a></li>
<li><a href="http://extramagic.forbootcamp.org/">ExtraMagic</a>: OSX-Trackpad Multitouch on Windows</li>
<li><a href="https://sourceforge.net/projects/ccseer/">Seer</a>: OSX-like Spacebar Preview on Windows</li>
</ul>
<h2>GitHub</h2>
<ul>
<li><a href="https://github.com/Homebrew/homebrew-bundle/issues/147"><code>brew bundle check</code> should list whats missing · Issue #147 · Homebrew/homebrew-bundle</a>: brew bundle check/dryrun</li>
<li><a href="https://github.com/erocarrera/pefile/issues/123">Broken links in readme · Issue #123 · erocarrera/pefile</a></li>
<li><a href="https://github.com/erocarrera/pefile/issues/124">Better modularisation · Issue #124 · erocarrera/pefile</a></li>
<li><a href="https://github.com/erocarrera/pefile/issues/125">Flag to skip parsing on PE object instantiation · Issue #125 · erocarrera/pefile</a></li>
<li><a href="https://github.com/jgm/gitit/issues/580">Github Flavoured Markdown · Issue #580 · jgm/gitit</a></li>
</ul>
<h2>Quantified Self</h2>
<ul>
<li><a href="https://hello.is/">Sense</a>: Sleep tracker</li>
</ul>
<h2>Performance, nootropics, etc</h2>
<ul>
<li><a href="https://www.hongstarr.com/">Hong</a>: Bulletproof Coach in Melbourne, written up on Living Bulletproof, etc</li>
<li><a href="https://www.gethapi.com.au/products/flow">Hapi | Flow</a></li>
<li><a href="https://www.totalnootropics.com.au/collections/all-products">Total Nootropics</a></li>
<li><a href="https://nootroplus.com/">Nootroplus - Premium Nootropics</a></li>
</ul>
<h2>Interests, activities, etc</h2>
<ul>
<li>Climbing
<ul>
<li><a href="http://climbingschool.com.au/courses/">Courses - Blue Mountains Climbing School</a></li>
</ul>
</li>
<li>Archery
<ul>
<li><a href="https://www.canberraarchery.club/come-and-try">Canberra Archery - Come and Try</a></li>
<li><a href="http://home.tuggeranongarchery.com/index.php/activities/come-and-try">Tuggeranong Archery - Come and Try</a></li>
<li><a href="http://www.wvac.asn.au/beginners.html">Weston Valley Archery Club - Come and Try</a></li>
<li><a href="http://capitalfieldarchers.com.au/">Capital Field Archers</a></li>
<li><a href="https://www.bowhunters.org.au/index.php/author-login/branch-f-southern-nsw-act">Branch F - Southern NSW &amp; ACT</a></li>
<li><a href="https://www.bowhunters.org.au/">BowHunters</a></li>
</ul>
</li>
<li>Shooting
<ul>
<li><a href="http://ssaa.org.au/act/ssaa-act-inc.html">SSAA ACT Inc</a></li>
<li><a href="http://actsmallborerifleclub.com/">ACT Smallbore Rifle Club Inc</a></li>
<li><a href="http://www.canberrarifleclub.org.au/wordpress/?page_id=110">Canberra Rifle Club</a>: Preliminary Information for Interested Persons</li>
</ul>
</li>
<li>Medieval
<ul>
<li><a href="https://www.facebook.com/AncientArtsFellowship/">Ancient Arts Fellowship</a></li>
<li><a href="http://www.aaf.org.au/fighting/">Ancient Arts Fellowship - Fighting</a></li>
<li><a href="https://www.facebook.com/TheHundredSwords">The Hundred Swords</a></li>
<li><a href="http://politarchopolis.lochac.sca.org/">The Barony of Politarchopolis</a></li>
</ul>
</li>
</ul>
<h2>Gaming</h2>
<ul>
<li><a href="http://raptr.com/">Raptr</a>: Raptr makes PC gaming fast, beautiful, and hassle-free.</li>
<li><a href="http://www.gameplay-time-tracker.info/en/download.aspx">Gameplay Time Tracker</a></li>
</ul>
<h2>Unsorted</h2>
<ul>
<li><a href="https://www.gitbook.com/">GitBook · Documentation made easy</a></li>
<li><a href="https://www.blinkist.com/en/pricing.html">Blinkist: Serving curious minds</a></li>
<li><a href="http://isite2020.com.au/">iSite 20/20 - Take control of your vision</a></li>
</ul>

	  ]]></description>
	</item>

	<item>
	  <title>GraphQL: Why You Should Care</title>
	  <link>/devalias/2016/09/07/graphql-why-you-should-care/</link>
	  <author>devalias</author>
	  <pubDate>2016-09-07T00:00:00+10:00</pubDate>
	  <guid>/devalias/2016/09/07/graphql-why-you-should-care/</guid>
	  <description><![CDATA[
	     <p>If you haven't yet come across <a href="http://graphql.org/">GraphQL</a>, it's kind of exciting stuff. It's a query language developed by <a href="https://code.facebook.com/posts/">Facebook</a>, that basically lets you request exactly the data you need for the given task; no more, no less. Sounds good right?</p>
<h2>Tell me more..</h2>
<p>If you like to get into the nitty gritty of tech specs, you can head over to the <a href="https://facebook.github.io/graphql/">GraphQL Working Draft</a> (<a href="https://github.com/facebook/graphql">GitHub</a>) to have a deeper read, then play around with the <a href="https://github.com/graphql/graphql-js">reference implementation</a> in JavaScript.</p>
<p>Though if specs aren't really your style, check out '<a href="https://learngraphql.com/">Learn GraphQL</a>' and give their free short course a run through. Should get you up to speed!</p>
<h2>Ok. I'm in!</h2>
<p>Excited? Want to dive into it? Need libraries for your particular tech stack? Head on over to the <a href="https://github.com/chentsulin/awesome-graphql">Awesome GraphQL</a> list. You're bound to find what you need!</p>
<p>For my particular tech palette I was after something <a href="http://scala-lang.org/">Scala'esque</a>, maybe some <a href="http://doc.akka.io/docs/akka/2.4/scala/http/">Akka-HTTP</a> to go with it. Seems I wasn't the only one! <a href="http://sangria-graphql.org/">Sangria</a> (<a href="https://github.com/sangria-graphql/sangria">GitHub</a>) is a Scala GraphQL implementation. They even have <a href="https://github.com/sangria-graphql/sangria-akka-http-example">an Akka-HTTP based example</a>. Perfect! Throw in a little <a href="https://github.com/sangria-graphql/sangria-relay">Relay support</a> and this package is pretty much complete.</p>
<p>If you're looking for an all-in-one stack heading forward, I keep seeing a lot of good things posted by the team at <a href="http://www.apollostack.com/">Apollo Stack</a> (by the <a href="https://www.meteor.com/">Meteor</a> team), so would most definitely recommend keeping an eye on them. They also post a lot of really good articles <a href="https://medium.com/apollo-stack">on their blog</a> too.</p>
<p>For some further reading, make sure to check out:</p>
<ul>
<li><a href="https://medium.com/apollo-stack/tutorial-building-a-graphql-server-cddaa023c035">&quot;Tutorial: How to build a GraphQL server&quot; by Jonas Helfer</a></li>
</ul>
<h2><a name="graphql-relay-redux"></a>GraphQL and Relay.. What about Redux?</h2>
<p>A lot of things you'll read about GraphQL on the net will talk about it quite closely with <a href="https://facebook.github.io/relay/">Relay</a>, and given they were both released by Facebook, and sort of designed to work together, it makes a lot of sense. That said, you most definitely don't need to use Relay to take advantage of the awesomeness GraphQL provides!</p>
<p>KADIRA states it pretty well in <a href="https://kadira.io/blog/graphql/graphql-vs-relay">GraphQL vs Relay</a>:</p>
<blockquote>
<p>GraphQL provides a way to model and expose data in your app. You can use it on top of any kind of data source and use it with any kind of transport layer.</p>
</blockquote>
<blockquote>
<p>Relay is an efficient client-side data-fetching technology built for React. It talks to a GraphQL Schema to get data. Relay also has a server-side part that adds some features on top of GraphQL.</p>
</blockquote>
<p>There is a bunch of talk about how Relay is currently a pain to use, but Facebook seems to be <a href="https://facebook.github.io/react/blog/2016/08/05/relay-state-of-the-state.html">well aware of this issue</a> and has future plans to make it much nicer to work with.</p>
<p>I think it's definitely worth keeping an eye on Relay in the future, but if you're not quite ready to jump in, you can always take advantage of the benefits of GraphQL while sticking to something like <a href="http://redux.js.org/">Redux</a> (<a href="https://github.com/reactjs/redux">GitHub</a>). For further reading:</p>
<ul>
<li><a href="https://www.reindex.io/blog/redux-and-relay/">&quot;Comparing Redux and Relay&quot; by Mikhail Novikov</a></li>
<li><a href="https://medium.com/@matt.krick/replacing-relay-with-redux-2990c81aa807">&quot;Replacing Relay with Redux&quot; by Matt Krick</a></li>
<li><a href="https://medium.com/@thisbejim/getting-started-with-redux-and-graphql-8384b3b25c56">&quot;Getting started with Redux and GraphQL&quot; by James Childs-Maidment</a></li>
<li><a href="http://www.apollostack.com/">Apollo Stack</a></li>
<li><a href="https://github.com/mattkrick/cashay">Cashay</a>: &quot;Relay for the rest of us&quot;</li>
<li><a href="https://github.com/gyzerok/adrenaline">Adrenaline</a>: &quot;Simple Relay alternative&quot;</li>
<li><a href="https://github.com/kennetpostigo/react-reach">React-Reach</a>: &quot;A small library for React to communicate with GraphQL&quot;</li>
</ul>
<h2>GraphQL vs Falcor</h2>
<p>So by now we should have a fairly good idea about what <a href="http://graphql.org/">GraphQL</a> is. So what's <a href="http://netflix.github.io/falcor/">Falcor</a>? This one comes from our friends over at <a href="http://techblog.netflix.com/">Netflix</a>. In essence, it turns all of your data sources into one giant JSON graph. Regardless of whether you're loading data remotely, have it cached locally, etc; you'll access it in the same way.</p>
<p>If you want to read deeper, I found these to be quite useful:</p>
<ul>
<li><a href="https://stackoverflow.com/questions/32057785/what-is-the-difference-between-falcor-and-graphql">&quot;What is the difference between Falcor and GraphQL?&quot; on StackOverflow</a></li>
<li><a href="https://medium.com/apollo-stack/graphql-vs-falcor-4f1e9cbf7504">&quot;GraphQL vs. Falcor&quot; by Jonas Helfer</a></li>
<li><a href="http://react-etc.net/entry/beyond-rest-graphql-vs-falcor">&quot;Beyond REST: GraphQL vs. Falcor&quot; by React-Etc</a></li>
</ul>
<p>The consensus that I came to is that it seems to be on par with GraphQL in a number of ways, but is probably a bit easier to implement and a bit less powerful overall. Apparently you could even go so far as to <a href="http://hueypetersen.com/posts/2015/10/26/querying-graphql-with-falcor/">query GraphQL with Falcor</a>, but not the other way. For my purposes, I think I'll be sticking with GraphQL.</p>
<p>It's also worth noting that Facebook has been using various flavours of GraphQL for a few years now, whereas Netflix is yet to (or has only recently) started using Falcor in production.</p>
<h2>API's: REST, HATEOS, Observables.. GraphQL!</h2>
<p>I have read SO many articles over the years about the 'proper' way to design API's, and why styleX is so much better than styleY. With so much info out there, and so much conflicting advice (even within each supposed style), it's really easy to get stuck in analysis paralysis.</p>
<p>Greg Ziegan put together a <a href="https://medium.com/@gregoryziegan/how-graphql-taught-me-to-code-client-apps-1c631a9953bd">nice little article</a> talking about his progression along this path: from REST, through <a href="http://timelessrepo.com/haters-gonna-hateoas">HATEOS</a>, observables, etc; and how he ended up at GraphQL. Following on from this, Sashko Stubailo makes a pretty good argument about why GraphQL is <a href="https://medium.com/apollo-stack/graphql-the-next-generation-of-api-design-f24b1689756a">&quot;the next generation of API design&quot;</a>.</p>
<p>While the benefits of a GraphQL-based API seem pretty obvious to me, it's not always feasible to jump straight into shiny new tech. Maybe you need to support legacy services, interact with 3rd-party API's, or allow other developers to consume your API without them having to learn the ins and outs of GraphQL. But thankfully, we don't need to pick one over the other!</p>
<p>The GraphQL team have a pretty good article on their blog about <a href="http://graphql.org/blog/rest-api-graphql-wrapper/">wrapping REST API's in GraphQL</a>, starting purely with the client-side, and later moving it to the backend. This idea plays in SO well with some little side-projects I've been thinking about over the years, and how it could be used to help decompose and combine existing API's.</p>
<h2>Conclusion</h2>
<p>This is a scattering of the articles and things I have read through while learning more about GraphQL, and why it is so awesome. I definitely know it's a technology that I am super excited to start utilising in my future projects.</p>
<p>Have you come across any other awesome articles/tools related to GraphQL or similar? I'd love to hear about them! Let me know in the comments below.</p>

	  ]]></description>
	</item>

	<item>
	  <title>Shared Devices Need Account Switching</title>
	  <link>/devalias/2016/08/31/shared-devices-need-account-switching/</link>
	  <author>devalias</author>
	  <pubDate>2016-08-31T00:00:00+10:00</pubDate>
	  <guid>/devalias/2016/08/31/shared-devices-need-account-switching/</guid>
	  <description><![CDATA[
	     <p>Living in share houses and using tech like the Apple TV has highlighted an annoying situation: so many apps these days want you to sign in to enable access, personalised features, etc; but most offer no good solution for when you share the device with other people.</p>
<p>There are some apps out there that handle this pretty well:</p>
<ul>
<li><a href="https://www.plex.tv/">Plex</a> allows you to switch between different users in your 'home', each of which can either be a fully independent account, or a 'managed user' that exists under the main account.</li>
<li><a href="https://www.netflix.com/au/">Netflix</a> allows switching between different users under the one subscription. While this is ok.. it doesn't work so well for a share house. What if we each have our own Netflix subscriptions, but want to share the device without having to log out and back in to our own accounts?</li>
</ul>
<p>And then there are so many apps that don't even seem to give the option, two of which immediately jump to mind for me:</p>
<ul>
<li><a href="https://www.youtube.com/">YouTube</a> let's you sign in to a single account, but no switching features save for logging out.</li>
<li><a href="https://www.ted.com/">TED</a>'s app suffers from the same issue.</li>
</ul>
<p>This could be fixed at the individual app level. It would be REALLY nice to see support for multiple account switching added to any app made for a device that could potentially be shared (Apple TV/etc, far less likely to be useful on an iPhone.. but it might be for some users) But this requires extra effort from every app developer out there. Perhaps a common framework could be developed to help support this.. but then making it generic enough to fit into everyone's different architectures would be a challenge.</p>
<p>An even better solution could be baked into the OS itself by Apple.. I boot up my Apple TV and am presented with an account chooser asking which particular registered user I am. If I haven't already logged in, there's the option for signing in to my Apple account to add myself as a new user. Once logged in, I'm presented with my own homescreen of apps, laid out to my own preferences, logged in to my own accounts, and saving my own personal data.</p>
<p>This poses some issues about duplication of apps between users, space requirements, etc. So a mid-ground could be allowing the owner/'master' user to control app installation, but then for each other user to be able to maintain their own stored data/signin status/etc.</p>
<p>What do you think? Is this a feature you'd use, or does it just seem like over-engineered bloat? Let me know your thoughts in the comments!</p>

	  ]]></description>
	</item>

	<item>
	  <title>Starting a New Web Application (Part 1): An Exploration of Options</title>
	  <link>/devalias/2016/08/24/starting-a-new-web-application-1-an-exploration-of-options/</link>
	  <author>devalias</author>
	  <pubDate>2016-08-24T00:00:00+10:00</pubDate>
	  <guid>/devalias/2016/08/24/starting-a-new-web-application-1-an-exploration-of-options/</guid>
	  <description><![CDATA[
	     <p>Finding myself with some free time (and looking into starting a new project), I thought I might catch myself up on the state of web technologies, and what might be a good stack to work with.</p>
<p>The details collected here are most certainly not a complete layout of the entire landscape, and there will no doubt be leanings toward my personal tastes (<a href="http://www.reactivemanifesto.org/">reactive</a>, api-driven, etc). You should use this more as a starter into your own deeper research than as a source of ultimate truth. With that out of the way, let's get into it!</p>
<p><strong>Quicklinks</strong></p>
<ul>
<li><a href="#frontend">Frontend</a>
<ul>
<li><a href="#frontend-frameworks">Frameworks</a></li>
<li><a href="#frontend-ui">UI</a></li>
<li><a href="#frontend-scripting">Scripting</a></li>
</ul>
</li>
<li><a href="#backend">Backend</a></li>
<li><a href="#tooling">Tooling</a></li>
<li><a href="#conclusions">Conclusions</a></li>
<li><a href="#updates">Updates</a></li>
</ul>
<h2><a name="frontend"></a>Frontend</h2>
<p>The frontend is the pretty, interactive, main part that people will be seeing. You can have the most amazingly streamlined and perfect backend code, but noone's going to notice and love it without a strong frontend to back it up.</p>
<p><strong><a name="frontend-frameworks"></a>Frameworks</strong></p>
<p>The days of raw JavaScript and jQuery selectors is long gone. We're looking for a nice, modern framework to help put together our frontend. Here's a little selection of some of our options:</p>
<ul>
<li><a href="https://facebook.github.io/react/">React</a> (<a href="https://github.com/reactjs">GitHub</a>) (most likely with a flavour of <a href="https://facebook.github.io/flux/">Flux</a> (<a href="https://github.com/facebook/flux">GitHub</a>))
<ul>
<li>A frontend framework from Facebook that is taking the web by storm. Probably my personal favourite from what I've seen so far.</li>
<li>It even let's you <a href="https://facebook.github.io/react-native/">build for native devices</a>!</li>
</ul>
</li>
<li><a href="https://angular.io/">Angular (v2)</a> (or if you like outdated for some reason <a href="https://angularjs.org/">AngularJS (v1)</a>)
<ul>
<li>Also <a href="https://mobile.angular.io/">available for native devices</a></li>
<li>I was a big fan of AngularJS (v1), and I want to like v2, but I don't think it will be my main choice.</li>
</ul>
</li>
<li>There are a TON of other frontend frameworks, of varying popularity and support. I won't delve into them much, but there's heaps of info out there
<ul>
<li><a href="http://emberjs.com/">Ember</a></li>
<li><a href="https://vuejs.org/">Vue.js</a>
<ul>
<li>From reading around the web, there's a decent amount of good stuff talking about Vue. In the end I decided against it since it's not supported by a big backer, and the skills aren't as useful on a resume. That said, for a personal project it could be a great fit!</li>
<li><a href="https://vuejs.org/guide/comparison.html">https://vuejs.org/guide/comparison.html</a></li>
<li><a href="http://blog.evanyou.me/2015/10/25/vuejs-re-introduction/">http://blog.evanyou.me/2015/10/25/vuejs-re-introduction/</a></li>
<li><a href="http://vuejs.org/2016/04/27/announcing-2.0/">http://vuejs.org/2016/04/27/announcing-2.0/</a></li>
<li><a href="https://github.com/vuejs/vue">vue</a>, <a href="https://github.com/vuejs/vue-rx">vue-rx</a>, <a href="https://github.com/vuejs/vue-resource">vue-resource</a>, <a href="https://github.com/vuejs/vue-router">vue-router</a>, <a href="https://github.com/vuejs/vuex">vuex</a>, <a href="https://github.com/revue/revue">revuew</a></li>
</ul>
</li>
<li><a href="http://aurelia.io/">Aurelia</a></li>
<li><a href="http://riotjs.com/">Riot</a> (<a href="https://muut.com/blog/technology/riot-2.0/">v2</a>)</li>
</ul>
</li>
</ul>
<p>As with most things, every man and his dog has their own opinion, so here are a few comparisons I found useful:</p>
<ul>
<li><a href="https://www.ociweb.com/resources/publications/sett/comparison-of-angular-2-and-react/">&quot;Comparison of Angular 2 and React&quot; by Mark Volkmann and Lance Finney</a></li>
<li><a href="http://blog.backand.com/angular-2-vs-react/">&quot;Angular 2 vs. React&quot; by Itay Herskovits</a></li>
<li><a href="https://medium.freecodecamp.com/angular-2-versus-react-there-will-be-blood-66595faafd51">&quot;Angular 2 versus React: There Will Be Blood&quot; by Cory House</a></li>
<li><a href="https://rlafranchi.github.io/2016/05/03/vue-vs-react/">&quot;Vue.js vs React.js&quot; by Richard LaFranchi</a></li>
<li><a href="https://forums.meteor.com/t/why-doesnt-mdg-just-adopt-vue-js-and-forget-about-react-vs-blaze/13926/6">&quot;Why doesn’t MDG just adopt Vue.js and forget about React vs Blaze?&quot;</a></li>
</ul>
<p><strong><a name="frontend-ui"></a>UI</strong></p>
<p>Even if you like to go oldschool and code your site by hand in notepad/vi, you can't deny the ease/benefits of using a frontend UI framework.</p>
<ul>
<li><a href="https://getbootstrap.com/">Bootstrap</a> (<a href="https://blog.getbootstrap.com/2015/08/19/bootstrap-4-alpha/">v4</a>)
<ul>
<li>Released by Twitter, and arguably one of the most used frontend UI frameworks out there.</li>
<li><a href="https://react-bootstrap.github.io/">React-Bootstrap</a> (<a href="https://github.com/react-bootstrap/react-bootstrap">GitHub</a>)</li>
<li><a href="https://ng-bootstrap.github.io/#/home">ng-bootstrap</a> by the angular-ui team (<a href="https://github.com/ng-bootstrap/ng-bootstrap">GitHub</a>)</li>
<li><a href="https://valor-software.com/ng2-bootstrap/">ng2-bootstrap</a> by valor-software (<a href="https://github.com/valor-software/ng2-bootstrap">GitHub</a>)</li>
</ul>
</li>
<li><a href="http://foundation.zurb.com/">Foundation</a>
<ul>
<li>While not as well known as the other two mentioned here, those that make use of foundation swear by it.</li>
<li><a href="https://react.foundation/">React-Foundation</a> (<a href="https://github.com/nordsoftware/react-foundation">GitHub</a>)</li>
<li><a href="https://aruberto.github.io/react-foundation-components/">React-Foundation-Components</a></li>
</ul>
</li>
<li><a href="https://material.google.com/">Material Design</a>
<ul>
<li>Following a set of design principals from Google, this lays out a slick, consistent look and feel.</li>
<li><a href="https://getmdl.io/">Material Design Lite</a></li>
<li><a href="http://www.material-ui.com/">For React</a> (<a href="https://github.com/callemall/material-ui">GitHub</a>)</li>
<li><a href="https://material.angular.io/">For Angular (v2)</a> (<a href="https://github.com/angular/material2">GitHub</a>)</li>
<li><a href="https://material.angularjs.io/">For AngularJS (v1)</a> (<a href="https://github.com/angular/material">GitHub</a>)</li>
</ul>
</li>
</ul>
<p>Can't decide? Try some comparisons:</p>
<ul>
<li><a href="http://blog.teamtreehouse.com/the-rundown-bootstrap-vs-google-mdl-vs-foundation">&quot;The Rundown: Bootstrap vs. Google MDL vs. Foundation&quot; by treehouse</a></li>
<li><a href="https://dannyherran.com/2016/03/state-of-affairs-bootstrap-4-vs-foundation-6/">&quot;State of affairs: Bootstrap 4 vs Foundation 6.2&quot; by Danny Herran</a></li>
</ul>
<p><strong><a name="frontend-scripting"></a>Scripting</strong></p>
<p>Modern web apps live by the functionality they enable in the browser, and to do this, we need a JS-esque language. Your chosen frontend framework may sway your choice (eg. Angular (v2) has a strong preference for TypeScript), but ultimately, it's up to what you/your team feel comfortable with. With <a href="https://github.com/jashkenas/coffeescript/wiki/list-of-languages-that-compile-to-js">so many options</a> out there, it's hard to pick.. And of course, you could always stick to plain JavaScript.. and with the new features coming in <a href="http://es6-features.org/">ES6</a> (eg. <a href="http://www.html5rocks.com/en/tutorials/es6/promises/">promises</a>) and beyond, it might be a good choice.</p>
<ul>
<li><a href="https://babeljs.io/">Babel</a>
<ul>
<li>A transpiler that lets you play with all the fun features of JavaScript ES6 and beyond, while maintaining compatibility with all of the older browsers.</li>
</ul>
</li>
<li><a href="https://www.typescriptlang.org/">TypeScript</a> (<a href="https://github.com/Microsoft/TypeScript">GitHub</a>)
<ul>
<li>&quot;TypeScript is a typed superset of JavaScript that compiles to plain JavaScript&quot;</li>
<li>If you're using Angular (v2) and like sticking to convention, this is the one for you.</li>
</ul>
</li>
<li><a href="http://coffeescript.org/">CoffeeScript</a> (or maybe <a href="https://github.com/michaelficarra/CoffeeScriptRedux">v2</a>)
<ul>
<li>This used to be my choice, but looking at the other options available now, I think i'll be moving on.</li>
<li>As always, there are a bunch of arguments for and against..
<ul>
<li><a href="https://robots.thoughtbot.com/replace-coffeescript-with-es6">&quot;Replace CoffeeScript with ES6&quot; by Blake Williams</a></li>
<li><a href="http://tech.noredink.com/post/111583727108/dont-replace-coffeescript-with-es6-transpilers">&quot;Don’t Replace CoffeeScript with ES6 Transpilers&quot; by Richard Feldman</a></li>
<li>etc</li>
</ul>
</li>
<li>If you're looking for a way out, why not <a href="https://github.com/decaffeinate/decaffeinate">decaffeinate</a>?</li>
</ul>
</li>
<li><a href="https://flowtype.org/">Flow</a> (<a href="https://github.com/facebook/flow">GitHub</a>)
<ul>
<li>While it's not a language unto itself, it does allow you the benefits of typed JavaScript without having to dive into something like TypeScript.</li>
</ul>
</li>
<li><a href="https://www.scala-js.org/">Scala.js</a>
<ul>
<li>A little left field, this transpiles Scala code into JavaScript. While I probably wouldn't see myself using this as a main choice, it could make for some interesting reusability between front and backend.</li>
</ul>
</li>
</ul>
<h2><a name="backend"></a>Backend</h2>
<p>My preferences for backend tech stacks lean heavily towards <a href="http://www.scala-lang.org/">Scala</a> and the <a href="https://www.lightbend.com/platform">Lightbend Reactive Platform</a> these days, but I will make quick mention of some of the other options available.</p>
<ul>
<li><a href="http://doc.akka.io/docs/akka-http/current/scala.html">Akka-HTTP</a>
<ul>
<li>Taking the power of asynchronous, message based actors, and applying them to HTTP. Definite win.</li>
<li><a href="https://softwaremill.github.io/bootzooka/">Bootzooka</a> (<a href="https://github.com/softwaremill/bootzooka">GitHub</a>)
<ul>
<li>&quot;Bootzooka is a simple application scaffolding project to allow quick start of development for modern, web based applications.&quot;</li>
<li>While not perfect, it's a decent implementation of a starter app, tying together some useful technologies.</li>
</ul>
</li>
</ul>
</li>
<li><a href="https://www.playframework.com/">Play Framework</a>
<ul>
<li>&quot;Play is a high-productivity Java and Scala web application framework that integrates the components and APIs you need for modern web application development.&quot;</li>
</ul>
</li>
<li><a href="http://scalatra.org/">Scalatra</a>
<ul>
<li>&quot;Scalatra is a simple, accessible and free web micro-framework. It combines the power of the JVM with the beauty and brevity of Scala, helping you quickly build high-performance web sites and APIs.&quot;</li>
</ul>
</li>
<li><a href="https://liftweb.net/">Lift</a> (<a href="https://github.com/lift/framework">GitHub</a>)
<ul>
<li>&quot;Lift is the most powerful, most secure web framework available today. There are Seven Things that distinguish Lift from other web frameworks.&quot;</li>
</ul>
</li>
<li><a href="http://http4s.org/">http4s</a> (<a href="https://github.com/http4s/http4s">GitHub</a>)
<ul>
<li>&quot;A typeful, purely functional, streaming library for HTTP clients and servers in Scala.&quot;</li>
</ul>
</li>
<li><a href="https://twitter.github.io/finatra/">Finatra</a>
<ul>
<li>&quot;Fast, testable, Scala services built on TwitterServer and Finagle.&quot;</li>
</ul>
</li>
<li><a href="https://github.com/airbnb/hypernova">Hypernova</a>
<ul>
<li>&quot;A service for server-side rendering your JavaScript views&quot;</li>
<li>While not a choice unto itself, this should help speed things up and keep your site nice and search engine friendly.</li>
</ul>
</li>
<li>There will be a number of opinions spread throughout the net, including:
<ul>
<li><a href="https://scala.libhunt.com/categories/585-web-frameworks">https://scala.libhunt.com/categories/585-web-frameworks</a></li>
<li><a href="https://www.reddit.com/r/scala/comments/3kaael/which_framework_to_use_for_development_of_a_rest/">https://www.reddit.com/r/scala/comments/3kaael/which_framework_to_use_for_development_of_a_rest/</a></li>
<li><a href="https://www.quora.com/Is-Play-the-best-web-framework-written-in-Scala">https://www.quora.com/Is-Play-the-best-web-framework-written-in-Scala</a></li>
</ul>
</li>
<li>You also have all of your other typical options
<ul>
<li><a href="https://www.ruby-lang.org/en/">Ruby</a>
<ul>
<li><a href="http://rubyonrails.org/">Ruby on Rails</a></li>
<li><a href="http://www.sinatrarb.com/">Sinatra</a></li>
</ul>
</li>
<li><a href="https://nodejs.org/en/">Node</a>
<ul>
<li><a href="http://expressjs.com/">Express</a>: &quot;Fast, unopinionated, minimalist web framework for Node.js&quot;</li>
<li><a href="https://www.meteor.com/">Meteor</a>: &quot;Meteor is an open source platform for web, mobile, and desktop.&quot;</li>
<li><a href="http://noeticforce.com/best-nodejs-frameworks-for-web-and-app-development">&quot;Node.js Frameworks: The 10 Best for Web and Apps Development&quot; by noeticsunil</a><br />
mobile, and desktop.&quot;</li>
</ul>
</li>
<li><a href="https://www.python.org/">Python</a>
<ul>
<li><a href="https://www.djangoproject.com/">Django</a></li>
<li><a href="https://wiki.python.org/moin/WebFrameworks">Web Frameworks for Python</a></li>
</ul>
</li>
<li><a href="https://secure.php.net/">PHP</a>
<ul>
<li><a href="https://octobercms.com/">October</a>: &quot;October is a free, open-source, self-hosted CMS platform based on the Laravel PHP Framework. A simple and modular CMS that grows with you, with a precise and beautiful interface that comes as second nature.&quot;</li>
<li><a href="https://laravel.com/">Laravel</a></li>
</ul>
</li>
<li>etc</li>
</ul>
</li>
</ul>
<h2><a name="tooling"></a>Tooling</h2>
<p>With the crazy mix of technologies and steps involved in modern web app development, it makes a ton of sense to tie it all together with some automation.</p>
<ul>
<li><a href="https://webpack.github.io/">Webpack</a> (<a href="https://github.com/webpack/webpack">GitHub</a>)
<ul>
<li>&quot;Webpack is a bundler for modules. The main purpose is to bundle JavaScript files for usage in a browser, yet it is also capable of transforming, bundling, or packaging just about any resource or asset.&quot;</li>
<li><a href="http://blog.andrewray.me/webpack-when-to-use-and-why/">&quot;Webpack: When To Use And Why&quot; by Andrew Ray</a></li>
<li><a href="https://github.com/webpack/less-loader">https://github.com/webpack/less-loader</a></li>
<li><a href="https://github.com/shakacode/bootstrap-loader">https://github.com/shakacode/bootstrap-loader</a></li>
</ul>
</li>
<li><a href="http://gulpjs.com/">Gulp</a> (<a href="https://github.com/gulpjs/gulp">GitHub</a>
<ul>
<li>Gulp is a streaming javascript task runner that lets you automate tasks.</li>
</ul>
</li>
<li><a href="http://gruntjs.com/">Grunt</a> (<a href="https://github.com/gruntjs/">GitHub</a>)
<ul>
<li>Grunt is basically the older, less streaming, less awesome version of Gulp.</li>
</ul>
</li>
</ul>
<p>While a little different in purpose to the things mentioned above, getting everything nicely tested and deployed is always good:</p>
<ul>
<li><a href="https://bitbucket.org/product/features/pipelines">Bitbucket Pipelines</a>: &quot;Build, test and deploy from Bitbucket&quot;</li>
</ul>
<h2><a name="conclusions"></a>Conclusions</h2>
<p>Hopefully this has given you a decent starting point for figuring out what combination of technologies is going to work best for your next project. If you want to see the direction I've decided to go, make sure you read on in <a href="#TODO">Part 2</a>.</p>
<p>Have I missed something important? Not given love to your favourite stack? Got a cool pointer? Or just want to say hi? Let me know in the comments!</p>
<h2><a name="updates"></a>Updates</h2>
<ul>
<li>2017-04-11 Added some more backend web frameworks, updated akka-http link, fixed some formatting</li>
</ul>

	  ]]></description>
	</item>

	<item>
	  <title>Resolutions for 11111011100 [2012]</title>
	  <link>/devalias/2012/01/04/resolutions-for-11111011100-2012/</link>
	  <author>devalias</author>
	  <pubDate>2012-01-04T10:31:00+11:00</pubDate>
	  <guid>/devalias/2012/01/04/resolutions-for-11111011100-2012/</guid>
	  <description><![CDATA[
	     <p>So here comes the obligatory post about my resolutions for 2012. In no particular order or level of detail:</p>
<ul>
<li>Spend more time hanging out and chatting with friends. Those who are physically close as well as those far away; in person, on the phone and online; those who I am close to and those I should be closer with.</li>
<li>Put more time into coding/web design/development tasks with the aim of getting at least 1 app out this year.</li>
<li>Open source anything and everything I do that isn't a 'trade secret' (More on this to come later). Who knows what people will be able to find a use for. Also contribute back anything I can to open source projects I use.</li>
<li>Continue to read, learn and grow; be it in technical skill, learning about myself, or the world; and share what I learn with everyone and anyone who is interested. (Essentially open source whatever knowledge I gain)</li>
<li>Be more forward and take (calculated) risks even when they seem scary. (Talking to someone new/interesting/cute, giving that project a go, etc)</li>
</ul>
<p>This one isn't a resolution so much as a goal but a notable thing to do in any case:</p>
<ul>
<li>Ensure all of my hard drives utilise full disk encryption, using a strong password. ''The man' thinks he is too good these days, so why not stick it to him in a simple, fun, and secure way. (See the article on EFF.org)</li>
</ul>

	  ]]></description>
	</item>


</channel>
</rss>
