Speed up your application in Azure App Service

There are many different articles on the internet about how to make an application faster when hosting it on Azure. This has been a real pain point with big PHP applications or applications which involve a lot if IO operations – like loading modules with Node.js. Recently, I was working with one startup and they approached me with a very interesting issue: Their Node.js application was running about 35x faster on Heroku than on Azure App Service and that is what actually made me to write this article.

Continue reading “Speed up your application in Azure App Service”

Creating a build agent and definition for PHP in VSTS

When speaking of modern development nowadays, we can hear words like DevOps and as part of that, Continuous Integration (if you never heard about it, you can read more about it here). Anyways, today I am going to show you how to set up a build definition for a PHP project stored in Visual Studio Team Services and then the publication to an Azure Web App or a physical server.

Continue reading “Creating a build agent and definition for PHP in VSTS”

Is callback hell still a thing in ES6 with TypeScript?

Whenever I am talking to someone about JavaScript, I mostly end up hearing “callback hell” at least once during the conversation. Most of the people are unfortunately staying with the old-school habit, that callbacks are super bad in JavaScript. Let’s take a look at how can we remove the need for using callbacks using ECMAScript 6 and TypeScript.

Continue reading “Is callback hell still a thing in ES6 with TypeScript?”

Session locking in PHP on Azure Web Apps

During the last couple of weeks, users started noticing certain issues with an application that I develop on Microsoft Azure using PHP and Azure Web Apps. In general, the application is using an OAuth2 library to connect to a custom identity provider, the access token, refresh token and others are stored in $_SESSION. From the last sentence, you could have noticed two keywords – OAuth2 and refresh. The users started noticing an issue that after some time of working with the application (also the IdP was generating loads of useless token pairs), that they had to constantly relog. After turning on the logs, doing some diagnostics and trying to reproduce the issue, it was pretty clear – something fishy is going on with sessions.

Continue reading “Session locking in PHP on Azure Web Apps”

MVA: Mastering Node.js series

Recently, I discovered a series of 7 episodes about getting started with Node.js on Microsoft Virtual Academy! It goes through the basics and moves you deeper into the specific topic. I especially like the fact, that they also focus on building applications with Electron shell which has been getting more popular over the past year or so. Another great thing is that all of the examples are leveraging ES2015 enhancements and features.

Additionally, I also found a course named Game-Changing Features in ES2015 which introduces all the awesomeness coming with ES2015.

Designing web applications for geographical scale

I have been wandering around the web trying to find some more information about geographically scaling web applications with both web and database tier. With Azure, I really don’t think there’s an active issue with possible downtime but mostly the need for reaching your customers with the application all around the globe.

Continue reading “Designing web applications for geographical scale”

Remotely debugging PHP on Azure Web Apps with ngrok

One of the most pain points during PHP development is usually debugging for me. Quite frankly, I hate to run and debug PHP applications on my local machine, because when you move them somewhere else (to another environment) they sometimes don’t work and you have to do some more configuration (let’s ignore the fact that Docker or similar solutions can solve this on a decent level).

Continue reading “Remotely debugging PHP on Azure Web Apps with ngrok”