Logo

Thoom Technologies

  • Developer-Free Tumblr
  • Archive
  • RSS

Packages: The Way Forward for PHP

» Great article articulating what I’ve experienced recently.

Having played around with Composer lately, I’ve gone from a meh to a This is frickin’ awesome mentality. For my new projects, I’m building them around Composer for managing my dependencies and autoloading.

    • #php
    • #packagist
    • #composer
  • 1 month ago
  • Comments
  • Permalink
  • Share
    Tweet
Modern MVC web frameworks often involve a lot of boilerplate code just to support the primary client type of User Agents. This boilerplate code typically does little to help with supporting the other client types of Admin Processes and Unit Tests. As a result of the overhead introduced by this extra boilerplate code, developers often find themselves creating Fat Controllers (a side-effect of The MVC Paradox). Controllers take on too many responsibilities, both vertically and horizontally. Vertically, Controllers start to handle domain logic that should be pushed down to the Model layer. Horizontally, multiple concerns get stuffed into a handful of Controllers. These different horizontal concerns should be separated out into multiple Controllers (the Single Responsibility Principle). The overhead introduced by modern MVC web frameworks leads directly to these problems.

The MVC Paradox – Bradley Holt

» This article is a great read and something I’ve been pondering myself recently. The author references the Slim micro framework which, at least from a cursory glance, is very similar to Silex. I love Silex for the same reasons he mentions Slim:

There is very little boilerplate code involved in handling a User Agent’s request. Minting and handling new routes is incredibly simple. Placing your entire front-end application layer in one file may seem absurd at first. However, it has the nice side-effect of making it painfully obvious if you start to handle domain logic outside of your Model layer or if one route is doing too many things.

I’d recommend checking out these micro-frameworks. Silex has opened my eyes to a new way of designing web applications and services. Where Zend Framework has complexity, Silex offers simplicity.

Source: bradley-holt.com

    • #micro frameworks
    • #mvc paradox
    • #silex
    • #slim
    • #php
  • 1 month ago
  • 1
  • Comments
  • Permalink
  • Share
    Tweet

Today I ran into a problem where my PHP Application would throw this fatal error:

Fatal error: Exception thrown without a stack frame in Unknown on line 0

… After a few minutes I found the problem: I had a class that would save itself to the Session, and that class also had a __sleep method which is invoked on serialization.

PHP, Sessions, __sleep, and Exceptions | Justin Carmony

I had a similar problem not too long ago. My solution was to call:

register_shutdown_function('session_write_close');

at the beginning of the bootstrap process.

Source: justincarmony.com

    • #php
    • #serialize
    • #session
  • 1 month ago
  • Comments
  • Permalink
  • Share
    Tweet
Google warned several developers in recent months that if they continued to use other payment methods - such as PayPal, Zong and Boku - their apps would be removed from Android Market, now known as Google Play

Exclusive: Google leans on developers to use payment service | Reuters

» I’ve got conflicting feelings on this one. As a developer, I’ve encountered severe limitations dealing with Apple’s in-app offerings, especially as it relates to our subscription services. It’s been nice not having to worry about similar problems with Android, where we continue to use Paypal.

If it becomes required to use Google Wallet, we’ll have to support Apple’s in-app subscription for iOS, Google Wallet for Google Play, Paypal for web, and ??? for Amazon Kindle.

But on the other side, the consumer side, I like being able to easily purchase using my iTunes account. I am conflicted…

Source: reuters.com

    • #Google Wallet
    • #Apple In-App
  • 2 months ago
  • Comments
  • Permalink
  • Share
    Tweet

Depending on packages without composer.json in Composer (PHP dependency manager) | burgiblog

» Great information for using Composer with repos that aren’t on Packagist. I look forward to when the composer is more stable and usable.

    • #composer
    • #packagist
    • #dependency management
  • 2 months ago
  • Comments
  • Permalink
  • Share
    Tweet
← Newer • Older →
Page 1 of 8
A web application consulting company that specializes in LAMP-based web development.

Me, Elsewhere

  • @thoomtech on Twitter
  • Linkedin Profile
  • thoom on github

Tweets

loading tweets…

  • RSS
  • Random
  • Archive
  • Mobile

Effector Theme by Carlo Franco.

Powered by Tumblr