Subscribe to Drupal News feed
Drupal.org - aggregated feeds in category Planet Drupal
Updated: 2 days 15 hours ago

AddWeb Solution: Drupal Meetup By Team AddWeb

Mon, 06/25/2018 - 05:52

Drupal meetups are all about gathering up the Drupal-ers around the local community and helping the community grow at large. AddWeb Solution Pvt. Ltd. recently took up this initiative and organised a Drupal Meetup in Ahmedabad - India’s first heritage city declared by UNESCO.

 

A little about AddWeb and its association with Drupal

AddWeb is an outsourcing agency, based out of Ahmedabad with its clientele spread across the globe. Being an active member and contributor of Drupal community, AddWeb has been doing its bit for Drupal community from time to time. The recent one, being this Drupal Meetup held on 9th June 2018 at AddWeb premises.

, ,

About of the Meetup

The meetup was organised with the primary goal of elevating the local Drupal community and the secondary goal of promoting new ideas to strengthen Drupal in our area. The meetup was designed and divided under 3 different sessions, each session meant to bring us closer to our goals. Below is the brief hint on what each of these sessions was about:

 

1) Decoupled Drupal

An open discussion about the most talked about thing coming from the house of Drupal. In the meetup, several aspects of Decoupled Drupal were discussed.

, ,

2) Component-Driven Front-end Development

Drupal is bringing in some major changes and innovation to its existing format. Component driven front-end development is one such innovation that needs your attention.

, ,

3) Decoupled React Editorial Experiences

A remotely setup session that was supposed to be taken by Ruben Teijeiro from 1XInternet, did not happen due to last minute urgency of the speaker.

 

Though the third session couldn’t be conducted, AddWeb has promised to incorporate it in the next meetup that we organise. All in all 50+ Drupal-ers joined us in the meetup and shared their insights on both the conducted sessions. Overwhelmed by their active participation and enthusiasm for the event, we’re motivated to plan more such Drupal Meetups in future. Let’s unite and keep on making efforts to build the Drupal scenario is our respective geographical setups. Because Drupal-ing is fun!


 

Event Sponsor: AddWeb Solution Pvt. Ltd.

Venue Sponsor: AddWeb Solution Pvt. Ltd.

Event Organizer: Ashish Jain

OSTraining: Build a Mega Menu with Ultimenu and Bootstrap in Drupal 8

Mon, 06/25/2018 - 00:19

One of our customers asked how to build a mega menu in Drupal 8.

Mega menus are menus with multi-column navigation. They are fastly becoming a trend in web design.

The Ultimenu module allows you to insert Drupal blocks into a menu. You can easily build with it fairly complex menu layouts with little effort.

In this tutorial, you will learn how to build a simple mega menu using the Ultimenu module and Bootstrap.

Jacob Rockowitz: Webform Accessibility @ Design4Drupal

Sun, 06/24/2018 - 21:27

Putting together my presentation about Webform Accessibility for Design4Drupal proved to be more challenging than I anticipated. I proposed this session to force myself to begin to address accessibility in the Webform module for Drupal 8. I mistakenly thought that I could do some research and become an accessibility expert. I assumed learning about accessibility was the same as learning a new programming language - you read a book, review the docs, write some code, throw out some code, refactor other code, learn about design patterns and - voila! - you now know a new programming language. I was wrong - getting up to speed on accessibility is very challenging.

Learning about accessibility can be overwhelming

Between screen readers barking text at you and massive well-thought-out guidelines, I discovered that understanding accessibility could be overwhelming. I thought I could enable VoiceOver, the screen reader built into OSX, and start using it. Instead, I was only able to digest VoiceOver in small five minute bites, trying to reckon one of the most challenging pieces of software I have ever used. I found myself empathizing with anyone with a disability attempting to navigate a website. Frankly, many people with disabilities are likely forced to give up trying to browse websites that don't care about accessibility.

Why do I care about accessibility?

My difficulty loomed large enough that I considered coping out and seeing if I could just do a general Webform presentation at Design4Drupal. There are three other accessibility related sessions scheduled, and I am willing to assume that these presentations are going to be more thorough...Read More

Mediacurrent: Friday 5: 5 Questions about Gatsby.js

Fri, 06/22/2018 - 15:16

Happy Friday everyone! This episode Front End Developer, Grayson Hicks joins the show to answer some questions about Gatsby.js, an up and coming static site generated that you can use with Drupal or any other data source.

Ashday's Digital Ecosystem and Development Tips: Things to Consider When Writing a Drupal Integration

Fri, 06/22/2018 - 15:00

One of the many things Drupal excels at is integrating with other services. Some popular integrations are made even easier by the existence of contributed Drupal modules (such as the one for Google Analytics). But, many times, there isn't a ready-built solution, or the one that's available doesn't quite suit your needs. At Ashday, we've built many integrations between Drupal and other systems, and although every integration is different, there are some things we've learned that are good to consider when writing most any integration.

