March 3rd, 2010 by Jack Keller
Okay, so there are a seemingly endless supply of javascript frameworks for you to develop with, so which one is right for you?
Maybe a better way to go about this subject is how I arrived at my chosen framework. I used to be all about Mootools by default, maybe it was the name, maybe the fact I like beef, maybe that I really dug their web site. I eventually (after sporadically testing different frameworks) arrived at JQuery as my default. So what made me choose JQuery over the countless others? Plain and simple it was the community support. Having a great framework or script is all well and good, but when you have a great user base out there that shares their innovations and discoveries then it makes it all the better. It probably didn’t hurt that in my employment we write in .NET technology and in that technology Microsoft decided that it would embrace JQuery as it’s default framework for Javascript going forward, so for me that’s a Win/Win. I program in .NET at work but do a lot of PHP stuff in my offtime, so a framework that appeals to both androgynously really perked up my senses.
So what is your preferred framework, and why?
Posted in .NET, CSS, PHP, Programming, Rails, Tools, Workflow Be the first to comment! »
February 20th, 2010 by Jack Keller
Okay, so I've posted before about MAMP, XAMPP and the alternatives but now I'm going to dig a bit deeper into tricks and tips. Bear in mind that I'm writing this on how I do my development and your software choices and the like may be somewhat different than mine.
Localhost: XAMPP
Language: PHP
Database: Sequel Pro
Editor: Coda
OS: Snow Leopard
I usually set up my sites in the Default ~/Sites folder on my Mac, just to keep things in one area mainly and for this demo we'll be using stardup.com (a domain I own and have never really done anything with due to time restraints).
I found this tutorial online a while back by Arron Wolf and it was a really good way to keep my logical file structure instead of duping directories back and forth from XAMPP's native htdocs folder. This is not super intense a process even though some people may shy away from Command Line. Follow along with the instructions on that site if you want to get it set up for your latest project. Go ahead, I'll wait…
…Okay great, you're back! Now let's begin with one really dead easy trick to keep your configuration files working on both sides, without having to change them every time you commit many site changes.
PHP:
-
if ($_SERVER["REMOTE_ADDR"] == "127.0.0.1") {
-
-
-
-
-
$siteurl = "http://stardup.dev/"; // WITH TRAILING SLASH!
-
-
} else {
-
-
-
-
-
$siteurl = "http://stardup.com/"; // WITH TRAILING SLASH!
-
}
This can be done in any other programming language, however the if/else syntax changes a bit. I've also begun taking this a little further, including other bits in my code like $header and $footer stuff that will help me visually determine which one I may be looking at (as I'm often too lazy to look at the address bar).
So my next tip is related to running a lightweight version of XAMPP (because you really don't need all of the features for local development). I write a very simple Applescript that launches XAMPP with options, and then placed it in my System Preferences > Accounts > My Account > Login Items
CODE:
-
do shell script "/Applications/XAMPP/xamppfiles/xampp startapache" user name "yourname" password "yourpassword" with administrator privileges
-
do shell script "/Applications/XAMPP/xamppfiles/xampp startmysql" user name "yourname" password "yourpassword" with administrator privileges
Now I know a lot of the more hardcore programmers are probably wondering why I have to do the username/pass with administrator privileges twice, the answer is because I know only as much Applescript as I need to, and nothing more.
Posted in Life, PHP, Tools, Workflow Be the first to comment! »
August 20th, 2009 by Jack Keller
Just wanted to sort of resurrect an older post about Getting Things Done. I've recently started using a new app to help with time management and it's sort of become a replacement for the GTDTiddlyWIki. The Hit List by Potion Factory has really acted well as an organization list as well as a really handy built in timer. The big wins for me are the straight forward keyboard shortcuts and easy to navigate interface. I was lucky enough to have received this in the MacHeist 3 Bundle but didn't realize just how useful I would find it in the long run.
Just a quick note/update for Mac users.
Posted in Mac Software, Tools, Workflow Be the first to comment! »
May 3rd, 2009 by Jack Keller
When I'm developing a Web site sometimes I will take my initial development local and run a local server. Obviously for projects already online or projects that do not require full database integration I do not need to run one all of the time. This is where MAMP comes into play, or if you run Windows WAMP* would be your flavor.
What exactly do these terms mean? The M and W stand for your working platform by way of Macintosh or Windows and the AMP stands for Apache, MySQL and PHP. These simple apps can start and stop the full suite of hosting tools at a moments notice without you having to muck around in your system and install all sorts of tools that require more in depth configuration. I've found that overall this can speed up programming and testing because you will not need to constantly upload files to an FTP server and check them that way, instead you would just save and refresh your browser.
And it would be sort of open-source blasphemy if I didn't mention XAMPP mainly used for Linux, but also containing flavors of Mac OS X, Windows and even Solaris.
All of these software packages are free, or have a free (lite) version available for you to use in your programming endeavors so have at it!
*Windows & WAMP makes the assumption that you are developing a PHP/MySQL Web site and not a .NET Solution
Update: I have moved from MAMP to XAMPP for local development, it's a little more flexible for my usage.
Posted in Mac Software, PHP, Programming, Scripting, Tools, Workflow Be the first to comment! »
April 9th, 2009 by Jack Keller
Most people utilize a CMS or Weblog software that automatically handles url rewrites, but what if you have a simple website that doesn't need quite the same treatment?
I came up with a quick down and dirty little trick to help overcome such an instance and I think you may find this useful.
Fire up your favorite text editor and open up create a .htaccess file (or modify the file that may be sitting in your root directory) and paste these lines in. Feel free to tweak them a bit to suit your needs, maybe you'll even find a better use for this method.
HTML:
-
RewriteEngine On
-
RewriteBase /
-
RewriteRule ^admin/.*$ — [PT]
-
# Use the above line for a folder that you DON'T want to follow these rules
-
RewriteRule ^/?([a-zA-Z0-9-_/]+)/$ $1.php [L]
-
# Here's where the "magic" happens
-
# http://www.example.com/page.php — OLD
-
# http://www.example.com/page/ — NEW
And that's it! Pretty URL's on the easy.
Posted in Programming, SEO Be the first to comment! »