Why a Platform Enabled Business Model over Tradional Business Model?

Every era has brought with it changes and disrupted the way businesses function, defined its roles, broadened horizons and brought sellers and buyers closer.

We have forever lived and interacted with business models that had a straight line of communication. Companies made and sold products through buyers and consumers bought them. Each had a specific role and were complete at their touch points.

Traditional Media and Publishing wasn’t anything different. Media and Publishing houses produced content and it was pushed to the end-users in that similar straight line.

From the time of the industrial revolution, not a lot had changed, until recently. Nokia got sold to Microsoft and Android took over the world, phones, cars, houses, connectivity and everything else.  It created a shift in the way the world worked traditionally, it gave a new shape to business models - the platform business model.

What it did was not to create anything new, it just tweaked the traditional business model and the one straight line. It used the already present resources to create a platform, where the new product was not the product itself but the Platform which became a product.

What is a Platform?

The term “Platform” is one of the most misunderstood ones that we use today. A platform business model does not grow by the virtue of itself but by the sheer presence of its catalytic force - The User. An online platform or offline one is built by a company but is built upon to disrupt the present. The likes of Uber and Amazon are doing just that. They have not run behind a user, they have but created an ecosystem for businesses to connect with their consumers like a traditional market. A traditional market as a platform has sellers with shops and businesses where buyers come to pick and choose. What this did was cut the scope of scalability and growth. Some businesses thrived and a lot more died an eventual death without growth or expansion. What a traditional marketplace did not have was a system for getting heard and voice out an opinion, it was driven more by a seller than by the buyer, here the platform was of no value and had only of little physical importance.

What companies like Amazon did was to bring these core elements to a structure and form and given the system and connected it with the world, equipped it with a functional feedback loop.

What is successful platform business strategy made up of?

Platforms which attract, provide the building blocks and mediums which bring all of these together. Take Kickstarter for say, it attracts investors and entrepreneurs alike and has become an online platform or a medium where they can interact, it is like a matchmaker of sorts. Do you now see how a traditional business model was different?

 

How to set the right expectations for project delivery?

Setting a clear list of expectation to the client for a project delivery goes a long way to great client relationships. A mismatched and misunderstood project goal and target always leads to dissatisfaction among team members, account head, and all other stakeholders.

I manage a team of a few developers who build web applications in Drupal. While working on projects with my team, I have had the chance to practice a few of the points that I have mentioned in the article. It has not only kept us on track but also kept people happy and motivated.

What should you do?

Be involved from the beginning

When you begin a project makes sure that you and your team members are involved in the project from the beginning. There are times when the team would expand and you have to accommodate a new member. Make sure to walk the new member through the whole project and not just the part of the project they would be working on. This gives a wholesome idea and would help the newbies to understand the context of the work being done.

Involve all stakeholders

Including decision makers and stakeholders during the project planning and goal setting phase will ensure that no unplanned task gets in. This will avoid any last minute changes or any further approvals that would need to be taken later on into the project and help with managing expectations.

Identify pain points

Know exactly what value your project would be creating, know the nitty-gritty of why and how to fully understand the context of the project. To understand how to build the solution the problem statement needs to be understood. That can be done with a proper requirement analysis.

Be transparent

Let the stakeholders know what is possible and what is not. Be clear with the outcomes and process. Also, let your team members know.

Underpromise and overdeliver

If you have a project that will take a month and a half to get over, promise 2 months for so. There might be bottlenecks, you might run into unplanned problems and that might delay your delivery. It is best to set a timeline or task by keeping something in hand. In that way, if you finish before the time that’s a win-win.

Have clear scopes and boundaries - Set realistic goals

When you know something won’t be possible, just let the stakeholders know. In a project define the scope of a task. A particular task can be executed in a lot of ways. Be transparent about the way you would do it and mention the scope of the task. There should not be space for ambiguity.

Set smaller targets, plan - prioritize

You have one end goal in mind - good, break that up into smaller tasks, that way you could make sure to always be on track and time. You have to deliver a project in 6 months - make weekly project plans, review, update and track the progress.

Make sure everyone understands their responsibilities and are accountable

When you assign a task to someone, make sure they understand their responsibility. This is a cut-throat world and everyone is busy. No one would want to take up additional responsibilities or clean up one someone else’s behalf, it's just not right. For example, when you assign a coding task to someone, make them understand that they are not to push a buggy code and wait for a QA to see that. When you assign a task, it is important that the responsible person is also accountable for the task.

Communicate - follow up with team

Communication is the key to any collaborative task. Have frequent reviews, meeting and understand how you could help them in the process. Understand that it is you in between the client and the team. If there is a screw up with the project or any of your tasks it is highly likely that you have failed to communicate with your team and that will be a real pain in the back.

Communicate with client

Keep your client updated with the recent happenings, have frequent meetings and understand that all of you are on the same page. Client communications will ensure everyone understands and is on board.

Escalate issues

Bottlenecks on the projects are unavoidable, but not knowing about them is a serious offense. Right from the beginning encourage your members to let you know about issues. If issues are escalated to the right authority at the right time it will keep the project from going off track.  

Update plan changes

Plans and tracks will often need to be altered. New changes will need to be accommodated. Once you get to know that from your members or from the stakeholders - explain and let people know that. Your members might be working with a project plan in mind and you have another, the sooner they get to know about any change of plans the better it is for managing expectations.

Project management is not a difficult task and communication is the key. We put a lot of emphasis on client communication and stress on the details, that way it ensures we set the right expectations for a project delivery. We deliver high-end experiences in Drupal for Media and Publishing, Hi - Tech and Pharma, all of these for a global clientele while ensuring the right tracks for handling a project. 

Guide to Drupal distribution Thunder for Media & Publishing companies

While, a drupal developer is working on a project, adding custom codes or functionalities is one of the unavoidable things to do. Otherwise known as extensions or modules in drupal. Drupal modules do not come packed with the core built of drupal and often has to be navigated and found on drupal.org. But is does not end there, you have to know the exact task or functionality the drupal module will add.

The solution to extensive module search may end with drupal distributions. Making a big fat functional website with the perfect drupal modules would be so much easier if someone would do that for us and we could download it whole as a package, well that is what distributions are for.

A drupal distribution gives a website custom made functionalities and features and for the kind of website. It comes as a single downloadable package having the Drupal core, contributed drupal modules, themes, and pre-defined configuration. This helps to pace up the set up for a use-specific website than navigating through a whole bunch of drupal modules and configuring setups by yourselves. The often resolve compatibility issues which a module may have. They are mobile first and are highly scalable.

Producer Retailer built with Thunder distribution
Producer Retailer built with Thunder distribution

Our drupal developers at Valuebound has had the chance to work with such a distribution built by publishers for publishers - Thunder. Thunder is a Drupal distribution which is made and maintained by Thunder Coalition of Hubert Burda Media since last year. Its partners include Facebook, Acquia, Riddle, Valiton and Nexx.tv. There are over 200 websites using this distribution.

Digital publishing has seen massive disruption affecting technology and revenue. Thunder is a drupal distribution essentially focusing on custom drupal modules made for publishers. Drupal Thunder is easy to use and deploy, reducing considerable amounts of development time and resources. It is regularly maintained by core Drupal Thunder team and comes with a host of functionalities built for publishers.

This video gives an idea about the approach

The Thunder project on Drupal lists the following features:

    Create articles dynamically with paragraphs: Using paragraphs, you can add text with a WYSIWYG-editor, pictures, videos, Instagram or Twitter cards to your article – and change the order by dragging and dropping the content wherever you like it. Thanks to a preview mode, you get a good idea of how your article will look like in the end.

    Schedule your content: You can plan when texts should be published, and you can also set a date to remove the article from your website. Also, you can set an expire date for images. After this, the picture will be replaced with a placeholder.

    Improved media handling: With the help of the media browser, it’s very easy to add pictures, galleries, or videos to your article. You can upload new pictures to the media browser by just dragging and dropping. The pictures are cropped automatically and with the focal point, you can define the important part of the picture, which should be visible in every layout.

    Keep your users engaged with Riddle: With Riddle, any editor can quickly create professional quizzes, polls, or personality tests. Publishers can use these to generate more traffic on their sites and to monetize this traffic with lead generation or selling sponsored quiz slots.

    Multi-device video player: With the easy-to-embed media player nexxPLAY from nexx.tv, you get a powerful tool for video distribution. It enables live streaming as well as video-on-demand services for all relevant platforms. Plus, nexx.tv offers solutions for monetizing videos. Alternatively, you can include videos from Youtube or Vimeo to your article, too.

    Single Sign-On solution: The Harbourmaster is a multi-site, multi-device Single Sign-On solution, developed for the media industry by our industry partner Valiton. The Harbourmaster contains a Policy Server, User Directory, Authentication Gateway, and User Manager.

    Facebook Instant Articles: With drupal Thunder, editors may publish their content easily as instant articles on Facebook. This reduces loading times on the mobile web.

    Mobile Friendly: With the Thunder installation, you get a responsive theme for frontend and backend. When writing an article, you can check how your text will look on different smartphones and tablets with the help of the device preview.

    Demo Content and Guided Tour: We added demo content and a guided tour to make it easier for newcomers to understand how Thunder works. Step by step, we explain how to add an article, how to edit an article, or how to add and sort channels.

    Flexible System: With Thunder, you get a system with a very high scalability. It’s extendable with more than 2500 drupal modules to fit every need. Plus, it’s themeable.

    Big Drupal community: Benefit from an active community with more than 100.000 users actively contributing and more than 2000 commits per week. In the Drupal and the Thunder community, you’ll find support if needed.

I tried Drupal core and Drupal Thunder on simplytest.me to create a content, below are the screenshots for reference.

Drupal Core

Drupal core has the usual elements to create a basic article.

Thunder

Thunder has advanced content authoring options like SEO Title, Tags, authoring information.

Thunder

Features like Facebook instant articles, Google AMP, Google Adsense, Analytics, Nexx Video integration and much more.

Thunder features

How to find vendors for implementing Thunder distribution?

Thunder has established Certified Thunder Integrators (CTI), these are IT consultancies, developers, agencies, and similar IT professionals having a proven knowledge and practical experience in managing and implementing successful Thunder projects. CTIs need to be certified by the Thunder Core Team in order to be allowed to use the label ‘Certified Thunder Integrator’ and the associated badge to promote their services. Valuebound is one of the Certified Thunder Integrators and has worked on multiple projects with Thunder. If you are into publishing looking for someone to integrate the needs of a publishing platform with Drupal or Thunder we can help.  

Drupal Coding Standards and Best Practices

The work of a code is not just to execute a command but to make sure that it can be edited, updated and debugged.

When you first write a code in a language you prefer to write in your comfort level. However, a good code should always adhere to the standards of coding to ensure readability. And maintainability.

There are some particular areas where the members of a team might often have different preferences but will need to agree on something. It's a tough debate about the advantages and disadvantages any system over another. But being consist on a lot of these things have a large impact and advantage rather than being inconsistent: all of the members can read the code and that ensures one part  can be used as a reference or standard for another piece of code.

Coding standards are inevitable, and absolutely necessary whether it is being used by Drupal developer for drupal or any other language. These are a set of standard rules, guidelines and methods set for writing every aspect of code followed and maintained by the Drupal community.

These slides tell us about coding standards in general, Drupal coding standards, why they're important and how to implement them. A handy guide for a Drupal developer.

 

 

Getting Started With Drupal Commerce 2.x - Part 2

In the previous article, Getting Started With Drupal Commerce 2.x (Part - I) we have set up the Drupal commerce module 2.x and build the store. The next step to finish the basic commerce 2.x setup is to create Products.

Let’s have a detailed summary of e-commerce products creation in commerce 2.x.

1. Products :

Here we should note the main difference of Drupal Commerce 2.x (for Drupal 8) from Drupal Commerce 1.x (for Drupal 7). In Commerce 2.x, we now have such entities as Product and Product Variation. The product replaces product display of Commerce 1.x (node type, which has been linked to the products).

1.1 Product Attributes:

In Commerce 2.x product attributes is a drupal entity, So it is easy to edit, delete, create new attribute from.

To create commerce Products, first, we need to create Product attributes. On the Product Attributes page (admin/commerce/product-attributes) we add our attribute (eg, product size) and select a value that it can have.

For example, let’s add "size".


Add Product Attribute Page

1.2 Product variations:

The Product variation types page (admin/commerce/config/product-variation-types) we choose the Default product variation (or create our own), and add this attribute to the variation

Add Product Variation

A product variation can have several attributes. All the attributes of the product variations can be found in the list of fields (admin/commerce/config/product-variation-types/default/edit/fields). When creating a new type of product variations, you can use the already existing attributes.

In our example, the Default variation has one attribute — "size". This is a field that can be changed just like other fields. By clicking the Edit button, we can go to the editing mode.

Manage Fields in product variation

 

So for Size As an example, let’s set a default value.

Product Attribute Settings

A product variation may have various fields of different types (text, numeric, etc.), as well as other entities

1.3 Product Types

The Product types page (admin/commerce/config/product-types) we choose the Default product type (or create our own), and here we can add fields which will be added with the product entity. In manage fields in default product type (admin/commerce/config/product-types/default/edit/fields) we see Variations and Store are inherited in product and Body is a field added to it.

Product Type Fields

Let’s add an image field too

New Image Field in Product Type

These fields will be seen when we add products, which is the next step.

1.4 Creating Product:

Instead of nodes, we hare having Product entity itself. To create a product, let’s go to the admin/commerce/products page. We will have a product named “T-shirt” and the variations of this product in various sizes.

Add Product Page

This is how our first product looks.

The New Product Page

We have now done basic settings for an online store. The Drupal Commerce 2.x module supports a variety of options for implementing the desired features like shipping (commerce shipping module), Promotions (commerce promotions module). Recently Commerce guys are working on making these functionality stable.

Getting Started With Drupal Commerce 2.x - Part 1

Drupal Commerce 2.x overview

E-commerce in Drupal 8 is a very interesting topic for many developers and this blog is the right place to start with E-commerce in drupal 8.

Drupal Commerce 2.x is the module for creating online stores of varying complexity. This blog provides an overview of the Commerce 2.x module for Drupal 8.

In this blog, we will be focusing on following things

Installing Drupal E-Commerce 2.x

To install Drupal Commerce, make sure that your server has a Composer dependency manager installed. In Drupal 8, Commerce requires the installation of libraries, which are now installed not manually but with the help of Composer. Make sure Composer installed globally.

You can install Drupal, as well as Commerce together with the dependent modules and libraries with this command:

“composer create-project drupalcommerce/project-base mystore --stability dev”

Everything will be installed to “mystore” folder

Installing Drupal Commerce 2.x on an existing site

We need to do the following steps for Installing Commerce 2.x in existing Drupal 8.x site.

Step 1: Add the Drupal packagist repository which allows Composer to find Commerce and the other Drupal modules. For that run the following command,

"composer config repositories.drupal composer https://packages.drupal.org/8"

Step 2: The following command will he'""lp us to download the required libraries and modules (Address, Entity, State Machine, Inline Entity Form, Profile).

“composer require "drupal/commerce 8.2.x-dev"

Step 3: Enable the all commerce related submodules like  “commerce_product commerce_checkout, commerce_cart” , Use drush or drupal console.

"drupal module:install commerce_product commerce_checkout commerce_cart"

Settings in the admin interface in new Commerce 2.x

Go to the commerce settings (admin/commerce/config).

1. Currency :

It is very easy to use the currency inside and Outside the US.

First, you need to select your store currency (admin/commerce/config/currency). By default, the currency list is empty (you will see the message “there is no currency yet”). The list of currencies needs to be imported. Select the desired ones on the currency import page (admin/commerce/config/currency/import).

 

Import Currencies

Now, at the Currency page, we see a list of currencies.

Currency Page

2. Store :

In the version for Drupal 8, you can create a store or multiple stores , which may vary by products, currencies, tax settings, shipping countries and so on. In Commerce 1.x (Drupal 7) there was no such entity as "store".

You can create your own type of stores (on the admin/commerce/config/store-types page) and add a variety of fields. On the admin/commerce/stores page, click Add new store.

At this step, we configure the store: give it a name, specify its email, country, currency, and other settings.

 

Add A Store

Now, at the Store page, we see our new store.

 

Store Page

 

In this way, in Drupal 8 we can now create multiple stores that have different settings (email, address, default currency, tax settings, etc.).

Each drupal store will have its own cart and checkout. In the second part of this article, next week we will create products.

How does the Media Industry use Marketing Automation for monetization?