Aegir Dispatch: DrupalCamp Montreal 2018: Hosting Drupal Sites? You need Aegir!

Fri, 06/22/2018 - 14:48
On Friday, June 15th, Christopher Gervais and I presented at DrupalCamp Montreal 2018. That’s the annual gathering of the Drupal community in Montreal, Canada. Session information: Do you need a self-hosted solution for hosting and managing Drupal sites? Would you like be able able to upgrade all of your sites at once with a single button click? Are you tired of dealing with all of the proprietary Drupal hosting providers that won’t let you customize your set-up?

Evolving Web: DrupalCamp Montreal : My First Drupal Experience

Fri, 06/22/2018 - 14:14

Our summer intern, Ami Koga, attended her first DrupalCamp June 14-16 in Montreal. Here are her impressions from the camp:

Before the Camp:

My name is Ami Koga. A couple weeks ago, I started my summer internship at Evolving Web. I had no idea about Drupal before starting at Evolving Web. I did a bit of research on it beforehand; and the internet gave me some basic information such as 

  • Drupal is a free open source content management system

  • Drupal is easy to use

  • Drupal users are supported by a big Drupal community

This was all very abstract to me until I attended DrupalCamp Montreal. Now that I have experienced the DrupalCamp vibes, attended presentations and training, and gotten involved in the Drupal community by volunteering at the camp, I have a much better understanding of what Drupal is.

Training Day:

The first day of DrupalCamp, I went to a Drupal training called “What is Drupal? An Introduction to Drupal 8”, presented by our team lead Suzanne Dergacheva. It was an Introductory Drupal course and the training was available both in English and French. It was my very first time trying out Drupal; and, I was able to understand why the internet claims that “Drupal is easy to use” over and over again. We started with installing Drupal (of course, it was free!!), then, we played around with it by adding content, inserting pictures, changing fields, etc. I created the following basic website within 2 mins without knowing any coding knowledge. Very simple, fast and easy.

Camp Day:

On the second day, I attended the camp as a volunteer, as well as a team member of Evolving Web. During the registration, I noticed a large variety of people came to sign in; all ages, all genders, from different cities, but all gathered for the same common interest: Drupal.

Moreover, the people who stopped by at our company’s booth were very passionate and motivated to learn more about Drupal, and chat with us about their future projects. “Wow, Drupal is actually used by many people from different fields”, was my first impression at the DrupalCamp. Beginners, developers and agencies are all part of the community and all seemed happy to discuss problems and ideas related to Drupal.

Presentations:

Overall, the presentations were the main and most fun part of the DrupalCamp. My Evolving Web colleagues presented 12 sessions, so I got to learn a lot from them! Here are some of the presentations I saw :

  1. Our Co-founder and front-end lead, Suzanne Dergacheva was the Keynote speaker. She gave a presentation titled, “It’s All About the Experience: What I’ve Learnt from Talking to Thousands of People About Drupal.” The essence of the presentation was that we can learn a lot by looking at the Drupal experience from different perspectives and thinking about the personas of people who interact with Drupal. This gave me some insight into the Drupal community and who makes up that community.
  2. Our Co-Founder and Technical Lead, Alex Dergachev presented, “Migrating 10000 Classic Books to Drupal 8.” He discussed the technical and business motivations for the project, and provided a technical overview of the Drupal migration.
  3. Our UI/UX Designer, Annika Oeser gave us 10 tips on designing a website, so that we can make our own website projects. Annika's talk gave me insight into the web design process and how designers and developers interact.
  4. Our Senior Drupal Developer, Jigar Mehta and Marketing & Content Manager, Meyzi Mazalto gave a presentation on Accessibility. Making a website more accessible can also improve the SEO value and usability of your site.

 

In summary, the 3 day long DrupalCamp gave me interesting insight about the Drupal Community. It was highly beneficial to my development as an intern at Evolving Web and I was glad that I took the opportunity to get involved in this community as it opened up a “window” for me into web development and design.

+ more awesome articles by Evolving Web

Colan Schwartz: DrupalCamp Montreal 2018: Hosting Drupal Sites? You need Aegir!

Fri, 06/22/2018 - 11:09
Topics:  On Friday, June 15th, Christopher Gervais and I presented at DrupalCamp Montreal 2018. That's the annual gathering of the Drupal community in Montreal, Canada. Session information:

Do you need a self-hosted solution for hosting and managing Drupal sites? Would you like be able able to upgrade all of your sites at once with a single button click? Are you tired of dealing with all of the proprietary Drupal hosting providers that won't let you customize your set-up? Wouldn't it be nice if all of your sites could automatically get free HTTPS certificates?

If you said yes to any of the above questions, there's only one option: the Aegir Hosting System. While it's possible to find a company that will host Drupal sites for you, Aegir helps you maintain control whether you want to use your own infrastructure or manage your own software-as-a-service (SaaS) product. Plus, you get all the benefits of open source.

We'll cover:

  • History
  • Architecture
  • Basic features
  • Advanced features
  • Development workflows
  • Recent additions
  • Future
  • Questions & discussion

A one-hour video recording of our presentation is available on YouTube, and our slides (with clickable links) are attached here.

This article, DrupalCamp Montreal 2018: Hosting Drupal Sites? You need Aegir!, appeared first on the Colan Schwartz Consulting Services blog.

File(s):  Hosting Drupal sites? You need Aegir!.pdf

OpenSense Labs: How can Augmented Reality and Drupal Come Together

Fri, 06/22/2018 - 09:46
How can Augmented Reality and Drupal Come Together Shankar Fri, 06/22/2018 - 19:16

Reading a fantasy book, envisaging yourself living in an imaginary world, and identifying yourself with your favourite character - such is the feeling of reading a book full of imaginations which stays with you for a long long time. We all try to visualize something far from the reality and technological advancement has made it possible to not only imagine things but to actually see them right in front of our eyes. Augmented reality is the futuristic tech marvel that can be integrated with Drupal to build a tech genius.

Source: iStock

So, what is Augmented Reality (AR)? Gartner defines AR as the real-time use of information in the form of text, graphics, audio and other virtual enhancements integrated with real-world objects. It is this “real world” element that differentiates AR from virtual reality. AR integrates and adds value to the user’s interaction with the real world, versus a simulation.

The evolution of AR is staggering and interesting at the same time.

How did Augmented Reality come into being?

Today informational overlays layered on top of the physical world is the talk of the town. Back in the 1960s, 1965 to be precise, Ivan Sutherland talked about immersive displays in an essay and created the first-ever head mounted display in 1968.

The user of one of today’s visual displays can easily make solid objects transparent - he can “see through matter!”
- Ivan Sutherland  Timeline of Augmented Reality 

Krueger demonstrated collaborative interactive overlays of graphical annotations in 1978. Fast forward to 1990s, we would witness plenty of research works and prototypes. In 1992, terminology called Augmented Reality was for the first time seen in a research at Boeing. Subsequent discoveries like KARMA in ‘93, first medical AR application in ‘94, Studierstube in ‘96, The Touring Machine in ‘97, and ARToolKit in ‘99 paved the way for many complex innovations post the millennium.

The launch of Pokémon Go had almost 45 million users at its peak in 2016. More recently, in 2018, Google displayed AR street view mode to help you in the real time in addition to personalized recommendations to discover new places around you.

A smartphone showing Google Map's augmented reality feature

Today, AR developers have a lot of options to choose from when it comes to software platforms dedicated to AR. But these inventions had a lot to offer in terms of guidance and model.

Types of Augmented Reality

AR did come a long way to go for commercial use. There are different classifications within AR.

  • Marker-based AR: It is also known as image recognition AR is the easiest to implement. It used a trigger object to display content. Google Goggles, Popcode, and ScanLife are some of the examples.
     
  • Markerless AR: It is more versatile than the market-based AR. In place of trigger object, it uses cameras, GPS and accelerometer information to track the user location and offer them relevant content. Examples of markerless AR include ARIS and Layar.
     
  • Projection-based AR: It projects digital images directly onto a surface within the user’s surrounding. Disney theme park has employed projector camera toolbox that builds 3D objects to enhance theme park experience.
     
  • Outlining AR: It uses image recognition to outline shapes and boundaries. It can be used to help drivers see the edges of the highway in dim light for safe driving.
     
  • Superimposition-based AR:  It uses object recognition to replace an object within the user’s surrounding either partially or fully with a digital image. For instance, a surgeon can use such technology for adding digital x-rays over a part of a patient’s body during a surgery.
Applications of Augmented Reality

Whether it’s transportation or sports, AR has a lot to offer for different industries. Let’s see all of them.

Retail industry can reap the benefits of AR to a great effect. IKEA has an AR application called IKEA Place which allows customers to preview thousands of virtual furniture in the actual room within their home.

Source: Entrepreneur

Transportation sector can also explore AR to simplify their work. Aero Glass have created AR headsets that can display airports, navigation points, terrain features etc. for the pilots.

AR can be a big boon for the sports industry. Stubhub developed a feature on their mobile application that would allow ticket buyers of the Super Bowl to see a virtual 3D model of the stadium and the surrounding area.

It has immense potential in the education sector as well. An application like AR Flashcards Animal Alphabet can help children in learning alphabets easily by bringing flashcards to life.

Healthcare industry promises to be one of the most important areas for AR to be explored with a vast potential. AccuVein uses AR technology to help nurses find veins more easily while inserting IVs.

Source: Hackernoon

Marketing sector can’t be far behind. In 2014, by installing outward facing cameras in a London bus shelter and projected UFOs, robots, balloons, and tigers, Pepsi took the promotional campaign to a whole new level.

Working Principle of Augmented Reality

AR is great on so many levels for a multitude of industries. How does augmented reality work?

Sensors can be found on the outside of the AR devices that gather data regarding user’s real-world interactions and process them.

Cameras, also located on the outside of the AR device, scan the surrounding area and uses this information to determine the appropriate output.

Projection based AR works through miniature projector which is found in an outward-facing AR device. They can turn any surface or object into an immersive environment. The data collected by the cameras is projected onto the surface through projection-based AR devices.

AR devices are like mini-supercomputers that require a great deal of computer processing power. They use many of the same components that the smartphones do which includes CPU, GPU, flash memory, RAM, Bluetooth/Wifi microchip, GPS microchip, etc.

AR devices can also use mirrors for reflection to help in viewing the way our eyes view the virtual image. While some AR devices may use an array of small curved mirrors, other AR devices can use a double-sided mirror with one surface that reflects incoming light to the camera which is side-mounted and the other surface would reflect this light to the user’s eye.

Drupal and Augmented Reality Use Cases

A Drupal agency built a chatbot prototype which assisted customers to select recipes based on the health constraints and their preferences. Interactive experience with the chatbot could make their life easier and forbade them from intensively researching for their grocery shopping. To improve it further, they tried to integrate AR in Drupal.

The demonstration shown in this video displayed a shopper interacting with the AR application. The mobile application of Freshland Market (a fictional grocery store), built on Drupal 8, guided the shopper through her shopping list.

It also assisted her to make better decisions while shopping through AR overlays. It superimposes relevant details like price, product ratings, and recommendations over the shopping items detected by the smartphone camera. The mobile application personalised the shopper’s experience by displaying the products that were best for her dietary restrictions and her preferences.

Source: Drupal.org

Drupal’s web services support and JSON API module helped in serving content to the mobile application. The Drupal 8 site of Freshland Market stored all the product related information including price, dietary constraints, and reviews and ratings. If Drupal content for one of the products is edited to show the item as being on sale, it automatically reflected in the content superimposed through the mobile application. In addition to this, the location of the product was also stored on the site to guide the shopper to the product’s location in the store.

The application was developed using AR library, Vuforia, which identifies pre-configured targets like images of product labels. For instance, in the demonstration, it identifies tomato sauce and cereal labels. Each of these targets was given a unique ID to query the Freshland Market’s Drupal 8 site thereby finding the content related to those targets.

Another use case is the Lift HoloDeck prototype which was built using commercially available technologies like Drupal(content store), Acquia Lift(a personalised engine), Vuforia(AR library) and Unity(3D game engine).

Lift HoloDeck team built a mobile application that superimposes product information and smart notifications over real-life objects that are detected on the smartphone’s screen. It could change the way customers interact with brands and improve the customer experience.

Let’s say a user informs about his purchases to a coffee shop through this mobile application. When he enters the shop, he would show his phone screen displaying “deal of the day”. The application superimposes dietary information, directions on how to order, and product information on top of the beverage. By going through the nutritional facts, he would order his preferred choice and would receive notification that his order was ready to be picked up. 

Future of Augmented Reality Source: Gartner

What is the future of augmented reality? Gartner Hype cycle discovery in 2017 suggests that it will take another 5 to 10 years for the mainstream adoption of AR.

Forecast AR & VR market size worldwide from 2016 to 2022 (in billion US dollars) Source: Statista

The graphical representation, mentioned above, clearly states that AR is going to be a force to reckon with in the coming years. The market share of AR is going to witness a dramatic transformation in the coming years.

 

Source: Hackernoon

By 2025, the biggest industries for AR, as shown in the graph above, will be the gaming and the healthcare industries followed by the engineering, real estate, and retail sectors.

Conclusion

The world is changing. And it is changing at an unimaginable pace. Technologies like augmented reality were once a part of our huge list of fantasies. Many of your fantasies can come true with this awesome piece of disrupting technology. With Drupal as a content store, designing an AR-driven web and mobile applications can be highly rewarding for your organization.

Ping us at hello@opensenselabs.com to get the best of Drupal and augmented reality for your future businesses.

blog banner blog image Augmented Reality Drupal Blog Type Articles Is it a good read ? On

Drupal Europe: E-Commerce track at Drupal Europe 2018

Fri, 06/22/2018 - 09:40

The e-commerce industry continues to grow rapidly year over year, bringing more merchants online and driving larger profits. With that growth comes the increased need for rich content, innovative product merchandising, and integration into an ever increasing number of third party sales, marketing, and fulfillment tools. Drupal has always excelled as a platform for building unique customer experiences, and it continues to come into its own as an adaptive sales platform via projects like Drupal Commerce.

Photo by Mike Petrucci on Unsplash

This track includes content that helps merchants understand how to start and grow their online businesses, demonstrates to developers how to build ambitious e-commerce sites, and incorporates solution providers who improve the whole process via integrations.

In the e-commerce track you will learn how to start to sell online, how to grow your existing business and reach a wider audience, and the best tools to use for developing your platform.

The track is focused on the following topics:

  • Drupal vs other e-commerce solutions: comparison, the cost of entry and scale
  • What competitive advantages does Drupal bring to online merchants?
  • What are the benefits of Drupal-native eCommerce solutions vs. integrating external systems?
  • Case studies for unique or ambitious implementations of Drupal for e-commerce
  • Latest trends in eCommerce (e.g. payment, fulfillment, security, taxes, etc.)
  • Latest trends in building eCommerce websites (e.g. headless, multichannel, AI, etc.)
About industry tracks

As you’ve probably read in one of our previous blog posts, industry verticals are a new concept being introduced at Drupal Europe and replace the summits, which typically took place on Monday. At Drupal Europe these industry verticals are integrated with the rest of the conference — same location, same ticket and provide more opportunities to learn and exchange within the industry verticals throughout three days.

Now is the perfect time to buy your ticket for Drupal Europe. Session submission is only open for a few more days so please submit your sessions and if encourage others who have great ideas.

Please help us to spread the word about this awesome conference. Our hashtag is #drupaleurope.

To recommend speakers or topics please get in touch at program@drupaleurope.org.

About the Drupal Europe Conference

Drupal is one of the leading open source technologies empowering digital solutions in the government space around the world.

Drupal Europe 2018 brings over 2,000 creators, innovators, and users of digital technologies from all over Europe and the rest of the world together for three days of intense and inspiring interaction.

Location & Dates

Drupal Europe will be held in Darmstadtium in Darmstadt, Germany — which has a direct connection to Frankfurt International Airport. Drupal Europe will take place 10–14 September 2018 with Drupal contribution opportunities every day. Keynotes, sessions, workshops and BoFs will be from Tuesday to Thursday.

Valuebound: Integrating Headless Drupal with AngularJS

Fri, 06/22/2018 - 02:02

This post is the last part of AngularJS series where we have discussed all of the essential concepts and knowledge you need to get started. The series covers a wide range of topic, including an Intro to AngularJS, Data binding methods, Modules & Controller, Filter,…

Freelock : This is Why You Need Another Backup

Thu, 06/21/2018 - 18:12
This is Why You Need Another Backup John Locke Thu, 06/21/2018 - 16:12

At 12:27pm, our alerts started firing. Multiple ones -- website down, server down, secondary monitoring -- one of our client's servers had completely disappeared off the Internet.

I confirmed that I could not reach the site, or the server, and then looked up our AWS credentials for that customer. They didn't work. Then I tried to call two different contacts at our client, leaving messages, and sent an email asking if they needed assistance restoring their AWS account.

The answer came back 20 minutes later, after our client checked their email account associated with AWS.

Backup Drupal Planet hacked site Security

Acro Media: Memory Usage in PHP - Dealing with Arrays

Thu, 06/21/2018 - 10:45

Drupal is built on PHP so any developer working with Drupal needs some PHP knowledge. PHP memory management is something that can initially be a difficult concept to grasp.

In this Acro Media Tech Talk video, Rob Thornton covers PHP arrays and how they use memory. He goes over various examples, helping to shed some light on how to use arrays effectively. Along the way, Rob discusses passing arrays by value vs. by reference and shares some tips about each.

If you find this video helpful, you may also be interested in these related topics:

OpenSense Labs: How important is JSON API for a Headless website

Thu, 06/21/2018 - 10:19
How important is JSON API for a Headless website Raman Thu, 06/21/2018 - 19:49

There has been a rapid increase in the popularity of JavaScript frameworks since their introduction in early 2010. They provide powerful architectures to build fluid, responsive and user-friendly web applications. Moreover, there are more people than ever using their mobile devices to access the digital content, hence building native applications for your site makes sense. 

Drupal has realized the potential of this market and has added the support for building RESTful APIs into the core. But the RESTful Web services of Drupal core does not provide a very robust solution out-of-the-box. You need to enable all the resources, configure the endpoints, verbs, authentication mechanisms, and create views with REST export to build the desired solution.

RESTful Web services of Drupal core do not provide a very robust solution out-of-the-box

But even then, the APIs built this way, do not necessarily follow any widely accepted guidelines or specifications like JSON API. You can always write custom logic, but luckily there is a contributed module for that. Before understanding this how this module proves to be a robust solution to build decoupled applications, let us clear some basics.

What is an API?

In terms of web services, an API is an agreement or a contract of request and response between the server(provider) and the client(consumer) for the purpose of exchange of data. It is that element bridges the front end and the back end. It defines which resources are accessible, who can access them, and how to access them.

What is JSON?

JavaScript Object Notation (JSON) is the most common data format for exchange of data over web services. It has primarily replaced XML due to its lightweight nature. It is easier for humans to read and for machines to parse. It is supported by almost every modern programming language and framework.

JSON API specifications – What and Why you should consider implementing them?

