Often entrepreneurs ask us same questions: ‘What technology stack should I build my startup on? What do you guys propose? What is trendy now? What frameworks/libs/tools my start up is going to use?’
There is no right or wrong answer to this questions. It’s a decision every company makes for itself, depending on what it’s trying to build and often based on skills of its cofounders. Moreover pretty complex projects uses a whole bunch of tools optimized to effectively solve specific problem i.e. choice of technology stack is based on problems and needs.
This post highlights PHP as the main platform but certainly not all comes down to PHP.
PHP is the core technology in our team and in the last few years we have successfully completed dozens of complex and highly loaded systems, in practice, verified the effectiveness of each particular tool in a given situation. Therefore, in this post I will try to describe the basic and most important tools of our typical project.
As for development IDE we picked PHPStorm over ZendStudio, Eclipse and other. There are multiple reasons for that: it comes with the easiest debugging solution, easy way to run unit tests from within the IDE, it is really like a “storm” when it comes to performance.
Symfony 2.1 (latest stable version) is high performance php-framework that has many high-quality components/bundles and follows most nowadays coding standards
Propel ORM is fast ORM framework. It allows you to access your database using a set of objects, providing a simple API for storing and retrieving data.
Composer is a tool to manage package/component dependencies. In other words you can declare the dependent libraries your project needs and it will install them in your project for you.
PHPUnit is a tool and method of testing that verifies the individual units (the smallest testable code) of source code are working properly.
Important Symfony Components
Twig is template engine. Twig is a way to make your php more object and less messy. You’ll make your code cleaner, easier to maintain and to 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
Node.js gives you an ability to handle thousands of concurrent connections with minimal overhead on a single process
Less is an amazing little tool that extends CSS with the addition of variables, mixins, operations and nested rules. What this means is that you can write leaner code very quickly.
jQuery if you have anything to do with web development, you probably have heard the term ‘jQuery’ over a million times already :)
Typical Server Software Stack
Nginx is a web server that focus on high concurrency, performance and low memory usage
php5-fpm is PHP fast-cgi adaptor; basically it gives us the ability to scale up (or down) the number of PHP processes that are running and handling requests based on load and because it’s fast and it integrates well with nginx
MySql/Percona 5.5 is an enhanced replacement for MySQL
Redis high performance noSQL storage. Used like advanced cache engine.
Newrelic is a managed service (SaaS) that you “plug in” to your web app, which collects and aggregates performance metrics of your live web application. The information it provides can help you find answers to questions like: Is my website slow? Who is it slow for? Where is it slow exactly? Do we need more, or bigger servers? What can we do to improve things?
Percona toolkit is a collection of advanced command-line tools to perform a variety of MySQL server and system tasks including: analyze queries, collect 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 :)