Development

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…

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.

My First Rails Dev Evironment with Vagrant and Puppet

For those of you doing Web Application Architectures by Greg Heileman out of Coursera this will get you up to the end of Module 2 Lecture 2.

Let me start by saying this.. sometimes I’m lazy.  So when I see a new way to spin up a development environment that will literally do EVERYTHING FOR ME I jump at the opportunity.  I’m no master with vagrant (started using it yesterday) or puppet (started using it this morning) but they are not hard to figure out.

I primarily use Windows which means that most of the scripts and plugins that you see out on the web for Vagrant will not work, especially the ones using Chef for some reason.

Continue reading…

Simulate Clicker (Cookie Clicker Project)

After finishing IIPP over at Coursera I was excited to start POC.  I found most of the stuff in IIPP fairly easy but I was shocked at how difficult the first project “Cookie Clicker” was.  For those of you thinking that this one is too difficult don’t worry the projects get easier as you progress.  This is a very difficult first project but it’ll get you going in the right direction for the others.

I’m going to go over what I thought was the most difficult part of this project with out completely giving it away.  Phase one is pretty basic stuff.  The really difficult one for me was phase two.  The difficult part about this one is deciphering what you need to do from the instructions provided.  Honestly the forums are nice but some times you have to read way to many useless comments to find something helpful, people trying to be cryptic to follow the honor code.

Continue reading…

WordPress Development Environment on Windows

I recently decided that I wanted to start contributing a little bit of time each week to the WordPress project.  Since I’ve already written a couple of extensions and administrate quite a few WordPress sites I figure it’s time to start giving back to the project.

The Core Contributor handbook outlines quite a bit of things you need to know in order to get started but there are always things that are linked to that start to fall out of date as time marches forward.

One step that I recently wanted to take was getting set up to perform unit tests.  As a developer I’ll be the first to admit guilt in not creating these for projects but for big projects like WordPress with distributed development and thousands of tickets it’s imperative that we have unit tests.

In this guide I will cover how to setup a complete WordPress development environment on Windows.  I’ll be covering everything from server (localhost) to SVN to Composer to PHPUnit.  We’ve got our work cut out for us so let’s get started.

Continue reading…