News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

Paul Jones:
What's The Difference Between Tightly-, Loosely-, and De-Coupled ?
October 06, 2014 @ 10:20:30

In his latest post Paul Jones recounts a Twitter-based discussion that happened between Taylor Otwell (@taylorotwell) and others on Twitter about the different types of coupling in libraries or applications. The discussion focused around three different types and their definitions: loosely-coupled, tightly-coupled and de-coupled.

The quotes from the conversation come from Taylor, but Paul includes some of his own thoughts in response (things better expressed in more than 140 characters. He talks about some of the assumptions that were made during the discussion, the general knowledge level of "basic programming terminology" and how Paul views the definition of "decoupled".

If your code has a dependency on classes in a particular thrid-party package, your code is tightly coupled to the code in that package. [...] The fact that your code could be tightly coupled to another package does not mean that the other package is coupled to anything else. That is to say, the other package might have no couplings of any sort to any other code outside itself. The other package in that case is de-coupled.

He talks about how one of the main goals of the packages that make up the Aura project is to be decoupled from the start and how that can help with changing requirements/dependencies down the road. He also defines what he sees as "loose" and "tight" coupling, largely defined by the packages required in the "composer.json".

0 comments voice your opinion now!
decouple loose tight coupling package library definition terminology

Link: http://paul-m-jones.com/archives/6051

Reddit.com:
What exactly is 'model' in MVC?
June 20, 2014 @ 11:25:48

If you're relatively new to the world of the MVC (Model-View-Controller) design pattern and its use, you may be trying to figure out exactly what each piece is. One of the more difficult relationships is between models and controllers, more specifically what each are supposed to contain. In this discussion over on Reddit several people weigh in on their opinions and own suggestions about what models should be.

Sometimes I feel I should avoid session in model ... but sometimes I feel using session in controller is putting business logic in controller which is bad ... sometimes I feel I should avoid $_POST and $_GET in model ... but sometimes I feel receiving data in controller and then send all of them to model is an unnecessary move ... sometimes I feel one model should represent almost everything about one certain table ... sometimes I feel it's almost god pattern if that table is the core of your application, but separate the model into many model is confusing too since they are using the same table. I wanna be a Model Master who can explain 'Model' very well. Who can help me plz.

Comments on the post explain models in several different ways including:

  • Thinking of it as a representation of "domain" functionality
  • Models as a 1-to-1 relationship with database tables
  • The differences between them and collections
  • Links to some helpful libraries like Eloquent and Doctrine
0 comments voice your opinion now!
model mvc modelviewcontroller opinion definition

Link: http://www.reddit.com/r/PHP/comments/28luto/what_exactly_is_model_in_mvc/

Community News:
PHP-FIG Voting on PSR-4 Opened
September 20, 2013 @ 12:18:31

The PHP-FIG has officially started the voting process for the PSR-4 autoloading standard that would provide an interface to make autoloading a bit more standardized across applications.

The purpose is to specify the rules for an interoperable PHP autoloader that maps namespaces to file system paths, and that can co-exist with any other SPL registered autoloader. This would be an addition to, not a replacement for, PSR-0.

The current autoloading standard definition (PSR-0) still allows for the use of the underscore in class names to resolve to directory paths in the application's files. In this new standard, that allowance is gone, relying only on the actual namespacing to define package pathing. This "package-oriented autoloading" is set to help move PHP package development forward into a more standardized structure.

0 comments voice your opinion now!
psr4 voting process open member autoload definition

Link: https://groups.google.com/forum/#!topic/php-fig/NWfyAeF7Psk

Anna Filina:
Define Functional, Unit and Integration Tests
April 08, 2013 @ 14:45:46

Anna Filina has a new post to her site that helps to clarify the definitions between functional, unit and integrations tests of your application's functionality.

I have recently read a blog post claiming that functional tests are not "true" tests. The author also claims that unit testing shows you where the problem is occurring, while functional testing simply identifies that a problem exists. This argument is deceptive and the conclusion dangerous. Different kinds of tests are not mutually exclusive. One is not superior to the other. They have different goals and can happily coexist. Let me explain the kinds of tests so that you could make enlightened decisions.

She covers each type of test in detail, noting the goal of that particular type and some examples of the kinds of things they might test. She starts with the highest level, functional testing, then jumps down to the lowest - unit testing. She finishes up the post defining "integration tests" as tests that ensure you're integrating correctly - that you're using the API provided by the tool in the right way and that it's working as expected.

0 comments voice your opinion now!
testing functional unit integration definition example

Link: http://annafilina.com/blog/functional-unit-and-integration-tests

NetTuts.com:
Deciphering Testing Jargon
October 11, 2012 @ 09:13:06

There's been a lot of talk recently about unit testing (and testing in general) in the PHP community and some of the terms that are thrown around might be confusing for someone coming into it fresh. NetTuts.com is here with a guide to help those folks make some sense of it all.

Lately, we've been hearing and reading more and more about test-driven development. This domain, however, comes with a series of expressions and specific jargon that can be confusing to newcomers. This article will walk you through the most common definitions, test types and test parts. Use cases will be provided, and, where possible, some code in PHP will also be presented.

They cover several of the common terms you'll come across when working with testing including:

  • Automated testing
  • Test fixtures
  • Test cases
  • DOC - Dependency-on component
  • Component tests
  • Acceptance testing
  • Continuous Integration/Delivery
0 comments voice your opinion now!
tutorial guide unittest terminology jargon definition introduction testing


QaFoo Blog:
Abstract Classes vs. Interfaces
October 02, 2012 @ 12:29:56

On the QaFoo.com blog Kore Nordmann shares some insight about the difference between abstract classes and interfaces and how they can be used effectively/correctly.

Features of object oriented languages are often use from a purely technical perspective, without respect to their actual semantics. This is fine as long as it works for you, but might lead to problems in the long run. In this article I discuss the semantical differences between abstract classes and interfaces. I also outline why following the semantics of those language constructs can lead to better code.

He defines "class" and "interface" before he gets too far into the differences, stating that a "class" is more of a "type" while an "interface" describes the type and the structure to use it. He also talks about how to tell them apart (when to use each). There's also some examples and "hints" to help you determine good and bad examples of interfaces and when an abstract class might be a better answer.

0 comments voice your opinion now!
abstract class interface compare tips definition


Nikita Popov's Blog:
Understanding PHP's internal function definitions (Part 2)
March 19, 2012 @ 08:17:48

Following this recent post from Anthony Ferraara about the source code of the PHP language itself, Nikita Popov is working with him and has produced the second part of the series, a look at finding the internal function definitions for the PHP functions you use every day.

In the previous part ircmaxell explained where you can find the PHP source code and how it is basically structured and also gave a small introduction to C (as that's the language PHP is written in). If you missed that post, you probably should read it before starting with this one. What we'll cover in this article is locating the definitions of internal functions in the PHP codebase, as well as understanding them.

He starts with a basic example - a string function, strpos. He shows a handy searching trick to help find the actual function definition and which matches should be given priority. He lays out a typical skeleton of a PHP function definition and gets into some detail as to what this particular function does (in C). He briefly mentions the Zend Engine functions and a look ahead to finding classes and methods.

0 comments voice your opinion now!
source code developers language internal function definition tuttorial


PHPMaster.com:
Creating Web Services with PHP and SOAP, Part 2
February 28, 2012 @ 10:11:25

On PHPMaster.com today they've posted the second part of their series looking at creating a SOAP web service with NuSOAP. (Part one is here)

In this article we'll talk about what WSDL files are and how to use them. I'll show you how to quickly build your WSDL files with NuSOAP and incorporate a WSDL file into the SOAP server and client examples from the first part.

He introduces WSDL files, the specially formatted XML definitions that tell SOAP clients what's available on the service and includes some markup as examples. Creating one from scratch ca be a hassle, so it's handy that NuSOAP generates one for you from your server class. He includes sample code to create this generated file and how to create a SOAP client pointed to the PHP script to get the result.

0 comments voice your opinion now!
webservice soap tutorial nusoap wsdl definition


Paul Jones' Blog:
Different Definitions of Quality
May 06, 2011 @ 11:14:29

Paul Jones has a new post today looking at the disconnect in the term "quality" that there seems to be between the ones developing the code and the ones paying for the end result.

Recently, I was pondering why it is that programmers and employers have different attitudes toward the quality of the projects they collaborate on. The people who do the work are usually the ones who care more about quality. Why? [...] The people who are paying for the work care much less about quality. Why?

He touches on some of the answers to the "why" questions above and points out that it's not so much about the care one has over the other on quality. It's the differing definitions of quality they both have on the parts they work with.

0 comments voice your opinion now!
quality definition perspective care opinion


Kevin Schroeder' Blog:
Getting good PHP programmers
November 16, 2010 @ 10:15:40

Kevin Schroeder has posted some of his thoughts how how you, the one looking for good PHP developers, can really get the best talent out there you can find based on his experiences in interviewing other developers.

I can interview for certain (but by no means all) PHP positions because I know a fair about PHP and I believe that being smart but being an asshole does not make you a good PHPer. But not everyone who interviews knows that. And not only that, it is getting difficult to find good PHP developers. A lot of the good ones are being taken up by top companies, but even they are having trouble finding all the good developers they need.

He suggests coming up with something a bit more concrete than just this vague picture of what a "good PHP developer" is and how, even once that's defined, the quality of all developers should be raised to that level. He asks for some feedback on a few related questions like: is there really a shortage of good PHP developers or what are the significant topic areas that PHP developers should know well? Lease him some feedback on the post.

0 comments voice your opinion now!
good programmer requirement opinion definition



Community Events





Don't see your event here?
Let us know!


introduction conference symfony framework release laravel list podcast opinion security voicesoftheelephpant series composer tool artisanfiles version community interview library language

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework