Browsing Category

Web-Development

2182

How to build api module with yii2

Let's make an API module that will contain the actions currently reachable by the /services/json and /services/yaml routes. The following use cases should be supported: The GET request to the /api/services/json route should return…

Dealing with Server-sent Events in Html5

Imagine you’re building a simple stock ticker application. You have a server resource that publishes the APIs you need for getting stock values, so it’s quite easy to get things started. But how do you get updates to the stock values? How…

What Is an Abstract Factory Pattern?

The Abstract Factory pattern is a creative way to expand on the basic Factory pattern. Since the Factory pattern is a class that creates other classes in a uniform way, the Abstract Factory pattern gives us a way to allow factories with…

Logging in symfony 2

To make our application more elegant while working in cron, we should implement logging to a file. Symfony2 supports some standard logs, through the so-called monolog component. To use this, we simply call for the logger service, and then…

Pin It on Pinterest