JQuery, Prototype, Mootools?

March 3rd, 2010 by Jack Keller

Okay, so there are a seem­ingly end­less sup­ply of javascript frame­works for you to develop with, so which one is right for you?

Maybe a bet­ter way to go about this sub­ject is how I arrived at my cho­sen frame­work. 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 even­tu­ally (after spo­rad­i­cally test­ing dif­fer­ent frame­works) arrived at JQuery as my default. So what made me choose JQuery over the count­less oth­ers? Plain and sim­ple it was the com­mu­nity sup­port. Hav­ing a great frame­work or script is all well and good, but when you have a great user base out there that shares their inno­va­tions and dis­cov­er­ies then it makes it all the bet­ter. It prob­a­bly didn’t hurt that in my employ­ment we write in .NET tech­nol­ogy and in that tech­nol­ogy Microsoft decided that it would embrace JQuery as it’s default frame­work for Javascript going for­ward, so for me that’s a Win/Win. I pro­gram in .NET at work but do a lot of PHP stuff in my off­time, so a frame­work that appeals to both androg­y­nously really perked up my senses.

So what is your pre­ferred frame­work, and why?

Posted in .NET, CSS, PHP, Programming, Rails, Tools, Workflow Be the first to comment! »

Tips on Local Development

February 20th, 2010 by Jack Keller

Okay, so I've posted before about MAMP, XAMPP and the alter­na­tives but now I'm going to dig a bit deeper into tricks and tips. Bear in mind that I'm writ­ing this on how I do my devel­op­ment and your soft­ware choices and the like may be some­what dif­fer­ent than mine.

Local­host: XAMPP
Lan­guage: PHP
Data­base: Sequel Pro
Edi­tor: Coda
OS: Snow Leop­ard

I usu­ally 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 any­thing with due to time restraints).

I found this tuto­r­ial online a while back by Arron Wolf and it was a really good way to keep my log­i­cal file struc­ture instead of dup­ing direc­to­ries back and forth from XAMPP's native htdocs folder. This is not super intense a process even though some peo­ple may shy away from Com­mand Line. Fol­low along with the instruc­tions on that site if you want to get it set up for your lat­est project. Go ahead, I'll wait…

…Okay great, you're back! Now let's begin with one really dead easy trick to keep your con­fig­u­ra­tion files work­ing on both sides, with­out hav­ing to change them every time you com­mit many site changes.

PHP:
  1. if ($_SERVER["REMOTE_ADDR"] == "127.0.0.1") {
  2.  
  3.     $l = mysql_connect ( "local­host" , "root" , "" ) or die("Error con­nect­ing: <br /><br />".mysql_error());
  4.     mysql_select_db( "stardup" ) or die("Error get­ting db: <br /><br />".mysql_error());
  5.    
  6.     $siteurl = "http://stardup.dev/"; // WITH TRAILING SLASH!
  7.  
  8. } else {
  9.  
  10.     $l = mysql_connect ( "local­host" , "stardup_user" , "**********" ) or die("Error con­nect­ing: <br /><br />".mysql_error());
  11.     mysql_select_db( "stardup" ) or die("Error get­ting db: <br /><br />".mysql_error());
  12.  
  13.     $siteurl = "http://stardup.com/"; // WITH TRAILING SLASH!
  14. }

This can be done in any other pro­gram­ming lan­guage, how­ever the if/else syn­tax changes a bit. I've also begun tak­ing this a lit­tle fur­ther, includ­ing other bits in my code like $header and $footer stuff that will help me visu­ally deter­mine which one I may be look­ing at (as I'm often too lazy to look at the address bar).

