Developers Journal https://developersjournal.in Journal for Developers Wed, 22 Nov 2017 03:51:18 +0000 en-US hourly 1 https://wordpress.org/?v=4.9.1 https://developersjournal.in/wp-content/uploads/2017/05/cropped-dj-circular-1-1-100x100.png Developers Journal https://developersjournal.in 32 32 Introduction to Java Garbage Collection Tuning (Part 1) https://developersjournal.in/java-garbage-collection-tuning/ https://developersjournal.in/java-garbage-collection-tuning/#respond Sun, 19 Nov 2017 15:25:40 +0000 https://developersjournal.in/?p=2518 Garbage Collection

The Java HotSpot VM provides multiple garbage collectors, each designed to satisfy different requirements. Lets look at how we can tune the garbage collection for better performance.

The post Introduction to Java Garbage Collection Tuning (Part 1) appeared first on Developers Journal.

]]>
Garbage Collection

The Java Platform, Standard Edition (Java SE) is used by wide variety of applications whether its a small applet on desktops or web services on large servers. In order to support this diverse range of deployments, the Java HotSpot VM provides multiple garbage collectors, each designed to satisfy different requirements. Java SE selects the most appropriate garbage collector based on the class of the computer on which the application is run. However, users, developers, and administrators with strict performance goals or other requirements may need to explicitly select the garbage collector and tune certain parameters to achieve the desired level of performance. This journal entry is the first part of the series Introduction to Java Garbage Collection Tuning.

Suggested Read: GC Algorithms and GC Collectors

Java Garbage Collection Tuning

To tune the garbage collector, let’s first understand what exactly is Garbage Collector?

The garbage collector (GC) automatically manages the application’s dynamic memory allocation requests.

The automatic dynamic memory allocations is performed through the following operations:

  • Allocates from and gives back memory to the operating system.
  • Hands out that memory to the application as it requests it.
  • Determines which parts of that memory is still in use by the application.
  • Reclaims the unused memory for reuse by the application.

The Java HotSpot garbage collectors employ various techniques to improve the efficiency of these operations:

  • Use generational scavenging in conjunction with aging to concentrate their efforts on areas in the heap that most likely contain a lot of reclaimable memory areas.
  • Use multiple threads to aggressively make operations parallel, or perform some long-running operations in the background concurrent to the application.
  • Try to recover larger contiguous free memory by compacting live objects.

Why Does the Choice of Garbage Collector Matter?

The purpose of a garbage collector is to free the application developer from manual dynamic memory management. The developer is freed of the requirement to match allocations with deallocations and closely take care of the lifetimes of allocated dynamic memory. This completely eliminates some classes of errors related to memory management at the cost of some additional runtime overhead. The Java HotSpot VM provides a selection of garbage collection algorithms to choose from.

When does the choice of a garbage collector matter? For some applications, the answer is never. That is, the application can perform well in the presence of garbage collection with pauses of modest frequency and duration. However, this isn’t the case for a large class of applications, particularly those with large amounts of data (multiple gigabytes), many threads, and high transaction rates.

Amdahl’s law (parallel speedup in a given problem is limited by the sequential portion of the problem) implies that most workloads can’t be perfectly parallelized; some portion is always sequential and doesn’t benefit from parallelism. In the Java platform, there are currently four supported garbage collection alternatives and all but one of them, the serial GC, parallelize the work to improve performance. It’s very important to keep the overhead of doing garbage collection as low as possible. This can be seen in the following example.

The graph in Figure 1-1 models an ideal system that’s perfectly scalable with the exception of garbage collection. The red line is an application spending only 1% of the time in garbage collection on a uniprocessor system. This translates to more than a 20% loss in throughput on systems with 32 processors. The magenta line shows that for an application at 10% of the time in garbage collection (not considered an outrageous amount of time in garbage collection in uniprocessor applications), more than 75% of throughput is lost when scaling up to 32 processors.

Figure 1-1 Comparing Percentage of Time Spent in Garbage Collection

Description of Figure 1-1 follows
Description of “Figure 1-1 Comparing Percentage of Time Spent in Garbage Collection”

