 | News Feed |
 | Jobs Feed |
Sections
|
| feed this: |  |
Developer Drive: Building a PHP Ad Tracker Data Object Design and Coding
by Chris Cornutt February 08, 2012 @ 12:57:54
Continuing on from the first part of their tutorial series about creating a simple ad tracker for your web application, Developer Drive is back with part two, a more in-depth look at the actual object design and code.
In our last PHP Ad Tracker lesson, we constructed the database tables for our ad banner application. Now we are ready to construct the data object that will hold the variables and functions that will display, add, edit and delete the data in those tables.
They cover each of the variables they'll be using with a summary of what they're used for as well as the various functions to be defined and what they'll return. Following this, they get into the actual development - creating an "ads" class and defining the methods to get the current ad count, get the number of clients and pull the actual client/ad data.
voice your opinion now!
ad tracker tutorial object design code
Chris Hartjes' Blog: Better Remote Code Development
by Chris Cornutt January 06, 2012 @ 11:02:55
Chris Hartjes is asking for suggestions to help solve a common problem for developers (remote or otherwise) that have to develop in a non-local setup: a better method for remote code development.
I've been playing around with Sublime Text (because of the awesome vim bindings) and was thinking about why do I always have to be logged into the remote server to do my work. Normally I connect using SSH, then attach to my tmux session and then fire up vim. This is okay but it lacks a certain elegance in it's approach. [...] What I'm chafing against is having to deal with multiple environments all the time to get my work done.
His ultimate goal is to be able to update and commit code without having to be logged into the remote server - essentially to replicate the local development experience regardless of the underlying technology. Have a suggestion or a method that's currently working for you? Leave him a comment!
voice your opinion now!
remote code development opinion suggestion environment
Rob Allen's Blog: Sublime Text 2 Snippet for PHP getter and setter generation
by Chris Cornutt January 03, 2012 @ 09:54:23
In a quick new post to his blog, Rob Allen has shared a snippet for the Sublime Text 2 editor to make creating getters and setters for your class simpler (dynamically too).
As with a lot of editors, Sublime Text supports snippets which are essentially text expansions of a short phrase into more text. I needed to create a few getXxx() and setXxx() methods for some properties of a class and decided that the easiest way to do this would be with a snippet.
Included in the post is the code you'll need to put into the snippet - a simple find (regular expression based) looks at the currently selected variable and expands out the getter and setter for it. For more information on the Sublime Text 2 editor, see the product's website.
voice your opinion now!
sublimetext2 editor snippet getter setter code
Volker Dusch's Blog: Textual code coverage information for PHPUnit
by Chris Cornutt November 25, 2011 @ 16:11:41
In a new post to his blog Volker Dusch points out a new feature in a recent release of PHPUnit, the popular unit testing framework for PHP - textual code coverage details.
Three weeks ago PHPUnit 3.6 was released and it has a little new feature you might have missed until now. PHPUnit can now show you code coverage information on the command line.
Options for the report output include: colorizing, writing the output to a file, including a project summary, namespace separation and package (using the @package phpdoc tag) information. He includes a use case he's found for it - small projects where you can cover the whole codebase quickly (with a "watch" command example filtering based on a certain class).
voice your opinion now!
textual code coverage report phpunit tutorial feature summary
PHPMaster.com: PHP Master Writing Cutting-Edge Code
by Chris Cornutt November 11, 2011 @ 09:04:34
On PHPMaster.com today (disclaimer: PHPMaster is a SitePoint website) Timothy Boronczyk has posted a review of SitePoint's latest offering for PHP developers - Writing Cutting-Edge Code (by Lorna Mitchell, Davey Shafik and Matthew Turland).
The book was written explicitly to help you becoming a better PHP programmer and is totally awesome. It not only covers advanced PHP coding topics such as object-oriented programming and design patterns, but also periphery topics that are just as important, such as security, performance profiling, and deployment. If you're ready to hang up your novice hat for good and become a professional-level PHP developer, this book is for you.
He goes through and highlights some of the content in the book, chapters covering relational databases, web services, security topics, caching, automated testing, PEAR/PECL....just to name a few.
Using the Slashdot scale of book ratings, where 1 is fit for lining cages and 10 is destined to be a class, I give PHP Master: Write Cutting-Edge Code a very solid 8.5. The content will grow with you and the book is not something you'll read in a weekend and then donate to the library because you have no need for it.
voice your opinion now!
book review sitepoint cuttingedge code
PHPMaster.com: Code Templates, AutoHotKey, and Ditto Speeding Up Development
by Chris Cornutt November 07, 2011 @ 11:13:20
On PHPMaster.com today they share a list of helpful tools and tricks that you can apply not only to your PHP development, but programming in general. They highlight code templates, using hotkeys and Ditto.
There are also other helpful pieces of software such as libraries, code snippets, and third party applications. In this article I'll show you how I use a feature built into NetBeans along with two other applications to increase my productivity when programming on Windows. These tips and techniques offer a different way of thinking about things which should be helpful to any developer, regardless of his skill level.
They start with a look at the Code Templates available in NetBeans (other IDEs/editors have a similar feature) to provide an easier starting place for your code, a tool called AutoHotKey that lets you define custom hotkey shortcuts and Ditto, a clipboard manager that lets you manage your copy/pasting better than the single-shot functionality Windows normally has.
voice your opinion now!
code template hotkey clipboard management autohotkey dittio development tool
Henri Bergius' Blog: Composer Solves The PHP Code-Sharing Problem
by Chris Cornutt November 02, 2011 @ 16:28:25
Henri Bergius has a new post to his blog today about a tool that could help make code reuse across PHP applications a much simpler process. The Composer tool (and Packagist) make setting up packages and dependencies easy.
In PHP we've had a lousy culture of code-sharing. Because depending on code from others as been tricky, every major PHP application or framework has practically had to reimplement the whole world. Only some tools, like PHPUnit, have managed to break over this barrier and become de-facto standards across project boundaries. But for the rest: just write it yourself. But now Composer, and its repository counterpart Packagist, promise to change all that. And obviously new conventions like PHP's namespacing support and the PSR-0 standard autoloader help.
Making a package is as simple as setting up a JSON-based configuration file that names dependencies and package metadata (like name, type, etc). Composer generates an autoloader of its own to handle the loading of your needs based on the dependencies listed as a part of the package. If you'd like more information about Composer or to get the latest version and try it yourself, check out the project's github repository.
voice your opinion now!
code sharing composer package psr0 packagist namespacing
XpertDeveloper.com: Abstract in PHP
by Chris Cornutt October 28, 2011 @ 09:55:07
On the XpertDeveloper.com site today there's a new tutorial talking about something that can not only help the structure of your application but can make things more reusable in the end - abstract classes.
For Abstact keyword we can say that, abstract is type of the class and class which we can't create a object of it. Surprised???? [...] Abstract class can be used some what like an interface in PHP. So basically we can implement class using abstract. We can't extend more than one abstract class while we can implement more than one interface.
They introduce you to the creation of an abstract class and show how to set up some abstract methods inside. These methods are required to be defined as a part of the extension in your class. One of the benefits they don't mention of abstract classes over interfaces is the ability to have methods in the abstract that are actual code, not just definitions of the structure (that's more of what interfaces are for).
voice your opinion now!
abstract class structure interface code
SitePoint Blog: Book Release - "PHP Master Write Cutting-Edge PHP Code"
by Chris Cornutt October 21, 2011 @ 09:58:25
As is mentioned in this new post to the SitePoint blogs, a new book has been released (by SitePoint press, naturally) about "writing cutting-edge PHP code" by a few well known authors in the PHP community - Lorna Mitchell, Davey Shafik and Matthew Turland.
Savvy PHP web developers can now keep ahead of the game and ensure that their PHP code is safe, secure, and well-structured for the future with the latest release from SitePoint: "PHP Master: Write Cutting-edge Code"
by Lorna Mitchell, Davey Shafik, and Matthew Turland.
The book covers a wide range of topics (somewhat replacing SitePoint's usual "anthology" type of book) including:
- An introduction to OOP
- Working with databases
- Creating and working with APIs
- Design patterns
- Security
- Automated testing
As part of a special offer, you can pick up your print+ebook bundle for the price of just the book, about $40 USD. If you'd like a sample before purchasing, they've posted three sample chapters.
voice your opinion now!
sitepoint book release phpmaster cutting edge code lornamitchell daveyshafik matthewturland
NetTuts.com: The Best Way to Learn PHP
by Chris Cornutt October 17, 2011 @ 09:08:55
On NetTuts.com today there a new article with what they think is the best way to learn PHP in a list of thirteen different "assignments".
Learning something from scratch is almost always an arduous affair - you simply have no idea as to where to start, or not to start, to kick things off. I loathed learning about the idiosyncrasies of C++'s syntax when all I wanted to learn were some darn programming concepts. As I'm sure you can agree, this is a less than ideal situation. [...] Today, we're going to figure out the best way to learn PHP.
Among their list of "assignments" are things like:
- Disregard the Naysayers
- Read a Few, Good Books
- Create Something Simple
- Try out a Lean, Lightweight Framework
- Build Something Awesome
- Get Involved and Be Up to Date
There's also some good comments with suggestions of other frameworks to learn, things to try out and a few comments that put an emphasis on learning the language before diving directly into a framework.
voice your opinion now!
bestway learn language suggestions books code framework involvement
|
Community Events
Don't see your event here? Let us know!
|