Sharing experience of building one online product for 13 years

Testing Angular 2 apps – Part 2: Dependency Injection and Components

If you missed part 1 I encourage you to take a look at it here.

Note: Article is based on Angular 2 beta.2

Testing Services

The easiest thing to start testing real Angular 2 thing is Service. It is pure JS class which is about to be injected.

Let’s start with simple service:

export class TestService {
  public name: string = 'Injected Service';
}

Read the article …

Testing Angular 2 apps – Part 1: The beginning

Introduction

Angular 2 tends to be one of the hottest front-end framework last time. We decided to give it a try and now we are about to share thoughts on that topic. You can find some awesome articles over the web on how to make your first components or even much more advanced topics but we found it not enough to create big scalable application (like the LiveChat apps are).

Going back in the history, one of the reasons Angular 1 was introduced was a problem of testing front-end apps. It solved that problem quite nice and version 2 follows that path despite of being totally new piece of code.

Read the article …

Installation and update systems for Windows. Part 2: ClickOnce – as simple as it gets?

In early 2014, inspired by the Slack desktop application for OS X, LiveChat decided to create a new desktop application in a form of a smart client – a web application wrapped in a desktop application window.

The new application, based on new technologies, provided the opportunity to search for new solutions for application installation and update. Read the article …

C# library for LiveChat API

We have just published the C# library for the LiveChat API. With only two lines of code you can add an agent, create a ticket, start a chat or get the availability report.

Read the article …

Installation and update systems for Windows. Part 1: The history of LiveChat application

LiveChat desktop application for Windows took many shapes and forms over the years, but regardless of its features and appearance, two of its tasks are common for practically all desktop applications: installation and update.

In this series of blog posts, I will describe installation and update systems that the LiveChat application used before and uses now. This will also show you how the application itself changed with time.

Read the article …

What is SPF – Sender Policy Framework

Spoofing is a type of a computer attack in which the attacker pretends to be someone else. In particular, email spoofing is an attack in which the attacker sends an email with a fake “From:” field. You can compare it to sending a traditional mail with forged return address.

If you are using one of the popular email services such as Gmail or Yahoo, you don’t need to worry about that. These providers keep security on the high level. But if you are just the owner of an internet domain, you should be aware of the spoofing vulnerability (even if you don’t send emails on your own).

Read the article …

How Tissot watch notifies about a weak battery

Watches usually don’t have a digital display which shows a battery status icon. As a result, users are informed about the weak battery in the least convenient moment: when they check the time and the watch hands are still.

Tissot has found a super-usable way to inform the user about a weak battery in the watch.

Read the article …

Setting cookies to subdomains in JavaScript

We’ve recently faced a problem of setting a cookie from foo.mycompany.com to all subdomains in a *.mycompany.com domain.

The solution seemed pretty straightforward: just set a wildcard cookie to .mycompany.com (note that the first character is a dot). However, we had to determine the target domain (the actual value of “.mycompany.com”) automatically because our code is fired on tens of thousands of different domains.

And here came the problem: the list of Top-Level Domains.

Read the article …

How to create better reports

How to create better reports with HTML

A report is probably the most common way of displaying data within any substantial business environments. Unfortunately a lot of reports we come across are simply dull and visually unpleasant.

Say no to reports in PDF format!

We cannot neglect the power of traditional plain PDF form, although we should not feel excused from being creative and resolute. There is no need to stay idle when technology allows us to experiment a little.

We asked ourselves the following questions:

  • Shall we make the reader download a separate file?
  • How many of them decide not to?
  • Are there any solid reasons to bear with closed format limitations?
  • And finally: can we create a new quality of report by designing it in a well-known form of a website? How to create better reports?
Read the article …

Should your email validator be that complex?

So you’re a keen programmer that one day faces a problem of validating user’s email address. Sounds easy.

You search Google for the best possible regular expression. After a while you end up with the following RFC-compliant best regexp ever:

Read the article …