The JavaScript Diaries: Part 15 - The Date Object
675062
With JavaScript you can display and manipulate the date and time. You can calculate the days between dates, show new items on your Web site, etc. In this installment we'll take a look at the JavaScript Date() object and learn how to utilize it in our scripts. By Lee Underwood. 1011
648973
On his blog today, Joakim Nygard has posted about the use (or disuse) of time zones in PHP:   The problem with not handling timezones correctly is not apparent in the usual case of the webserver and the database server being in the same timezone. [...] Often a specific timezone is assumed for displaying date and time. This could very well be incorrect for a large number of visitors. If the database server is in yet another timezone, things begin to get out of sync.   He mentions the time zone functionality that MySQL offers too, but notes that it cannot be relied on either. Thankfully, there's is a bit of hope in PHP5 (as of 5.1 in fact) - the date_default_timezine_set function. He includes an example of the function in use, making it simple to get the correct date and time automatically with the date() function without having to do any hacks to discover the correct time zone.
41064
Gerd Schauffelberger writes on the PHP-Tools Blog today about the contents of the latest issue from the German PHP Magazine, specifically an article covering the PEAR package HTML_AJAX.   This article's target is (1st) to give a brief introduction to AJAX and how things work from Javascript an PHP side in contrary. Also (2nd) I wanted to show that you actually don't have to muck around with a mess of Javascript (browser compatibility issues and such) because it's it is all done by the Joshua Eichorn's HTML_AJAX framework.    The article doesn't build up an entire application (as Gerd mentions) but it does provide you a good base to work from and gives you a good direction to head from to learn more about this powerful package.
124693
Jared White has posted another Willowgarden highlight to his blog today, this time with a focus on the processing of form input.   In the bad old days of processing forms and saving each field to a column in a database row, you'd have to do a lot of manual gruntwork: accessing each field from the $_POST superglobal, checking the values, constructing the SQL query, connecting to the database and executing the query, and so forth. Wouldn't it be great if you could just import the form right into an object, and let it do the validation and the database saving based on just a few simple rules? Let's take a quick look at how that might work.   He shows how to make an instance of the WFFormCreator class in a simple script and add actions to it to handle the successful submission and the errors that might come up.
703914
On his blog, Stuart Herbert has a quick tip showing how to mimic a feature of Ruby on Rails:   I'm still working on the next article in my series looking at PHP on servers, so in the mean time, check out this simple way to emulate Ruby's nice way of handling separate getter, setter and state query methods in PHP.   He admits his example isn't as elegant as the Ruby method, but it does get the job done. Code for the method is included in his post ready for cut and pasting.
79883
DevShed has posted the last part of their latest series, a look at using the Prototype pattern in a PHP5 application, Building a Data Validation System with the Prototype Pattern with PHP 5.   Taking into account that this pattern can be helpful in situations where a prototype object is required, along with other clones of it, in this final installment of the series I'm going to demonstrate how to use it to build a simple application for checking the validity of incoming data.   They create a simple validation system with the pattern to check and see if the inputted data is either alpha only or alpha-numeric. On top of this, they create some additional classes to check the data for things like being a valid email address or if the value is made up of all numbers.
213595
Changes at The Journal: movable deadlines and a new taste for models.
539271
Terry Chay, a popular speaker at many of the PHP conferences and photog to the geek chic crowd in San Francisco, will be speaking at the upcoming PHP Meetup for the SF PHP group. He'll be giving a talk titled "OOps! The PHP Fear and Loathing Guide to OO Design".   How does the PHP developer in the trenches create powerful object-orientation code? By doing what the PHP's architects did, of course: cherry picking the most pragmatic of OOP principles and patterns! This talk is targeted at the PHP developer who has basic knowledge of PHP OOP syntax but wants to find out where OOP principles can fit into a program.   If you'd like to attend, head over to the meetup page for the event and let them know you're coming. It'll be happening at the CNet Network offices February 7th @ 7pm.
685228
Tobias Schlitt has a last chance post on his blog today for those that might still want to attend the PHP Weekender event starting this Saturday (Oct 7th).    I just returned from vacation and realized, that the PHP Weekender (the free-of-charge workshop weekend for PHP enthusiasts, organized by the [http//phpugdo.de PHP Usergroup Dortmund]) has 90 verified, registered attendees so far.    This is really cool, we never expected such a huge number of signups! Anyway, the PHP Weekender starts on upcoming Saturday, October 7th. If you did not register, yet, you should take your heels and run to our website, since we will only accept registrations until tomorrow 12:00 CET.    There's stil time to get your name on the list, so head on over and sign up today before it's too late!
730193
On the Chronosight Blog, there's a follow-up post with a look at some enhancements to the original tutorial - Simple Calendar Tutorial.   Almost a year ago I made a tutorial on Simple Calendar Tutorial which trained us to develop a calendar using PHP. Now it times to enhance that tutorial to a whole new level. Let trou in some AJAX code and Javascript Document Object Model (DOM) to create not one, but three type of calendar: Single Calendar, Time Period Selection Calendar, Month-Year Calendar   He steps you through the creation of two files - one to provide a space for the Ajax interface and another for the calendar PHP class. Toss in a little CSS and some explainations along the way and you have all that you need to make a simple, easy to use calendaring system.
465600
Joshua Eichorn notes in a quick post that, due to a last minute change, he will be speaking at php/db|works this year.   He'll be giving two Ajax sessions:  Scaling with Ajax (Wednesday @ 10:15) Javascript Light and Sweet (Wednesday @ 14:45)    Check out the full listing schedule over on the php|architect site for complete details on the whos and whens of each day of the conference. And, of course, you can still sign up for the conference too!
199233
In the last part of this series, we look at creating constants with the define() function, the constant() function, predefined and "magic" constants. By Ellie Quigley. 0129
445025
Popular posts from PHPDeveloper.org for the past week:Stijn Leenknegt's Blog: [PHP6] function-return-array idea!GeesNotNerds Blog: Free PHP + Ajax chat appStefan Mischook's Blog: Object Oriented PHP Tutorial Updated - Steps 18 - 22Dave Dash's Blog: SymfonyCampWebDigity.com: PHP geotargeting techniquesEtienne Kneuss' Blog: Late Static Bindings ExplainedDevShed: Handling Static Data with PHP 5PHP-Learn-It.com: Cooking Cookies with PHPMichael Kimsal's Blog: PHP PredictionJob Posting: Steinman Recruiting Seeks Senior Developer (Littleton, CO)
647305
Popular posts from PHPDeveloper.org for the past week:Ian Selby's Blog: Uploading Large Files With PHPONLamp.com: Quick and Clean PHP FormsDotVoid.com: Reordering nested sets using PHP and JavascriptRob Allen's Blog: Zend Framework Book Coming SoonCommunity News: php|works Daily Summaries (Day 2)Community News: Sara Golemon & Christopher Jones - First Day Summaries of php|worksJob Posting: University of Wisconsin, Department of Medicine Seeks Web Developer (Madison, WI)Zend Developer Zone: PHP Abstract Podcast Episode 19: Glue Frameworks vs. Full Stack FrameworksStefan Mischook's Blog: Installing PHP and MySQL on the Mac with MAMPSecurityReason: Three Advisories for PHP 5.2.4 (dl, iconv_substr & setlocale)
437494
Popular posts from PHPDeveloper.org for the past week:PHPClasses.org: A PHP killer feature - Streams abstractionRob Thompson's Blog: Switch vs. IfPHPEverywhere: Octopussy numbers in PHPJob Posting: MODE Visual Seeks PHP Developer (Charlotte, NC)ProDevTips.com: Why PHP as a templating language sucksMatthew Turland's Blog: The Yin and Yang of TypingStubbles Blog: Stubbles 0.5.0 releasedChristopher Jones' Blog: Updated connection pooling in PHP's OCI8 extensionBen Ramsey's Blog: Congrats Costa Rica PHP!Carsten Lucke's Blog: Configuration issues with Xdebug on Debian Etch
242013
Popular posts from PHPDeveloper.org for the past week:ProDevTips.com: Writing a CMS/Community with Smarty and the Zend Framework: Part 6Nessa's Blog: Using an .htaccess with PHP Compiled as CGIArnold Daniels' Blog: How I PHP: The Output Handler - ContinuedMartynas Jusevicius' Blog: PHP 5 features: Class autoloadingSean Coates' Blog: Actually Solving a Problem (believe it or not)The Northclick Blog: Message Queue Project: First working versionStefan Mischook's Blog: A Question about object properties in PHP ClassesJob Posting: G2 Technology Seeks PHP Developer (Memphis, TN)Rob Allen's Blog: Zend_View: Access the view from a view helperDavid Walsh's Blog: Using PHP Generic Objects To Organize Your Code
723192
Here's what was popular in the PHP community one year ago today:Yet Another Web Development Blog: A PHP Developer Spends a Week with PythonZend Developer Zone: AJAX Chat Tutorial Pt 5: Javascript, Sending Chat Messages, Screen Name ChangesWebDevLogs: ClickHeat - PHP+JS heatmapTemplora.com: Basic PHP Script SecurityVinu Thomas' Blog: Modifying your MySQL databases to be UTF-8 compliantJeff Moore's Blog: PDO versus MDB2AnyExample.com: PHP password generationJason Palmer's Blog: Zip Code To LocationThe Bakery Blog: A gift for all to enjoySara Golemon's Blog: PHP-2006: A look backMatthew O'Phinney's Blog: Overloading arrays in PHP 5.2.0Davey Shafik's Blog: A Year in Review (2006)Jacques Marneweck's Blog: Smarty tip for including multiple javascript filesphp|architect: Final days of our iPod Training Promo!Alexander Netkachev's Blog: About Eclipse PHP IDE php.ini location