This figure shows that negligible throughput issues when developing on small systems may become principal bottlenecks when scaling up to large systems. However, small improvements in reducing such a bottleneck can produce large gains in performance. For a sufficiently large system, it becomes worthwhile to select the right garbage collector and to tune it if necessary.

The serial collector is usually adequate for most small applications, in particular those requiring heaps of up to approximately 100 megabytes on modern processors. The other collectors have additional overhead or complexity, which is the price for specialized behavior. If the application does not need the specialized behavior of an alternate collector, use the serial collector. One situation where the serial collector isn’t expected to be the best choice is a large, heavily threaded application that runs on a machine with a large amount of memory and two or more processors. When applications are run on such server-class machines, the Garbage-First (G1) collector is selected by default.

Source Viva: https://docs.oracle.com/javase/9/gctuning/introduction-garbage-collection-tuning.htm#JSGCT-GUID-223394DF-2E27-4F5D-A7DF-83151EB577BB

The post Introduction to Java Garbage Collection Tuning (Part 1) appeared first on Developers Journal.

]]>
https://developersjournal.in/java-garbage-collection-tuning/feed/ 0
How To Update WordPress Plugins Without Using FTP? https://developersjournal.in/update-wordpress-plugins-without-using-ftp/ https://developersjournal.in/update-wordpress-plugins-without-using-ftp/#respond Thu, 16 Nov 2017 09:49:01 +0000 https://developersjournal.in/?p=2507 Update Wordpress Plugins

Looking to update your Wordpress plugins and you don't want to use FTP then here is the solution for you.

The post How To Update WordPress Plugins Without Using FTP? appeared first on Developers Journal.

]]>
Update Wordpress Plugins

It is critical to update WordPress plugins associated with your WordPress Site as often as possible. An updated WordPress site not only keeps you updated with the latest versions but can help you with an increase in the traffic and bring in more users.

To keep your website secure, you might set the security settings to be as read-only. By keeping these settings you also prevent your WordPress installation and the plugins from updating. Sometimes not updating your WordPress installation seems to be a bigger issue than those security settings.

However, in some of the cases, you are not able to update/upgrade your WordPress and plugins to the latest versions without providing a valid FTP connection information. This is one of the common issues whereby the WordPress system can’t access to write/update your /wp-content folder.

Update WordPress Plugins

Update WordPress Plugins

To solve these types of issues there are two ways:

  • Define the FTP details in the /wp-config.php file. This will be picked up by WordPress while updating the system.
  • You may provide the Write access to the /wp-content folder. This can be done by changing the folder file permission (CHMOD) to 775. Normally the default file permissions are 755 or 644.

However, there is another easier way to deal with updating the WordPress installation and the associated plugins. It’s simple and straightforward, you have to define a constant, FS_METHOD in your wp-config.php file. This constant bypasses WordPress’s recurring prompts and allows auto-updates of your files. This process just needs only 1 line of code to be written.

For your ease of understanding here the steps taken to do this:

1. Open /wp-config.php

Now the first thing you need to do is to open the wp-config.php file from your WordPress root folder (you may access this file from your WordPress installer folder). From the installation folder, the file is located at WordPress/wp-config.php

2. Insert FS_METHOD

Paste the following code into your wp-config.php file, preferably just below every other line of code. define(‘FS_METHOD’, ‘direct’);

3. Save And Upload

When you have already pasted the one-line code, you can proceed to upload the file to your WordPress root folder on your server, and it should work right away. Uploading can be done directly from your host control panel.

 

The post How To Update WordPress Plugins Without Using FTP? appeared first on Developers Journal.

]]>
https://developersjournal.in/update-wordpress-plugins-without-using-ftp/feed/ 0
Koin Dependency Injection for Android https://developersjournal.in/koin-dependency-injection-android/ https://developersjournal.in/koin-dependency-injection-android/#respond Mon, 13 Nov 2017 08:00:13 +0000 https://developersjournal.in/?p=2497 Koin Dependency Injection

KOIN is a simple (but powerful) dependency injection framework for Android.

The post Koin Dependency Injection for Android appeared first on Developers Journal.

]]>
Koin Dependency Injection

Dependency Injection (DI) is a design pattern which has been around for while, but recently it has become more commonly used in the development of Android applications, due mainly to the implementation of some rather nifty DI frameworks. You must be aware of Marinator – Dependency Injection Framework for Android. However, in this journal entry we will be having a look at Koin Dependency Injection which uses Kotlin for Android.

DI allows developers to write code that has low coupling and which can therefore be easily tested. The more complex and longer lived your Android software the more important it becomes to be able to test it effectively.

Koin Dependency Injection

KOIN is a simple (but powerful) dependency injection framework for Android. It uses Kotlin and its functional power to get things done! No proxy/CGLib, no code generation, no introspection. Just functional Kotlin and DSL magic 😉

KOIN is a very small library, that aims to be as simple as possible and let’s you write dependency injection in a breath.

Just describe your stuff and inject it!

Getting Started

To get started with using Koin on your Kotlin based Android application make sure that you have jcenter repository in your gradle.build file. Once confirmed, add the following gradle dependency to your Android app:


// Koin for Android
compile 'org.koin:koin-android:0.5.2'
// If you need Koin for your tests
testCompile 'org.koin:koin-test:0.5.2'

Setup Your Application

To start KOIN and your modules, all you have to do is use the startAndroidContext function in your Android Application like below:


class MainApplication:Application(){

    override fun onCreate() {
        super.onCreate()
        // Start Koin
        startAndroidContext(this, weatherAppModules())
    }
}

The startAndroidContext function requires an Application instance, and a a list of modules to run.

To get a more grasp about KOIN, Modules, check out this wiki page.

The post Koin Dependency Injection for Android appeared first on Developers Journal.

]]>
https://developersjournal.in/koin-dependency-injection-android/feed/ 0
Marinator – Dependency Injection Made Delicious https://developersjournal.in/marinator-dependency-injection-made-delicious/ https://developersjournal.in/marinator-dependency-injection-made-delicious/#respond Sun, 12 Nov 2017 17:26:27 +0000 https://developersjournal.in/?p=1706

Marinator decendency injection was created keeping Dagger 2 in mind for dependency injection in Android Apps.

The post Marinator – Dependency Injection Made Delicious appeared first on Developers Journal.

]]>

When using dependency injection, getting access to the classes which perform the injection is a common problem. On Android, the most common solution to this tends to be to store the components in the Application object. But this then requires the developer to reach into their Application object in multiple places throughout their code. This creates several challenges – in addition to just looking ugly, it can make it harder to write pure JUnit tests. In this journal entry, we will be having a look at Marinator Dependency Injection.

Marinator Dependency Injection made delicious

Marinator helps solve this problem by wrapping your components with a simple static class. Instead of calling code like MyApplication.get().getComponent().inject(this), you can simply call Marinator.inject(this). Marinator relies on an annotation processor to generate a helper that registers your injectors – as a developer, all you have to do is annotate your injector methods and provide the component to the MarinadeHelper.

Marinator was created with Dagger2 style dependency injection in mind. But there’s no requirement that you use Dagger2 or even any sort of framework for DI to use Marinator. As long as your injector class has a method annotated with @Injector, Marinator will recognize this and add it to the prepare method.

Setup

Marinator is distributed via Jitpack. To use Marinator in your project, add the following lines to your build.gradlefile:

// Root build.gradle file:
allprojects {
  repositories {
    maven { url "https://jitpack.io" }
  }
}

// App-level build.gradle file:

// If using Kotlin:
apply plugin: 'kotlin-kapt'

dependencies {
  compile 'com.github.blueapron.marinator:marinator:1.0.2'
  annotationProcessor 'com.github.blueapron.marinator:marinator-processor:1.0.2'

  // If using Kotlin:
  kapt 'com.github.blueapron.marinator:marinator-processor:1.0.2'
}

When you define your components, declare the injector methods and annotate them with @Injector. So, as an example:

@Singleton
@Component(modules = ApplicationModule.class)
public interface ApplicationComponent {
  @Injector
  void inject(Recipe recipe);

  // Note that the injector method can be named
  // whatever you want - it doesn't have to be
  // called "inject".
  @Injector
  void provide(Wine wine);

  // Other Dagger component dependencies declared here.
}

The next time you compile after adding this annotation, the annotation processor will generate the MarinadeHelperclass for you. Wherever you create your components, you can use the MarinadeHelper to register them as injectors:

// In your application class:
public class MyApplication extends Application {

  // ...

  @Override
  public void onCreate() {
    super.onCreate();

    // Create our components and register as an injector. Note that we can
    // use multiple components here as needed.
    mApplicationComponent = createApplicationComponent();
    mNetworkComponent = createNetworkComponent(mApplicationComponent);
    MarinadeHelper.prepare(mApplicationComponent, mNetworkComponent);
  }
}

// In unit tests:
public abstract class BaseUnitTest extends TestCase {

  // ...

  @Before
  public void init() {
      mApplicationComponent = DaggerMockApplicationComponent.create();
      mNetworkComponent = DaggerMockNetworkComponent.builder()
        .mockApplicationComponent(mApplicationComponent)
        .build();
      MarinadeHelper.prepare(mApplicationComponent, mNetworkComponent);
  }
}

You can also register/unregister injectors dynamincally using Marinator. This helps if you need to register an injector for less than the entire lifecycle of the application.

Finally, in your classes, use Marinator to inject the necessary dependencies. The code doesn’t care whether the components were provided by the application, by a unit test, or by something else altogether:

public final class Recipe {
  @Inject Context mContext;

  public Recipe() {
    Marinator.inject(this);
  }
}

public final class Wine {
  @Inject Context mContext;

  public Wine() {
    Marinator.inject(this);
  }
}

Testing

To run the Marinator tests, use the command line. (Android Studio doesn’t play nicely with annotation processing in unit tests)

From the root directory of the project, run ./gradlew clean test to run the unit tests.

Source Courtesy: https://github.com/blueapron/marinator

The post Marinator – Dependency Injection Made Delicious appeared first on Developers Journal.

]]>
https://developersjournal.in/marinator-dependency-injection-made-delicious/feed/ 0
Javascript Snippet Packages for Visual Studio Code https://developersjournal.in/javascript-snippet-packages-for-visual-studio-code/ https://developersjournal.in/javascript-snippet-packages-for-visual-studio-code/#respond Thu, 09 Nov 2017 03:18:29 +0000 https://developersjournal.in/?p=808

Some of the most useful JavaScript snippets available in the Visual Studio marketplace

The post Javascript Snippet Packages for Visual Studio Code appeared first on Developers Journal.

]]>

Visual Studio Code is a lightweight but powerful source code editor which runs on your desktop and is available for Windows, macOS, and Linux. It comes with built-in support for JavaScript, TypeScript and Node.js and has a rich ecosystem of extensions for other languages (such as C++, C#, Python, PHP, Go) and runtimes (such as .NET and Unity). As VS Code is a cross-platform tool that runs on Windows, Linux and macOS — and JavaScript is becoming the programming language for all kinds of cross-platform projects, here are some of the most useful JavaScript snippet packages available in the marketplace, based on the number of downloads, ratings, and plain old subjective assessment.

JavaScript (ES6) Code Snippets

As JavaScript evolves in a series of new versions, the Sixth Edition of the ECMA-262 standard, otherwise known as ECMAScript 2015 or ES6 is a hot topic, with many features being adopted by major browsers.

Charalampos Karypidis has published JavaScript (ES6) code snippets: “Code snippets for JavaScript in ES6 syntax.”, to help you quickly take advantage of new features such as classes, arrow functions, promises and much more.

The snippet package — which supports both JavaScript and TypeScript — has been installed more than 418,562 times and has a rating of 4.5 out of 5 at the time of writing this post.

Angular v4 TypeScript Snippets

The AngularJS and Angular (TypeScript-based) frameworks, originally developed by Google, are all over the VS Code extension marketplace.

We will be discussing Angular v4 TypeScript Snippets from John Papa, for Angular 4.0.0, just formally released in March. It’s said to be smaller and faster and includes new features like a revamped ahead-of-time view engine, TypeScript 2.1 and 2.2 compatibilities, experimental ES2015 builds and more.

This snippet package has been installed more than 526,076 times and had a rating of 5 out of 5.

 

The post Javascript Snippet Packages for Visual Studio Code appeared first on Developers Journal.

]]>
https://developersjournal.in/javascript-snippet-packages-for-visual-studio-code/feed/ 0
AngularJS vs jQuery: Comparison https://developersjournal.in/angularjs-vs-jquery-comparison/ https://developersjournal.in/angularjs-vs-jquery-comparison/#respond Tue, 07 Nov 2017 08:50:35 +0000 https://developersjournal.in/?p=2475 AngularJS vs jQuery

