5 Things to know about Cloud if you are in Publishing

As Cloud computing garnered year-over-year traction in the enterprise world, companies have wondered if it would suit the needs of these organisations and if it is as a matter of fact doing today, how smooth would the transitions be. For over a series of articles we have been exploring and touching the areas that require the most of the attention when it comes to Cloud Computing Technology for the Media and Publishing houses.

In this latest article we plan to cover the summarized version of the previous articles and sum it up. Starting from the first article, we have explored 4 areas to begin with.

We have understood,

#1 What do Publishers’ have on their plate?

Streamlining it to the main categories

  • Enhancing experience for the consumers
  • Increase Revenue without compromise in business
  • Manpower Cost cut down

We have discussed that whether Cloud can be a solution to a particular firm will depend on the way the business and technology is. Each each Media and Publishing enterprise function differently and Cloud computing will not necessarily be a game changer on its own. But together with the integration and experimentation will emerge out to be one of the forerunners in scalability and match the speed with which consumers are absorbing experience.

#2 Who uses Cloud?

Discussed some of the big names in Media associated to Cloud - Time Inc.

#3 What benefits can Cloud provide?

  • Handling disruptions
  • Handling traffic demand
  • No infrastructure maintenance
  • Improve infrastructure without people
  • No people maintenance
  • Reduced Software Costs
  • Improved and Fast updates
  • Unlimited storage space
  • Worldwide accessibility without costs to set up data center

Understood,

#4 Different Cloud Technology Stack

Iaas - Infrastructure as a Service
Paas - Platform as a Service
Saas - Software as a Service

Discussed,

#5 Security issues with Cloud

Cloud computing vulnerabilities

When deciding to migrate to the cloud, we have to consider the following cloud vulnerabilities:

  • Session Riding
  • Virtual Machine Escape
  • Reliability and Availability of Service
  • Insecure Cryptography
  • Data Protection and Portability
  • CSP Lock-in
  • Internet Dependency

Cloud computing threats

Before deciding to migrate to the cloud, we have to look at the cloud security vulnerabilities and threats to determine whether the cloud service is worth the risk due to the many advantages it provides. The following are the top security threats in a cloud environment:

  • Ease of Use
  • Secure Data Transmission
  • Insecure APIs
  • Malicious Insiders
  • Shared Technology Issues
  • Data Loss
  • Data Breach
  • Account/Service Hijacking
  • Unknown Risk Profile
  • Denial of Service

With a brush up in understand the above points, we have summarized whatever we have discussed in the series of articles that we have been seeing from last week. For the next and the last article we plan to bring up a comparison of the companies that are offering Cloud Computing services to these organizations.

For further reads :
http://www-935.ibm.com/services/multimedia/fr_FR_Cloud_Computing_for_Media.pdf
http://cloud-computing.tmcnet.com/

Image Credit : http://blog.udn.com/jason080/9401738

Disclaimer: Screenshots, logos and other identification used in this article belong solely to the companies they represent.

Create Custom content type programmatically using Configuration API in Drupal 8

Drupal 8 has quality of utility tool could help anyone to develop custom module box. One of the tool is Drupal Console, where any developer can follow the Terminal Command and generate the boilerplate for source code. Which help us to reduce time to write chuck line of code. And also help us to overcome with error rate to produce zero marginal error. Kind of typo & syntax error ;) . if you haven’t aware of Drupal Console then just go through it by installing on your local Drupal 8 instance. For fresh code like creating block or user or view or node I will suggest you boilerplate code. But as a New learner my suggestion would be always to write line by line code.

Here is the command that you need to generate Custom Content type using Drupal Console  generate:entity:bundle [options]

This article is specifically for Custom Content Type creation in Drupal 8. Most of the time developer don’t like to use Admin UI, just to get the better flexibility and hands on self-constructed content type. So the only way to achieve this by creating new Content type as a module and keep on adding own choice of attributes.

To begin with this tutorial I assume reader has basics. Even if you don’t have I will make sure to go through each one of them. So without wasting time let’s start.

Prerequisites: 

  • Drupal 8 installed.
  • Custom module “creates any module with your choice of name”. 

Creating custom content type required multiple YAML files contain necessary configuration. In this tutorial we are going to create one content type called “Book_detail” with two default fields title and body.

Step 1: Create .info.yml file as in Drupal every module is initialized with this info file. Kind of mandatory for module. Now .module is no longer necessary to create a custom module. We can proceed without .module also.

As you can see .info.yml file has module name, type[new in D8], description, core, & dependencies. Let us know about module name, what is the type, description, core compatibility & if has any dependency respectively.

Step 2: Creating a Custom content type.
Folder structure: book_detail /config/install/node.type.book_detail.yml

Step 3: Adding field to the content type. Currently we are adding body field to our custom content type.
Folder  structure : book_detail/config/install/field.field.node.book_detail.body.yml

Step 4: This file is about teaser view of custom content type.
Folder  structure : book_detail /config/install/core.entity_view_display.node.book_detail.teaser.yml

Step 5: This files holds default display of custom content type.
Folder  structure : book_detail /config/install/core.entity_view_display.node.book_detail.default.yml

Step 6: This file tells how form should be displayed when creating a new node from custom content type.
Folder  structure : book_detail/config/install/core.entity_form_display.node.book_detail.default.yml

As you can see I used minimal no of configuration file where developer should be able to create custom content type with teaser view, default view, form display, body field, node type and info file. If you go to each code snapshot there is not much to describe but I will do it for you.


On node.type.book_detail.yml

  1. langcode: langcode stands for language code. If langcode is NULL the current content language is used.
  2. dependencies:It's advisable to add enforced dependency to custom module. if you won't add this to module, Drupal will not remove content type while uninstalling.
  3. name:Name of the Content type

     Book Content type
  4. type: machine name of Content type.Content type machine name

     

  5. description:Content type short description on content type listing page.
     

    Content type description

     

  6. new_revision: Allow admin to SET  "create new revision" option
     

    Content type revision

     

  7. Preview_mode: Allow author to “preview” node option before submission.
     

    Content type preview mode

     

On “field.field.node.book_detail.body.yml”  you will find  language, status  and dependencies using field.storage.node.body & node.type.book_detail with module text which defines simple text field types.

id: node.book_detail.body
This attribute represent field ID.

field_name : body
name of the field, which is ‘body’

entity_type: node
Tells whether this field belongs to which entity.  As we mentioned it node.

bundle: book_detail
This field belongs to Custom content type ‘book_detail’

label: 'Book Description'
The field label name.

Book Content type body label name


description: 'More specific information about the book.'
The short description of the field.
 

Book Content type body description

required: true
We can make body field mandatory too, by setting the required value true or false.
 

Book Content type body field mandatory

translatable: true
To make the content type translatable we can set the value true false.


default_value: { }
If you really wish to pre define default text  for body section, you can fill up value here

ex:  default_value: 'optional detail data instruction.'

for null value
default_value: {  }
This is how it has to display default value on back end as well as in front end.
 

Book Content type body default value

display_summary: true
Displaying summarized value of body text. We can enable/ disable it by making field value true/ false.
 

Book Content type body field display summary

field_type: text_with_summary
This is one of the type of Text field where site admin can configure own choice of text input type. So we need to pass field value on field_type.

Drupal 8 provides 6 different type of text field and they are:

  • Text (plain, long)
  • Text (formatted, long, with summary)
  •  List (text)
  • Text (formatted)
  • Text (formatted, long)
  • Text (plain)

 

Book content type back end


field_name: body with field_type: text_with_summary, with bundle: book_detail, label: ‘Book Detail’, description, made field is not required, translation Is ON, default value is blank, display_summary  is TRUE

 

body field listing under book content type

On core.entity_view_display.node.book_detail.default.yml &  core.entity_view_display.node.book_detail.teaser.yml  used  to display  default & teaser view of the node. The only difference in both the files that teaser has dependency of core.entity_view_mode.node.teaser with unique id for each one of them. targetEntityType: node,  bundle is own custom content type.  Mode is different for teaser and default.  Content body has hidden label as we do on manage field, with weight and trim length.

Almost every attributes is being covered earlier, but some of theme I would like to elaborate here. They are “Content “ under this you will find the list of the field need to be display on default & teaser view with weight order label, type of display, third party settings.
There is one section called hidden: { } , currently it is blank but if you really want to hide some of the field from display then you can mentioned those fields over here.

Syntax:       hiding two fields  url / Autored on
                      hidden:
                                 created: true
                                 field_pointing_urls: true


in case we have nothing to hide, make it blank
                     hidden: {  }

On core.entity_form_display.node.book_detail.default.yml has langcode, status with dependencies of config file field.field.node.book_detail.body.  unique id, targetentityType :node, bundle: book_detail, mode is default, content has body with hidden label, text with summary and weight.

Now we have all of the configuration files in place, we need to inform Drupal about our new custom content type. This is done just by enabling module. If your module was already enabled, uninstall the module and enable it again.

If you now go to the Create content page, you will see that you're able to create a new node of the content type "Book Detail".

Custom content type configuration files

Conclusion: This Article covers basics of Custom Content type creation using configuration API, where we have created Custom Bundle with a body field. And also gives you little knowledge on  different view of node includes teaser and default. My suggestion would be to get more hands on experience on these custom bundle creation, you can create content type from Admin UI, with few different variety of field, add a field level configuration to the same with manage display. Export / import the configuration back & forth and see the changes. I belief it will help a lot to get the better understanding on various attributes.

Source Code: https://github.com/xaiwant/D8CustomContentType.git

Why big government websites are switching over to Drupal

The open source Drupal CMS powers some of the biggest government websites. Now what do government websites and media & entertainment websites have in common? A lot of functionalities and end goals are similar. Media websites have subscription forms, personalized data delivery, large data warehouses, events and related forms, publishing tools, marketing tools, transactions etc.

The Georgia Technology Authority was running 65 state government websites on two different versions of proprietary software - Vignette 6 and Vignette 7, one of which is no longer supported. It had become cumbersome and expensive. Apart from that, moving all the 65 sites to Vignette 8 was too much of a hassle. CTO Steve Nichols says, “As we dug in, all the obvious best choices were open source,”. The most obvious and the strongest of those contenders turned out to be Drupal, which powers Whitehouse.gov and other key federal government sites. For a new CMS for all the 65 websites there were two important criteria to be met. First, it had to be a complete enterprise solution and second was the need to move off the proprietary model which is too expensive. Another criteria was the major market share. 

layout of whitehouse.gov


Excepting it’s popularity in the private sector, Drupal has an enormous market share in government as well as the public sector in general. Over 150 of the federal government sites are using Drupal, the list includes biggest sites like the white house, NASA, Department of education, Department of energy, Health, Defense, Transportation, Agriculture and even the Department of homeland security. In 2009, it was decided to migrate whitehouse.gov and all it’s associated sites to Drupal. This perhaps, gave the open source platform its sizable credibility and confidence to other government agencies to follow to same route.

When big government sites like whitehouse.gov and NASA, which store huge amounts of data, prefer Drupal, it’s no wonder that many other private media companies are following the suit for their own websites.

layout of NASA.gov


The department of energy decided to migrate their website to drupal when they felt that their website, energy.gov, needed immediate attention. They were facing typical problems like low traffic, high bounce rate and the website design was built based on an internal office structure which was troublesome to navigate. “The prior CMS supporting Energy.gov was outdated,” said Cammie Croft, director of new media and citizen engagement for the department’s Office of New Media. She also mentions that the Energy Department had a lot of outdated technologies.

Cammie Croft sought for a platform that would be scalable and be able to adapt to a number of requirements which would be the current needs and those yet to be discovered. A platform that would capacitate the Energy department and allow it to evolve and expand as quick as user’s needs. After the completion of migrating the energy.gov to Drupal, it resulted in cost savings upward of $10 million annually. This was achieved by consolidation of duplicative digital technology platforms, internal hosting along with the new Drupal platform to circulate information, rather than building new stand alone websites.

layout of energy.gov
Drupal is used and maintained by a community of more than 630,000 global users and developers. Drupal is free for download, use and share under the terms of GNU General Public Licence. At the most basic level, Drupal wins the financial part of the argument because of it’s open source model. Drupal spares the users from expensive licensing fees and proprietary lock-in. As a result the saved costs can be reallocated to other departments and functionalities, adding value in other areas. “With Drupal, agencies can share and reuse code, reducing labor costs, and drastically accelerate the pace with which every agency can innovate.” said Kurt Voelker, CTO of Forum One Communications, the vendor behind a Drupal build for the International Programs Center of the U.S. Census Bureau. After the White house chose Drupal as it’s platform for development, debates and criticism surrounding the security and compliance issues do not have much clout. Drupal has made major accomplishments on security and compliance issues along with constantly sticking to strict best practices and also access to all the source code for auditing purposes.

Albeit there are many companies which are still wary of Drupal, mainly because of the fear of giving up reliance on proprietary solutions like Sharepoint and completely migrating to a LAMP stack solution, or requirement for different set of skills for maintaining a completely different  and complicated platform integration. Another blocker commonly faced is the reluctance to move agencies in the midst of long term contracts for windows software as many own sharepoint as an existing deal.

But Drupal’s ability to integrate is “limitless,” said Treehouse Agency’s Caccavano. “It is very compatible with other solutions and services. That’s probably one of its greatest strengths.” Proprietary solutions for CMS like Sharepoint, will likely coexist Drupal and other open source platforms. Microsoft was listed as one of the only three leaders by Gartner in its ‘Social software in the Workplace Magic Quadrant’ in September. Gartner predicts that more enterprises will use Sharepoint to enable social solutions as compared to any other platform. Because of Sharepoint’s popularity and established name in the marketplace, clients are ready to pay the licensing and maintenance fees rather than opting for the open source platforms. Drupal can be easily adjusted to a very large as well as small deployments is because it works on a modular system. In Drupal, “Distributions” are sets of modules, functionalities and features created for a specific audience. OpenPublic, an open source CMS based on Drupal, created by Phase2 Technology is a good example of a distribution catering specifically to the needs of government. 

The outlook for Drupal is positive, considering its extraordinary growth within the public sector. Apart from the reasons why government websites prefer Drupal, there are plenty other features Drupal has to offer which easily facilitate a big and complicated website which require complicated systems. With the release of Drupal 8 in 2015, there is a lot of flexibility in terms of grouping functions and inheriting or deriving particular characteristics which one would want to repeat in different parts of the website. 

Disclaimer : Screenshots, logos and other identification used in this article belong solely to the companies they represent.
Image credit - JuralMin

How can Drupal be used to develop data driven web applications?

Everything about building a website or a web application is not just coding and hosting an app. It includes a thorough ecosystem research and co-designing a scalable product to cooperate and compete within the networked internet of things. Drupal is the perfect platform to build large systems like CRM system or ERP system, which is complicated as well as data oriented.

The data acquired is first organized appropriately and then analyzed to make essential business decisions. Various underlying platforms serve critical aspects in the complete system, which work really well with applications developed with Drupal.  Management, governance and security are always on the top of the list when it comes to media and entertainment companies.

Building a complex website with Drupal is like a ladder worth climbing. You will have complete access to modules created by some of the most sought after developers in the world also, your website will run on a CMS that is designed for maximum scalability, customization and reliable maintenance. You can get endless features with Drupal using the horde of modules available, many of which are maintained by professional developers. Read more about reducing costs with big data.

How can Drupal facilitate a complicated data oriented website?  Let us look into some key features that Drupal has to offer.

CONTENT TYPES: With content types and views you can build easy to use forms that will aggregate the information entered, in all the required places. For example, when a user wants to add a new event to the site, they can fill out a simple form which will mainly include fields for the title, long or short descriptions or both, venue, date and time, duration of the event and the required Call-to-Action links. After the user submits the information, all the pieces of information are put in their rightful place including a brief introduction in the calendar, full description on the events page and a teaser on the homepage.

The same concept is used for  any type of content one would like to apply onto their website. User types, products, ads, teasers etc.

FLEXIBILITY: Drupal is a really flexible platform. The right developers can shape the system into whatever you need. It is configured to suit your needs today and also scalable to a large extent to facilitate your future needs.

SECURITY: Drupal has a really good track record in terms of being secure. It has an organized process for verifying, investigating and publishing possible security issues.
It has a dedicated team which is constantly working with the community to address security issues and they come up. 
Members of the security team sometimes perform analyses of core or contributed project code, especially if there is a weakness that can be found by easy scanning. 

SCALABILITY: If your website gets hit with a lot of traffic, it is possible that your site can go down and it won't matter even if you are delivering the world’s best digital experience. Drupal has the capability to keep your website running when you are really popular. More than a million sites are powered by Drupal worldwide for eg: Grammy awards and NBC Olympics because the get hit with traffic bursts at times. Drupal’s scalability ensures that your site will perform fabulously and always run on turbo mode even on the busiest days. 

Drupal is a great choice for for sites that will continue to grow over time. The perfect example would be examiner.com which keeps growing.

ROBUSTNESS: Apart from its scalability, Drupal platfrom is quite capable and it can handle a small mom-and-pop marketing brochure websites to huge data oriented sites like grammy.com (which can handle millions of users on the website within a period of two hours without crashing or even a glitch). No matter what size project you are looking at, Drupal is quite adequate and efficient to handle it.

FLEXIBLE FRAMEWORK: Rather than just a CMS, Drupal is a flexible framework. Drupal offers a solid foundation of solutions that majority of websites and web systems require. you can build on top of that to create any application that you require. Additionally, once the system is built in Drupal, not only can you bolt on new features in the future, there is a large community of users out there that can pick up where one left off.

OPEN SOURCE COMMUNITY:
The Drupal community is massive and very active. Of all the technology communities with which We’ve interacted, not one matches the Drupal community. Everyone is focused around the act of sharing and helping their fellow Drupal users grow. Rarely does one stumble across someone that isn’t willing to share or educate. And most of the time the answer to one of your questions (challenges) is just a Google search away. This helps shorten development time so that your websites are up and running quickly even if you come across a challenge. 

Here are some real-world examples of using Drupal for Big Data in action:

  • Consumer product companies and retail organizations are monitoring social media like Facebook and Twitter to get an unprecedented view into customer behavior, preferences, and product perception.
  • The government is making data public at both the national, state, and city level for users to develop new applications that can generate public good. 
  • Financial Services organizations are using data mined from customer interactions to slice and dice their users into finely tuned segments. This enables these financial institutions to create increasingly relevant and sophisticated offers.
  • Advertising and marketing agencies are tracking social media to understand responsiveness to campaigns, promotions, and other advertising mediums.
  • By embracing social media, retail organizations are engaging brand advocates, changing the perception of brand antagonists, and even enabling enthusiastic customers to sell their products.
  • Web-based businesses are developing information products that combine data gathered from customers to offer more appealing recommendations and more successful coupon programs.

To conclude, Drupal is the most sought after platform to build complicated data oriented systems by larger companies. It can power small to large sized businesses alike. It has a great open source community. It’s features like security and scalability are more advanced as compared to the other content management platform and development framework providing companies. It can be incorporated with big data management and is the perfect platform for it because of it’s robustness.
 

How secure is Cloud Computing for Media and Publishing websites?

Cloud computing is such a popular topic, because it was built to reduce cost and save resources. With the growing demand of online presence and digitization of news, it is the need of the hour for Media and publishing enterprises and all leading Publishing houses to take it into serious consideration to move a chunk of the work from their data centers and networking centers over to Cloud to reap the benefits of less spends and less maintenance, however the Cloud Computing Technology comes with certain liabilities as threats and vulnerabilities, in this post we go through what exactly to expect from Cloud in terms of security.

Vulnerability:  Vulnerability is a prominent factor of risk. ISO 27005 defines risk as “the potential that a given threat will exploit vulnerabilities of an asset or group of assets and thereby cause harm to the organization,” It is seen as an opportunity for attackers to exploit for personal gain, measuring it in terms of both the likelihood of an event and its consequence.

Threat: Threat is an entity that attacks system takes advantage of its vulnerabilities and uses the exploit to his own advantage.We often tend to confuse and blur the line between security issues in Cloud and security issues in general.

 

Cloud computing
http://www.ibm.com/developerworks/cloud/library/cl-cloudthreats/

 