The Publishing industry has been proving its mettle.

Media and Publishing are aggregating all kinds of content and reaching it out to people through digital marketing and social media channels. The platforms are plenty and people’s time to focus is less.

The early adopters who belong to the Media domain set the path for innovation in the digital publishing industry.

Marketing Automation is widely used in the retail and e-commerce industry and is making its foray into the digital publishing world. Publishing information on the web requires regular and uninterrupted connection with the readers through a host of devices and channels and mediums, which is scaled up and requires a task of automation that which reacts to a trigger and can be handled to act by itself.

How can Marketing Automation help?

Marketing automation collects user information, couples it up with actions and segments which kind of data can be pushed to which kind of audience. This helps with targeted digital marketing to users. That being said, the main aim of marketing automation in digital marketing is to help with large-scale data analysis, optimization to handle actions like subscriptions and social media interactions.

Marketing Automation will help collect data about Call to Action buttons and actions like a form fill up, subscription, clicking an email to read and aid with marketing efforts. These data can be used by publishers to find out the engagement scores of individuals and help push marketing efforts to customers likewise at an individual level.

Audience development and marketing automation tools can provide greater efficiency, agility, and insight by combining capabilities in analytics, multichannel distribution, and automation. These capabilities allow magazine publishers to optimize their marketing platforms to move faster and more responsively to market nuances. By automating what type of content is sent to certain users (whether they only opened an email without clicking or deeply engaged with email content), publishers can segment their audiences and send more meaningful content to users. That content, because it is more precisely targeted can then spur the actions publishers want (subscriptions, social shares, comments, etc.).

More sophisticated tools, particularly those geared toward B2C segments, are distinguished by their ability to manage huge databases of customer information such as purchase history, demographic information, an online behavior. A publisher might want to compare how a subscription campaign performed among various demographics or regions. Publishers can then orient specific content or campaigns toward individual segments.

Mobile capabilities play a large part in enabling an omnichannel presence. Even a simple email campaign must now accommodate any number of unknown platforms and devices. When evaluating marketing automation or email marketing providers, publishers should particularly explore their mobile testing capabilities, as well as their ability to adapt to swift market changes.

Where do we find the implementations?

Marketing Automation is becoming more complicated and is now incorporating adaptive machine learning. Some of the largest publishers like Time and Sports Illustrated are using same automated tech to buy print ads. This is known as programmatic ad buying and helps cut down on manual work. Which in turn helps with revenue.

Configuration Management in Drupal 8 VS Drupal 7

In Drupal whenever you are making changes in settings configuration changes are made. For example if we enable a permission then its a configuration change. Another example is if place a block in a region it's a configuration change. It is not recommended to make configuration changes directed in live site. 

We make configuration changes in our local environment and then move these configuration to live site. But in some case there are configuration changes as well as content changes , For example Block creation is content changes and placing block is a configuration changes.

Below listed are considered configuration:

  • Content Types

  • Block Types

  • Everything under Admin -> Configuration

  • Everything under Admin -> Appearance,

  • Views.

Below listed are considered content and are not touched by this system:

  • Nodes

  • Custom blocks added on admin/structure/block/block-content

  • Users

  • Content for other entities

One of the best improvements in Drupal 8 is the new configuration management system. This post explains how things have changed from Drupal 7, and how Drupal 8  deals with configuration management.

Configuration in Drupal 7

If you’ve worked on site building or programming in Drupal 7, you have worked with the Features module. 

So we can say that Configuration in Drupal 7 is done by Feature module. Features made it very simple to do this and not have to remember all of the config changes.

Configuration Management System in Drupal 8

The configuration management system in Drupal 8 solves a lot of the problem which we faced with Features in Drupal 7. Below I explain how to use the Configuration Management system in Drupal 8 works.
 

Content in Drupal 8 vs Configuration in Drupal 8

In Drupal 8 is easy to understand what is considered configuration under database change and what is considered content in D8 data content change. In Drupal 8 configuration management system handles is configuration. Here are a few things that below listed  are considered configuration as in YAML file:

  • Content Types

  • Block Types

  • Everything under Admin -> Configuration

  • Everything under Admin -> Appearance,

  • Views.

