From the Code Mill

Search

  • About the Author
  • Useful Scripts
  • Subscribe
Browsing: / Home
Shortlink

Our Wheels Are Rounder

By Eric on May 17, 2010 in content management, PHP

As web developers we are familiar with the DRY (Don’t Repeat Yourself) principle of programming.  Cut & paste is the bane of object-oriented programmers, and we will frequently hear the phrase “Don’t reinvent the wheel”.  However, I typically find myself and other colleagues in the world of PHP doing just that.  The plethora of actively developed PHP Frameworks are a fluid testament to this fact.  So are other libraries – sajax/xajax/projax for PHP Ajax work, jQuery/Dojo/Prototype/Mootools for JavaScript, and the list goes on.

Sure, there are unique qualities and features that separate third-party libraries, but the principle overlap is what – 75%?  80%?  So why do we do it?  The answer may be pride.  Or, as someone so excellently put it this past weekend, our answer to “Don’t reinvent the wheel” becomes “Our wheels are rounder”. Continue reading →

Share this on: Mixx Delicious Digg Facebook Twitter
Shortlink

NuSphere Releases PhpEd 5.9.5

By Eric on May 1, 2010 in Product Highlights

Yesterday I received a message in my inbox that I had not seen in quite some time:

“New Release of PhpED. 5.9.5 is here”

Over my 2+ years as a PhpED Professional subscriber, I like most became accustomed to regular updates.  Be they bugfixes, features, or even just browser and debugger updates – I could be pretty safe in betting on a release every 2-3 weeks.  But such has not been the case as of late, and the lack of activity prompted a thread on the NuSphere community forums titled “Future of PHPEd“.  Ominous, yes, but a thread that began sour with complaints quickly turned mushy-sweet when NuSphere Customer Support team member gitmans assured everyone that development was very active for PhpED version 6.0!  Nice! Continue reading →

Share this on: Mixx Delicious Digg Facebook Twitter
Shortlink

Finally, a chmod Reference I Will Remember

By Eric on January 9, 2010 in General

I haven’t posted on here in over 2 months, mostly because I have been busy a) fathering 2 girls, and b) working my butt off.  Maybe I just haven’t learned many new tricks lately.

However, I found this page yesterday, showing the binary translations of chmod hex commands:

http://catcode.com/teachmod/numeric.html

I can never remember if 5 is “read execute” or “read write”.   Well…now, I have a handy reference to remember.

And now, so do you.

Share this on: Mixx Delicious Digg Facebook Twitter
Shortlink

Flexible Data Display with PDO and HTML_Table_Matrix

By Eric on October 18, 2009 in Databases, PHP

Have you ever wanted to set up an application that displays tabular data, and wanted to use the same view for each query?  While PHP is excellent for writing small-footprint queries, its ability to be embedded in HTML leaves the creativity to the programmer to figure out a consistent display solution for tabular data.

We need two things – first, we need a way to dynamically retrieve table information, query information, and query results.  Second, we need a way to dynamically build the display based on the information we have.  Using the metadata methods of PDO, along with PEAR::HTML_Table_Matrix, we can do just this. Continue reading →

Share this on: Mixx Delicious Digg Facebook Twitter
Shortlink

Writing a Cross-Domain Proxy in PHP

By Eric on September 15, 2009 in PHP, Web Design

Today I encountered a problem that many developers will likely face while building a web application with Ajax, so I wanted to share my experience with it.

The Problem:

You create a web site with the goal of consuming content from the web.  This may be in the form of a geocoding service, or perhaps a lightbox service for browsing images.  You need to load an external resource though Ajax.  The XMLHttpRequest object cannot make a connection, and you receive a javascript error, or a blank page. Continue reading →

Share this on: Mixx Delicious Digg Facebook Twitter
Shortlink

New Page – Useful Scripts

By Eric on August 15, 2009 in Uncategorized

I have created a new page for featuring little snippets of code that I think others may find useful. Its name, quite uncreative, is “Useful Scripts”.

http://codemill.studio-connect.com/useful-scripts/

The first function posted is for getting the difference between two dates. This function takes two dates that are convertible to Unix timestamps using strtotime(), and will return an array of the number of years/months/days between the two dates. The number of days between a leap and non-leap year is not correct yet, that is on my to-do list.

PHP 5.3 introduces the new DateInterval class which will help parse dates and provide native dateDiff functionality to PHP. Until we are all on 5.3, hopefully this will help someone else.

Until next time.

Share this on: Mixx Delicious Digg Facebook Twitter
Shortlink

PHP and Javascript Combine with PHP.JS

By Eric on July 10, 2009 in PHP, Product Highlights

I wanted to write a quick post about a library one of my co-workers stumbled upon this week.  It is called php.js and is a compilation of php functions ported to javascript.  That sounds pretty convenient!

Continue reading →

Share this on: Mixx Delicious Digg Facebook Twitter
« Previous 1 2 3 ... 5 Next »

Tags

PHP web design content management best practices object-oriented programming MVC Databases site optimization Javascript Development Tools Administration forms security Propel css

RSS PHPDeveloper.org

  • Kurt Payne's Blog: User register_tick_function to profile your code February 7, 2012
  • Chris Hartjes' Blog: How Not to Suck at PHP February 7, 2012
  • PHPMaster.com: Under the Hood of Yii's Component Architecture, Part 2 February 7, 2012
  • NetTuts.com: Turbocharge your Website with Memcached February 7, 2012
  • Brandon Savage's Blog: New Rockville PHP Group February 7, 2012

RSS DailyJS: A JavaScript Blog

  • jQuery Roundup: 1.7.2, Super Labels, jquery.textntags February 7, 2012
  • UIKit, Expect-dom, Patio February 6, 2012
  • StackHack, Ducks, Remote-Tilt, Simplify.js February 3, 2012
  • Mastering Console Logging February 2, 2012
  • Node Roundup: Ryan Dahl Steps Down, Thimble, Mongo Model, Banking.js, Navcodec February 1, 2012

Copyright © 2012 From the Code Mill.

Powered by WordPress and News.