When is a Vulnerability Cloud Specific?

  • If it is intrinsic core cloud computing technology
  • If it has relation to one of NIST’s cloud characteristics
  • When technology is upgraded in Cloud and that makes security mechanisms tough to be implemented
  • Already present in Cloud

Cloud computing vulnerabilities

When deciding to migrate to the cloud, we have to consider the following cloud vulnerabilities:

  • Session Riding

  • Virtual Machine Escape

  • Reliability and Availability of Service

  • Insecure Cryptography

  • Data Protection and Portability

  • CSP Lock-in

  • Internet Dependency

Cloud computing threats

Before deciding to migrate to the cloud, we have to look at the cloud security vulnerabilities and Cloud Computing threats to determine whether the cloud service is worth the risk due to the many advantages it provides. The following are the top security threats in a cloud environment

  • Ease of Use

  • Secure Data Transmission

  • Insecure APIs

  • Malicious Insiders

  • Shared Technology Issues

  • Data Loss

  • Data Breach

  • Account/Service Hijacking

  • Unknown Risk Profile

  • Denial of Service

Enterprises are adopting the cloud computing services in every day operations, but it’s often not the case they really understand what sort of thing is coming next. Cloud users should know the good and bad about the attacks and about the links that are weak. There are multiple ways a black hat hacker can do to dig into the system and cause damage. Security awareness is an often overlooked security concern.

 

Image Credit : http://core0.staticworld.net/

How Drupal handles the page request: Bootstrap Process

This is an interesting topic to get to know more about Drupal core activity. We will be looking into ‘how to use drupal echo on request?’ and ‘how many process it has gone through?’ Basically the process flow of Drupal Pipeline to interpret the steps & finally respond to the end users. Which is called as Bootstrap Process.

Having a little bit of knowledge on bootstrap could help us to develop & customized complicated area of drupal development.

Sample:
When we hit URL in browser: domain-name/node/234. which is a standard node page created under any of the Bundle.

Page request

The server responds on the browser request with the output and the same is rendered in the browser.

Page response

 

Technically, when a server receives a URL request, for eg: domain-name/article/lorem-ipsum,  drupal instantly takes care of the internal path & separates it from the domain name. Sometimes you will find a url with texts that do not really explain the content of the page for Eg: domain-name/?q=node/234. By enabling “Clean URLs” it help us to give a better suited url and make the it relevant and clean.

In Drupal each page request goes through index.php. You will find the index.php file in the Root directory of drupal.
So before we get started with the actual topic which is bootstrap process, i would like you to explore index.php. 
What does it contain?
Basically it has 4 lines of code that get called on each page request.

1. define('DRUPAL_ROOT', getcwd());
2. require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
3. drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
4. menu_execute_active_handler();
 
define('DRUPAL_ROOT', getcwd());

The first line defines a constant, DRUPAL_ROOT, containing the file path to the Drupal installation.

require_once DRUPAL_ROOT . '/includes/bootstrap.inc';
The second line used is a constant, to load bootstrap.inc in the includes/subdirectory.bootstrap.inc and contains PHP code. Drupal uses the *.inc extension to prevent files from being executed directly. This way, not everyone can plug in example-name/includes/bootstrap.inc and get back a valid page.

drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
The third line of code, drupal_bootstrap() does the initialization. It basically checks for a connection to the database, loads modules, loads needed data into memory, and prepares everything for the final line of code in index.php.

menu_execute_active_handler();
The fourth line of code has menu_execute_active_handler() function, which handles the page request. This is the part that takes the ?q= half of the URL and produces a web page for the end users.

Get Started
Bootstrap process has total of 8 phases which initialize the database, set sessions, load libraries and so on.

DRUPAL_BOOTSTRAP_CONFIGURATION:  This setups configurations, sets error and handles exception. This function is called upon when Drupal encounters a PHP error or exception. attempting to log any errors or exceptions that may occur, and then throw a 500 Service unavailable response. In this process, error handling code is prepared, php settings are modified, settings.php gets loaded and some key global variables that Drupal uses throughout are initialized.

set_error_handler('_drupal_error_handler');
set_exception_handler('_drupal_exception_handler');

drupal_settings_initialize();
drupal_environment_initialize()

DRUPAL_BOOTSTRAP_PAGE_CACHE: It is used to serve the page from the cache. It checks if the requested IP is blocked or not, if it is blocked then it returns a  ‘403 Forbidden’ response. This depends on whether a user is logged in or not and if caching is enabled to decide whether to try to serve the page from cache (or at all).
If page caching is enabled, and the request is asking for a cached page, it returns the page.

drupal_block_denied(ip_address());
$user = drupal_anonymous_user();
$cache = drupal_page_get_cache();

 

DRUPAL_BOOTSTRAP_DATABASE: This Initializes the database connection and redirects to install.php if no $databases array has been defined in settings.php yet. If the call is from testing system (in which case it uses a separate set of tables) it loads database.inc, and more.

If we don't have anything in $GLOBALS ['databases'] and we haven't already started the installation process, then we get booted to /install.php since Drupal is assuming we need to install the site.
It registers the autoload functions for classes and interfaces

drupal_autoload_class()
drupal_autoload_interface() 