Here are a few things that are considered content and are not touched by this system:

  • Nodes

  • Custom blocks added on admin/structure/block/block-content

  • Users

  • Content for other entities

Moving content from the environment to environment (not config) requires a different module flow (one example would be the Deploy module) and isn’t handled by configuration management.

Get Familiar with the Drupal 8 Configuration Management System

Hands-on learning are really the only way to understand Drupal 8 configuration management.  Create new sandbox D8 site or using a development D8 site locally so that you can experiment.  Once you have your environment set up work through some common use cases.  

Step #1: Enable Configuration Management and go to Synchronization admin page

Make sure the “Configuration Manager” module is enabled. Clear Drupal cache (drush cr) after you enable the module, which is included in Drupal 8 core.

Go to the Synchronize admin page: /admin/config/development/configuration.It will tell you the config files that have changed between the active configuration (what is in the Drupal DB) and what is staged (in the config YAML files) but also allows you to click on each row to view the exact differences.

Step #2: Export Your Active Configuration

Before you sync configuration between environments, you need to first do a full export of your active configuration by drush cex or by UI. This creates the configuration YAML files in your config_files directory. By default this directory is in your user uploaded directory, you change configuration path in settings.php where all yml will be saved.

There are below listed ways to export your active configuration change to the config YAML files in your sync directory:

  1. Run drush config-export (or drush cex)

  2. Go to the Synchronize admin page, click on the Export tab -> Full Archive and download the exported file. You then need to manually extract the compressed file and move those files into your config_files directory.

  3. Synchronize admin page(/admin/config/development/configuration) should not list any differences between your Active configuration (Drupal DB) and the Staging configuration (config YAML files). At this point, you can commit the config YAML files to your repository.

  4. The Synchronize admin page should not show any differences between your Active configuration (Drupal DB) and the Staging configuration (config YAML files). At this point, you can commit the config YAML files to your repository.

Step #3: Understanding Exporting and Importing Configuration

If you have used Features in Drupal 7, this should be familiar. There are two ways to handle configuration:

Export

This is what you did in Step #2. The configuration defined in your Drupal database and converting it to YAML config files. I suggest using the drush cex command to make this simple.

Import

Export provides a way to go from the Drupal database to config files. Import does the exact opposite. To do this you can click on the “Import All” button on the Synchronization page, or use the drush command: drush config-import (or drush cim).

To understanding the concept is that when you drush cex (export), you are having your config files deleted out and match your Drupal database config exactly. When you run drush cim, you are wiping out the configuration in your Drupal database and having it match what is in your config files exactly. This is important because you need to understand when you should run each of these commands. See the How to Avoid Issues section below for a way to easily avoid this problem.

For example, if you apply a config in the Drupal admin, and then run drush cim you are going to delete out the configuration change you just made in the Drupal admin. If you pull in config file changes from your code repository, apply a change in the Drupal config admin area and then run drush cex you will wipe out the new changes that were pushed to the repository.

You can refer drush based workflow doc page for more info.

Step #4: Enjoy your Drupal 8 configuration

At this point, your active configuration should 100% match your staging configuration. It is time to understand what happens when your Drupal config changes and when your staging config files change.

Drupal Config Changes (Drupal database)

Let’s make a very basic change in our Drupal DB configuration and see what happens.

(1) In the drupal admin area, make a simple config change. For example, go to /admin/config/system/site-information and update the Site Name field.

(2) Go back to the Synchronize admin page and notice what happens:

Configration changes in Drupal

It is telling you you're active and staging config do not match. Click on the View Differences button to see what has changed:

active changes in Drupal Configuration

(3) On the left, it is telling you what was changed in your Drupal DB configuration. On the right, it is showing you what is defined in the config files (staged).

(4)  when you run drush cex or drush cim is the best way to understand how things work. If you export what is in your active configuration will also be in your staged configuration (which is probably what you want in this case). don't , the change you just made that will wiped out and it will go back to what is in your configuration files.

Note: This illustrates the idea that if you pull in changed config files and update Drupal config in the admin right after that, you are going to be in a pickle in that you will either have to wipe out the changes in the config files or wipe out the changes you just made in the Drupal config! Later in the article, I document a process in avoiding this scenario.

Staged Config Changes (config YAML files)