The JSON API specifications are a set of standards and conventions that describe how the APIs should be served by the servers and consumed by the clients for exchanging data in JSON format. The key benefits of implementing these specifications include:

  • Consistency
    The front end developers expect a consistent structure and behavior from the APIs while consuming them to build the applications.
     
  • Widely accepted and supported
    The specifications are widely accepted and implementations of client libraries can be found for almost every programming language and framework.
     
  • Efficiency
    The specification is designed to keep the number of requests and size of the data to a minimum.
     
  • Productivity
    There are numerous ways of designing an API and as a developer, you will often find yourself in an argument on what are the best practices or conventions to build an API. By following these set of standards, you can eliminate this and focus on building the application. 

Now, that we understand the foundations, let us see how does the JSON API module help in building a headless website in Drupal.

JSON API specifications of what and why are important. Downloading and installing JSON API module

The module has a dependency on the Serialization module, so enable it first and then download and install JSON API using any of the below methods:

Using Drush $ drush en serialization -y $ drush dl jsonapi && drush en jsonapi -y Using Drupal Console   $ drupal module:install serialization $ drupal module:download jsonapi && drupal module:install jsonapi Using UI Enabling JSON API and Serialization modules
  • Navigate to Manage → Extend → Install new module and enter the .tar.gz or .zip URL of the module and click on Install.
  • Once the downloader finishes downloading, click on “Enable newly added modules”.
  • Select the Serialization and the JSON API module under the Web Services package and click on “Install”.
How does JSON API help?

