Pull to refresh
157.33

JavaScript *

High-level, interpreted programming language. It is a language which is also characterized as dynamic, weakly typed, prototype-based and multi-paradigm

Show first
Rating limit
Level of difficulty

Generating multi-brand multi-platform icons with Sketch and a Node.js script — Part #2

Reading time16 min
Views1.5K


This is the second part of a post about the creation of a pipeline that can take a Sketch file and export all the icons included in the file, in different formats, for different platforms, with the possibility of AB testing each icon.

You can read the first part of the post here.



The Sketch files, with all the icons collected, styled and properly named, were ready. Now it was time to start writing the code.

Suffice to say, the process was very much a trial and error: after the important initial code core, developed by my team lead Nikhil Verma (who set the script foundations), I went through an incremental process that required at least three phases of refactoring and quite a few revisions. For this reason, I won’t go into too much detail on how the script was developed, but rather focus on how the script works today, in its final shape.
Read more →
Total votes 23: ↑22 and ↓1+21
Comments0

Generating multi-brand multi-platform icons with Sketch and a Node.js script — Part #1

Reading time10 min
Views2.2K


TL;DR


Using a custom build script in Node JS, it is possible to manipulate a series of Sketch files, and then, using an internal Sketch tool, automatically export their assets, to generate multiple icon libraries, for multiple platforms and different brands, that support dynamic colourisation of the assets via design tokens, and also AB testing of the assets via naming convention. Easy peasy :)


Well, actually it’s not that easy, but it can certainly be done. This post is a detailed explanation of how we did it, and what we discovered along the way.

The problem we were trying to solve


At Badoo we build a dating app. Actually, multiple dating apps. For multiple platforms (iOS, Android, Mobile Web, Desktop Web), across multiple teams.

We use hundreds of icons in our apps. Some of them are the same across different apps, some are very specific to the brands the apps reflect. The icons are continuously evolving, in sync with the evolution of the design. Sometimes completely new icons are added, while others get updated, and still others get dropped (although, they often remain in the codebase).
Read more →
Total votes 30: ↑29 and ↓1+28
Comments0

Vue mixins, the explicit way (by an example of BEM modifiers plugin)

Reading time3 min
Views7K


Vue mixins are the recommended way of sharing common functionality between components. They are perfectly fine until you use more than one for them. That's because they are implicit by design and pollute your component's context. Let's try to fix this by giving them as much explicitness as we can.

Read more →
Total votes 26: ↑26 and ↓0+26
Comments0

The Overview of JavaScript Frameworks: Which One to Choose for Your Project?

Reading time4 min
Views1.8K
Ten years ago, companies who wanted to create cross-platform projects would have to cooperate with different development teams and experts. However, 2009 has changed the game, because the developers from Nitobi (later purchased by Apache) presented Cordova – a fresh framework that was able to convert web applications into mobile systems. Linking the devices’ APIs via plugins, developers could access smartphones and tablets. Cordova is a JavaScript-based tech compatible with various platforms.

In this guide, we will review three more JS-driven systems, look at their unique features and compare them.
Read more →
Total votes 24: ↑24 and ↓0+24
Comments0

Vue, Storybook, TypeScript—starting a new project with the best practices in mind

Reading time12 min
Views22K


(originally published on Medium)


I like writing React code. This might be an odd introduction to a story about Vue, but you need to understand my background to understand why I’m here discussing Vue.


I like writing React code and I hate reading it. JSX is a neat idea for assembling the pieces together fast, Material-UI is amazing solution for bootstrapping your next startup’s UI, computing CSS from JS constants allows you to be very flexible. Yet reading your old JSXs feels awful – even with scrupulous code review practices you might scratch your head not once as you try to figure the intricate nesting of the components.


I’ve heard many things about Vue—the not so new kid on the block—and I finally decided to get my feet wet; bringing in all my mental luggage of React and Polymer (and Angular, but let’s not talk about that).

Read more →
Total votes 18: ↑17 and ↓1+16
Comments2

The ever-lasting strife of static vs dynamic typing – TypeScript won’t help

Reading time6 min
Views4.8K


When my friend and I were of school age and aspiring to become software developers, we daydreamed of designing some cool stuff together – like a game or a mega-useful app.

I chose to learn C++ and C#, he picked JavaScript. We finished school, graduated from our universities, served in the army and started our jobs. We had a pretty busy time in industrial software engineering, with lots of different jobs and positions, and after it all started to wear on us, we recalled where it all had begun.