So my next tip is related to run­ning a light­weight ver­sion of XAMPP (because you really don't need all of the fea­tures for local devel­op­ment). I write a very sim­ple Apple­script that launches XAMPP with options, and then placed it in my Sys­tem Pref­er­ences > Accounts > My Account > Login Items

CODE:
  1. do shell script "/Applications/XAMPP/xamppfiles/xampp star­ta­pache" user name "your­name" pass­word "your­pass­word" with admin­is­tra­tor privileges
  2. do shell script "/Applications/XAMPP/xamppfiles/xampp start­mysql" user name "your­name" pass­word "your­pass­word" with admin­is­tra­tor privileges

Now I know a lot of the more hard­core pro­gram­mers are prob­a­bly won­der­ing why I have to do the username/pass with admin­is­tra­tor priv­i­leges twice, the answer is because I know only as much Apple­script as I need to, and noth­ing more.

Posted in Life, PHP, Tools, Workflow Be the first to comment! »

More Getting Things Done

August 20th, 2009 by Jack Keller

Just wanted to sort of res­ur­rect an older post about Get­ting Things Done. I've recently started using a new app to help with time man­age­ment and it's sort of become a replace­ment for the GTDTid­dly­WIki. The Hit List by Potion Fac­tory has really acted well as an orga­ni­za­tion list as well as a really handy built in timer. The big wins for me are the straight for­ward key­board short­cuts and easy to nav­i­gate inter­face. I was lucky enough to have received this in the MacHeist 3 Bun­dle but didn't real­ize just how use­ful 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! »

Local Development using MAMP

May 3rd, 2009 by Jack Keller

When I'm devel­op­ing a Web site some­times I will take my ini­tial devel­op­ment local and run a local server. Obvi­ously for projects already online or projects that do not require full data­base inte­gra­tion I do not need to run one all of the time. This is where MAMP comes into play, or if you run Win­dows WAMP* would be your flavor.

What exactly do these terms mean? The M and W stand for your work­ing plat­form by way of Mac­in­tosh or Win­dows and the AMP stands for Apache, MySQL and PHP. These sim­ple apps can start and stop the full suite of host­ing tools at a moments notice with­out you hav­ing to muck around in your sys­tem and install all sorts of tools that require more in depth con­fig­u­ra­tion. I've found that over­all this can speed up pro­gram­ming and test­ing because you will not need to con­stantly 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 blas­phemy if I didn't men­tion XAMPP mainly used for Linux, but also con­tain­ing fla­vors of Mac OS X, Win­dows and even Solaris.

All of these soft­ware pack­ages are free, or have a free (lite) ver­sion avail­able for you to use in your pro­gram­ming endeav­ors so have at it!

*Win­dows & WAMP makes the assump­tion that you are devel­op­ing a PHP/MySQL Web site and not a .NET Solution

Update: I have moved from MAMP to XAMPP for local devel­op­ment, it's a lit­tle more flex­i­ble for my usage.

Posted in Mac Software, PHP, Programming, Scripting, Tools, Workflow Be the first to comment! »

Quick trick for Pretty URLs

April 9th, 2009 by Jack Keller

Most peo­ple uti­lize a CMS or Weblog soft­ware that auto­mat­i­cally han­dles url rewrites, but what if you have a sim­ple web­site that doesn't need quite the same treatment?

I came up with a quick down and dirty lit­tle trick to help over­come such an instance and I think you may find this useful.

Fire up your favorite text edi­tor and open up cre­ate a .htac­cess file (or mod­ify the file that may be sit­ting in your root direc­tory) and paste these lines in. Feel free to tweak them a bit to suit your needs, maybe you'll even find a bet­ter use for this method.

HTML:
  1. RewriteEngine On
  2. Rewrite­Base /
  3. RewriteRule ^admin/.*$ — [PT]
  4. # Use the above line for a folder that you DON'T want to fol­low these rules
  5. RewriteRule ^/?([a-zA-Z0-9-_/]+)/$ $1.php [L]
  6. # Here's where the "magic" happens
  7. # http://www.example.com/page.php — OLD
  8. # 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! »

About media|extranet

We're a group of industry professionals who would like to give a little bit back to the community. Although we've just begun, we plan to do some write-ups on Advertising, Marketing, Development (.NET, PHP, Flash, Flex, AIR, JavaScript Frameworks, etc.) and Copywriting. Visit our contact section if you would like to see us cover something that we're not. The links below are for our writers, visit them directly if you have a project in mind that could utilize their talents.

Visit Snackbox