The new Fullstack website

Fullstack Logo We at FullStack are big on dogfooding so we decided it was time to move away from Wordpress. As our site is just a simple static site with the random blog post we decided to build something a lean as possible. This lead us to doing a serverless deployment using AWS, Jekyll, and a few scripts.

Simplify SSH access to your AWS ec2 instances

We at FullStack are big on security and only allow SSH access to hosts by the IPs of our engineers.  In AWS we create a single security group (SG) to allow SSH access.  With the use VPNs, travel, and dynamic IPs it can some time be a pain to update a security group with your new IP.  So I wrote a small python script using Boto3 that removes and updates a single ingress rule based on the description value.  You just need to set the SG Id on line 5, and the value of the description on line 6 of the rule you want to update.  We use a user name for the description value as it makes it easy to tell what rule belong to who.

update-ssh-sg.py

Do you need help with your DevOps? Are you struggling with getting AWS to work for you? Contact us to discuss how we can help!

A new github project - pubmed_j

PubMed Logo

I have just released a new GitHub project - pubmed_j.  It fetches and parses PubMed docs into a POJO.  This project was started out of a need to import PubMed documents as references in the MAGICApp.  As I really dislike using SOAP services I wrote this.

Get the goods at - https://github.com/denov/pubmed_j

FullStack gets a shout-out in a BMJ article

British Medical JournalWe got a little love in the recent BMJ article, "Decision aids that really promote shared decision making: the pace quickens" for the work we have been doing on the MAGICApp.

Do you need help creating your next high-performance app? Are you struggling to determine the right architecture for your next project? Contact us to discuss how we can help!

Stylish, and accessible, ordered lists with LESS CSS

The design process for most front end designers has evolved over the last few years to remove Photoshop from the workflow, to one where the design goes from wireframe to browser as soon as possible. It allows us to work faster and present a design concept that can be viewed on multiple screens and devices right off the bat.

The basic design concept for the login and signup pages for the MAGICapp project called for a numbered list of the benefits of creating a new account. In years past I might have used icons or images crafted in Photoshop to achieve the desired look, but with what can be achieved in CSS, it's possible to be able to create the design in code that renders well on all screens and devices. Here is a screenshot from the Balsamiq wireframe that shows the basic list design:

Obviously this should be coded as an ordered list. It's semantically correct to do so and it's also nice that it can still be accessible to screen readers. Basically, when the CSS is disabled, it should still render as a numbered list. But, the biggest design challenge with styling ordered lists in CSS is figuring out how to target the numbers separately from the text as shown in the wireframe above. Here's the solution I came up with.

Standard html for the list:

  <ol class="numberedList">
      <li>List item number one</li>
      <li>List item number two</li>
      <li>List item number three</li>
      <li>List item number four</li>
  </ol>

And the basic CSS for the list and first list item:

.numberedList ol {
  list-style-type: none;
}

Passing arguments to Intern tests

theinternWe have started to use Intern to test MAGICapp, a medical guideline authoring application we are currently working on. I wanted the flexibility to run a test against any of our environments and didn't want to hard code the server host name into the test. After looking through the Intern wiki and related blog posts I found nothing to explain how to pass an arguments into a test.

Digging in the source of the Intern I found 'intern/lib/args' which has the following comment in the top of the file:

/**
 * A hash map of arguments passed to the application.
 * This code expects that arguments are passed as key=value
 * pairs, either in the query string (if in browser) or on
 * the command line (if in Node.js). Arguments passed
 * with a key but no value are assumed to be boolean flags.
 * Keys with - or -- prefixes will have the prefix stripped.
 */

So if you include 'intern/lib/args' into your tests you'll be able to pass the host you want to test against. You could pass other things like if the test should be 'read' or 'write' as you may not want to run tests that change data again your production application.

define([
  'intern!object',
  'intern/chai!assert',
  'require',
  'intern/lib/args'
], 
function (registerSuite, assert, require, args) {

Interview on Dojo site for MAGICapp JavaScript development

Our very own Deno Vichas was interviewed by Dylan Schiemann, CEO at SitePen, and co-founder of the Dojo Toolkit for Dojo's Case Study Series.

magicapp2-1024x614Deno talks about managing complex JavaScript web applications and developing rich user interface components using Dojo.

MAGICapp is a cutting edge clinical practice guideline authoring and publishing application used by evidence based medicine practitioners and is featured for the interview.

MAGICapp was developed from the ground up by the Fullstack team and makes extensive use of the Dojo Toolkit.

Read more »

HTML multi select with ordering on JSFiddle

jsfiddle-htmlJSFiddle is a great tool for interactive JavaScript development and prototyping.

I needed an HTML select where the user could change the ordering and select to edit the values. Developing this interactively right in the browser made it easy to quickly see updates.

Here's a live demo on JSFiddle of the finished product implemented in JavaScript with some help from Dojo:

http://jsfiddle.net/denov/ShLrs/

 

 

Database restore with Elastic Beanstalk

So you have an Elastic Beanstalk environment with an RDS instance with automated backup and you just hosed your database and need to restore.

aws

At first you may think this should be a quick and simple process until you try to restore your database. With RDS you can only restore a backup to a new instance. This seems reasonable until you figure out there's no way to change your RDS endpoint in your Beanstalk environment, or at least no solution was readily available in the documentation. You also can't create a new environment from an automated backup.

Here's the steps I used to solve this problem:

  • Restore the database to a new RDS instance.
  • Make a manual backup of this new RDS instance.
  • Create a new Beanstalk environment using your manual RDS backup.
  • Test to make sure everything is working as expected.
  • Update URLs or DNS to make sure traffic is routed to your new environment.

Let us know in the comments if you found a better solution or this saved you some headache.

 

SQL IN like query with Dojo stores

Sometime you need a little more that passing an object to query() of a Dojo store to do a simple compare of a property or two. In those cases you can pass a function that returns a boolean. As an example say you want to return the object where the key is in a list. You can use the following: