Magento 2 Config Search

Do you remember, I recently wrote about implementation of a small but handy extension for config search in Magento1? I have become so used to it, that I had to do the same for Magento 2. And since I heard many rumors about improved contribution process to M2, I also decided to make it as a contribution and get my hands “dirty”.

Since the architecture of the framework has drastically changed, I expected many troubles. But in fact, it was even a little bit easier than for M1. From the development point of view it was definitely more pleasant to work with the code, but I also wanted to test the complete path to the fully merged pull request.

Continue reading about Magento 2 Config Search

Tags: ,

Hello, Rust! — An overview

This is my report of my talk at the TupperRust meetup hold in Lyon (France, February 2017) You find my slides available to download. 

The February 2nd 2017, I have presented a talk entitled Hello, Rust! — An overview about the Rust language. This language describes itself as safe, concurrent, and practical. The goal of this presentation was to give an overview of several features brought by the language, such as its strong safety guarantees, or speed and memory performances.

The slides are available online

First slide from the Hello, Rust! talk

This talk has been presented during the first TupperRust meetup event in Lyon (France). This is a serie of meetups focusing on Rust. The interaction was exceptional: The audience has been a great actor of this talk, and we even had a live-coding session on projects made by someones in the room. It was a great moment to talk about concrete problem, memory safety, performance etc.

It was also an opportunity to present a project that I have started here at Liip, called Tagua VM, which is an experimental PHP Virtual Machine that guarantees safety and quality by removing large classes of vulnerabilities thanks to the Rust language and the LLVM Compiler Infrastructure.

If you have any question, feel free to ask anything!

Tags: , , , ,

Accessibility: make your website barrier-free with a11ym!

Accessibility is not only about people with disabilities but also about making your website accessible to search engines robots. This blog post shares our experience with making the website of a famous luxury watchmaker more accessible, an important e-commerce application. We have built a custom tool, called The A11y Machine to help us crawl and test each URL against accessibility and HTML conformances. Less than 100 hours were required to fix a thousand of strict errors.

Issues with unaccessible application

Accessibility is not just a matter of helping people with disabilities. Of course, it is very important that an application can be used by everyone. But, have you ever considered that robots are visitors with numerous disabilities? What kind of robots you may ask, well: Search engine robots for instance, like Google, Bing, DuckDuckGo, Baidu… They are totally blind, they don’t have a mouse, they don’t have a keyboard, they must understand your content only with the source code.

Whilst it is easy to consider a man or a woman with a pushchair having a bad time in public transport, someone color-blind, a widespread disability, could also have issues browsing the web.

Continue reading about Accessibility: make your website barrier-free with a11ym!

Tags: , , , ,

An opensource Drupal theme for the Swiss Confederation

After having contributed to the official styleguide of the Swiss Federal Government and having implemented it on a couple of websites, we decided to go further and bring these styleguide into a theme for Drupal, a well-known, pluripotent and robust CMS we implement regularly at Liip.

Screenshot of Drupal theme for the Swiss Confederation

Continue reading about An opensource Drupal theme for the Swiss Confederation

Tags: , , ,

Order fulfillment with Swiss Post and YellowCube

Setting the stage

We live in a time where more and more goods are purchased online. May it be your airline ticket or the diapers for your newborn, many things are often cheaper and more conveniently purchased online. As comfortable it is for the customer buying things this way, as challenging it can be for the seller. They need to have an online presence that is easy to use and need to have all goods in stock to sell and send them quickly.

This means that selling physical products requires sufficient storage space on-site, people that handle picking, packing and shipping and someone that handles returned goods. All this factors can sum up to a costly venture, especially when you don’t have any infrastructure from other sales channels already.

Architekture PostLogistics YellowCube Connector

The PHP-YellowCube interface is part of all YellowCube extensions for PHP based web stores

What is order fulfillment?

This is where YellowCube comes in handy. YellowCube is a fulfillment service offered and run by Swiss Post. But what is a fulfillment service anyway? In the case of YellowCube it means everything to do with the storing and shipping of the products you sell on your store. This means receiving and storing of the products, handling of the inventory, picking, packing, shipping and handling of returns.

How to implement it into your web shop?