DRUPAL_BOOTSTRAP_VARIABLES: This loads variables from the variables table.
It will load all the variables from the database variables table and then overwrite the ones that were defined in settings.php. module.inc and any .module files that are required during the bootstrap phase will be loaded.

few important details:

It tries to load variable from the cache first, by looking for the variables cache ID in the cache_bootstrap table. If cache has failed, it tries to acquire a lock to avoid a stampede if a ton of requests are all trying to grab the variables table at the same time. Once it has the lock acquired, it grabs everything from the variables table and then it finally releases the lock.

DRUPAL_BOOTSTRAP_SESSION: This Initializes the user's session and
load the user's session from the DB. If the request isn't from a logged in user, it returns an anonymous user.

Drupal registers custom session handlers with PHP:

session_set_save_handler() PHP function allows us to set your own custom session storage functions, As you can see above, Drupal implements its own handlers for all 6 of those.

drupal_session_initialize()

Drupal has 6 session handler:

_drupal_session_open() and _drupal_session_close() Used for opening & closing the connection. both return TRUE;.

_drupal_session_read(): Fetches the session from the sessions table.

_drupal_session_write(): Checks if the session has been updated in the current page request page.

_drupal_session_destroy(): Deletes the appropriate row from the sessions DB table and sets the global $user object to be the anonymous user, and deletes cookies.

_drupal_session_garbage_collection(): Deletes all sessions from the sessions table that are older than whatever the max lifetime is set to in PHP.
 

DRUPAL_BOOTSTRAP_PAGE_HEADER: It sets HTTP headers to prepare for a page response.
This is probably the simplest of the bootstrap levels. It does 2 very simple things in the _drupal_bootstrap_page_header() function.

bootstrap_invoke_all('boot');
for uncached pages, this is where it happens.

Sends initial HTTP headers
It will sends a couple default headers (Expires and Cache-Control). anything can be called with drupal_add_http_header().


DRUPAL_BOOTSTRAP_LANGUAGE: It initializes the language types for multilingual sites.
This function is called only if we're talking about a multilingual site. It checks drupal_multilingual() which returns TRUE if the list of languages is greater than 1, and false otherwise. If it's not a multilingual site, it escapes.

DRUPAL_BOOTSTRAP_FULL: This includes a group of other files and executes a few other miscellaneous setups. The phase name is better thought as "Last", rather than "full". It loads all enabled modules and invokes hook_init().

So now that we already have the database, variable, session and configuration, we can add other miscellaneous .

All those things that we didn't need yet but may be reuired after this, we require here. ajax.inc, or mail.inc, or token.inc, image.inc, file.inc.

Load all enabled modules
The module_load_all() grabs the name of every enabled module using module_list() and then runs drupal_load() to load it.

Conclusion:

Bootstrapping is a self starting process that proceeds without an external input. It is the process of loading basic required software into the memory which will take care of loading other processes if needed.

There is lot of information and practice required. My intention was to provide a fair knowledge on the process. This is a good time to stop for now since each phase in the bootstrap process requires more in depth knowledge & information. Each phase of the bootstrap process contains a lot of code. While I could write an article in summarized way, there is a lot more to cover.

In a short note, How drupal deals with page request ? Drupal bootstraps on every request by going through different phases. These phases defined in bootstrap.inc

To summarize the steps:

When end user request for page.

What Drupal does:

  1. Separates the internal path from the full URL.
  2. Bootstraps and initialize the database, sessions etc
  3. Maps the path to a callback function.
  4. Modules can hook into the process and extend functionality and alter the content.
  5. The Theme System generates the HTML and styles it.
  6. Drupal returns a fully formed HTML page to the browser
  7. The browser renders the HTML page for the user

What are the benefits of different Cloud Technology Stack?

Cloud computing might come across as one of the solutions for industries which are looking to outsource storage and maintaining issues. The world of Digital Media is moving forward tremendously and it has become very necessary to take inventory of what you are working on and what needs change.

In the previous article, we got introduced to Cloud Computing for Media. This article presents us with a broader view about how exactly is the Publishing Industry getting benefited. We also explore different stacks in the Cloud computing domain.

Who uses Cloud?

Time Inc is one the largest Media and Publishing giants, it has an in house data center on the 21st floor, but “it is not on the 21st floor, is IS the 21st Floor” Colin Bodell, the then CTO explains. He understands the limitations of “held capital”. Colin’s main agenda from the time he joined has been to shift TIME’s in house data center to Cloud infrastructure. He says that getting new hardware on board is time consuming. Time doesn’t want to be on data center business, wants to be what time does best - Write, Publish. They no more have to hire or select talent who would maintain data centers or manage a department to look after that.

Moving some of the data centers is cost effective for enterprises. Hosting costs for Time has come down from 70k to 17k and now they have an - enterprise data center it is more agile , has more speed and more power, can handle traffic surge in peak times with ease.

Cloud computing applications brings down the cost for operations and maintenance. It is hassle free and service provider handles maintenance for things beneath the application layer. You choose a vendor and post migration, your work is much smoother and requires far less attention than before. You do not have to get bothered while deciding to invest lump sum into hardware.