Comparison of two powerful Client Side Javascript technologies AngularJS and jQuery.

The post AngularJS vs jQuery: Comparison appeared first on Developers Journal.

]]>
AngularJS vs jQuery

In this journal entry, we will be having a look at AngularJS vs jQuery. We will also try to list down some of the best features available in both of these technologies. But before diving deep into this topic lets first understand these topics in slight more details.

AngularJS

AngularJS is a product by Google and it’s MVC-based framework. AngularJS is a great tool for creating dynamic and highly rich client side web applications. As being a framework, it dictates us to follow some rules and a structured approach. It’s not just a JavaScript library but a framework that is perfectly designed.

AngularJS utilizes HTML’s syntax as your template language and develop the components of your application compactly. Dependency Injection and data binding, few of the features of AngularJS helps to eliminate major chunk of the code which otherwise had to be written.

To read more about the features offered by AngularJS, please check this journal entry, “Features and Benefits of AngularJS”.

Let’s have a look at some of the pros and cons for using AngularJS.

Pros

  • Easy to learn
  • Perfect for Single Page Applications
  • Easy to unit test
  • Code less, get more functionality
  • Provided re-usability with the help of components

Cons

  • Applications written in AngularJS are not that secure.
  • If the end-user disables JavaScript on their browsers then they only see the basic HTML page.

jQuery

jQuery is a lightweight, quick, small, and feature-rich Javascript Library. jQuery tries to make HTML tag traversal and control, animations, event handling, and Ajax calls more straightforward. All of these are done via a simple API calls that works over many programs.

Using jQuery, we can:

  • easily manipulate the contents of a webpage
  • apply styles to make UI more attractive
  • easy DOM traversal
  • effects and animation
  • simple to make AJAX calls and
  • utilities and much more… etc.

Now we have a slight understanding of what these two technologies exactly are and capable of, let’s look at some of the differences and features of AngularJS and jQuery.

AngularJS vs jQuery

AngularJSjQuery
AngularJS is best suited for the web application developmentjQuery is a fast and feature-rich language
Helps in developing interactive and robust web applications.A commendable JavaScript library and a great tool for creating feature-rich websites
Supports the Two-Way Data BindingDoesn't support the Two-Way Binding
Mostly used for SPA (Single Page Applications)Can be used to create any websites or web applications
DOM manipulation is one part of the AngularJS frameworkjQuery is all about the DOM manipulation

The post AngularJS vs jQuery: Comparison appeared first on Developers Journal.

]]>
https://developersjournal.in/angularjs-vs-jquery-comparison/feed/ 0
How to convert Java String to Integer https://developersjournal.in/how-to-convert-a-java-string-to-an-int/ https://developersjournal.in/how-to-convert-a-java-string-to-an-int/#respond Mon, 06 Nov 2017 18:26:35 +0000 https://developersjournal.in/?p=1711 java

Solution to Convert Java String to Integer data type.

The post How to convert Java String to Integer appeared first on Developers Journal.

]]>
java

Most of the times developers are looking for the solution to convert java string to integer data type in java. In this journal entry, we will be talking about how we can convert a Java String to Integer data type.

Convert Java String to Integer

