Jeśli jesteś właścicielem tej strony, możesz wyłączyć reklamę poniżej zmieniając pakiet na PRO lub VIP w panelu naszego hostingu już od 4zł!

Archive for Maj, 2011

This Week In Web – Python, NodeJS CMS, Google APIs, XDebug

This Week In Web – Python, NodeJS CMS, Google APIs, XDebug

Writing Clean, Testable, High Quality Code in Python

Noah Gift, Python book author and Associate Director of Engineering at AT&T has written an article titled Writing Clean, Testable, High Quality Code in Python on IBM Developer Works. Gift primarily talks about good coding practices such as multiple small functions, test coverage and static analysis (with PyLint). Although all code in the article is Python, the lessons he teaches and topics he discusses can be applied to any dynamic language such as Javascript, PHP and Ruby. If you are relatively new to programming I recommend your read this article.

NodeJS Cheatsheet

The folks over at GoSquared have published a great NodeJS cheatsheet [pdf] [jpg].

Removal and Deprecation of some Google APIs

Following the standard deprecation period – often, as long as three years – some of the deprecated APIs will be shut down. The rest have no scheduled date for shutdown, but won’t get any new features. The policy for each deprecated API is specified in its documentation.

These APIs are now deprecated but have no scheduled shutdown date: Code Search API, Diacritize API, Feedburner APIs, Finance API, Power Meter API, Sidewiki API, Wave API
These APIs will be shut down as per their deprecation policies: Blog Search API, Books Data API and Books JavaScript API (not the new API), Image Search API, News Search API, Patent Search API, Safe Browsing API (v1 only), Translate API, Transliterate API, Video Search API, Virtual Keyboard API

Wherever possible, the documentation includes suggested alternatives designed to help you achieve similar functionality — whether it’s a new version or related offering. We hope these alternatives, along with lengthy deprecation periods, will help minimize the impact and allow us to focus on building great products together.

More info and links to APIs in the announcement.

XDebug PHP Talk

Talk given by Derick Rethans, developer of XDebug. It covers:

  • Getting up and running with XDebug
  • Interpreting XDebug output
  • Remote debugging, breakpoints
  • Finding bottlenecks

Calipso – NodeJS CMS

Calipso is an open source CMS project started by Clifton Cunningham. It runs on NodeJS and MongoDB and aims to be a high performance, extendible content publishing platform. Although usable, it is still in early stages of development and Cunningham is looking for more developers. The installation guide will help you get up and running with Calipso quickly and the module guide will give you an idea about the architecture of Calipso.

Source: http://query7.com/this-week-in-web-python-nodejs-cms-google-apis-xdebug

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Jason Gilmore’s Blog: Thirteen Zend Framework Tutorials

Jason Gilmore’s Blog: Thirteen Zend Framework Tutorials

Jason Gilmore has posted a new article with a list of thirteen tutorials all centered around the Zend Framework but on a wide variety of topics.

A few weeks ago I posted what turned out to be a rather popular compendium of productivity- and best practices-related PHP tutorials which I’ve published in recent years on Developer.com and PHPBuilder.com. As it happens I write about the Zend Framework with equal vigor, and figured readers might like to check out the list of Zend Framework tutorials I’ve written over the past two years for the aforementioned sites. With no further ado, here’s the list.

Among the tutorials on the list are things like:

Source: http://www.phpdeveloper.org/news/16399

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Michael Nitschinger’s Blog: Caching responses in Lithium

Michael Nitschinger’s Blog: Caching responses in Lithium

Michael Nitschinger has put together a guide to caching responses in the Lithium framework – a simple update that means your application dosen’t even need to reach the controllers to do its job.

I’ve hacked together a small example on how to easily cache full responses in Lithium. If you need to cache full Response objects in Lithium (which means that your controllers don’t even get called when there’s a cache hit), you can place this in your app/config/bootstrap/cache.php file (note that this is certainly not “production ready”, but it should give you a starting point).

The code adds a new filter to run on execute that takes the current object (the Response object hit the first time) and use the Cache functionality to push it into storage. Their cache key is based on the URL, so each requests is cached individually. You can find out more about filters and the framework at Lithify.me.

Source: http://www.phpdeveloper.org/news/16398

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Play nice when extending Exception

Play nice when extending Exception

Lukas Smith has a suggestion for developers out there who get the idea to start messing with the order of the parameters of PHP objects/methods – play nice. His example is specifically with Exceptions.

This is just a short follow up to a recent tweet of mine. I have seen this repeatedly happen, even to top notch and usually very careful developers (*). I am not sure why this mistake happens so frequently, but quite often you see code that changes the parameter order for custom Exception constructors. I guess it’s mostly because in these cases the developer wants to pass some magic parameters that contain the message (and potentially also the code).

He recommends that, if you really do need to change something like the order of the parameters, use something like a factory to handle the reorganization for you.

Source: http://www.phpdeveloper.org/news/16397

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Script-Tutorials.com: How to Protect any Site from Spam using Akismet

Script-Tutorials.com: How to Protect any Site from Spam using Akismet

From Script-Tutorials.com there’s a new post that wants to help you prevent one of the biggest menaces of the social online world – spam. Their solution uses the Akismet service to detect possible spam and notify you.

What is spam? – this is (usually) any message which not relevant to this page – usually just an advertisement of something (and even with a backward link to another site). Yes, you can put the first line of defense – a captcha, but I think spammers are also ready for this and find ways to avoid the CAPTCHA (or, they even can solve its by self). In today’s tutorial I’ll show you how to create a second line of defense against spam – using web services – for example akismet.

They include all the code you’ll need to create a simple interface to the Akismet system with the help of this library that handles a lot of the connection and messaging for you. They apply it to a comment form and check the POSTed values against the Akismet spam checking. You can download the full package to get started immediately.

Source: http://www.phpdeveloper.org/news/16396

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Community News: Latest PEAR Releases for 05.30.2011

Community News: Latest PEAR Releases for 05.30.2011Latest PEAR Releases:

Source: http://www.phpdeveloper.org/news/16395

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Zend Developer Zone: Caching of Zend Framework application configuration file

Zend Developer Zone: Caching of Zend Framework application configuration file

On the Zend Developer Zone today there’s a new post showing how you can cache your application configuration file to boost the performance of your Zend Framework application just a little bit more.

If you think that you’ve done everything in terms of performance optimization of your Zend Framework-based project, I bet that your application configuration file was not included in that process. [...] Reason why I’m referring to application config is that its parsing is performed on every request, which is certainly unnecessary, as you don’t make configuration changes very often. Solution is simple – cache it.

He opts for an APC-based solution that, in the bootstrap, reads in the configuration file and caches it as a part of a custom Zend_Application object. Code is included for both the addition to the bootstrap and the custom class extending Zend_Application to handle the actual caching.

Source: http://www.phpdeveloper.org/news/16394

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Christian Weiske’s Blog: How to integrate PHP_CodeSniffer with Git repositories?

Christian Weiske’s Blog: How to integrate PHP_CodeSniffer with Git repositories?

Christian Weiske has a problem he hopes you can help with – he’s trying to get the PHP_Codesniffer tool integrated into his git workflow (well, the workflow of his team) as an automatic process that runs on commit. Unfortunately he’s having some issues.

At work, we used a SVN server and enforced our project coding standard with a pre-commit hook on the server that ran PHP_CodeSniffer. Whenever a developer tried to commit some code that does not match the standard, he got it rejected. [...] The only way to enforce the standard is a pre-receive hook on our central Git repository server that all devs push to. Just installing the SVN hook on it isn’t the solution, though.

Because of how git handles commits (possibly multiple in one push) the usual methods won’t work. Other tricky things like file renaming and allowing for legacy code check-ins are also needed. He’s posted the question on StackOverflow too, but no one’s come up with a good answer yet (at the time of this post).

Source: http://www.phpdeveloper.org/news/16393

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

NetTuts.com: Easy Authentication with CodeIgniter

NetTuts.com: Easy Authentication with CodeIgniter

On NetTuts.com there’s a new post of a two-part screencast series helping you get authentication working in CodeIgniter based on the information in a MySQL database.

In this in depth “screencast of the week,” I’ll take you through the process of building an authentication system with CodeIgniter. Need to restrict access to certain parts of your website to only those who’ve logged in? This tutorial will teach you how!

There’s two videos in the series (both included in the post, but with links to the full versions) and the sample code is included as a download. The cover using the form helper that comes bundled with CodeIgniter to create a basic form that validates off of the user’s information in the backend database tables.

Source: http://www.phpdeveloper.org/news/16392

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Elated.com: Object-Oriented PHP: Working with Inheritance

Elated.com: Object-Oriented PHP: Working with Inheritance

On Elated.com there’s a new introduction to working with inheritance in PHP for object-oriented applications. They work through some of the basic concepts including parent/child classes, final and abstract classes and interfaces.

In this article we’re going to explore the idea of inheritance in object-oriented programming, and how inheritance works in PHP. With inheritance, your objects and classes can become much more powerful and flexible, and you can save a lot of time and effort with your coding.

They start with the basics of how inheritance works and then move right into creating child classes from a parent. Their example code makes a basic forum system (just example code, not fully functioning) with administrators, members and forum creation. They use this as a base to show the method overriding and exposure with “final”. The finish it off with examples of two things that can promote good application structure – abstract classes an interfaces.

Source: http://www.phpdeveloper.org/news/16391

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>