Now we need to see what happens when the config files are changed. This would happen if someone exported new config they made locally and pushed to the repository. In this case, you usually want to make sure your Active configuration gets updated with what is in the config files so you don’t wipe out their changes.

(1) Make a same change by Drupal admin, directly to the config files. Now you don’t necessarily have to get comfortable working with the config files directly, but it does help to have a basic understanding of how the YAML works.

(2) Go to your config_files directory and open the system.site.yml file. Change the value under the “name” key to something different.

(3) Go to the admin synchronization page and click the View Differences button. It should look like this:

Differences in active and staging environment

Notice how the change, in this case, appears in the Staged column? That is because the change was done in the configuration files and not in the Drupal admin area.

(4) You need to run drush cim to get your active configuration from your config files. If you run drush cex at this point, it will wipe out what was in the config files.

Object-Oriented Programming Concepts in PHP - Part 2

In the previous article of Object Oriented programming concepts in PHP,  we learned to create a class, define objects for the class and create methods. We also learned about different topics of object-oriented programming like inheritance, interface, and abstraction.

In this article we will deal with php's Magic methods. Php classes are some predefined functions. Magic methods starts with the prefix __, for example __call, __get, __set. There are various magic methods in php. Here we will discuss some of the following magic methods of php which will be use in object oriented programming. First of, let us review some important magic methods with short description:

Description_Magical_Methods

Magic Methods:

The function names __construct(), __destruct(), __call(), __callStatic(), __get(), __set(), __isset(), __unset(), __sleep(), __wakeup(), __toString(),__invoke(), __set_state(), __clone() and __debugInfo() are magical in PHP classes.

We cannot have functions with these names in any of our classes unless we want the magic functionality associated with them.

Now Let us discuss the important Magical Methods,

Constructors:

    A constructor is the first function to be called even if n number of functions are there in the class. Constructor need not be initialized and called explicitly. It is automatically called when the object is created with the help of the new operator.

    The constructor allows sending the parameter to the class when the object is created.

Examples for the constructor:

Output:

Indian Tiger

An example of constructor in INHERITANCE:

Output:

Calling parent class constructor

Calling parent class constructor

Calling child class constructor

Destructors:

__destruct is the keyword for the destructor. A destructor is called automatically when the object is destroyed. The destructor is automatically called by the garbage collector when the memory allocated for the variable or the object holding the resource is no longer needed.

Example:

Output:

Calling the constructor

Calling  Destructor  object

__get():

    __get() is utilized for reading data from inaccessible properties.

    It accepts one argument, which is the name of the property.

    It should return a value, which will be treated as the value of the property.

Example:

Note that our student class has $Age commented out, and we attempt to print out the Age value of $obj. When this script is called, $obj is found to not to have an $Age variable, so __get() is called for the Student class, which prints out the name of the property that was requested - it gets passed in as the first parameter to __get(). If you try uncommenting the public $Age; line, you will see __get()is no longer called, as it is only called when the script attempts to read a class variable that does not exist.

__set():

    __set() is run when writing data to inaccessible properties.

    It accepts two arguments, which are the name of the property and the value.

For Example:

In that script, $mailid is commented out and therefore does not exist in the mytable class. As a result, when $mailid is set on the last line, __set() is called, with the name of the variable being set and the value it is being set to be passed in as parameters one and two respectively. This is used to construct an SQL query in conjunction with the table name passed in through the constructor.

__toString():

    The __toString() method is called when code attempts to treat an object like a string.

    It accepts no arguments and should return a string.

    This allows us to define how the object will be represented.

For Example:

Output:

Hello, how r u

Cloning Objects:

Object cloning is the act of making a copy of an object.When the object is created with the help of new keyword and assigned the object created to a new variable the object reference will be copied but not the value stored in that object. And now if we want to change the value of the object created the copied object variable will also be affected. Similarly, if we change the copied object, the created object data will be affected. So to solve this problem we will use the concept of cloning

For example Copy of the object

Output:

test object
(
   [a] => no arun
   [b:test:private] => technology
)

test object
(
   [a] => no arun
   [b:test:private] => technology
)

test object
(
   [a] => arun
   [b:test:private] => technology
)

Implementation of clone object in PHP:

Object cloning can be implemented by using clone keyword.

Example: Implementation of Object Cloning in PHP

Output:

test object

