Estimated reading time: 5 minutes
Posted on March 24, 2013

Your Next Development Stack

A lot of entrepreneurs often ask us the same questions:

What technology stack should I build my start-up around? What do you guys propose? Which one is trendy now? What frameworks/libs/tools does my start-up need to use?

In fact, there is no right or wrong answer to these questions.

It’s a decision every company makes for itself depending on what they are trying to create, and it’s usually based on the skills and background of co-founders. Moreover, when working on pretty complex projects, you’ll most probably use a whole bunch of tools optimized by Managed IT services to effectively solve tech issues.

In this post I’m going to emphasize on PHP as one of the major platforms, but a large variety of technologies does not certainly come down just to it.

PHP is a primary technology in our team, and over the last few years we have successfully completed dozens of complex and highly loaded systems, verified in practice the effectiveness of each particular tool in a given situation. I will try to describe basic and the most important tools we use for our typical project.

Primary Tools

Perhaps I’ll start by saying that we keep all our code on GitHub (see Plans & Pricing). I’ve recently written an article on its convenience and benefits, and anyone interested can read it.

PHP 5.4.x (the latest stable version) contains some performance improvements compared to 5.3.x

As for IDE, we’ve picked PHPStorm over ZendStudio, Eclipse, and others. There are multiple reasons for that: it provides the easiest-to-use debugging solution, a handy way to run unit tests from within the IDE, and it is really unstoppable when it comes to performance.

Symfony 2.1 (the latest stable version) is a high-performance PHP framework including many high-quality components/bundles and following the most up-to-date coding standards.

Propel ORM is a fast ORM framework. It allows you to access your database using a set of objects, provides a simple API for storing and retrieving data.

Composer is a tool for managing package/component dependencies. In other words, you can declare the dependent libraries your project needs and Composer will install them in your project for you.

PHPUnit is a tool and method of testing that verifies if individual units (the smallest testable code) of source code are working properly.

Behat and Mink are tools for behavior-driven functional testing. With Behat you can describe anything that you can describe in business logic. See Developing Web Applications with Behat and Mink

Important Symfony Components

Twig is a template engine. It provides an opportunity to make your PHP more object-based and less messy. You’ll make your code cleaner, easier to maintain and understand.

Assetic is an asset management framework for PHP (define, compress, build, etc.).

Monolog sends your logs to files, sockets, inboxes, databases, and various web services.

SwiftMailer is a mail engine offering a flexible and elegant object-oriented approach to sending emails with a multitude of features.

JMSSecurityExtraBundle helps to define access rules.

FOSJsRoutingBundle exports routes to JavaScript.

Javascript

Backbone.js is a JavaScript framework allowing you to easily create single page web applications. It’s very flexible and incredibly lightweight. I think there is no need for me to explain why building something without any structure is a bad idea.

CoffeeScript lets you clearly express your program with a lot less code than with JavaScript. It also makes accomplishing many common tasks much easier and employs a class-based approach to creating objects. JavaScript is generally prototypical which confuses the hell out of most people.

Node.js gives you an opportunity to handle thousands of concurrent connections with minimum processing overhead.

Underscore.js is a utility-belt library for JavaScript.

Less is an amazing little tool that extends CSS with variables, mixins, operations, and nested rules. It means that you can write cleaner code very quickly.

Qunit provides a simple and rather unique approach to Test Driven Development in JavaScript.

Moment.js is an excellent library for working with dates in JavaScript.

jQuery: if you have anything to do with web development, you have probably heard the term ‘jQuery’ over a million times already :)

Highcharts: there are many JavaScript-based charting components out there, but we particularly enjoy using this JavaScript library.

Typical Server Software Stack

Nginx is a web server that focuses on high concurrency, performance, and low memory usage.

php5-fpm is PHP fast-cgi adaptor; it gives you an opportunity to scale up or down (based on load) the number of PHP processes running and handling requests. It’s fast and integrates well with Nginx.

MySql/Percona 5.5 is an enhanced replacement for MySQL.

Redis is a high performance NoSQL storage used as an advanced cache engine.

NewRelic is a managed service (SaaS) that you “plug into” your web app. The tool collects and aggregates performance stats for your live web product. The information it provides can help you find answers to questions like: Is my website slow? Whom is it slow for? Where is it slow exactly? Do we need bigger servers or more of them? What can we do for improvement?

Percona toolkit is a collection of advanced command-line tools to perform a variety of MySQL server and system tasks including analyzing queries, collecting vital system information, etc.

Gearman allows your application to perform tasks in parallel, distribute processing jobs to separate processes in the same machine or other machines in a cluster, balance the processing load, and even invoke code written in other languages.

And what are you using? Any pros and cons or success stories are welcome :)