<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by STYLABS HQ on Medium]]></title>
        <description><![CDATA[Stories by STYLABS HQ on Medium]]></description>
        <link>https://medium.com/@STYLABSHQ?source=rss-312a2a1495ae------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*xQkk08EAmEAHrI5Z5CvHuw.png</url>
            <title>Stories by STYLABS HQ on Medium</title>
            <link>https://medium.com/@STYLABSHQ?source=rss-312a2a1495ae------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 16:20:41 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@STYLABSHQ/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The Evolution Of Wearable Technology In The Fashion Industry]]></title>
            <link>https://medium.com/@STYLABSHQ/the-evolution-of-wearable-technology-in-the-fashion-industry-ccb1c082d950?source=rss-312a2a1495ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/ccb1c082d950</guid>
            <category><![CDATA[wearable-technology]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[wearables]]></category>
            <category><![CDATA[fashion]]></category>
            <category><![CDATA[apple]]></category>
            <dc:creator><![CDATA[STYLABS HQ]]></dc:creator>
            <pubDate>Tue, 20 Nov 2018 09:45:27 GMT</pubDate>
            <atom:updated>2018-11-20T09:45:27.248Z</atom:updated>
            <content:encoded><![CDATA[<p>It has been more than two years now, and the hype surrounding Apple Watch, Google Glass and Fitbit, shows no signs of dying down. The steady growth in their offerings, design and technology, strongly compelled us to go backwards in time and trace roots of more such manifestations of wearable technology.</p><p>When it comes to wearable technology, the first thing that pops into our mind is the ubiquitous wrist watch that has taken the realms of health and fashion by storm. But, the concept of wearable technology isn’t as new as we think it is. People have been weaving technological advancements into their outfits since as far back as the pre-computer ages. Think funky headsets, stereos and of course the iconic Walkman.</p><p>Depending on how you define technology, you can say the concept of wearable was sparked first in the 13th century with the groundbreaking invention of eyeglasses. But it was the innovation of the digital watch by Hamilton Watch Company in the 70s, which marked the advent of wearable technology.</p><p>Isn’t it only natural that the entwinement of fashion and technology only strengthened as time flew by!</p><p>Today, fusing style, compatibility and health, contemporary wearables such as motion sensing sports bras, google glasses (for augmented reality), fabrics infused with technology, and 3D printed footwear have gripped the world. But let’s understand how it started!</p><h3><strong>How It Began?</strong></h3><p><strong>The Abacus Ring</strong></p><p>Dating as far back as the 17th century, one of the earliest inventions in wearable technology, the abacus ring was introduced as a forerunner of the computer. A Chinese creation, the ring enabled performance of mathematical workings and tasks without writing. A tiny ring was sufficient for everything. What was more? It had zero issues with battery!</p><p><strong>‘Strappy’ Watches</strong></p><p>Soon after the concept of pocket watches took off in Europe. The hassle of engaging and operating it with both hands, paved the path to the invention of the modern wrist watch. Near the end of the 19th century, tired of the fuss that pocket watches entailed, a German officer highlighted the idea of strapping it to his wrist.</p><p><strong>The ‘GoPigeon’</strong></p><p>In the year 1907, Julius Neubronner had arguably fathered the concept of the modern day GoPro. In order to take aerial shots, the German innovator came up with the idea of strapping cameras to pigeons! The wee camera couldn’t shoot videos, but was decent enough for photography. This is the idea that seems to have prompted the invention of the widely loved GoPro cameras. Surprising, isn’t it?</p><p><strong>The Calculator Watch</strong></p><p>The world’s first ever calculator watch was launched at the International Watch &amp; Jewellery Trade Fair of London in the year 1977. One of the first watches of its kind, it was spurred, perhaps, by the invention of the abacus ring. The ring was an ingenious invention, but the tiny size ironically made it quite cumbersome. Enter the calculator watch.</p><p><strong>The Sensational Walkman</strong></p><p>The pioneer of ‘headphones’, Sony introduced the very first Walkman in the year 1979, and the world hasn’t known peace ever since!</p><p><strong>The Bluetooth</strong></p><p>Hands-free and convenient, the one-ear Bluetooth device was the iconic accessory of Jason Sudeiki in Saturday Night Live’s ’Two A-Holes’ bit. The popularity of the device has seen a sharp ascent ever since. It was a colourful journey from the good ol’ clip-ons to the invention of Apple’s ‘airpods’.</p><p><strong>GPS Watches — An Invention That Made History</strong></p><p>If you’re unaware of these devices, let’s climb out from our rocky hiding place!<strong> </strong>In the late 2000s, Apple and Nike astounded the world with an unprecedented device that could track the user’s route and steps. This fathered the launch of Fitbit, a device that trumped every other. Introduced in 2009, Fitbit is essentially an accelerometer driven wrist brand that tracks the user’s steps, distance, and pace.</p><h3><strong>Contemporary Wearable Trends</strong></h3><p><strong>Google Glass</strong></p><p>The stunning voice-controlled Android device is essentially a pair of futuristic glasses that presents information and reality like it’s playing in front of your eyes. The audio-visual inputs provide the user with relevant information based on the location. An invention that borders on a ‘magical’ experience, it was Google Glass that initiated and mastered the art of augmented reality.</p><p><strong>The Smart Watch</strong></p><p>Born of the need for producing devices as smart and efficient as smartphones, the smart watch (Samsung) and iWatch (Apple) are designed dexterously to track and record your workout sessions. You need not even feed the device with the activity you’re engaging in, as it identifies that by itself — whether you’re running, cycling, or swimming. An advancement to the classic Fitbit, it seems that the smartwatch is everything that we needed.</p><p><strong>Smart Rings</strong></p><p>If you’re skeptic about strapping on your smart watches for fear of it being easily noticeable, smart rings have your back. Built with an activity and sleep tracker, heart rate monitor and pedometer, the smart ring spells subtlety, and promises to blend in easily with your routine outfits. In fact, it is well on the road to becoming a coveted fashion accessory.</p><p><strong>Motion Sensing Sports Bras</strong></p><p>Out with the old, in with the gold! Reebok’s sensational PureMove Bra is a groundbreaking invention that uses Motion Sense Technology to ensure smooth workout sessions, especially to heavy chested women. The shear thickening fruit that the bra uses is essentially a gel-like liquid during sedentary state, and hardens during active state. This supports the bust, and holds it in place, eliminating any discomfort that may follow a regular sports bra.</p><p>Today, wearable technology can be used to track the number of footsteps, heart rate, and speed, essentially keeping a record of your overall health. In 2012, these wrist-worn devices were used only by a select few, but within 3 years, the number of users surged considerably. An analysis shows that a total of about 148 million wearables will be sold.</p><p>Looks like there will soon come a time when the already fading line between ‘magic’ and scientific reality vanishes altogether! Would that be good? Time will definitely tell, but I sure do hope it is.</p><p><em>— Prapti Vyas</em></p><p>Fashion writer, STYLABS.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ccb1c082d950" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[5 Graphic Design Trends You May Be Missing Out On!]]></title>
            <link>https://medium.com/@STYLABSHQ/5-graphic-design-trends-you-may-be-missing-out-on-bac0aeba706d?source=rss-312a2a1495ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/bac0aeba706d</guid>
            <category><![CDATA[design]]></category>
            <category><![CDATA[fashion]]></category>
            <category><![CDATA[photoshop]]></category>
            <category><![CDATA[stylabs]]></category>
            <category><![CDATA[graphic-design]]></category>
            <dc:creator><![CDATA[STYLABS HQ]]></dc:creator>
            <pubDate>Thu, 17 May 2018 07:30:03 GMT</pubDate>
            <atom:updated>2018-11-20T09:48:18.176Z</atom:updated>
            <content:encoded><![CDATA[<p>Often we make the mistake of trying to photoshop the life out of an image and end up ruining it completely. Here are some tips to make an ordinary catalogue image transform into a professional looking banner.</p><p><strong>#1 Pop Colours and Shadows</strong></p><p>Pop colours from the 90’s have made a comeback and how! Not only does it end up making you nostalgic, it is also immensely eye catchy. While drop shadows are outdated, you can add depth in your photos by manually creating realistic looking shadows. Follow the steps below to create a shadow:</p><p>Make a selection &lt; Go to Select in the Status bar &lt; Modify &lt; Feather &lt; Add a radius and click on OK &lt; Add colour to the selection. You can also blur a shape to create a shadow and then distort it in the desired direction.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*UsNB_pUFSSfTaOiili_KMQ.jpeg" /></figure><p><strong>#2 Prints and Patterns</strong></p><p>Whether your excuse is budget cuts or creativity, cropping a model and placing the object on another background is already pretty cliched. Instead, you could redesign your background by a few simple strokes or a print. Use the pen tool to turn a plain white top into an artistic checkered print and don’t stop there! You can also create an illusion wherein the background seems like an extension of the foreground, by recreating the print with a more zoomed in version. Add an edge to your banners by experimenting with Graffiti or Watercolour prints.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*j-BPzAa86XdK09p7-vpBdA.jpeg" /></figure><p><strong>#3 Filters</strong></p><p>Instead of adding a colour and multiplying it, why not add a Photo Filter instead! It makes the image more vibrant by enhancing the shadows and highlights. On the other hand, only adding an overlay of colour would definitely dull out the image. Of course, there’s one small step to consider. You need to multiply the image over a grey hued background before adding the Photo Filter. This way your text is easily readable against the image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*7oiEONCozCOjs-GnTtahBg.jpeg" /></figure><p><strong>#4 Paper Cut Out effect</strong></p><p>Inspired by scrapbooks and magazine cuts, this effect works well for portrait images. As the name suggests, you need to crop out the image and apply a stroke around the image. You can also duplicate the image, apply colour to it and then move it in a particular direction, thus giving a one-sided outline. To support the cut out image, add brush strokes, doodles, cursive fonts and grunge backgrounds. This effect allows you to unleash your creative side. Be careful though, lest your background overpowers your main image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*HCILWuJZRZ4Us4YEa0MqFQ.jpeg" /></figure><p><strong>#5 Glitch effect</strong></p><p>The ‘ruined image’ look is trending this year and there’s no reason why you shouldn’t jump on that bandwagon. To achieve the effect of the year, all you need to do is follow these steps:</p><p>Duplicate the layer &gt; slightly move the layer to the right or left &gt; double click on the duplicated layer &gt; select blending options &gt; select either the R, G or B channels.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*LufRR6Urw9xzidX3zPxFtg.png" /></figure><p>To add more colours, duplicate the layer again and select another channel. You will notice that your image is completely distorted and that isn’t very helpful as your product should be in focus. In this case, crop out your image and place it on top of the other blended layers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KH8lO1BtkYANzHo1iANvpw.jpeg" /></figure><p>Old trends are making a comeback and we’re excited to try them out! Of course there are a few specific ones that are catching our attention. That said, blending the traditional with the modern, definitely will take your design to a whole new dimension.</p><p><a href="https://medium.com/@karen_52645"><em>— Karen Sequeira</em></a></p><p>Senior Visualiser, STYLABS.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bac0aeba706d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[At A Glance: A Roadmap In Creating Effective Dashboards]]></title>
            <link>https://medium.com/@STYLABSHQ/at-a-glance-a-roadmap-in-creating-effective-dashboards-fc081ed7e34e?source=rss-312a2a1495ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/fc081ed7e34e</guid>
            <category><![CDATA[product-design]]></category>
            <category><![CDATA[ui]]></category>
            <category><![CDATA[ux]]></category>
            <category><![CDATA[dashboard]]></category>
            <category><![CDATA[web-design]]></category>
            <dc:creator><![CDATA[STYLABS HQ]]></dc:creator>
            <pubDate>Thu, 19 Apr 2018 12:45:47 GMT</pubDate>
            <atom:updated>2018-11-20T09:48:41.976Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ulCtVVSAbH27LqtCAaUTPw.jpeg" /></figure><p><strong>What are Dashboards?</strong></p><p>Dashboards often provide an at-a-glance view of all your KPIs (Key Performance Indicators) relevant to a particular objective or a business process. In the other words, dashboard is another name for a progress report or simply put — a report.</p><p>As they’re unique powerful tools for communicating important information at-a-glance, dashboards have become increasingly popular in recent years.</p><p><strong>First things first.</strong></p><p>Dashboards are not static reports. They need to be dynamic with a side of actionable analysis. There are certain criteria that a successful dashboard should check. A dashboard should show trends, growth and dips on a timeline basis and provide summaries of the same, sure. But a successful dashboard also provides analysis of the applicant’s data while allowing the users take action on it.</p><p>Further, a good dashboard also displays relevant information to the users, swiftly and lets the users customise it based on his needs, albeit to an extent.</p><p><strong>Quick Principles For Effective Dashboard Design</strong></p><p>While designing dashboards in STYLABS, there are certain guidelines that we adhere to. With roughly 6 points under it, these have been immensely useful to us in our STYLABS journey.</p><p><strong><em>#Know Your Audience</em></strong></p><p>A detailed understanding of your audience of your web application is a must to create an efficient dashboard. It should be designed to answer all the questions your user may have in mind. Ensure that you are aware of your intended audience, and that the data you display is relevant to your them. You must also be constantly abreast of the scope of their requirements. Because, when designed correctly, a dashboard will increase user productivity.</p><p><strong><em>#The 5 Second Rule</em></strong></p><p>An competent dashboard should provide the relevant information in about 5 seconds.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*zlBey9vHAgSGimbB." /></figure><p>A dashboard should also be able to answer frequently asked questions (FAQs) at a glance. If a user is scanning for any information for minutes, it could be an indication of a problem with the dashboard’s visual layout.</p><p><strong><em>#The Inverted Pyramid</em></strong></p><p>The inverted pyramid is the perfect graphic to by. Your most newsworthy info should take up the maximum space. This must be followed by other important details, with miscellaneous information taking up the background. The most significant insights must be displayed on the top part of the dashboard, trends in the middle, and the granular details at the bottom. This makes the inverted pyramid one of the most useful and used principle.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/0*9hX3tPIMZUr2YCAl." /></figure><p>This concept originated from the world of journalism and has fetched recognition in various other fields as well. This is how information should be prioritised and structured.</p><p><strong><em>#Minimalism: Less is More</em></strong></p><p>Your dashboard should contain no more than 5–9 visualizations. Cognitive psychology tells us that the human brain can only comprehend around 2 to 7 at a time. So, this is the number of items you should want in your dashboard. Also, avoid unnecessary and irrelevant labeling and instructions. They do help in providing context, but if used excessively only add to the clutter and confusion of the user.</p><p>Too many colour swatches, palettes and combinations also tend to create difficulty for the viewers in digesting the data quickly.</p><p>For example when displaying revenue or a monetary amount.</p><p>Rs. 1,454,845.53 is complex and headache inducing.</p><p>On the other hand, Rs. 1.45 m is simple that leads to peace of mind.</p><p>In short, cluttered displays deflect the focus from important messages.</p><p><strong><em>#Data Visualisation</em></strong></p><p>While selecting data visualisation formats, it’s important to select the one that’s appropriate and relevant to its usage and purpose.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/638/0*3mQ4HbYL1X7S4WO8." /><figcaption>Usage of Bar Charts vs Pie Charts.</figcaption></figure><p>If you’re building a dashboard, you obviously want your user to digest data quickly. Hence, it’s important to have clear, well-planned data visualizations at hand. The visuals for every Key Performance Indicator (KPI) should inspire action on behalf of your user.</p><p><strong><em>#Defining The Frequency Of Refreshing Data</em></strong></p><p>Ensuring that your dashboard data is being refreshed at the right interval is very important. It helps in saving time during the development phase and can ensure optimal performance once the dashboard is live.</p><p><strong>Conclusion</strong></p><p>A steady rule that we follow at STYLABS is that before sitting for designing of the dashboard, we have a discussion with our end users. This is significant in gathering their requirements and defining KPIs. You may design the most beautiful dashboard in the world, but if it doesn’t change the way your users make decisions, then a successful dashboard it is not.</p><p><a href="https://medium.com/@pratikraul03"><em>— Pratik Raul</em></a></p><p>UX Designer, STYLABS.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fc081ed7e34e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[5 Questions We Answered Before Finalising React Native Over Native Code Approach]]></title>
            <link>https://medium.com/@STYLABSHQ/5-questions-we-answered-before-finalising-react-native-over-native-code-approach-9d8fdc7d6f9e?source=rss-312a2a1495ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/9d8fdc7d6f9e</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[redux]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[STYLABS HQ]]></dc:creator>
            <pubDate>Tue, 06 Mar 2018 13:26:14 GMT</pubDate>
            <atom:updated>2018-11-20T09:49:40.168Z</atom:updated>
            <content:encoded><![CDATA[<p>STYFI, as previously discussed, is an app published on both, the App store as well as the Play Store. Apps for each platform are written and maintained in their native code language, thus requiring a core team of Android and iOS developers. This means oscillating between taking the native code approach — which would inundate the core team — or having the temerity to go the React Native approach.</p><p>Evidence suggests that React Native apps are nearly indiscernible when compared to other native apps, thus allowing us to take the latter, seriously. While the process and architectural decisions of building a React Native apps are significant on their own, let’s first elucidate the questions that needed to be answered.</p><h3>1. What is the timeframe we’re looking at?</h3><p>The ability of a team is not just measured by its efficacy, but also the speed at which results are achieved. The clock was set to 4 weeks for us. As React Native requires only one code base which complies to both iOS &amp; ANDROID, the amount of resources allocated to building our product would be dramatically reduced. Additionally, React Native is Javascript, a scripting language most developers at STYFI are cognizant of. This meant we could delegate workload evenly across multiple developers reducing the development time substantially. The only requirement we had was for our developers to be adroit at JSX (<strong><em>J</em></strong><em>ava</em><strong><em>S</em></strong><em>cript </em><strong><em>X</em></strong><em>ML</em>) and Redux (<strong><em>State Management </em></strong>).</p><p>This post is not about react-redux, but I’d be remiss if I don’t mention how redux works in a few lines. All data is stored inside a store called the Application Level State. Data can be added or changed into this store by calling for an action creator, which in turn calls for an action. This action that gets dispatched, skims through the various rules of changing or editing of the store (Reducers). After adhering to the reducer’s rules, the store is edited, which then gives a fresh batch of data to show in the U.I.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/633/0*d0IlSdznVgcy26_m." /><figcaption>Image explaining the flow of data using redux</figcaption></figure><p>After a week of tinkering with React Native we found ourselves writing some nifty applications. Hence 4 weeks was a realistic target to look at from a React Native perspective.</p><h3>2. How mature is the development community?</h3><p>React was released first in March of 2013. Almost instantly it became extremely popular because of its revolutionary approach to creating slick and efficient user interfaces. To the chagrin of Angular fanboys, react started becoming the de facto standard when it came to developing speedy UI. This meant that new and experienced developers flocked to the react community. Consequently, this allowed the open source community to create and modify solutions to various problems faced by everyday react developers. This has veritably led to one of the most mature and active dev communities.</p><h3>3. How mature are the available tools?</h3><p>React Native is gifted with a bunch of tools that make it an easy entry point for new developers to start off with. The advanced features allow you to perform complex react-fu. However, I shall mention the few, most frequently used.</p><p><strong>EXPO</strong>:<strong> </strong>Best described on their homepage…</p><p><em>Expo is a free and complete workflow for creating next-generation apps for iOS and Android.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/664/0*lgqc7vY5GY1SRfeo." /><figcaption>The above image shows the traditional method of running React Native apps, which was extremely slow as it required a simulated environment on your local machine to run and test your apps.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/604/0*ZPRTW1VjbzCu9RFo." /><figcaption><strong>The expo XDE generated a link that can be accessed by the expo client app running on your local mobile, which runs to the app you just built making it super quick and easy to the user.</strong></figcaption></figure><p>Expo ships out of the box with features such as… accelerometer, social authentication, push notification, locations with google maps and lot more. Expo comes with a unique feature called Expo Snack which allows developers to try and edit React Native apps on the browser and show it to other developers; No download required. Expo also comes with Remote Debugging on the browser and Hot Module Reloading.</p><p>One of the salient features of React Native is that it allows instant updates, simply by updating your codebase… No longer does a user have to update his or her app just to get the latest features.</p><p><strong>IGNITE</strong>: Ignite is a boilerplate engine, built with a scalable architecture and generator for styling to get you started. It allows you to adhere to best practices for building a scalable app.</p><p><strong>REACTORN</strong>: A desktop app for inspecting your React JS and React Native projects. A welcome addition, it allows debugging, which is a very slow process otherwise.</p><h3>4. Do we exactly understand the cons of React Native?</h3><p>A pertinent question before finalising a tech stack; it was imperative we weighed the cons before choosing React Native and here’s what we found. As React Native runs on Javascript, when handling native elements, it is allowed only a single execution thread. On the other hand, Native Code has multiple threads to choose from. This has direct implications while performing intricate animations as it Native Code would obviously always be much slower than a well optimised Native app. Although the core API comes with a wide array of features and components, there are certain needs that could be fulfilled only through a Native module. Examples include Multipart-Form Data Sending and Augment Reality. To create such features, a bridge has to be created between the React Native code base and platform specific Native Code. This could vary in complexity and require expertise in respective platforms.</p><h3>5. How is React growing in the grand scheme of things?</h3><p>With competition from Vue JS, Angular JS and new UI frameworks popping out almost every month, it is imperative for Facebook (the creators of react) to be proactive rather than reactive to the growing needs of the community. Their commitment to react is evident from the latest release of React named REACT FIBER. It is a ground up rewrite of React’s reconciliation algorithm that has allowed increased suitability for areas such as animation, layout and gestures.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*8b78CoWyBCJ_YCX2." /><figcaption><em>The image shows the increase in growth for react native vs Android and IOS on google trends.</em></figcaption></figure><p>This vindicates the trust and commitment shown by the community in opting for React Native. With Google just entering the cross-platform reactive apps market with FLUTTER, Facebook and React Native still stand as the de facto standard when it comes to reactive apps.</p><p>In the end, after due diligence was done the pros overpowered the cons, making React Native our choice of framework.</p><p>— <a href="https://medium.com/@richardandrews5057"><em>Richard Andrews</em></a><em>,</em></p><p>Associate Software Architect, STYLABS.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9d8fdc7d6f9e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[STYFI: Handling Products At Scale]]></title>
            <link>https://medium.com/@STYLABSHQ/styfi-handling-products-at-scale-cf99a039f2d9?source=rss-312a2a1495ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/cf99a039f2d9</guid>
            <category><![CDATA[mongodb]]></category>
            <category><![CDATA[sqs]]></category>
            <category><![CDATA[etl]]></category>
            <category><![CDATA[e-commerce-software]]></category>
            <category><![CDATA[amazon]]></category>
            <dc:creator><![CDATA[STYLABS HQ]]></dc:creator>
            <pubDate>Tue, 27 Feb 2018 06:58:43 GMT</pubDate>
            <atom:updated>2018-11-20T09:50:00.460Z</atom:updated>
            <content:encoded><![CDATA[<p>At STYFI, we love brands and brands love products; a lot of products!</p><p>E-commerce is having an excellent product base, whether that is through a warehouse model or a marketplace model. The core of this industry, something that denotes your brand strength and value is decided by the kind of product base you own.</p><p>Handling products on an e-commerce platform is the foundation stone to serving the customer. This is then dolled up with different services on top of this layer. Providing customer with the latest products, listed with details such as price, offers, colors, availability, etc is the key to this business.</p><p>We at STYFI, handle products in a fashion, wherein we don’t have to suffer over even a single percentage of customer dropouts. Apart from our customers, we need to ensure that our brands — the other primary party that the app is for — is satisfied with the background work that STYFI engages in, to keep up with all of their products.</p><p>This product data is handled by us via different mediums such as API integration, Bulky CSV Management, Webhook Implementation, ERP Integration, etc. By doing so, we effectively get and process product data changes, in any form to achieve that evasive sync between the brands and STYFI in real-time.</p><p>Thus, we needed to create a solution that was high-performing and scalable to grab, transform and deliver the final product to target systems.</p><p>Our abstract level design architecture diagram is given below for reference.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/574/0*7SFx6lYYVFNNIyLb." /></figure><p>Now, let’s go through the services that we’ve expressed in the above image.</p><p>Once a brand is onboarded, — according to the panel via which it is providing us data — we then initiate related operations to bring those products to our platform.</p><h3><strong>IRIS</strong></h3><p>This service provides initial interaction with a newly onboarded brand, based on the platform they’re present on. We have coded a lot of lines in the most-optimised way possible to keep the system high performing and scalable. IRIS is responsible for getting data from the brand in whatever platform they send to us or the data we extract from them.</p><p>Basic overview of the IRIS is described in the below diagram:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/641/0*c8DPLYKzE7gQ9F1o." /></figure><p>Once we get products and apply the all-fancy transformation according to our rule engines, we finally push the details to Amazon SQS for further processing.</p><h3><strong>Validator</strong></h3><p>It grabs the data from the SQS and validates it for the structure of the details. It then proceeds to perform an operation that includes checking whether the data exists in our systems. Depending upon the set of operations under this service, we take the call to process the final data.</p><h3><strong>200</strong></h3><p>The calling of this service, depends on the Validator’s response. If this service is called, it is responsible for handling image operations for all the products. This is an in-house server that handles heavy image processing as per requests from the fashion team.</p><h3><strong>Darwin</strong></h3><p>It is the system, which performs various in-house operations as requested by the fashion team, the operations teams and such. This service performs the final quality check, while handling product on our main application, doing predictive actions for the customer and other such finishing tasks. Once the entire data is processed it holds all the data to base MongoDB cluster.</p><p>Once the data is processed, it makes its way to our MongoDB cluster. From there on, it is the job of other services to then take over and proceed with the necessary action to make the product live.</p><p>— <a href="https://medium.com/@shivdhwaj"><em>Shivdhwaj Pandey,</em></a></p><p>Platform Engineer, STYLABS.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cf99a039f2d9" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[STYFI and NGINX API Gateway: For High Performance Service Delivery]]></title>
            <link>https://medium.com/@STYLABSHQ/styfi-and-nginx-api-gateway-for-high-performance-service-delivery-7e586924f810?source=rss-312a2a1495ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/7e586924f810</guid>
            <category><![CDATA[devops]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[nginx]]></category>
            <category><![CDATA[api-gateway]]></category>
            <category><![CDATA[api]]></category>
            <dc:creator><![CDATA[STYLABS HQ]]></dc:creator>
            <pubDate>Tue, 20 Feb 2018 10:36:52 GMT</pubDate>
            <atom:updated>2018-11-20T09:50:13.139Z</atom:updated>
            <content:encoded><![CDATA[<p>An API Gateway is a facade that provides simple API interface to complex subsystems. It essentially decouples the interface that clients see from underlying implementation. However, you might need to expose data from various services to make the system work. The NGINX API Gateway is a reverse proxy that can be configured dynamically via API and it should be used when routing rules. The API gateway pattern means that you put an API gateway in front of your services, and make the API gateway become the entry point for every new request that’s being executed by the application, a classic abstraction.</p><p>Multiple node applications expose APIs to each other and Node itself handles large pool of requests as well. But, it throws itself into an underperformance architecture if traffic exhibits sudden growth spurts. Also, managing multiple applications at the same time is a difficult task. This in turn lead us to using NGINX, as a solution. The reason why we choose NGINX is that before implementing API Gateway, we used to rely on individual applications capabilities. Post this we came to realize that our back-end team do have this pattern. Hence, then they developed services and when these service are deployed, they put NGINX in front. However, a better approach to this scenario was needed. Rather than doing it at individual applications, why couldn’t we do it inside NGINX. This would be the solution to API-management and our internal team also could take advantage of it. As a result of NGINX, the first benefit we get is that it is very stable. Secondly, it is extremely fast. Thirdly, it does not need a lot of resources to run, as we ourselves were surprised to find out.</p><p>I was, in fact running on my local machine NGINX in the docker container, capable of doing 100,000 requests per second with only two CPUs. So, we were very pleased with its performance, latency and stability, which turned out to be key factors for us.</p><blockquote>“API Gateway is essential to ensuring API security, usability, scalability and reliability.”</blockquote><p>Here in the diagram below, you can see the API Gateway is configured with routes request to the respective node applications. It also has the request filtering mechanism to restrict/allow HTTP methods in NGINX, along with other best security practices. The first thing it does is, working as a reverse-proxy server in front of our node applications. This protects our node servers from being directly exposed to the outside world and gives us better flexibility in using multiple applications servers. You can see the various node applications that are running independently such as auth, api, profile, etc. We have other node applications such as checkout, vendors, image-downloader, etc. These node applications are used in conjunction with Socket.IO, a web socket API and proxied to this server. NGINX reduce and multiplexes the HTTP connections and maintains persistent websocket connections.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/647/0*tGmBxOvZ4jWUr_dX." /><figcaption><strong>Fig I: API Gateway Pattern using NGINX</strong></figcaption></figure><p>This is a sample of the NGINX as reverse proxy server configuration:</p><pre>location /cart/ {</pre><pre>proxy_set_header Host api-gateway-host/cart/;</pre><pre>proxy_pass application-host:5555/</pre><pre>proxy_set_header   X-Real-IP  $remote_addr;</pre><pre>proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;</pre><pre>client_max_body_size           10m;</pre><pre>client_body_buffer_size       128k;</pre><pre>proxy_connect_timeout          600;</pre><pre>proxy_send_timeout             600;</pre><pre>proxy_read_timeout             600;</pre><pre>send_timeout                   600;</pre><pre>proxy_buffer_size             128k;</pre><pre>proxy_buffers               4 256k;</pre><pre>proxy_busy_buffers_size       256k;</pre><pre>proxy_temp_file_write_size    256k;</pre><pre>}</pre><p>These are specific advantages of using NGINX as API Gateway for node applications:</p><ul><li><strong>Distribute API Development:</strong> Multiple teams can simultaneously work without creating a bottleneck. Also, you don’t have to have expertise on the entire application to create optimised endpoints.</li><li><strong>Minimise Deployment Risks:</strong> Different components of the system are easily deployed and shipped with minimal coordination.</li><li><strong>Latency and Throughput:</strong> The architecture is designed in such a way that it always tries to minimise latency and improvise the throughput of overall system.</li><li><strong>Centralised Monitoring and Control:</strong> The API gateway then centralises all of the authentication, logging, and traffic control that you need to implement in your application, by constant monitoring as a service.</li></ul><p>With these techniques mentioned above, we get important performance improvements in our node applications. The API Gateway along with reverse-proxy server, proxying websocket connection, caching, etc. improves flexibility and capability of existing applications. API gateway has became a single entry point of our servers. It is solely responsible for request routing, composition and protocol transition. It provides each of the application’s client with a custom API endpoint. This way, the NGINX API Gateway makes our life simpler and reliable by improving performance and providing resiliency.</p><p>— <a href="https://medium.com/@mohan08p"><em>Mohan Pawar</em></a></p><p>DevOps Engineer, STYLABS.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7e586924f810" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[STYFI Loves Webpack: How We Implemented This Killer Bundler]]></title>
            <link>https://medium.com/@STYLABSHQ/styfi-loves-webpack-how-we-implemented-this-killer-bundler-4fd330249acb?source=rss-312a2a1495ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/4fd330249acb</guid>
            <category><![CDATA[webpack-2]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[requirejs]]></category>
            <category><![CDATA[es6]]></category>
            <dc:creator><![CDATA[STYLABS HQ]]></dc:creator>
            <pubDate>Tue, 13 Feb 2018 12:50:22 GMT</pubDate>
            <atom:updated>2018-11-20T09:50:46.664Z</atom:updated>
            <content:encoded><![CDATA[<p>When we started off, STYFI was built using “<strong>RequrieJs”</strong>. RequireJS is one of the most well known module loaders for JavaScript. For those uninitiated, module loaders are basically tools used for specifying the dependencies of a javascript file and loading those dependencies in right order.</p><p><strong>Why We Moved Out Of RequireJs?</strong></p><p>RequireJs, as a module loader, made us developers use the AMD pattern, which of course made sense back then. However, today when we have CommonJS “require()” and ES6 “import” for importing those same dependencies, RequireJs has become futile.</p><p><strong>Syntax Comparison</strong></p><p>AMD modules look like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*isU9EQFCIS2OXESu." /></figure><p>Compared to CommonJs and ES6</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fWOVP6Fs1pBVAh3Q." /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*xEseSw0KPZ04c3mC." /></figure><p>In the development phase, RequrieJs does not require a build step. However, it does make every dependency of a javascript file load dynamically. It was good and it was bad, but as STYFI took off, and our grew by leaps and bounds, loading of dynamic content started to take a huge amount of time.</p><p><strong>Why Webpack?</strong></p><p>Webpack is a bundler for modules. The main purpose of Webpack is to bundle JavaScript files for usage in a browser. Not just that, it is also capable of transforming, bundling, or packaging just about any resource or asset.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vGppJ2HYKW3ugo-Y." /></figure><p>Since Webpack Supported ES modules, CommonJs and AMD modules, it was easy for us to use plugins written in any patterns. Then, even our code had been written using AMD pattern. (Although, today the entire coding has been written in ES6 module)</p><p>Webpack as a bundler, allowed to bundle files based on Entry point.</p><p><strong>Entry Point and Single output</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7b896c8219b9ab4828c729ce83f451e4/href">https://medium.com/media/7b896c8219b9ab4828c729ce83f451e4/href</a></iframe><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*yARqwGR693Gl9LgW." /></figure><p><strong>Multiple Entry and Output files</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*epGRH8Iur17puhrl." /></figure><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8226470d783a548835a1b1843c28ea63/href">https://medium.com/media/8226470d783a548835a1b1843c28ea63/href</a></iframe><p>One of the most compelling features of Webpack is code splitting. With the help of <a href="https://webpack.js.org/plugins/commons-chunk-plugin">CommonsChunksPlugin</a>, we can extract common dependencies into entire new chunks.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/982c2bb08afbc299081c0018d2745470/href">https://medium.com/media/982c2bb08afbc299081c0018d2745470/href</a></iframe><p>Webpack supports Lazyloading of modules. For example, Login module for unregistered or un-logged in users was lazy loaded with the aid of Webpack. Features like these made loading of js files quicker.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1fa20db568b4c4b8c17687a35acf8664/href">https://medium.com/media/1fa20db568b4c4b8c17687a35acf8664/href</a></iframe><p>Since Webpack provides us with a feature that is necessary to make our STYFI load faster, it became the obvious choice for our front-end team to move from RequireJs to Webpack 2.</p><p><em>— </em><a href="https://medium.com/@satishgowda"><em>Satish Gowda</em></a></p><p>Front End, STYLABS.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4fd330249acb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How We Made Searching By Colour Better And Faster?]]></title>
            <link>https://medium.com/@STYLABSHQ/how-we-made-searching-by-colour-better-and-faster-b5e6384b27c6?source=rss-312a2a1495ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/b5e6384b27c6</guid>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ecommerce]]></category>
            <category><![CDATA[computer-vision]]></category>
            <category><![CDATA[tech]]></category>
            <category><![CDATA[image-processing]]></category>
            <dc:creator><![CDATA[STYLABS HQ]]></dc:creator>
            <pubDate>Tue, 06 Feb 2018 07:47:25 GMT</pubDate>
            <atom:updated>2018-11-20T09:51:29.664Z</atom:updated>
            <content:encoded><![CDATA[<p>Colours are one of the primary factors that affect our purchases. We are all extremely selective about the colours that suit us and the colours we choose for varying occasions. While earlier there were only a stock set of colours, today because of progress in technology, designers are able to experiment with more. That said, since each colour has many shades and tints, the topic of colour taxonomy is still a sensitive one.</p><p>What you choose to call a colour is very subjective. This trickles down in e-retail, where the bridge between the colour a consumer is looking for and the colour available on the site is still wide. Majority of the time, a customer fails to get the colour shade of their preference.</p><p>To address this problem, we have built a system, which identifies dominate and disparate colours. Further, it also suggests similar products based upon the colour searched.</p><h3><strong>Problem Statement</strong></h3><p>As developers of STYFI, we wanted to bridge the gap between the colours users are searching for and the colours tagged on our website. Our goal was to give users the most relevant products based on their searches. Scouting for colour in product descriptions is common yet inaccurate. Search results too tend to yield products of different shades of one dominate color.</p><p>For example, if a user had searched for shirts in green, they would be expecting a result based on their perception. But the complex world of colours would mean that shades and tints of green would be offered to them as well. Hence, we needed to rank a colour and its shades before this problem started affecting our sales.</p><p>To address this problem, we divided our system into two models:</p><h3><strong>1. Computer Vision</strong></h3><p>As researchers of computer vision, our goal was to get our systems to detect dominate and disparate colors from a given image. To tackle this, we built an algorithm, which could extract colours from a given image, based upon its dominate colour. It then merges similar shades and gives us a set of colour palette, in the descending order starting from the most dominate shade to the least. The flow diagram is shown below.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*DZ4BY7fw2CcUDbWl." /></figure><ul><li><strong>Preprocessing:</strong></li></ul><p>The aim of Preprocessing is to enhance image data. Preprocessing does this via an image, by removing noise for better processing in further steps. This helps us in gaining better colour and localisation information of the product. For this we worked upon image equalisation and contrast enhancement on product images.</p><ul><li><strong>Background Removal:</strong></li></ul><p>In Background Removal, the image is segmented in two parts, foreground and background. Product images with less contrast, less focussed foreground, and non uniform backgrounds are a few glitches in Background Removal.</p><p>To solve this, we did an elaborate study and implementation of algorithms such as Watershed, Opencv Grabcut and many more.</p><p>This study helped us in designing a system for background removal. We used concepts such as contour analysis, and refined our edge detection by using morphological operations. We performed connected component analysis and used Opencv, Grabcut for better background removal.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bz6BAPlsqoo8QJA4." /></figure><ul><li><strong>Skin Detection:</strong></li></ul><p>Some of our product images are like the one displayed below in Figure 3. Here, the pixel count of human skin is larger when compared to pixel count of the product.</p><p>There already are multiple skin filters available for use, but relying on a single filter did not bode well on our data. Hence, we decided to use 3 color models (RGB, HSV and YCbCr) and used 3 skin color thresholds taken from various studies and generated a label image for the skin pixels.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*oT0leny6ivgQsENt." /></figure><ul><li><strong>Dominate &amp; Disparate Colour:</strong></li></ul><p>Our aim was to find dominate and disparate colors, use our background removal and skin detection algorithm, combined with further processing of calculating histogram based on 3 channel images. We flattened the histogram into a single channel and then indexed it in descending order.</p><p>Our aim to give the dominate colour as the result for products searched by our consumer, kept us focussed. Based on this, we decided to make clusters of disparate color and merged similar shades into a dominate colour. We used Euclidean distance to combine similar shades. With multiple observations and analysis, we calculated our threshold value. What resulted was an exclusive colour palette for every product in the image.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ZbZ0w4WpVlRd4Qah." /></figure><h3><strong>2. Search Best Match Of Colour:</strong></h3><p>To give a faster and better search experience to our consumers based on their color requirements, we designed a “Best Match” system that gives the product the best matches in the quaried color.</p><p>In RGB models, each channel is equally responsible for intensity and colour. So a small change in RGB can change its colour and intensity. We used LAB as a colour model because AB is responsible for colours, whereas L stands for intensity. We used the Geopoint Location feature, to search nearby colour points., where A and B represent Longitude and Latitude respectively, of LAB colour model.</p><pre>queryPoint = { &quot;type&quot; : &quot;Point&quot;,</pre><pre>               &quot;coordinates&quot; : lab_B , lab_A }</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*A2uwQhMUhp_MmtJU." /></figure><h3><strong>Conclusion:</strong></h3><p>The results of dominate and disparate colour detection algorithm are described in section 1. As you can see, we faced a lot of problems during implementation. The second colour of both colour palettes is not present in apparels as shown in Figure 4.a and 4.b. To overcome this problem we modified and brought the concept of dynamic thresholding, which can vary from image to image based upon the label image. This helped us to increase accuracy from ~85 to ~90%.</p><p>The second problem we faced was during skin pixel detection as shown in Figure 6. As you can see, the pair of trousers were detected as skin because of the hard threshold of skin values set by skin detection algorithm. To solve this problem, we found a total number of skin pixels and whether they excessed with dynamic thresholding, which was calculated based upon image dimensions and background mask. We assumed that the skin mask was covering the apparel and hence, we ignored it. We can see in figure 6, the difference in the results of colour palette with or without the skin mask. The overall accuracy is around ~95% as per our datasets.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YcS-xLaVR5mZJ3pV." /></figure><p>— <a href="https://medium.com/@himanshurobo"><em>Himanshu Srivastava</em></a><em>, </em>Lead Architect/Artificial Intelligence, STYLABS.</p><p>— <a href="https://medium.com/@rishabh_"><em>Rishabh Shah</em></a><em>, </em>Intern/Computer Vision, STYLABS.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b5e6384b27c6" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Automatically-read-OTP from SMSes — Android 4.3 to 8.x]]></title>
            <link>https://medium.com/@STYLABSHQ/automatically-read-otp-from-smses-android-4-3-to-8-x-99e1f75b5804?source=rss-312a2a1495ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/99e1f75b5804</guid>
            <category><![CDATA[fashion]]></category>
            <category><![CDATA[otp]]></category>
            <category><![CDATA[sms]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[android-app-development]]></category>
            <dc:creator><![CDATA[STYLABS HQ]]></dc:creator>
            <pubDate>Tue, 30 Jan 2018 09:04:11 GMT</pubDate>
            <atom:updated>2018-11-20T09:52:01.723Z</atom:updated>
            <content:encoded><![CDATA[<p>E-commerce apps are the new rage and understandably so. They provide convenience and value to the user all the while backing this experience with reliable security. That said, creating a balanced user-experience is tricker to achieve than it looks; it’s easy to overdo, or underdo.</p><p>SMS is one of the common modes to authenticate, communicate and provide service to the users. As a preliminary step to even enable any of those, the user has to voluntarily register with their mobile number with the service provider.</p><p>Such “one-time” registration is usually seen as follows:</p><ol><li>User initiates a registration request,</li><li>A one-time-password (OTP) is sent to the requested mobile number as a part of an SMS,</li><li>User returns this OTP back to the server.</li></ol><p>This is simple enough, but we can automate the last step! There are 3 common techniques to automatically read the OTP on behalf of your users:</p><ol><li>With a broadcast receiver (tested to work upto Android 8.x)</li><li><a href="https://developers.google.com/identity/sms-retriever/overview">With the official SMS verification and retrieval API</a></li><li><a href="https://developer.android.com/reference/android/telephony/SmsManager.html">With the official SMS manager API</a> (token based)</li></ol><p>Let’s discuss the broadcast receiver approach since it’s also the most well known. It’s quicker and does not require additional setups on the server. The other two approaches have been documented on the aforementioned links.</p><p>However, before we continue, there’s a breaking change with Android 8.x some of you may be stuck with. We’ll share our experience and offer a fix.</p><p><strong>THE PROBLEM</strong></p><p>When major changes were introduced on Android 8.x, our app STYFI was hit when the broadcast receiver failed on this latest version of Android. Snap! It seemed implicit broadcast may have been the concern, since a number of intent actions had been blacklisted as a part of <a href="https://developer.android.com/about/versions/oreo/background.html"><em>“Background execution limits</em></a><em>”</em>. But the action we’re interested in, was still whitelisted! After digging further, it was found that the permission wasn’t working right. There’s a subtle difference between the permission your app may request for — READ SMS or RECEIVE SMS.</p><p><strong>THE FIX</strong></p><p>READ SMS allows the app to read all SMSes that exist on device and also the incoming ones. RECEIVE SMS only allows reading the incoming ones. With the broadcast receiver approach, STYFI was earlier configured with the READ SMS permission which caused the failure on 8.x (while it worked absolutely fine on versions prior). What’s odd is that this permission isn’t deprecated either, and the documentation (as of the day this article is published) doesn’t talk anything about this behaviour.</p><p>Fear not! SMS_RECEIVED_ACTION is tested to work with the RECEIVE SMS permission! That’s how STYFI resumed its support for Android 8.x!</p><p>The steps go as follows:</p><ol><li>Request for a specific permission from the user,</li><li>Construct an interface (A bridge between the broadcast receiver and the bound views),</li><li>Construct a custom broadcast receiver,</li><li>Register this receiver in the manifest,</li><li>Bind it with any Activity or fragment,</li><li>Unbind when onDestroy is called.</li></ol><p><strong>Request for a specific permission from the user</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/36f22cc04848e0551f6e82c259179b2d/href">https://medium.com/media/36f22cc04848e0551f6e82c259179b2d/href</a></iframe><p>If permission is denied, rest of the steps won’t work and the app will throw a non-fatal error saying:</p><p><em>Permission Denial: receiving Intent { act=android.provider.Telephony.SMS_RECEIVED …</em></p><p>So it’s important that this permission is granted.</p><p><strong>Construct an interface (A bridge between the broadcast receiver and the bound views)</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/23b106899acef2512015576781b2af5c/href">https://medium.com/media/23b106899acef2512015576781b2af5c/href</a></iframe><p><strong>Construct a custom broadcast receiver</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7a7c29f9aac2bc8488a1398f7d2a023d/href">https://medium.com/media/7a7c29f9aac2bc8488a1398f7d2a023d/href</a></iframe><p><strong>Register this receiver in your manifest</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ea17064ec00665e1ea78660281f9b20b/href">https://medium.com/media/ea17064ec00665e1ea78660281f9b20b/href</a></iframe><p><strong>Bind it with any Activity or fragment!</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/90a32a06c9a5fdad17ff819e1aa6ae25/href">https://medium.com/media/90a32a06c9a5fdad17ff819e1aa6ae25/href</a></iframe><p><strong>Don’t forget to unbind this listener</strong></p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/7055ead9aef82df30761fc5fa1070059/href">https://medium.com/media/7055ead9aef82df30761fc5fa1070059/href</a></iframe><p>So this is how you can have your app listening for a specific SMS, and automatically read the contents within, on behalf of your users. It’s quick to setup, doesn’t break on Android Oreo and a nice addition to the overall user-experience.</p><p><a href="https://www.instagram.com/sabergeek"><em>— Raj Agrawal</em></a></p><p>Ideator/Indie-developer — <a href="https://play.google.com/store/apps/details?id=com.uberfables.leface.keyboard">‘Le Face Keyboard’</a>. Guitar Noodler.</p><p>Android, STYLABS.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=99e1f75b5804" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How We Developed Scalable Coupon Management System In Node?]]></title>
            <link>https://medium.com/@STYLABSHQ/how-we-developed-scalable-coupon-management-system-in-node-945426b02df1?source=rss-312a2a1495ae------2</link>
            <guid isPermaLink="false">https://medium.com/p/945426b02df1</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[STYLABS HQ]]></dc:creator>
            <pubDate>Tue, 23 Jan 2018 11:56:04 GMT</pubDate>
            <atom:updated>2018-11-20T09:52:15.057Z</atom:updated>
            <content:encoded><![CDATA[<p>Everyone loves freebies! Think vouchers, coupons and discount codes and you will have consumers lined up. Special offers act as a stimulus that turns potential consumers into consumers, who finally click on checkout. These also act as an incentive for past purchasers to be recurring and returning.</p><p>According to VoucherCloud, 91% of coupon redeemers suggest that they will revisit retailers that offer coupons, 57% of shoppers insist they would have abandoned their purchase without a coupon, and 62% of consumers spend two hours each week searching for deals and special offers.</p><p>Those are some big numbers that disclose the heady role that vouchers and coupons play in online commerce.</p><p>Also, a study done by Coupons.com and Dr. Paul J. Zak, Professor of Neuroeconomics at Claremont Graduate University found that coupon recipients were happier and more relaxed with a 38% increase in oxytocin levels.</p><p>Having done this research, we wanted a simple yet robust coupon management system with dynamic validations. Achieving this was quite a task as we required a scalable database schema for coupons, which would support dynamic validations along with flow control library to achieve scalable code in node js. This where constraint based database schema and node js based <a href="https://github.com/fuzzy-coder/rule-engine"><strong>rule-engine</strong></a> come into picture. The following diagram describes a sample constraint schema.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/431/0*W9_ll-HLY1xJaADB." /></figure><p>A coupon inherently holds a discount attribute which is only applied when all the constraints are satisfied. Constraints values are stored in de-normalized (comma separated) way. This may result in less throughput, but makes it easier to add or remove constraints. Each constraint holds its associated values which will be validated by node js based rule-engine. Scaling such schema can be achieved by merely adding new constraints.</p><p>Every developer, who has worked on node js has at least once encountered nested callback problem. Now try introducing if…else constructs into it. No wonder developers call it callback hell!</p><p>The following code illustrates this problem very well.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/625/1*VHTDraXqmJehSHeeMTZ8Sw.png" /></figure><p>Now imagine you have hundreds of constraints to validate. Yes, we imagined the same horror. Fret not though, rule-engine to the rescue. <a href="https://github.com/fuzzy-coder/rule-engine">rule-engine</a> is a flow control library, which works very well with nodes async nature. It replaces if…else constructs with condition…consequence constructs.</p><p>Consider the following example :</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*5V_oi_J6yPeGghsdCKg26A.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/607/1*z4B8bOFQ62sMiX2rZYi5pQ.png" /></figure><p>The rule engine flow control api provides methods such as enqueue, where you can use builder design pattern and construct rules dynamically. It also supports waterfall flow control api, where data can be passed/cascaded to next rule. Following diagram illustrates rule-engine rule validation process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/501/0*JBmXUwiLqDmhilhI." /></figure><p>When any of the condition fail, corresponding consequence block is executed, and errors are returned to rule engine. Also, when all conditions are satisfied, you can execute your final logic. In this case, apply coupon discount to your bag total.</p><p>I think you where what I am getting to. This package is not limited to coupons, but can replace any if…else constructs with nested callbacks and cut down on the frustration that all developers encounter. Due to the generic yet simple nature of this package, the application is limitless. For eg: Let’s consider that we want to apply discount to all products of a particular brand or category or start a BOGO (Buy One, Get One) offer on select collections. This can be achieved easily without creating any new messy codes.</p><p>Similarly, the Coupon Management System at STYFI is an example of a powerful and scalable module that empowers Cart/Checkout module with indigenous rules, adaptive behaviour and a powerful discount manager.</p><p>What more can a developer ask for!</p><p>— <a href="https://medium.com/@aditya_joshi2"><em>Aditya Joshi</em></a></p><p>Software Architect, STYLABS.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=945426b02df1" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>