(

[a] => no arun

[b:test:private] => technology

)

test object

(

[a] => no arun

[b:test:private] => technology

)

test object

(

[a] => arun

[b:test:private] => technology

)

Object cloning with __clone magic method:

Suppose we need to change the value of property in clone object.The behavior of the clone object has changed by using magic method __clone in php.

Example: Object cloning with magic method __clone

Output:

test Object

(
   [a] => no arun
   [b:test:private] => technology
)

test Object
(
   [a] => no arun
   [b:test:private] => technology
)

test Object
(
   [a] => c
   [b:test:private] => technology
}

In this article we explained the important concepts of PHP OOP called Magical Methods.The PHP magic methods are used to react to different events and scenarios that your object might find itself in. Each of these magic methods are triggered automatically, so in essence, you are just defining what should happen under those circumstances. Hopefully each of the examples I’ve presented in this blog will help to you.

 

 

How Can Publishers Improve The Context of Ads

There is always a tug of war between buyers and sellers and the Media and Publishing industry is no different. Publishers are always on a lookout to increase their conversion sales and sell more, whereas the customer wants the most value from his buying decisions. With the onset of the digital era, the switching cost has gone down,  the amount of data available to the consumer is unlimited, and gaining the audience’s attention to the relevant content has become a challenge.  

How to stay relevant?

When everyone is sharing content, and telling stories about their brands, the only thing which can differ and give your content a boost is contextual targeting. It has become essential to ensure, the context of your advertising; be a stand alone differentiator with respect to other ads. By backing on data and insights, publishers can make better decisions about how the audience can be kept engaged along with where and when the audience is ready to make a buying decision. Using technology for audience targeting is meaningful, giving you an opportunity you to reach your audience at the right time and place.

What is contextual advertising?

Contextual advertising is often referred to as target advertising i.e. targeting to a specific user. Search engine advertising, Google Adsense are few examples of the same. Advertisers work on ad targeting to influence consumer decisions by grabbing their attention to the messages which are relevant to them, giving them a more customised and personalised experience. Thus, for contextual targeting, it becomes necessary to understand the context, it could be location, weather, traffic etc.; to deliver a good experience. Aggregating contextual data on users allows better ad targeting, relevant content and higher value ad inventory for publishers.

Contextual Targeting

 

Where to utilize contextual advertising?

Advertisers are doing ad targeting using cloud technology. For instance, location data from mobile devices enables publishers to know the interests and behavior of their targeted audience at a specific time and place, this helps them to share the right content at the right time. Then this data, can be used to do ad targeting and to create audience personas based on demographic data like income, education, gender etc and combine it with the behavioural aspect;  such insights enable advertisers to buy media algorithms to increase the value of ad inventories, and enable them in delivering valuable content along with greater conversions.

For example, if someone has a time constraint and is looking for directions to a particular location on their phone, a mobile advertisement at that moment will not be very effective as the user attention will be more keen on reaching the place on time. However, for a person who is waiting in a bank queue is more likely to have a purchase intent on seeing the ad. Thus, understanding the behavior with insights is one step deeper to these target advertising analysis, and enables one to capture the potential audience.

location used for context ad targeting

 

Geo-fencing allows showing advertisements within a certain geographical area. Many advertisers are already using this ad targeting technology to their advantage. For instance, one of the stores in Guatemala, uses technology to win over the competition. When customers with a smartphone enter the store, they receive a coupon for a discount—at a competitor’s store nearby. The coupon expires after a specific length of time, thus, trying to cash on the impulsive buying behavior using location and cloud technology. This is how technology and data is being used for audience targeting.

What to do next?

Publishers and advertisers should rethink their strategies and take a deep analysis as to where are the places where consumers encounter advertisements and then focus on capturing the micro-demographics of users and create individual personas to be able to target users down to a precise location and behavior to encourage participation and engagement. Mobile phones have created a revolution and enabled real-time tracking, giving advertisers enough real-time data to take advantage of context ad targeting. Advertisers should offer consumers value for sharing their data and build a barrier to value their rights to privacy so that the consumer sees the worth of sharing content. A highly engaged and a segmented audience is an opportunity for advertisers to seize with targeted advertising.

Download the Drupal Guide
Enter your email address to receive the guide.
get in touch