So far so good, but how does this translate into real life? Liip has, in close collaboration with Swiss Post, developed a PHP-YellowCube-SDK and also the integration for Magento and Drupal web shops. The PHP-YellowCube interface provides an object-oriented wrapper to the SOAP based interface provided by Swiss Post. The code is readily available on Github. Please feel free to contribute to the PHP-YellowCube-SDK, as well as the Magento extension or the Drupal extension.

Please explain…

Now that we know about the SDK, we need to know how the basic process works. I want to show you what needs to happen in order to implement YellowCube successfully into a web shop. The process is agnostic to a certain integration, so I won’t go into details how it is integrated in a specific shop extension. I will explain the basic process, which applies to all web shop integrations in the same manner (more or less).

Continue reading about Order fulfillment with Swiss Post and YellowCube

Tags: , , , ,

Les Rencontres Hivernales du Libre, deuxième édition

Winter Libre meetup, second edition.

As member, I again had the opportunity to take part to the Rencontres Hivernales du Libre (roughly translated as ‘Winter Libre meetup’), up in the jura, in St-Cergue. This week-end-long meetup, organized for the second time this year, aims at gathering all libre-related actors. This article, originally written in french, tells you the story of what happened there, who attended and did what.

Les Rencontres Hivernales du Libre, deuxième édition

Dans le cadre de l’association dont je suis membre, j’ai à nouveau eu le plaisir de participer aux Rencontres Hivernales du Libre, du 8 au 10 janvier passés. Ces rencontres, organisées pour la deuxième fois en 2016, ont pour but de rassembler les acteurs romands du Libre, dans sa définition la plus large.

Continue reading about Les Rencontres Hivernales du Libre, deuxième édition

Tags: , , , , ,

Drupal Hackday – Writing DRUSH extentions

Today Patrick Jezek and I sat together to get a grip on one of the major problems we have when using Drupal in a continuous integration environment – module updates involving major updates on configuration settings and database content.

Problem description

Imagine a usual Drupal installation already deployed on a live server. Imagine further that there is a demand to update at least one module of this installation without human interaction, any downtime, and data loss. The default work flow when updating configuration information would either demand human interaction and/or the complete deinstallation and reinstallation of the module which, when the hook_uninstall() correctly implemented, will cause data loss. A third option is to write a script to setup the new module after the installation process is done but this would challenge the deployment system to support some kind of a post_deployment process.

What was the goal?

The goal of this hackday was to propose a solution which enables a development team to continuously deploy and maintain a Drupal installation without being forced to uninstall modules to do a major update. Further more there should be some kind of a mechanism making it possible to update modules without human interaction when deploying the modifications.

Solution proposal

One of the most beneficial Drupal extensions is the Drupal shell (short: drush). It provides an extensive variety of commands to maintain Drupal (e.g. managing modules, users, and basic drupal configuration). The nice thing about drush it can be handled by any shell script just calling the specific commands and processing their outcome. Extending drush was therefore the most natural thing we could think about when we were confronted by this task.

So we came up with a drush extension providing a new Drupal hook hook_vm_update().

Custom hook_vm_update

Located in the *.install files the hook_vm_update() will be invoked by the drush extension. Further does the extension detect the existence of the custom hook and indicates this on the command line.

Custom scripts

In order to keep track of previous installed module versions we wrote two scripts. One does write down the currently installed version into a text file. The other one invokes drush to for modules which got changed since last deployment.

Further ideas

Add version information to hook_vm_update

Currently the update hook will always be called when the drush command is invoked and the previous installed version is smaller then the just installed one. Having only one hook implies that this hook knows which steps needed to upgrade from one version to another (including steps in between). What about a naming convention for hooks combined with version number and a logic to call them in chronological order, up to the target version (like Drupal core updates use schema update hooks).

Since the hook should not invoke actions potentially dangerous or harmful in terms of data loss et. al. this should not be much of a problem. But since we can already imagine situations where it is useful to either step through past updates or make the hook decide whether it an update is to be invoked or not one of the next steps for this drush extension will be to provide version information for an update.

Persist version information into the database

The versions.json file resists on the file system and could be potentially overwritten by a new installed package. An alternative could store the version information into the database (e.g. by using the Drupal configuration with variable_set() ?).

Final thoughts

We had some fun working on a solution for this given problem. We had the chance to look deeper into drush. We learned yet some php functionality we never used before. Unfortunately the weather was not nice and we could not fire up the grate for lunch.

Last but not least thanks L//p for this opportunity!

Tags: , , , ,