- Chickens in the Sty: who's allowed to contribute in the Daily Scrum?
Testing Logging in Silex
Silex is a PHP microframework from the same family as Symfony. My shop, Imagine Easy Solutions, uses Silex for some of our most important applications. Modular setup is at the core of Silex's game, by means of Service Providers. The MonologServiceProvider makes it easy to add highly configurable logging to your application. But how to test your logging? It turns out that this Service Provider includes a
DebugHandlerwhich you can use to make log entries available in array form. more
Decoupling Domain Modules in AngularJS
- business logic
- frameworks (integration with HTTP, etc.)
- object storage (database abstraction layers, etc.)
The Realtime Web with Socket.IO and RabbitMQ
I have been thinking a lot about the best way to implement a realtime collaborative web app. WebSockets is the maturing tech of choice for this, and although there still seem to be some issues in terms of support, things are improving. more
Learn You a Haskell for Great Good in PHP, Ruby, ...
My main production language is PHP. I started dabbling in Haskell a couple of years ago, out of curiosity. I've found a few great resources out there and have gone through the novice lessons a few times. I still haven't graduated to the point of building Real Things in the language; I have noticed, however, that exposure to the very different approach and style of Haskell had an immediate broadening effect on my PHP work. more
Accessing undefined properties of hashes/objects (in PHP and more)
The true focus of this post is how to retrieve given member values of associative arrays in PHP, but it will touch on analagous constructs in other popular languages, namely Java's
Defining Communication in WebSocket Applications with WAMP
In an earlier investigation, I conducted a very high-level comparison of WebSockets to AJAX. I discovered that WebSockets, with its inherently persistent connection, makes more sense in principle for a low-latency interactive application, but that there is no built-in semantic for requests and responses in the way that AJAX inherits from HTTP. Enter the ill-named protocol of WAMP. more
Why Laravel Homestead Makes Me Nervous
I had an immediate negative reaction to the news of Laravel's new Homestead program. In their own words:
Laravel Homestead is an official, pre-packaged Vagrant "box" that provides you a wonderful development environment without requiring you to install PHP, a web server, and any other server software on your local machine.For starters, part of my reaction was due to my irritation at all the marketing that Laravel has been pushing out regarding an upcoming announcement, which I presume referred to Homestead, and Forge, their new hosting solution. My perception of that as hype, in addition to the not-terribly-innovative nature of this huge revelation, didn't dispose me well to the announcement. In truth, I can see how the availability of this pre-built development platform will be a tremendous boon to a lot of Laravel users. Now that I've had a chance to get past the initial emotional reaction, I can start to analyze the more objective reasons this project bothers me.
When I was your ageI've been doing web development with PHP for about 6 years. In that time, I've bootstrapped my knowledge of Linux in general, and running servers in particular. I learned, from the ground up, all about configuring Ubuntu servers, including using Puppet for management. Since I joined the Imagine Easy team in January, I've added some experience with cloud virtual-server hosting and deployment. This in-the-trenches learning is both a reflection of my natural mode of "dive in there and figure it all out," and a reinforcement of it. Most of my experience has come with the luxury of time and resources to just dig in and get to know different ways of solving problems in a given space. This means that I value getting my hands dirty with all different parts of the system, and having a hand in setting everything up. The notion of a pre-built environment is a challenge to that perspective. Whereas I try to get as much perspective and knowledge as I can to inform decisions about my stack, I see Homestead as taking that away from developers. This means they are trained to delegate decision-making, as well as losing the actual knowledge and in-depth experience they might have gotten by being thrown in the deep end. I fully acknowledge that this is not a complete nor totally fair assessment of Homestead; but this outlook greatly influenced the light in which I see Homestead.
@yitznewton Laragarden— Michael Hasselbring (@mikelbring) May 15, 2014A more serious argument against buying into Homestead is the notion of platform dependency. Over the last two years, Robert C. Martin ("Uncle Bob") has been by far the greatest influence on my thinking. One of his mantras (see Clean Architecture) is maintaining independence from things that you don't control. In the context of frameworks, it means isolating your business logic from the framework in discrete, Plain Old Object code. One immediate benefit of this is that the core logic is easier to test, being separated from any framework plumbing. A second is that, when the framework inevitably changes, you are not forced to make painful changes in the midst of your application; instead, all that's necessary is to write the boundary layer that connects your free-floating business code to the framework. The same concept applies to other components of the stack. If you hard-code persistence into your core code in terms of (MySQL|MongoDB|ActiveRecord|Redis) or whatever, and mix business logic in the same place as persistence, you are stuck with that decision, unless you want to rewrite it. Using a full-stack boxed solution like Homestead encourages that sort of thinking. I acknowledge 100% that it doesn't force the behavior of lazily (or unwittingly) coupling these external elements into your application, but it almost implies that is the way to go.
Down the roadFurthermore, let's say an application grows, and requires a particular piece added to the stack -- Solr search, perhaps. How easy will it be to add those components? Will the knowledge gap fostered by Homestead bite the project developers now that they need to extend the stack? You run into the same fragility problem where decisions made by the Homestead team down the road may conflict with your local emendments to the build. The project's documentation also indicates that running multiple Laravel applications on a single Homestead instance is the normal mode of operation; that seems to indicate that the Homesteaders are not taking project-specific build modifications into account.
ConclusionI am confident that Laravel Homestead will help a lot of people, and I am grateful to the entire Laravel enterprise as a key player in the continuing maturation of the PHP community. I have tried to highlight what I see as the key shortcoming of Homestead, and why I believe sober discretion is required in using such a pre-boxed solution. more
Test-Driven Development in Context
This article comes in response to a critique of TDD eloquently advanced by my colleague, Richard Wossel. Rather than offer a point-by-point comparison of our perspectives, I am going to paint TDD in a broader context, and I hope that this will clarify its value as I see it. more
The Angel of Refactoring
This is one of the nicest feelings in coding. You've been working a couple of hours on some legacy code, with a thorny refactoring of stuff that's used in a couple of places. After a morning buried in the code that deals with one of the implementations, you have a nicely reworked version, and you're at a few hundred lines of delta. more
subscribe via RSS