The module provides an implementation of the above-discussed specifications for Drupal. Following are the set of features of the API provided by the module.
 

  1. Zero configuration required – Production-ready out-of-the-box

    As soon as you enable the module, it exposes all the resources with appropriate verbs, endpoints, and fields. It allows no configurations to be modified (more on that later). This ensures that API always follows the JSON API specifications and also makes the deployment quick and easy.

    All the bundles get their unique endpoints, in case an entity does not have a bundle, the entity type is repeated. For example, in case of articles, it will be /jsonapi/node/article but for users, it will be /jsonapi/user/user. We need to specify the UUID (Universally Unique Identifier) of the entity, else we will receive a “collection” of the entities.

    The standard Drupal permissions determine the accessibility of the resource. So, you may need to authenticate using Basic Auth or OAuth to perform certain operations.

    You can make the following standard requests to perform CRUD operations on the resources. Note that the configuration entities only support the read operation, i.e. only the GET request.
      Accept: application/vnd.api+json Authorization: Basic {base64 encoded username + password} Content-Type:application/vnd.api+json GET /jsonapi/{entity-type}/{bundle-name}?_format=api_json GET /jsonapi/{entity-type}/{bundle-name}/{uuid}?_format=api_json  POST /jsonapi/{entity-type}/{bundle-name}?_format=api_json PATCH /jsonapi/{entity-type}/{bundle-name}/{uuid}?_format=api_json DELETE /jsonapi/{entity-type}/{bundle-name}/{uuid}?_format=api_json For example, the following request will return a JSON response of the collection of all the articles (paginated in the sets of 50 articles per page). GET /jsonapi/node/article?_format=api_json To get a specific article you need to specify its UUID. For example:  GET /jsonapi/node/article/6a1571e0-26c7-423f-8ff5-04b2e4deb6d3?_format=api_json Retrieving a collection of articles
  2. Include relationships

    A “relationships” object contains all the related information to the resource. This may be the author, entity references, image fields, revision details, etc. Usually, you would have to make additional requests to retrieve further information. But instead, we can add a request parameter “include” and specify the required fields of this related information to be retrieved.

    All the additional fields will be available in the “included” object. This ensures that we receive all the required data in one single request. You can even use nesting in the relationships, i.e. if the object further has relationships, it can be specified using the “.” operator. GET /jsonapi/{entity-type}/{bundle-name}?_format=api_json&include={relationships-object} For example, the article bundle has an image (entity reference) field, we can retrieve its path along with the article as follows. GET /jsonapi/node/article?_format=api_json&include=field_image This time, we will receive the JSON data with an “included” object along with the data. As you may notice, it further has UID in the relationships object, we can retrieve that by using include=field_image.uid.  "included": [         {             "type": "file--file",             "id": "e7f9cd27-3cd0-43d3-b205-b46e88d09109",             "attributes": {                 "fid": 12,                 "uuid": "e7f9cd27-3cd0-43d3-b205-b46e88d09109",                 "langcode": "en",                 "filename": "gen50F1.tmp.jpg",                 "uri": "public://2018-04/gen50F1.tmp.jpg",                 "filemime": "image/jpeg",                 "filesize": 5652,                 "status": true,                 "created": 1523243077,                 "changed": 1523243077,                 "url": "/drupal-8.4.4/sites/default/files/2018-04/gen50F1.tmp.jpg"             },             "relationships": {                 "uid": {                     "data": {                         "type": "user--user",                         "id": "434ec884-0f9b-4593-8bc4-ef58e542ac0e"                     },                     "links": {                         "self": "/drupal-8.4.4/jsonapi/file/file/e7f9cd27-3cd0-43d3-b205-b46e88d09109/relationships/uid",                         "related": "/drupal-8.4.4/jsonapi/file/file/e7f9cd27-3cd0-43d3-b205-b46e88d09109/uid"                     }                 }             },             "links": {                 "self": "/drupal-8.4.4/jsonapi/file/file/e7f9cd27-3cd0-43d3-b205-b46e88d09109"             }         }     ]
  3. Filtering

    Filters can be applied to the collections to retrieve only the required resources. They can be added using the “filter” request parameter. We need to specify the field on which the comparison has to be done, the value with which we need to compare and optionally specify the operator(default is ‘=’).

     GET /jsonapi/{entity-type}/{bundle-name}?_format=api_json&filter[label][condition][path]={field}&filter[label][condition][operator]={operator}&filter[label][condition][value]={value}

    Or

     GET /jsonapi/{entity-type}/{bundle-name}?_format=api_json&filter[field][operator]={operator}&filter[field][value]={value}

    For example, we can search an article with the title that contains some keywords.

     GET /jsonapi/node/article?_format=api_json&filter[title][operator]=CONTAINS&filter[title][value]=search-keyword

    We can even use nested and grouped filters for advanced use cases. Read the official documentation for complete reference.

  4. Paging

    Paging is a common technique used to divide a long listing of items into pages. It can be used to implement an infinite scroll, or simply a pager. This requires two parameters – limit and offset. Limit decides maximum number (default is 50) and offset(default is 0) can be used to skip first ‘n’ items or resources. The presence of “next” and “prev” links indicates our position in the pager.

    ​​​​​​​GET /jsonapi/{entity-type}/{bundle-name}?_format=api_json&page[offset]={offset}&page[limit]={limit}

    For example, we can build an infinite feed of articles. When the user scrolls to the bottom, we can use the following request asynchronously to fetch let’s say 10 more articles.

    ​​​​​​​GET /jsonapi/node/article?_format=api_json&page[offset]=10&page[limit]=10
  5. Sparse Fieldsets

    We can specify the fields of the resource which are required performing a GET request using the “fields” parameter. This is useful when we need only a limited information and save bandwidth.

    GET /jsonapi/{entity-type}/{bundle-name}?_format=api_json&fields[entity-type--bundle]={field(s)}

    For example, to display only the titles of all the articles we can use the following request.

    GET /jsonapi/node/article?_format=api_json&fields[node--article]=title    "data": [         {             "type": "node--article",             "id": "6a1571e0-26c7-423f-8ff5-04b2e4deb6d3",             "attributes": {                 "title": "Drupal 8 is awesome"             },             "links": {                 "self": "drupal-8.4.4/jsonapi/node/article/6a1571e0-26c7-423f-8ff5-04b2e4deb6d3"             }         },         {...} ]
  6. Sorting

    To sort a collection, we can add a “sort” parameter, specifying the field and the sort direction.

     GET /jsonapi/{entity-type}/{bundle-name}?_format=api_json&sort[label][path]={field}&sort[label][direction]={ASC/DESC}

    Or

     GET /jsonapi/{entity-type}/{bundle-name}?_format=api_json&sort=±{field}

    For example, to retrieve all the articles sorted by their created date and then by their titles, we can use this request:

     GET /jsonapi/node/article?_format=api_json&sort=created,title

    This is not an exhaustive list, please refer the official documentation for more usage details and examples. But, with the right mix of these features, we can easily implement all the required features in our headless website.

Customizing the API

The module does not provide any way to configure the resources and the API. We need to install an additional module, JSON API Extras, in order to customize the API. This module allows us to configure the endpoints, fields and enabling or disabling the resources.

  1. Navigate to Manage → Configuration → Web services → JSON API Overwrites. This lists all the available resources. All of them are enabled by default.Admin UI for managing the resources
  2. Click on the “Overwrite” button next to the resource you wish to customize.
     
  3. You can alter the resource type, path or the endpoint, disable specific fields, and give an alias to fields. You may disable the resources that are not required, rest of the configurations can be mostly left untouched.
     Configuration options for resources
  4. Click on “Save” when done to save the configuration.
To Conclude

The JSON API module provides production-ready API out of the box. It provides standard HTTP methods to perform basic CRUD operations on entities. It also provides some advanced features including paging, sorting, and filtering to retrieve all the required data in a single request.

However, it lacks few features like registering a user, logging in a user, checking login status, etc. But we can use Drupal core’s REST web service for this purpose and build a headless website or a native mobile application by using best of both worlds. 

At OpenSense Labs, we have worked on decoupled Drupal projects, drop a mail at hello@opensenselabs.com to connect with us. 

blog banner blog image Blog Type Tech Is it a good read ? On

