Packagist Latest Releases for 10.02.2014
October 02, 2014 @ 08:09:35
Recent releases from the Packagist:
Blast from the Past - One Year Ago in PHP
October 02, 2014 @ 07:05:00
Here's what was popular in the PHP community one year ago today:0 comments voice your opinion now!
Rabbit behind the scenes
October 01, 2014 @ 12:19:53
In PHP business logic is usually put right in action's method or just behind it. Hence, every little piece of delaying and long-running code will be processed with a request. The problem is almost undetectable if a user sends an e-mail but with more complex actions it may take a little bit longer than preferred. [...] In this article I would like to make an attempt to present a solution to the very annoying everyday problem that probably many programmers came across in their organisations - deadlocks in databases caused by a vast number of requests in relatively short time. The main aim of this text is to introduce RabbitMQ, which I value as a very functional and practical message broker, to help you solve the queuing problems and decrease the amount of work you would otherwise have to spend on it.
He talks about why message brokers are even needed and how to pick the right one for your project. Then he gets into the "in practice" part of the article, showing the use of RabbitMQ through PHP to save various data to a database when a user is presented with an advertisement. He shows how to create both the producer and consumer objects, making interaction with the queue simpler. His examples are all using the php-amqplib by Alvaro Videla.
Building a Customer Management App Using AngularJS and Laravel
October 01, 2014 @ 11:52:09
The NetTuts site has posted the first part of a tutorial series showing you how to create an application with Laravel and AngularJS to do some customer management. The application lets you track customers and transactions related to them.
When creating a single-page app we should use some kind of framework to do some of the job for us so we can focus on the actual functionality. AngularJS fits here perfectly, because features like dynamic dependency injection and bi-directional data binding are just great. Sometimes we also require some kind of server. If you've chosen PHP then Laravel may be your best option, as it's easy to work with and pretty powerful. In this part of the tutorial, we will build the front-end of our application using AngularJS.
He starts with some of the "preparation work" that has to be put into the main template for Angular to even work, including the loading of the Angular files themselves. He sets up a basic route and, some initial styling (CSS) and talks about the overall structure of the application. He includes the code to create the customer controller and transactions handling (via controllers) and how to do the usual CRUD (create, read, update, delete) operations for each. HTML output templates are also included to handle the forms and other tabluar output needed to display customer details.
Action-Domain-Responder and the "Domain Payload" Pattern
October 01, 2014 @ 10:16:11
Paul Jones has a new post with more information about his proposed "Action-Domain-Responder" design pattern (a replacement for the typical MVC) and suggests a new piece, the Domain Payload pattern. This pattern would use a domain payload object to wrap the data and provide the responder with additional handling and context.
In Action-Domain-Responder the Action passes input to the Domain layer, which then returns some data for the Action to pass to the Responder. In simple scenarios, it might be enough for the Responder to inspect the data to determine how it should present that data. In more complex scenarios, though, it would make more sense for the Domain to pass back the data in a way that indicates the status of the data. Instead of the Responder inspecting the Domain results, the Domain should tell us what kind of results they are.
He shows a code example of this Domain Payload object in action, starting with some typical MVC code and refactoring it along the way into an ADR structure. He shifts from a typical model into a more domain-driven approach and describes the wrapping of the data in the payload, context for the contents (even just a class name helps) and how those relate to the actual output. You can find the resulting code in this example over on Paul's GitHub account.
Voices of the ElePHPant:
Interview with Yitzchok Willroth
October 01, 2014 @ 09:03:56
They talk some about Yitzchok's involvement in the PHP community including his work to start up the Shore PHP user group in central New Jersey. They talk about some of the surprising things about running a user group, some of the speakers they've had present and the "skills lab" they've introduced into the group as a part of each meeting. They also cover some of Yitzchok's work freelancing and his "Ten Tips for Freelancing" article.
Packagist Latest Releases for 10.01.2014
October 01, 2014 @ 08:08:17
Recent releases from the Packagist:
Composer & Virtual Packages
September 30, 2014 @ 13:27:36
Peter Petermann has an interesting post he's added to his site describing a lesser known feature of the Composer package manager: virtual package support.
A few days ago i stumbled over a "virtual package" on packagist - and found it to be a feature that i was actually missing in composer. Turns out, composer can do it, its just not so well documented. So what is this about? Virtual packages allow you to have a more loose dependency. Rather than depending on a specific package, you depend on a virtual one, which can be fulfilled by all packages that provide the virtual one.
He includes a few examples to help illustrate the point of using virtual packages. The first describes an application that wants to use the PSR-4 logger structure but depends on "log-implementation" (a virtual package) rather than the "psr/log" package. The key is in using the "provide" keyword in the Composer configuration. His other two examples expand on this a bit, one showing the use of the "provide" keyword to define the relationship and the other of an actual application making use of this package.
SitePoint PHP Blog:
Interactive PHP Debugging with PsySH
September 30, 2014 @ 12:53:30
The SitePoint PHP blog has a new tutorial posted by i>Miguel Ibarra Romero showing how to use the PsySH tool to do some interactive debugging of your PHP applications via both the command line and a web frontend.
He walks you through the install via Composer and some of the basic commands and syntax for executing PHP code inside its shell. Command line testing is good, but debugging full applications is a bit more difficult. He shows how to integrate the tool into a sample application that calls PsySH via a "debug" call and output via a set of "window" objects. He also includes a bit close to the end about debugging with unit tests, executing them from inside the shell as well.
Semantic versioning for bundles
September 30, 2014 @ 11:26:40
In a recent post to his site Mathias Noback looks at the use of semantic versioning, introducing some of its basic concepts and how it can relate to the work done in Symfony bundles.
Semantic versioning is an agreement between the user of a package and its maintainer. The maintainer should be able to fix bugs, add new features or completely change the API of the software they provide. At the same time, the user of the package should not be forced to make changes to their own project whenever a package maintainer decides to release a new version.
He breaks down what the version numbering represents (major, minor and patch versions) and how they work with Symfony's "semver" to handle issues that come with backwards compatibility concerns. He then looks at a few things to consider when versioning your bundles and how it relates to the underlying libraries it might use:
Ultimately, he suggests that bundle versioning should have nothing to do with the underlying libraries/packages. It's his opinion that they should only be reversioned when there is a change in the actual bundle.
Don't see your event here?
Let us know!
conference api community interview series bugfix introduction language zendserver developer podcast deployment framework symfony release voicesoftheelephpant list library tips laravel
|All content copyright, 2014 PHPDeveloper.org :: email@example.com - Powered by the Solar PHP Framework|