Articles with tag "web-development"

Fulltext searches with Xapian and PHP

Sometimes MySQL just isn't quick enough. Especially when it comes to fulltext searches. Everything needs to be indexed correctly, and if we're using different fields with different weights for a relevance percentage, things get very complicated quickly. Xapian to the rescue.
Comments: 16     Views: 7647     Rating: 12345

A caching pattern for models

This is a caching pattern for models using Zend_Cache and the __call magic method. The initial thought behind this is that a model should be able to return calls either uncached or cached, without initializing some cache object every time. It should be easy to switch between the two calls, and the cache should be coming with the model object already.
Comments: 45     Views: 8798     Rating: 12345

Automated Testing Using Zend Framework

Automated testing for your web applications is an important step in having the confidence to make changes to your application, and still be confident you’re delivering a quality, regression-free product. With Zend Framework’s testing framework (built with PHPUnit), you can build a thorough suite of test cases for your web application with very little hassle.
This article will give you all of the basic information you need to start writing automated tests for your Zend Framework applications.
Comments: 2297     Views: 15467     Rating: 12345

Integrating FCKeditor with Zend_Form

How to use FCKeditor, or any other WYSIWYG editor, with Zend_Form? Another relatively common question. There are many ways you can do this, but let’s look at these two as they are the best in my opinion:
* Adding some JavaScript to your view script
* Creating a Zend_Form_Decorator
We’ll be using FCKeditor, but you can apply the techniques shown to others, such as TinyMCE, as well.
Comments: 46     Views: 13682     Rating: 12345

An Introduction to the Art of Unit Testing in PHP

Testing is an essential aspect of developing in any programming language. If you don't test your source code then how can you verify it works as expected? Manual testing can only be performed irregularly and usually only in limited ways. The answer to testing source code regularly, and in depth, is to write automated tests which can be frequently executed. In PHP such tests are usually written using a unit testing framework, a framework which allows the source code of any application or library to be tested as isolated units of functionality such as a single class or method. As unit testing has gained popularity, it has become a standard practice in PHP with libraries and frameworks such as Swiftmailer, the Zend Framework and Symfony all requiring unit test coverage of their source code.
Unit Testing is often seen as an arcane, time consuming task - which it sometimes can be! But the point of spending time writing tests is to improve the quality of your source code so it has fewer overall bugs, many of which are detected early, a continual testing process to prevent new changes from changing the behaviour of older code, and to provide confidence that your code can be depended on. There are other benefits too, and we'll detail these later.
Comments: 12     Views: 8110     Rating: 12345

Understanding scope in object oriented JavaScript

When you think of the keyword this you probably assume it refers to the current instance of the class. This is true for most object oriented languages like C# and Java. So, knowing this you would probably assume the same would be true of JavaScript and it's this keyword. This is, however, not the case.
Comments: 35     Views: 48906     Rating: 12345

6 Tools To Be An Effective Web Developer

Over the last few years Rails has helped Ruby’s popularity explode. One of the biggest reasons for this is the time that Rails can save you. By working within a well defined framework a lot of development decisions are simplified and it is easier to be more organized. Throw in some great tools like ORM, Unit Testing, Mocking, and more and you have a powerhouse of developer efficiency and quality.
There has always been and probably always will be feuds over what is the best platform but what I want to show you is that those arguments are mostly irrelevant.
Comments: 14     Views: 7368     Rating: 12345