Chromatic: Keeping Your Drupal Site Secure

Thu, 06/21/2018 - 10:00

Keeping your Drupal site secure requires diligence - here's what can happen if your site isn't up to date.

Drop Guard: A Weekend full of Hacking - and Securing

Thu, 06/21/2018 - 09:45
A Weekend full of Hacking - and Securing Our CEO Joe visited the Drupal HackCamp in Bucharest at the beginning of June and experienced a great Drupal event. The event was mainly organized by Softescu, a digital agency of Romania, and the main topics were security and security related issues. Drupal Drupal Planet Drupal 8 Drupal Community Drupal Camp

Agiledrop.com Blog: AGILEDROP: How to Integrate Maps to Drupal 8

Thu, 06/21/2018 - 06:27
Thanks to advancements in the tech industry, things that were once difficult have become incredibly easy now. One of these is finding addresses. As an online business, making sure your physical address is easily visible to your users can be crucial. What other way is there to show your visitors your address other than digital maps such as Google Maps, the largest and the most widely used online map software in the world. In this post, I’ll take a look at various ways of adding maps to your Drupal site and how they can be utilized for better convenience for your site visitors.   Integrating… READ MORE

mark.ie: Drupal's Settings Tray Module is Freakin' Awesome

Thu, 06/21/2018 - 04:55
Drupal's Settings Tray Module is Freakin' Awesome

Here's a very short video demo of editing a menu using Drupal's Settings Tray module. Things like this will be what drives Drupal adoption.

markconroy Thu, 06/21/2018 - 09:55

I'm a big fan of the quick edit module for Drupal. If it could work better with paragraphs module, it'd be a knockout feature. Aligned with that, I'm really impressed with the settings tray module and can see so many uses for it in the future - sidemenus, shopping cart slideouts, node editing, etc. Here's a very short video of using it to edit a menu, which should make many content editors' lives easier.

Amazee Labs: Remember to submit your DrupalEurope sessions!

Thu, 06/21/2018 - 04:54
Remember to submit your DrupalEurope sessions!

DrupalEurope will be taking place soon – different organization, different structure, same great community. There are a few things you need to know about this year’s edition of Europe’s largest Drupal conference, so let me tell you about them. But before I start, your case studies, as always, are more than welcome!

Fran Garcia-Linares Thu, 06/21/2018 - 10:54

DrupalCon Europe or DrupalEurope?

The first thing you might have noticed is that the event is called DrupalEurope and not DrupalCon Europe as in previous events. In order to find a sustainable approach to the conference in Europe, DrupalCon decided to take a year off in 2018 in order to come back stronger than ever, so the community decided to weigh in and organize this year’s event - DrupalEurope. This is the best possible example of one of the Drupal community mottos, “Come for the code, stay for the community”.

Main changes

Did I just mention that the event is fully organised by the community? Ah, yes, so here are some other changes:

Additional time for contribution - this will be a constant topic throughout the event. There will be mentors and self-organised contribution teams, so make sure you come prepared if you want to contribute and if you’d like to volunteer as a mentor then register here as well!

Date and place

The event will take place from 10 to 14 September in Darmstadt, Germany, which is just 20 minutes from the Frankfurt airport. It’ll be a fun week, so clear your calendar! There will be plenty of opportunities to attend talks, mentoring sessions, sprints, etc.

The week’s schedule is as follows:

  • Monday - Contribution with some mentors
  • Tuesday to Thursday - Sessions, panels, workshops, BoFs and contribution lounge
  • Friday - Traditional mentored contribution and self-organized contribution spaces

Get involved

Just attending the conference is a great experience, but there are more ways to get involved:

  • Volunteering - Help with the organization of the event, find out more here.
  • Submit a session - By submitting and preparing a session gives you a great way to give back to the community. Sharing your knowledge and experience with others is what makes these conferences so great. So, make sure to submit your sessions here.

Josef, our Agile Consultant, is part of the conference program committee, so if you see him during that week, make sure you give him kudos for putting his energy, as well as that of all the other volunteers, into the event.

A number of Amazees are already working hard on submitting sessions, ranging from client case studies to more technical talks. We love these gatherings and want to contribute as much as possible, so you’ll be sure to see a lot of us there in that week.

To-Do

So here is your to-do list:

  • Sign-up for DrupalEurope (if you haven’t already).
  • Submit your session/s, you have until the end of this month to do so.
  • Enjoy!

Hook 42: Drupal 8 Interviews: Spotlight on Jill Cohen from Autodesk

Wed, 06/20/2018 - 21:41

 

Jill Cohen is a Senior Software Application Engineer at Autodesk Inc. Autodesk is a global company that empowers users to design and create just about everything on this planet - and in virtual worlds. She works with the Digital Platform and Experience Organization on the Digital Help team, which manages the Autodesk Knowledge Network and Services Marketplace. She is also on the board for Autodesk Women in Leadership.

Pages