The MSNR Stack Step 1

I’ve been letting the idea for the MSNR stack ruminate in my mind for a while now and it was finally time to pull the trigger.  There are an endless array of node frameworks sprouting up but at the end of the day I think its important to do what your comfortable with and for me that’s MVC and SPAs that don’t step it your MVC aka the MSNR stack.

Today I took a very important step toward that goal by setting up my first very own server!  Well it’s not the first time I’ve set up a server or anything but it’s the first time I’ve done it outside of a VM!  I purchased an old HP G5 DL380 recently and decided it was high time to get it up and running.

The first thing I did was mount the sucker:

Then I wired it up, got it some juice (power) and some food (internet) switched it on and it was like the jet of my dreams taking off in my basement.  (The fans are really loud on start up…)

After that I installed Ubuntu 12 LTS since it was certified for my hardware.  Once the install was done it was time to get node installed.  I used a package available here from joyent with great success.

Then I had to make sure it would actually show something if I navigated to it.  By default node does not serve anything like nginx or lamp.  You need to create an application in order for something to display enter the Hello World app:

I’m a fan of nano so I did :

nano ~/hello_world.js

Then I got to work writing my first app (which I stole from the node site).

var http = require('http');
http.createServer(function (req, res) {
  res.writeHead(200, {'Content-Type': 'text/plain'});
  res.end('Hello World\n');
}).listen(80);

Once it was all ready I did my CTRL+X  Y and Enter to save my file.  Then finally it was time to test!

sudo node ~/hello_world.js

At this point if you did everything right all you should see is a flashing underscore.  You’ll need to use sudo if you are using port 80 like I am.

Finally I wanted to see my master piece in action so I logged on to my domain registrar, created a new subdomain, went to the Advanced DNS editor and redirected the sub-domain to my IP address.  Once that was setteled I went into my At&T 2WIRE router and went into my firewall, selected my server and set it to accept traffic on port 80 (by clicking the Server link and the Web Server selection).

TLDR for all those who skip to the bottom (like myself).

  1. Get a server
  2. Install Ubuntu
  3. Install Node
  4. Create a Node App
  5. Point a Domain to your IP Address
  6. Ensure your Router/Firewall are ready for the traffic.

DONE

http://dev.motoandmustache.com/

Not too bad for an evenings work.

Visibility in Lists with a Simple Script

For those occasions where you find yourself creating complex objects that are lists where you need control visibility here is a simple script that will save you a lot of headache.

I came across this needing while working with a list of locations on a project.  The objects were to complex for a table and needed to be dynamic enough to allow end users to easily add additional locations.  What I did was create a Section and bind it to my location list.  Then I proceed to put my various sub fields and sub-objects into that section.  Then at the bottom I put a couple of buttons that fired boundary events to add and delete items to my list.  Simple right?

repeater

Continue reading…

Installing and configuring IBM Business Process Manager on Windows 2012 R2 for Development

Starting my new job at Blue 2.0 and my supervisor gave me a little challenge… to get BPM installed.  Turns out it’s a little bit of a process and I’ve already had to start over once so I thought I’d document my process here.  I’ve decided to use Windows 2012 R2 as my development environment, I’d expect that most IT departments (that are windows based) are going to want to use the newest version of Windows Server so I figure why not make my development environment match a common deployment environment (I’d be interested to see the deployment numbers for base OS for this technology but that’s another day).  You can get a free 180 day evaluation copy of 2012 here: http://www.microsoft.com/en-us/evalcenter/evaluate-windows-server-2012-r2-essentials?i=1.  I’m using the Essentials package so I don’t have to configure absolutely everything.  I’ve installed the server on my VirtualBox VM already and gone through the initial config.  For this virtual box you’ll need at least 40GB of HD space.

Continue reading…

The MSNR Stack

MongoDB + Sails.js + Node.js + React.js = MSNR (mis · ner)

JavaScript frameworks are coming out of the woodwork right now but picking and choosing  which ones to use for your project can be a pain, because there are a myriad of ways to combine these frameworks to build applications.  ToDoMVC covers some of the more popular combinations out right now, however there is one that they don’t cover. The MSNR stack.

Continue reading…

ISIS Suburban Mall Stores

Thank you internet for making me smile.  Recently trending on twitter is the hashtag #ISISSuburbanMallStores I’ve saved some of my favorites for later giggles:

  • The GoatCheesecake Factory
  • Behead, Baath, and Beyond
  • Death to America Eagle Outfitters
  • Bombs and Noble
  • Cold Stoning
  • Things Dismembered
  • Die Yankee Candle
  • Aunt Annie’s Burkha-Covered Pretzels
  • IED Crafters
  • Jihad Juice
  • Turban Outfitters
  • The Hamas Depot
  • The Sharper Papyrus Drawing
  • Men-Only Warehouse
  • F.Y.E. (For Your Execution)
  • Behead a Bear Workshop

My contribution…

Victoria’s Veils

3 Reasons not to use SimpleSAMLphp to provide SSO support to your PHP application.

First off I want to say that I’m sure that SimpleSAMLphp has some really great applications/uses.  As they say on their site they’ve won some awards.   However in my experience this application has several large drawbacks that prevent it from being usable for many projects.

  1. Installation?
    • If I’m going to do something with simpleSAMLphp like write an extension for a CMS or add it for use in an application that I want to wrap up for easy deployment I ABSOLUTELY DO NOT want to require people to install SimpleSAMLphp on their own to use my software.
    • This isn’t cross platform friendly (at least not in the documentation) a.k.a. no windows install instructions.
    • Granted if you download it and put it in your application you can access the pages (in module core) but that leads to…
  2. Not external database friendly.
    • Trying to make the config files dynamic is like pulling teeth.  If you try to require() anything it more than likely won’t function correctly.  I tested several scripts to parse external data from my database to set the parameters in config.php file but every-time I tried to load the  ‘/www/module.php/core/frontpage_welcome.php’ my database object would fail.
    • What is the point of forcing your end users to manually configure a php file when this should be done from the application we are trying to build for them.
  3.  It’s bulky.
    • 1289 files
    • 462 folders
    • 6.77 MB (after unzip)
    • Integrating SAML into an application should not be this expensive…

I hope that they find a way to release a “lite” version of this application that make it more accessible to other application projects.

For now I would recommended looking at PHP SAML by OneLogin.  No installation required,  its much lighter and looks like it’s much easier to integrate with applications.  I’ll let you know my development with this one goes.

Git on Windows

For those of you still plowing through Module 2 of Web Application Architectures in the last bit he’ll show you have to setup a git repo for your project.  However if you’re using Vagrant and you files sync like mine you don’t need to do all of that typing in the terminal of your VM (unless you really want to).

If you don’t have it installed already install Git for Windows. Once installed you can now do you git stuff straight from the Window GUI.

Continue reading…

Vagrant SSH not working on Windows

Are you getting an error along the lines of:

‘ssh’ executable not found in and directories in the %PATH% variable.  Is an SSH client installed?  Try installing Cygwin, MinGW, or Git, all of which contain an SSH client.  Or use your favorite SSH client with the following authentication information shown below:

By default Windows doesn’t have a shell for SSH so you’ll need to install one if you haven’t already.  If you’re not using version control yet and don’t have a shell you can kill two birds with one stone by installing Git.

If you already have Git installed and are still getting the message.  It because by default Git doesn’t put itself in your %PATH% however that’s easy enough to fix within your CMD session.  Simply type:

set PATH=%PATH%;C:\Program Files (x86)\Git\bin

in your CMD prompt and your good to go. Now when you type vagrant ssh it will find the git-bash shell and put you right into your virtual machine.