Skip to content

Latest commit

 

History

History
41 lines (36 loc) · 2.99 KB

TRADEOFFS.md

File metadata and controls

41 lines (36 loc) · 2.99 KB

Should I use Symlex?

Give it a try if you already like Symfony and would like to work in a leaner, more agile way.

Pros

  • By far the fastest PHP framework according to phpbenchmarks.com
  • Code and memory footprint is very small
  • Built on top of well documented and tested standard components
  • Designed to be simple with few concepts to understand
  • Easier to learn than many other frameworks
  • Using Symlex results in more maintainable and testable code that is fundamental for agile development
  • It has proven to be well suited for rapidly building microservices, CLI and single-page applications
  • It comes complete with working examples which are the best form of documentation
  • Contains everything to create full-featured Web applications: Service container, REST routing & Twig template engine
  • Plain classes are used wherever possible to avoid vendor lock-in and enable framework independent code reuse (other frameworks often try to lock you in with proprietary annotations and specific base classes you have to inherit from)
  • You can use it with Symfony Components and any other PHP library out there
  • Even if you choose not to use Symlex, you might find lots of inspiration for your own projects (for example, you can build your own framework around the micro-kernel or learn how to integrate JavaScript with PHP)
  • Easy to upgrade to new versions of Symfony
  • You are free to create a fork if you want to be in full control and don't trust the community for any reason

Cons

  • While you can get commercial support, Symlex is not backed by a major company and has a small community: Development started to have a high-performance replacement for FOSRestBundle, it was never our goal to build a business
  • It is not good for developers who are not comfortable reading at least small amounts of framework code as not everything is documented 100% (you're welcome to ask for help via email or send additional docs as pull request)
  • There is no support for Symfony Bundles in Symlex
    • Using them often adds complexity to the overall architecture: They hide bootstrap / configuration details and encourage to build bloated applications
    • Symlex is designed to build focused, lean and fully testable applications
    • Writing meaningful unit tests is not possible, if certain functionality is exclusively encoded in framework configuration files or magically generated by bundles
    • Acceptance tests could be created, but they are slow and not well suited for test driven development (TDD) and refactoring
  • Annotations are also not supported as we find them difficult to maintain and test
    • We prefer a tiny bit of code instead or use the service container to configure our apps
  • Copy and pasting code from Stack Overflow or the Symfony documentation sometimes won't work without understanding it and adapting it a little e.g. when it comes to service configuration or routing