Canopy: PHP5 Coding Framework

Synapse Studios has also developed a core set of technologies which help streamline the development process, ensure consistency throughout a project's codebase, make said codebase considerably more maintainable and make goals like database and platform agnosticism easier to achieve.

Our primary development framework called Canopy is based around PHP 5. It allows our developers to quickly and easily write clean, functional code and reduces the complexity of many common challenges that occur during the course of development.

Innovations included in Canopy:

  • Messaging Middleware - abstract PHP and JavaScript class and methods for sending and receiving messages within a software and between applications and platforms
  • Object Relational Mapping - a collection of classes and methods allow flexible use of relational databases through a unified PHP interface
  • Platform - A unified controller featuring:
    • Plugins - you can write smaller, self-contained code as a plugin, which is easier to maintain and develop and which is also reusable
    • Settings - allows for easy-to-edit settings files that are not part of the codebase
    • Axon - allows for defining CSS, JS, and PHP resources as package names and allows for the fast inclusion of those resources through the platform
    • Display - automatically verifies syntax of HTML documents and also acts as a fast templating solution allowing for unified template naming in both JavaScript and PHP
  • Features optimization (via APC) for faster PHP interactions
  • Loader allows for lazy reading of include files to minimize resources used.

 

HTMList.com: Synapse Studios' Blog

Extending PHP 5.3 Closures with Serialization and Reflection

PHP 5.3 has brought with it some powerful and much-needed features like late static bindings, namespaces, and closures (also referred to as anonymous functions and lambda functions). Anyone who is experienced with JavaScript or who has worked with programming languages like Scheme or Lisp should realize the value that anonymous functions can bring to PHP. The PHP Manual explains closures like this: Anonymous functions, also known as closures, allow the creation of functions which have no specified name. They are most useful as the value of callback parameters, but they have many other uses. Closures can also be used as the values of variables; PHP automatically converts such expressions into instances of the Closure internal class. PHP has very few predefined classes that are part of the core language, so naturally I was intrigued by the Closure class. The PHP Manual has this to say about the class: The predefined final class Closure was introduced in PHP 5.3.0. It is used for internal implementation of anonymous functions. The class has a constructor forbidding the manual creation of the object (issues E_RECOVERABLE_ERROR) and the __invoke() method with the calling magic. The invoke magic method is also a new feature in PHP 5.3. It is called when an object is used in the context of a function (e.g. $object($parameter);). Since Closure objects will be used like functions, this is a critical feature of the Closure object. The Closure class may be perfectly equipped to act like an anonymous function, but it does not provide any extra utility beyond that. A var_dump() of a closure will reveal the functions parameters, but there is no way to get any other information about the Closure (like the actual code of the function). Trying to serialize the Closure throws an Exception and json_encode() just returns an empty JSON string. To make matters worse, the Closure class is final, so there is no way to extend it. That simply wasn't going to cut it for me. I wanted to make my own Closure class that was at least able to do the following:

Posted on January 28, 2010 by Jeremy LindblomRead More »

Who's using Synapse Software?

Herhsey's Discount Tire / America's Tire Troon Golf
Arizona State Board for Charter Schools Arizona Department of Transportation: Motor Vehicle Division Gila River Casinos

Synapse on the side

Threadcakes Cake Competition Give-a-weigh Charity Weight Loss Fundraiser