Having finally got together as mature developers, we decided to work on our own project – a 2D video game. Since my friend’s domain was front-end and I was a full-stack developer, our immediate choice of development platform was an Internet browser. As I was only used to working with TypeScript when designing front-end, we thought, ok, no problem, after all, TS is just JavaScript at scale. Let’s use it and things will go smoothly. If I only knew how wrong I was! When we started discussing the project, we ran into an extensive chasm of misunderstanding between us.
Read more →
Total votes 23: ↑20 and ↓3+17
Comments1

SAPUI5 for dummies part 4: A complete step-by-step exercise

Reading time4 min
Views3.5K


Introduction & Recap


In the previous blog post, we learned how to move our current application into a Master-Detail app displaying Business Partner as a list (master) and its detail information with Sale Orders inside the detail page (detail).


What will be covered on this exercise


With Part 4 of this series of blog posts, we will learn how to create a second drill-down page with information about the Sale Order detail and display a table of Sale Order items.


The most important part of this exercise is to understand how to Delete (part of the CRUD operations) a Sale Order Item of a Sale Order.


  • ODataModel: we have already used it to display server-side information about our Business Partner, Order Sale. Now we’re going to use it to display Sale Order Item and delete them from the set. For this purpose, we’re going to use the remove method

This is our main task in this exercise but it’s not the only thing we’ve done in the code. Here’s a list of the things you have to do to get to the final result:


  • Add a new route and target in the manifest.json to navigate to the BusinessPartnerSeleOrderItem page
  • Listen on the Sale Order click event and navigate to the SaleOrder detail (where we will display sale order detail and sale order items)
  • Add a FilterBar to filter the Sale Order Item’s table
  • Add a ViewSettingsDialog to sort/group Sale Order Items
  • Expand the ToProduct navigation property of a SaleOrderItem entity to display Product information into table’s rows
Read more →
Total votes 12: ↑11 and ↓1+10
Comments0

Translating Dust templates to JSX

Reading time5 min
Views1.8K


Hello Habr! I'm Miloš from Badoo, and this is my first Habr post, originally published in our tech blog. Hope you like it, and please share and comment if you have any questions

So… React, amirite???

It appeared in the middle of the decade (plagued by the endless JavaScript framework wars), embraced the DOM, shocked everyone by mixing HTML with JavaScript and transformed the web development landscape beyond recognition.

All those accomplishments, without even being a framework.

Love it or hate it, React does one job really well, and that is HTML templating. Together with a great community and a healthy ecosystem, it’s not hard to see why it became one of the most popular and influential JavaScript libraries, if not the most popular one of all.
Total votes 34: ↑33 and ↓1+32
Comments2

SAPUI5 for dummies part 3: A complete step-by-step exercise

Reading time4 min
Views7.4K


Introduction & Recap


In the previous blog post, we learned how to filter, sort and group our table. This is a fundamental aspect of every CRUD application because most of the time users have to deal with hundreds of hundreds of records.


What will be covered on this exercise


With Part 3 of this series of blog posts, we will learn how to create a Master-Detail application leveraging the SplitApp UI control and how correctly configure the app’s manifest to handle routes and targets.


  • SplitApp: UI control that allows you to create a Master-Detail application (used as a replacement of the App control)
  • Routing: we will configure the manifest.json to correctly handle the routing of the application
  • ObjectHeader: control that enables the user to easily identify a specific object. The object header title is the key identifier of the object and additional text and icons can be used to further distinguish it from other objects
  • Navigation to a detail view and bind the element context: you will learn how to navigate and open a detail page and bind the current View (of the detail) to a new context
  • List: in the master page we will use a list to display BusinessPartner because we will have less space
Читать дальше →
Total votes 15: ↑14 and ↓1+13
Comments0

SAPUI5 for dummies part 2: A complete step-by-step exercise

Reading time4 min
Views7.2K


Introduction & Recap


In the previous blog post, we started designing our application rendering a table with some Business Partner. We learned what OData protocol is, how to read an OData XML manifest, how to bind data to a Table and how to customize columns layout based on different screen resolution.


What will be covered on this exercise


With Part 2 of this series of blog posts, we will learn how to interact with data in our Tables and List. We will learn how to filter and sort data in a smart way.


  • Create JSONModel to handle local data
  • Set a default sizeLimit to our JSONModel
  • FilterBar: UI control that displays filters in a user-friendly manner to populate values for a query
  • Use XML Fragments to create a View Settings Dialog to handle sort and group data
  • Filter and Sort data
  • Add an Info Toolbar to our table to display useful information
Read more →
Total votes 14: ↑13 and ↓1+12
Comments0
Change theme settings

Authors' contribution