Global Data in Laravel

Global Data in Laravel

I’ve been using Laravel for a while now and one thing that has always bothered me is that there isn’t any kind of global “data” store to use in requests. A typical setup is to pass data into the view by setting the layout in the BaseController and using $this->layout->with() in our controller methods. Read Full Article

jQuery Plugin Development in 30 Minutes

jQuery Plugin Development in 30 Minutes

Dear Websanova Readers,

On the Websanova blog I have written frequently about jQuery development and jQuery Plugin development in general. I’ve launched a slew of jQuery plugins and small libraries available on my plugins page, including the popular wPaintwScratchPad and url.js plugins. I’ve also written a few popular articles on jQuery development in particular my Ultimate Guide to Writing jQuery Plugins. After a lot of feedback from users and friends, it led me to finally author my first eBook on jQuery Plugin Development. After months of hard work getting it just right, I’m happy to announce it is officially released and available today. Read Full Article

wScratchPad 2.0.0 Released

wScratchPad Version 2.0.0 Released

So after the whole MLB.com is using my Google Analytics code debacle I thought it was about time to finally give this plugin a major overhaul. The new version takes care of many nagging issues that kept coming up on GitHub. It also removes my Google Analytics and social tracking codes for anyone using the code locally and should avoid any more copy and paste “accidents” like the MLB.com one. There were a lot of issues on the GitHub page so please update to this latest version and drop me an issue on GitHub if anything else comes up. Read Full Article

Url.js for Node is Finally Here

Url.js for Node is Finally Here

You asked for it, so here it is. A few of the valiant readers of Websanova have been asking me for a Node version of the tiny but popular url.js library I had written some time ago. A few attempts were made to use the existing library into Node but it seems it’s not that straightforward. As I’ve been learning a lot of Node lately I have finally ported it over and you can find it on both GitHub and the official NPM directory at the links below. Read Full Article

What Happens When MLB.com Uses Your Google Analytics Code (Part Deux)

What Happens When MLB.com Uses Your Google Analytics Code

Well, seems my 24 of fame has come to an end. MLB.com updated their website within a few hours of my Websanova is tracking MLB.com posting and removed my Google Analytics and Addthis codes. It was nice being at the top of HackerNews for a few hours but the residue of traffic will slowly die and dwindle and life will be back to normal soon. In the mean time I’m milking it with this second article.

So what does it look like to be on the top of HackerNews for a few hours? Read Full Article

Publishing Node.js Packages to NPM

Publishing Node.js Packages to NPM

So you’ve created a new shiny Node.js package and now you want to share it with the world. So where do you start? Well it’s actually quite simple using Node and all you really need is a valid package.json file. You can check out my Creating a New Node.js Project post to help get things started. From there a single command will push your package to the NPM directory and make it available for anyone else to use within a matter of seconds. Read Full Article

Websanova is Tracking MLB.com

Websanova is Tracking MLB

I just checked my analytics tracking this afternoon with a pleasant surprise to see a nice little spike in my traffic. I don’t get all that much traffic so even a little spike is enough to get me excited. I have been writing some articles on Node.js lately but nothing too fancy nor have I focused on any kind of promotion or SEO for these articles. As I begin to investigate the source of the traffic I noticed some odd domains appearing in my stats.

Lo and behold it’s MLB.com! Read Full Article

Writing Unit Tests in Node.js

Writing Unit Tests in Node.js

An important part of Node.js will be writing unit tests for your apps and it’s modules. Like most of Node.js the basics of setting this up is a snap and you can begin writing unit tests in not time. All we need to do is include the assert library that already pre-ships with Node.js. Then from thered we can go ahead and create a test file with a series of assertions to test our code. Read Full Article

Creating a New Node.js Project

Creating a New Node.js Project

As we saw in my previous tutorials on Installing Node.js with Nginx Proxy and Serving Dynamic Pages with Node.js it’s quite easy to get Node up and running in no time. However if we really want to take full advantage of Node.js we’ll want to familiarize ourselves with it’s package manager npm for short. With the package manager we can install any libraries available including the popular express framework by simply creating a dependency for it and typing npm update. Read Full Article