What benefits can Cloud provide?

  • Handling disruptions

  • Handling traffic demand

  • No infrastructure maintenance

  • Improve infrastructure without people

  • No people maintenance

  • Reduced Software Costs

  • Improved and Fast updates

  • Unlimited storage space

  • Worldwide accessibility without costs to set up data center

What is the Cloud Computing Stack?

Infrastructure as a Service (IaaS):

Infrastructure as a Service, sometimes abbreviated as IaaS, is a pack of virtualized computing resource. It contains the basic building blocks for cloud IT and typically provide access to features such as networking, computers (virtual or on dedicated hardware), and data storage space. It is exactly like its name it provides infrastructure. It provides you with the highest level of flexibility and management control over your IT resources and is most similar to existing IT resources that many IT departments and developers are familiar with today. It also covers automation of administrative tasks, dynamic scaling, desktop virtualization and policy-based services.

Platform as a Service (PaaS):

Platforms as a service remove the need for organizations to manage the underlying infrastructure (usually hardware and operating systems), it provides a platform allowing customers to develop, run, and manage applications without the complexity of building and maintaining the infrastructure typically associated with developing and launching an app, and allows you to focus on the deployment and management of your applications. This helps you be more efficient as you don’t need to worry about resource procurement, capacity planning, software maintenance, patching, or any of the other undifferentiated heavy lifting involved in running your application.

Software as a Service (SaaS):

Software as a service (SaaS) is another method to standard software installation in a traditional work environment wherein the user has to build the server, install the application and configure it. Customer do not pay for the software itself, they rent it or pay in time or other parameters. Saas provides you with a completed product that is run and managed by the service provider. In most cases, people referring to Software as a Service are referring to end-user applications. With a SaaS offering you do not have to think about how the service is maintained or how the underlying infrastructure is managed; you only need to think about how you will use that particular piece software. A common example of a SaaS application is web-based email where you can send and receive email without having to manage feature additions to the email product or maintaining the servers and operating systems that the email program is running on.

Although Cloud comes with the utmost levels to flexibility and scalability, there is considerable talk about how efficient can cloud computing be to help reduce capital expenses; however is is less likely with traditional Publishing companies to shift completely to Cloud. Cloud opens the doors to the greatest opportunities for media companies where there is is content storage, media processing and distribution services co located. There is a lot to weigh in on this so on our next article we plan to discuss the challenges for working with cloud.

Image Courtesy : ComputerWorld Columbia

Setting up variables using preprocess & Process

Preprocess is one of the methodology used to declared the variable so that it can be placed easily on template files. Why does Drupal follow this approach?  It is to keep the Code clean and structured so that it would be pretty readable and easy to understand for post developer & also easy to extend. 

The preprocessing hook provides front-end developer more control over the output and make it more efficient, clean, markup.  It just needs some basic PHP knowledge, but after reading this blog everything will be more clear.

Before I start I am assuming you have basic knowledge of Drupal template files. If not then please visit drupal.org or Goooogle it. Drupal core / Contributed module produces output in template files. If you haven’t seen till now, please look into it, it will help to understand in a deeper level. These templates usually have HTML markup & PHP variable.

For example:  A template file “node.tpl” is located in “modules\node” folder and  their objective is to print node attributes. As you can see node attributes is bound with

How is the Publishing industry dealing with Cloud technology?

The speed with which Media and Publishing enterprises are innovating and moving on from one technology to the next, keeps us wondering what’s next and on the line for these firms. Over the past few weeks in our articles we have been discussing a lot about some of the new technologies, and how they are beneficial for organizations especially in the Media domain.

In this post we explore Cloud Technology for Digital Publishers.

What are the common issues in the Digital Publishing domain?

Fast Browsing experience

Websites which have viewers from a large variety of viewer base have certain expectations from the industry leaders and are constantly raising their standards higher. No one expects to wait for a few seconds to let a web page load.

Digital Publishing website have known to contain rich media content like videos and images for every article displayed on screen in a single page and there are plenty. We deal with too many links, pop ups and these tend to slow down performance.

The question arises as to how to make the browsing experience better keeping in mind about resources, because let's get real, at the end of the day if the balance sheets don’t show growth you are going wrong somewhere. The teams are bugged with issues and one of the major is ,

Increasing sales by increasing focus on content

Content is widely available  these days and if you are not getting enough traffic on your content, probably someone has already written it better or used strategies that has helped bring more viewership. Which leads us to the consumers, with the above in focus, CEOs are required to

Cut down costs and bring down Manpower

Decreased labour, resources and working capital costs. These organisations are always on the outlook to innovate with optimum utilization of resources and no compromises on content where protection is one of the major issues of concern to any website which deals with data.

Modern day technology is really moving fast and enhancing the content processing software can improve performance of websites, cut down costs and bring down run time charges for a Media organization and solve some of the major issues that Media executives are dealing with. These will augment the core competencies and enable them to thrive.

Cloud computing presents a new hope for the Media industry and which allows Cloud computing represents a fresh approach to these these ongoing issues which aim to manage the issues with outsourced and managed services solutions.

