What is Webiny Framework

Published on: Dec 15. 2014

About the author

Webiny Framework is just another PHP based framework ... yes that's TRUE, and this blog post is exactly about that. I will talk about why we created a new PHP framework, how do we plan to develop it further and why should you try it out. I will also do some comparisons with some other frameworks on the market, like Symfony, Laravel and Zend in regards on the components and architecture. 

We are not re-inventing the wheel, we're just putting 20" rims on it.

The industry has moved on, and PHP in the last couple of years really picked up the tempo, in releasing new versions and many new features with it. What we see is that many of the frameworks lack behind with implementing the changes.

$array = array(); // prior to PHP 5.4
$array = []; // after PHP 5.4

This change was implemented over 2 years ago in PHP 5.4

And it's not just that, there are many more new things that are missing. Some of those things are missing in general in PHP. The most obvious is everything is an object. With Webiny Framework we wanted to solve those problems and provide a more up-to-date development framework.

Why should I use it

It just works, it is fast and has most of the features you need, to develop a web application. With the REST component you can also build the server side for a mobile application. It also comes with a built-in MongoDb Document Object Wrapper what you will quickly start to appreciate.

This is the full list of the components that are in Webiny Framework:

  • Amazon
    • supports implementation of Amazon S3 and Amazon CloudFront API
  • Annotations
    • component for parsing phpDoc annotations from a class, method or a property
  • Cache
    • provides unified access to several caching libraries like Apc, Couchbase, Memcache and Redis
  • ClassLoader
    • PSR-0, PSR-4 and PEAR class autoloader
  • Config
    • a very handy library for parsing YAML, INI, JSON and PHP configuration files
  • Crypt
    • library for encoding and decoding strings and also validating password hashes
  • Entity
    • MongoDb ODM
  • EventManager
    • want to do event-based development, this is a library for you
  • Http
    • parse HTTP requests and send HTTP responses
  • Image
    • library for image manipulation
  • Loggger
    • a component for handling logging during code execution using PSR-3 interface
  • Mailer
    • component for sending emails
  • Mongo
    • a wrapper for PHP MongoDB class
  • OAuth2
    • library for working with OAuth2, currently supports Facebook, LinkedIn and Google+
  • REST
    • fully featured REST library with caching, security and rate control
  • Router
    • handles defining, parsing, creating and matching url routes
  • Security
    • provides authorization and authentication layer
    • supports Http, HTML form, Twitter and OAuth2 authentication
  • ServiceManager
    • want to write truly service based, loosely-coupled code, this library provides that
  • StdLib
    • tired of constantly mixing legacy PHP functions and objective code
    • this component provides objective wrappers for Arrays, Strings, Urls and DateTime types
  • Storage
    • storage abstraction layer that simplifies the way you work with files and directories
    • supports local file system and Amazon S3
  • TemplateEngine
    • provides a layer for rendering view templates and defining template plugins and manipulators using existing template engines
  • TwitterOAuth
    • library for working with Twitter API using Twitter OAuth

Did you build all that?

We built most of the components, yes. However there are few components that have dependencies to 3rd party libraries. Some of those components we might remove after some time, but for now we will concentrate on more important things, like improving the documentation, providing tutorials and other training materials.

Traits all around me

When we first started to build the components for our framework, we changed and reshaped, a lot, the public methods and the file-folder structure. It took many approaches and code refactoring, until we were happy with the output. Our main goal was to make it usable to developers

You usually judge a web application, based on its user interface (UI) and the user experience (UX) it provides. We wanted to take that approach in designing our components. The access to the component should be very simple and it should not get in the way with the class hierarchy of your web application. Also the setup of the component should be one-line of code, no matter how complex it is.

Eventually we decided that all the components should follow the same approach. The setup of the component should be done by calling a setConfig method that takes a Config object instance or a path to the YAML file. This is an example how it looks like:


Using the component is also standardized. You just need to implement the component trait into the class where you want to use it:

    class MyClass
        use Webiny\Components\Cache\CacheTrait;

        public function myMethod(){

Is this an MVC framework?

Model–view–controller (MVC) is a software architectural pattern for implementing user interfaces. It divides a given software application into three interconnected parts, so as to separate internal representations of information from the ways that information is presented to or accepted from the user.

- Wikipedia

The short answer is YES and NO.

By design, it's a request-response framework without any enforced architecture. With such an approach, you can shape it to any software architecture you want. - That's the NO part of the answer.

On the YES side, many developers came to us with the question and requirement for an out-of-the box MVC support. So we decided to build a component just for that. The Bootstrap component, that is currently in testing phase and isn't yet released, will enforce the MVC architecture on your application. With the Bootstrap component your app will be up and running in very few lines of code. It will also come with a generator that will speed up the app setup for you. We will be releasing this component together with a demo application so that you get the full insight into how the component works and how the application is structured.   

To wrap up

It's a full stack development framework with most of the components that you need. It's licenced under the MIT license, and is available for free download from our GitHub account or from composer.

Since we are the new guys on the block, we still need to work a lot to provide you all the documentation and tutorials that you need. In the next few weeks we will open a tutorials section on the website and release the first video tutorial. 

If you wish to support us, you can follow us on GitHub, do pull requests, or even it you wish to join our team, email us and we will see how we can work together.

If you would like to receive updates on our progress, you can subscribe to the newsletter in the footer.



Image by Jared Tarbell


Lastest from our blog:

The Power of the Community

In the focus of recent feedback that I got, I think there is a need for me to justify some of the decisions we made while developing Webiny Framework.

Share & subscribe: