Pull to refresh
161.4

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
Period
Level of difficulty

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

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

Functional components with React Hooks. Why it's better?

Reading time5 min
Views24K

When React.js 16.8 was released we got the opportunity to use React Hooks. Hooks make us able to write fully-functional components using functions. We can use all React.js features and do in in more convenient way.


A lot of people don't agree with Hooks conception. In this article I'd like to tell about some important advantages React Hooks give you and why we need to write with Hooks.


I will not talk about how to use hooks. It is not very important for the examples. If you want to read something on this topic, you can use official documentation. Also, if this topic will be interesting for you, I will write more about Hooks.

Read more →
Total votes 30: ↑28 and ↓2+26
Comments1

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

(in)Finite War

Reading time6 min
Views1.6K

infitite war


We have a problem. The problem with testing. The problem with testing React components, and it is quite fundamental. It’s about the difference between unit testing and integration testing. It’s about the difference between what we call unit testing and what we call integration testing, the size and the scope.


It's not about testing itself, but about Component Architecture. About the difference between testing components, standalone libraries, and final applications.


Everyone knows how to test simple components(they are simple), probably know how to test Applications(E2E). How to test Finite and Infinite things…

But... no, nobody knows actually.
Total votes 25: ↑24 and ↓1+23
Comments0

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

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

[SAP] SAPUI5 for dummies: A complete step-by-step exercise

Reading time2 min
Views4.4K

Yesterday I’ve blogged about the content I’m creating for new developers that have arrived at our Techedge office in Lucca.


Teaching is something I started to love, is the natural consequence of the fact that I love to learn and love to share my knowledge. And I think that it’s important that new students or young developers have some curated content to start with, maybe with also some tip&tricks that senior has learned during their journey.


The idea behind this exercise is to cover every topic a SAPUI5 developer should know and understand.


The exercise will be available on my GitHub project openui5-exercise.

Read more →
Total votes 19: ↑18 and ↓1+17
Comments0

Vue.js Is Good, But Is It Better Than Angular or React?

Reading time3 min
Views6.1K
Vue.js is a JavaScript library for building web interfaces. Combining with some other tools It also becomes a “framework”. Now, from our last blog, you already know that Vue.js is one of the top JavaScript frameworks and it is replacing Angular and React in many cases. This brings in the topic of this blog ‘Vue.js is good, but is it better than Angular or React?


In case you’ve never heard or used Vue.js before, you are probably thinking: Come on! yet another JavaScript framework! We get it. However, Vue.js is not new in the custom software development domain. It was first released in 2013 and now it has 130549 stars on Github and downloaded a number of times this year.
Total votes 22: ↑19 and ↓3+16
Comments6

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

SAP: What do you need to start learning SAPUI5?

Reading time3 min
Views5.1K

image


Introduction


At the start of September 2018, some cool guys also joined our team, they are fresh from University and they are really hungry to learn how to design and develop amazing web apps with SAPUI5.


That’s why I’ve started to collects internally on the web some links in order to create “The perfect journey to become a SAPUI5 Ninja Developer”.


I’ve also started to write down some exercise (from easy to hard) in order to test what they’ve learned but I will share those in a second blog post as soon I’ve finished them.


Presentation


Hi everyone,
I'm Emanuele Ricci, a full-stack developer based in Lucca (a beautiful little city in Tuscany, Italy).


Since the last three years, I work full-time for Techedge Group, a big worldwide consultant company that is a partner with SAP. I usually work in projects related with SAPUI5, SCP, HANA and in my free time, I love to create content around the technology I use at work and in my personal projects outside SAP. Lately, I'm a little bit experimenting with Android after the release of SAP Fiori SDK for Android/iOS.

Read more →
Total votes 17: ↑16 and ↓1+15
Comments2
1
23 ...

Authors' contribution