Solution to the problem is to use the parseInt method of the Java Integer class. The parseInt method is to convert the String to an int and throws a NumberFormatException if the string cannot be converted to an int type.

#Example

public class JavaStringToIntExample
{
  public static void main (String[] args)
  {
    // String s = "fred";  // use this if you want to test the exception below
    String s = "100";
 
    try
    {
      // the String to int conversion happens here
      int i = Integer.parseInt(s.trim());
 
      // print out the value after the conversion
      System.out.println("int i = " + i);
    }
    catch (NumberFormatException nfe)
    {
      System.out.println("NumberFormatException: " + nfe.getMessage());
    }
  }
}

 

Looking at the example above, the Integer.parseInt(s.trim()) method is used to change from the string s to the integer i in this line of code:

int i = Integer.parseInt(s.trim());

If the attempt to change fails – the Integer parseInt process will throw a NumberFormatException, which you must handle in a try/catch block.

It’s not essential to use the String class trim() method but in a real-world program, you must use it as a best practice.

Here are a few related notes about the String and Integer classes:

  • Integer.toString(int i) is used to convert in the further direction, that is from an int to a Java String.
  • If you’re concerned with converting a String to an Integer object, use the valueOf() method of the Integer class instead of the parseInt() method.
  • If you need to convert strings to additional Java primitive fields, use methods like Long.parseLong(), and so on.

The post How to convert Java String to Integer appeared first on Developers Journal.

]]>
https://developersjournal.in/how-to-convert-a-java-string-to-an-int/feed/ 0
Understanding Progressive Web Apps https://developersjournal.in/understanding-progressive-web-apps/ https://developersjournal.in/understanding-progressive-web-apps/#respond Mon, 06 Nov 2017 17:36:37 +0000 https://developersjournal.in/?p=2463 Progressive Web Apps

Progressive Web Apps (PWA) are user experiences that have the reach of the web.

The post Understanding Progressive Web Apps appeared first on Developers Journal.

]]>
Progressive Web Apps

Progressive Web Apps are experiences that combine the best of the web and best of the apps. No installations are required for progressive web apps and are useful to the users from the very first visit in a browser tab. In this journal entry, we will be understanding progressive web apps in a slight more details.

Understanding Progressive Web Apps

The app becomes more and more powerful, when the user progressively builds a relationship with the app over time. PWA loads quickly even on uncertain networks, sends out relevant notifications, icon is available on the home screen, and loads as a full-screen experience.

Progressive Web Apps are:

Reliable: Load Instantly even in flaky network conditions. The instant loading is handled by the Service Workers.

Fast: Users expect to loading time to be less than 3 seconds and they will tend to abandon your site if it takes more than the speculated time. And once the page is loaded they expect them to be fast – no janky scrolling or slow-to-respond interface.

Engaging: Progressive Web Apps are installable and live on the user’s home screen, without the need for an app store. They offer an immersive full screen experience with help from a web app manifest file and can even re-engage users with web push notifications.

What is a Progressive Web App?

A Progressive Web App is:

  • Progressive – Works for every user, regardless of browser choice because it’s built with progressive enhancement as a core tenet.
  • Responsive – Fits any form factor: desktop, mobile, tablet, or whatever is next.
  • Connectivity independent – Enhanced with service workers to work offline or on low-quality networks.
  • App-like – Feels like an app, because the app shell model separates the application functionality from application content.
  • Fresh – Always up-to-date thanks to the service worker update process.
  • Safe – Served via HTTPS to prevent snooping and to ensure content hasn’t been tampered with.
  • Discoverable – Is identifiable as an “application” thanks to W3C manifest and service worker registration scope, allowing search engines to find it.
  • Re-engageable – Makes re-engagement easy through features like push notifications.
  • Installable – Allows users to add apps they find most useful to their home screen without the hassle of an app store.
  • Linkable – Easily share the application via URL, does not require complex installation.

The post Understanding Progressive Web Apps appeared first on Developers Journal.

]]>
https://developersjournal.in/understanding-progressive-web-apps/feed/ 0
Service Workers: Introduction https://developersjournal.in/service-workers-introduction/ https://developersjournal.in/service-workers-introduction/#respond Mon, 06 Nov 2017 15:30:31 +0000 https://developersjournal.in/?p=2466 Service Workers

