No doubt we are in the middle of the mobile revolution. The mobile-first mentality is prevalent. I feel like I see these types of posts every day lately:
While there is an obvious trent towards mobile in the consumer world, there is one place desktop is king: Business.
I am a sucker for modules. Something about bundling a set of functionality and display logic into a module that can be easily redistributed for many apps makes my skin tingle. So when I saw that “modules” were a big part of the AngularJS methodology, I was super excited to try it out. I quickly realized however, that most of the examples online used one module for the entire application, which didn’t seem all that modular to me.
At my curent company we are using Angular.js for a new desktop application (yes, a desktop application, but I won’t get into that). Our app gets its data and events from a web service via a WebSocket connection. Angular comes bundled with some great tools to connect to REST servers, but it doesn’t come with anything to help you with real-time data (and it probably shouldn’t).
Here is an example of an Angular service (factory) that uses WebSockets to get data:
At my current company I am working on my first large-scale production backbone.js app and I couldn’t be happier. After using backbone.js for a few months I have caught the vision and I am becoming more and more proficient. But every once and a while I still run into problems I would consider basic, but I can’t seem to find much help on the interwebs. Authentication with backbone.js apps was one of those problems. So I am posting the solution I came up with in hopes it will benefit someone else, and hopefully will garner some feedback or potentially better ways to solve authentication with Backbone.js.
Last year around this time Plivo.org was announced to the public, allowing anyone to develop telephony applications with the web language of their choice on top of their OWN FreeSWITCH based phone system. Plivo.org is an amazing project, and if you aren’t familiar with it I suggest you read [my getting started post].
Now the founders of Plivo.org have built on that technology to create a new telephony platform, Plivo Cloud. I know what you are thinking– another Twilio. And while the general idea (building awesome telephony apps in any web language) is still the same, there are a few things that make Plivo Cloud much different, and much better.
Sublime Text 2 is an amazing code editor that I started using on the recommendation of a friend. I fell in love and haven’t looked back. Here are some recomendations for setting up Sublime Text 2 for PHP and WordPress development.
At my current job all the database systems are managed by DB admins and the developers have to connect to the database via web services. We do not connect to the databases directly. This allows for better separation of concerns and allows experts to focus on their respective specialties. But if you are programming a Symfony2 app, that means you don’t get to use Doctrine or any other ORM, which in turn means you create your own models/entities.
When you want to develop the authentication parts of your new app you will quickly find that there is plenty of documentation for Doctrine/ORM based apps, but if you are using your own custom models then you run into pages
like this one. (when I finish this post I will submit an article to the docs and see if they approve it) UPDATE: Someone beat me to it, there is now a good tutorial in the Symfony docs for custom user providers.
I have been working with the Zend Framework for the last 3 years. I like it. It is flexible, heavily object oriented, and organized. However, one thing that has always bothered me is that modules in ZF have been second-class citizens. Granted, in Zend Framework 2 this is not the case, but I needed to start a project right away, and since ZF2 is still in beta, I decided to go checkout some other frameworks again.
A few days ago, I needed to test a part of my application that was behind a login. I hit up UPHPU user group on IRC, and Carmony (a master website optimizer) suggested logging in on my browser and then hijacking the session in siege by setting header values. That is a great idea, but seems overly difficult. I doubted that I was the only one that ever wanted to do this. Isn’t there an easier way?
The open-source telephony development world has been changing drastically over the last 2 years. Projects like FreeSWITCH allow you to create simple phone applications with XML files, but until recently, advanced applications required a solid knowledge of the Erlang language. Then enters Twilio— which allows any web developer to make advanced telephony apps in the web language of their choice. But with Twilio’s pricing structure, you are looking at anywhere from 2 to 4 cents per minute IN ADDITION to your VOIP service while also being locked-in to their cloud. Must I learn Erlang if I want to make cool telephony apps for free?
If you have developed WordPress sites for clients this process might sound familiar to you:
After lots of trial and error, I have come up with a process that is more efficient, and allows rapid development of wordpress sites. I use Git, Git Submodules, and WordPress child themes to get going quicker and keep code up to date with minimal effort. (If your not using a revision control system like Git or SVN for development, then check out
this funny question and answer session on Stack Overflow Update: Stack Overflow moderators removed the question… bummer. Check out the funny-ness in the wayback machine internet archiver instead)
Today’s post will be on setting up wildcard subdomains in OSX. This allows you to map folders in your web root to sub-domains on your local box. Why would you want to do this? It is nice to be able to type use http://myproject.clint.dev for the URL and have it map to the ‘myproject’ folder on your local box. No need to add a line to the etc/hosts file, and no need to add a virtual host in apache for each sub-domain. The method I will be outlining here will allow you to map x.yourdevdomain.dev to any folder ‘x’ using Bind and a wildcard virtual host in apache. This tutorial assumes you already have Apache setup on your local box.
I have been using Zend Studio as my IDE for years, and for version control I have always used SVN. Zend Studio Eclipse plays very nicely with SVN out of the box, but lately it seems Git has gained a lot of momentum so I thought I would look into it. It turns out Git is awesome and is much better suited for many of the things I do. (See: [Why Git?])
But will Git play nicely with Zend Studio 8?
Thanks to eclipse plugins, you bet it will!
I came accross [MongoDB] a few months ago and it seemed like a perfect fit for many of the projects I am working. Extremely fast inserts, map-reduce for complex queries, and most importantly, scaling is a breeze.
Since I am a Zend Framework guy I created a simple base model class for MongoDB. It is a very simple wrapper, but is effective for what I need. I usually create model classes for each “Collection” just like I would create models for each table in MySQL. Each model class extends from the new MongoDB base class and allows a low level “active directory” type access to MongoDB documents.
Update: This project is now hosted at my [GitHub account].
While I am a huge fan of Zend Framework, I miss having the code generation that is bundled with other frameworks I use. Since my favorite codegen/ORM is from the Qcubed project, I decided to take the Qcubed code generator and customize it for Zend Framework.
I have recently been working on adding local fonts to my customized version of svg-edit. The idea is to have a font selector with several fonts from my local system. I have been using the recently released [Google WebFont Loader API] to load font files from my local server into the website. Google has made it easier than ever. (note: Google will collect stats from your website if you use this API, just like they do if you use any of their services.)
Zend Form is extremely powerful, and I love most of the built in validators. But some of the validators are overkill for many projects. Take the EmailAddress validator for instance. I have never worked on a web-form where I wanted 3 error messages to appear if the Email address entered was invalid. (To see what I mean, just type in “a@a” for your email address and see what Zend_Validate_EmailAddress displays). I have seen several questions and complaints about this problem ([Example 1] or [Example 2]) and thought I would offer up my fix.
I finally did it. I bought a mac. And after navigating around OS X for ten minutes using the multi-touch pad, I can honestly tell you I don’t think I’ll ever go back. As I use it more I am curious to see if developing on my new, sleek, aluminum toy will continue to bring the feelings of ecstasy.
The first thing I did was install Zend Server CE to develop and test locally on my machine. Here are my notes on the Zend Server CE installation for the OS X, which didn’t seem as user friendly as it’s Windows Installer counterpart. But I am such a noob with Macs it is probably just me. This is for all you windows developers making the switch.