One of the first things that come to the mind when we hear about cloud technology is AWS or the Amazon Web Services. I visited the websites and it featured three videos from some of the leaders in the media domain. They discuss some of the major happenings in their domain. The FT CTO says that they have transformed with focus on being as embedded and as close to the newsroom and business as possible. We see the Comcast solution Architect speak that Comcast is an “Advanced network that delivers some of the fastest high speed internet speeds, high speed videos as well as home offerings” . Businesses are all gearing up for Scalability, elasticity, global availability says Eva, Director at Netflix.

Financial Times on Cloud
Cloudtoo.co.uk


The AWS CEO points out "In the fullness of time, whether it's ten years or 20 years, very few companies will own their own data centers, and those that do will have a smaller footprint than they have now. The transition will lead to qualitative changes in the enterprise, Jassy said.

Data won't just inform decisions, it will drive decisions, Jassy said. That's already happening with enterprises that have already gone all in on cloud”

Whether Cloud can be a solution to a particular firm will depend on the way the business and technology is. Each each Media and Publishing enterprise function differently and Cloud computing will not necessarily be a game changer on its own. But together with the integration and experimentation will emerge out to be one of the forerunners in scalability and match the speed with which consumers are absorbing experience.

Over a series of articles we plan to discuss about Cloud Technology and its Potential for the Media domain.

For further reads visit -

How are top 10 Publishers dealing with AdBlocking?

In the last week I wrote about how the Media industry is getting affected by Adblockers. We saw that there has been an estimated loss of global revenue of $21.8B due to blocked advertising. On finding out the same we planned to do a survey of how the top 10 websites which appeal to most of the audience in the world fight against AdBlockers.

It gives us a brief idea how the giants respond to Adblocking. Given the nature and size of the business these businesses are set out to lose a good chunk of money due to Adblocking.

To get a non-biased view of the industry we took help of the Alexa ranking which gave us a list of the top ranking websites according to traffic. These websites were then chosen based on the fact that they are all news websites which display a lot of ads.

I for one always use Adblocking, simply because it is very annoying to browse a website or read something with distracting ads, not that they are irrelevant and at times when they appear in a browser I even happen to click, but for regular use I prefer a clean view. I cut it out, and I do not visit the site anymore.

NDTV AdBlocking

This site for one, has a rigid policy on adblocking and would not allow to read the news without disabling Adblocker.

There are several types of ads which are displayed on the websites that we have documented here. I have used AdBlocker Plus extension in Google Chrome and have taken screenshots of the pages with and without ABP.

The difference can be spotted between the two images below. The one without AdBlocker has ads marked out in red.

1. BBC shows traditional ads mostly with the inclusion of ads of other products of the website. They mostly keep it clean othwerwise.

BBC

 

2. Forbes

They have the regular adsense ones which are on display and very nicely blend in with the website and makes it totally bearable.

Forbes

 

3. Fox News have a lot of ads and they are mostly promotional from the website itself

Fox

 

4. The Guardian - They have a super nice panel at the bottom of the page which says “We notice you are using Adblocker. Perhaps you will support us another way? Become a supporter for less than $1/£1”

Without the AdBlocker installed you will get to see ads linked with online shopping sites via Google Ads. They also ask you for a one Year subscription request similarly using a nicely placed pannel at the bottom of the page.

Guardian

 

5. The Huffington Post

They show you Google ads and also some others, not necessarily based on searches.

Huffington Post

 

6. Indiatimes - The stark difference with and without AdBlockers is very noticeable.

Look how clean it looks without the ads on the left side of the image below.

Indiatimes

 

7. The New York Times have very much blend - in and soothing ads which ask us for buying a subscription based version of the website for viewing. No other ads whatsoever are shown.

NYT

 

8. Reuters have minimal ads and they are from Google again. Using AdBlockers have little effect on the site, out of two ads that are being displayed, one of the ads remain. It is not annoying, and Reuters are doing it in a way that should be acceptable to the mass

reuters

 

9. The Weather Channel have local traditional ads and some Google ones. A little too colorful

weather

 

10. Yahoo! Has found out ads from searches I did a few months back! Also contains traditional ads. And a hell lot of ads of Yahoo itself. We can SEE it Yahoo, you couldn’t have been more prominent!

And we have one important thing to notice that AdBlocker doesn’t have much effect on the Ads

yahoo

 

Not all ads are annoying and not every publisher is throwing the reader down the gutter. Publishers need to understand the reader base. Of Course publishers need ads to survive and we understand that.

But Publishers need to understand why AdBlockers block ads. A report by Adobe and Pagefair presents the statistics.

They find that,

  • (45%) of adblock users expressed a complete lack of desire to view any advertising and wanted as many ads as possible removed from websites.

  • 17% of respondents cited that privacy concerns were the reason for using an adblocking plugin.

  • 30% of current adblock users were open to some types of advertising. Intrusive ad formats were the key reason why they chose to block ads.

And there lies an opportunity here which is the key, as we have seen above ads which are less annoying and distracting do not necessarily have to be omitted out except for a few users.

The report validates our finding, that the majority of adblock users reject only distracting (animations, sounds) or intrusive (popover, interstitial, non-skippable video) ads. Adblock users can be respected by serving them non-intrusive ad formats.

Disclaimer : The Websites have been arranged alphabetically and not according to the Alexa Ranking. Also, respective screenshots, logos and other identification belong solely to the companies they represent.




 

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