Service workers provide the technical foundation for rich offline experiences, periodic background syncs, push notifications.

The post Service Workers: Introduction appeared first on Developers Journal.

]]>
Service Workers

Service workers provide the technical foundation for rich offline experiences, periodic background syncs, push notifications. These are the functionalities that would normally require a native application.

What is a Service Worker?

A service worker is a script that your browser runs in the background, separate from a web page. They open the door to features that don’t need a web page or user interaction. Today, they already include features like push notifications and background sync. In the future, service workers will support other things like periodic sync or geofencing.

The reason this is such an exciting API is that it allows you to support offline experiences, giving developers complete control over the experience.

Before service worker, there was one other API that gave users an offline experience on the web called AppCache. There are a number of issues with the AppCache API that service workers were designed to avoid.

Things to note about a service worker:

  • It’s a JavaScript Worker, so it can’t access the DOM directly. Instead, a service worker can communicate with the pages it controls by responding to messages sent via the postMessage interface, and those pages can manipulate the DOM if needed.
  • Service worker is a programmable network proxy, allowing you to control how network requests from your page are handled.
  • It’s terminated when not in use, and restarted when it’s next needed, so you cannot rely on global state within a service worker’s onfetch and onmessage handlers. If there is information that you need to persist and reuse across restarts, service workers do have access to the IndexedDB API.
  • Service workers make extensive use of promises, so if you’re new to promises, then you should stop reading this and check out Promises, an introduction.

Learn More

There is a list of documentation on service worker being maintained at https://jakearchibald.github.io/isserviceworkerready/resources that you may find useful.

The post Service Workers: Introduction appeared first on Developers Journal.

]]>
https://developersjournal.in/service-workers-introduction/feed/ 0
How to Increase Website Traffic? https://developersjournal.in/increase-website-traffic/ https://developersjournal.in/increase-website-traffic/#respond Mon, 06 Nov 2017 09:35:54 +0000 https://developersjournal.in/?p=2454 increase website traffic

A consistent flow of visitors visiting your personal blog or a business website is essential for online success. However, bringing in more traffic to your blog or website require some strategies. If you are striving to increase website traffic and want to see a quick change in your Google Analytics reports, then you should read this […]

The post How to Increase Website Traffic? appeared first on Developers Journal.

]]>
increase website traffic

A consistent flow of visitors visiting your personal blog or a business website is essential for online success. However, bringing in more traffic to your blog or website require some strategies. If you are striving to increase website traffic and want to see a quick change in your Google Analytics reports, then you should read this journal entry. In case if you are looking to increase your pageviews, we would encourage you to read this journal entry first.

Essential Things to Do to Increase Website Traffic

To gain more traffic there are some essential works that every site owner should do. If you have made some researches, you would probably have found the following pieces of important and standard advice.

  • Release quality content regularly – The heart and soul of every single popular blog post is it’s content. You should always concentrate on creating good contents that solve your readers’ pain. A perfect headline of the blog post draws the target audience’s attention.
  • SEO Optimize website – by utilizing healthy seo tips, such as optimizing links, speeding up your website, and optimizing images, you can expect a steady growth of traffic brought by increased search engine rankings.
  • Use long tail keywords – Long tail keywords are the keywords that have a smaller search volume as compared to single keywords. The content can be ranked easily for these type of keywords which in turn will bring more traffic to your blog or website.
  • Social Media Promotion – Popular social media like Facebook, Twitter, Instagram, Pinterest which have millions of users makes them great potential sources of website traffic. You should try to post on as many social platforms as possible. You can even use the tools like ifttt to automate the sharing process.
  • Email Marketing – You should try to build a valuable email list of the loyal readers who visit your website regularly. Once you have a valuable list of emails you should make an actionable email marketing plan to get more people involved when you host any activity.

The post How to Increase Website Traffic? appeared first on Developers Journal.

]]>
https://developersjournal.in/increase-website-traffic/feed/ 0