<?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[Brocoders Team - Medium]]></title>
        <description><![CDATA[Technical guides and useful articles for startup’ and business’ owners - Medium]]></description>
        <link>https://medium.com/brocoders-team?source=rss----dcb33b1b980b---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Brocoders Team - Medium</title>
            <link>https://medium.com/brocoders-team?source=rss----dcb33b1b980b---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 22:53:53 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/brocoders-team" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[An effective way to start a NextJS project]]></title>
            <link>https://medium.com/brocoders-team/an-effective-way-to-start-a-nextjs-project-40b545667e1e?source=rss----dcb33b1b980b---4</link>
            <guid isPermaLink="false">https://medium.com/p/40b545667e1e</guid>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[frontend]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[frontend-development]]></category>
            <dc:creator><![CDATA[Rodion Salnik]]></dc:creator>
            <pubDate>Thu, 27 Jun 2024 13:55:57 GMT</pubDate>
            <atom:updated>2024-06-27T13:55:57.609Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Vn9niNDqyy-ClA0mHwVccg.jpeg" /></figure><p>Choosing a framework for starting a new project can be quite challenging, considering the many frameworks and tools available today. Developers who want to build high-performance and scalable web applications often choose Next.js over others. No wonder, since Next.js is a React framework created by Vercel, offers a comprehensive solution for building server-side rendered (SSR) and static web applications. Here are some of the key advantages:</p><ul><li><strong>Server-Side Rendering (SSR) and Static Site Generation (SSG)</strong>: Next.js supports both SSR and SSG, allowing developers to choose the best rendering method for their needs. SSR improves SEO and page load speed by rendering pages on the server, while SSG can pre-render pages at build time for faster performance.</li><li><strong>Built-in Routing</strong>: Next.js simplifies routing with its file-based routing system. By organizing your files and folders in the pages directory, you can automatically create corresponding routes, eliminating the need for an external router library.</li><li><strong>Optimized Performance</strong>: Next.js comes with a host of performance optimizations out of the box, including code splitting, automatic static optimization, and image optimization, ensuring your application runs efficiently.</li></ul><p>Starting from scratch can be time-consuming, especially when configuring essential features like authorization and CRUD operations. A proper approach is to use a ready-made boilerplate that includes these settings, allowing you to focus on building features rather than setting up the basics. By applying a ready-to-use Next.js boilerplate, you would get:</p><ul><li><strong>Time and Effort Savings</strong>: a boilerplate provides a foundation with pre-configured settings, saving you from the hassle of initial setup and configuration.</li><li><strong>Best Practices</strong>: experienced developers follow industry best practices when building boilerplates, ensuring your project starts on the right foot.</li><li><strong>Included Features</strong>: built-in features such as authentication, routing, and state management, that a lot of boilerplates include, allowing you to hit the ground running.</li></ul><h3>Getting Started with a Next.js boilerplate</h3><p>Let’s go step-by-step on how to start your project using a boilerplate.</p><p><strong>Choose a Boilerplate</strong>: Choose the boilerplate that suits your needs. In this review, we’ll use the <a href="https://github.com/brocoders/extensive-react-boilerplate">extensive-react-boilerplate</a> as an example, because we use it in our company. In <a href="https://javascript.plainenglish.io/top-react-boilerplates-2024-complete-research-033f012603df">our boilerplate overview article</a>, we’ve provided the reasons behind its creation and implementation.</p><p><strong>Clone the Repository</strong>: Clone the boilerplate repository to your local machine using Git.</p><pre>git clone - depth 1 https://github.com/brocoders/extensive-react-boilerplate.git my-app</pre><p><strong>Install Dependencies</strong>: Navigate to the project directory and install the necessary dependencies.</p><pre>cd my-app<br>npm install</pre><p><strong>Configure Environment Variables</strong>: Set up your environment variables for authentication and other configurations. To do this, copy the example environment file</p><pre>cp example.env.local .env.local</pre><p><strong>Run the Development Server</strong>: Start the development server to see your project in action.</p><pre>npm run dev</pre><p><strong>Customize Your Project</strong>: With the boilerplate set up, you can now start building your features. The boilerplate provides a structure and essential configurations, allowing you to focus on the core functionality of your application.</p><h3>Conclusion</h3><p>Starting a project with Next.js offers numerous advantages, from server-side rendering to built-in routing and performance optimizations. Using a ready-made boilerplate can further accelerate your development process by providing pre-configured settings and best practices. By leveraging these tools, you can focus on what matters most: building a high-quality, scalable web application. In the next article, we will delve into mastering CRUD operations in Next.js, providing you with the tools and knowledge to manage data effectively in your applications.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=40b545667e1e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/brocoders-team/an-effective-way-to-start-a-nextjs-project-40b545667e1e">An effective way to start a NextJS project</a> was originally published in <a href="https://medium.com/brocoders-team">Brocoders Team</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How We Went from 46 to 99 Performance Score to Improve Our Website Speed]]></title>
            <link>https://medium.com/brocoders-team/how-we-went-from-46-to-99-performance-score-to-improve-our-website-speed-b2ce691fbebf?source=rss----dcb33b1b980b---4</link>
            <guid isPermaLink="false">https://medium.com/p/b2ce691fbebf</guid>
            <category><![CDATA[page-speed]]></category>
            <category><![CDATA[web-performance]]></category>
            <category><![CDATA[speed-optimization]]></category>
            <category><![CDATA[code-optimization]]></category>
            <category><![CDATA[core-web-vitals]]></category>
            <dc:creator><![CDATA[Rodion Salnik]]></dc:creator>
            <pubDate>Wed, 19 Jun 2024 13:05:27 GMT</pubDate>
            <atom:updated>2024-06-19T13:05:27.068Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5CmDHbnm5lyk9aBcI7yhUw.jpeg" /></figure><p>In 2018, Google <a href="https://developers.google.com/search/blog/2018/01/using-page-speed-in-mobile-search">announced</a> that page speed from then on would be a ranking factor for both desktop and mobile search results. But it’s not only ranking that is influenced by page speed. According to <a href="https://www.section.io/blog/page-load-time-bounce-rate/">research</a>, a 3-second page loading time means a 13% bounce rate, so the page speed doesn’t only impact the search results but the user experience as well.</p><p>So what do you do if your website is slow? Fixing website performance is not easy, which is why many companies do only minor optimizations just to keep their websites somewhere in search results. Our <a href="https://brocoders.com/">Brocoders</a>’s website ended up in the same situation. But unlike other businesses out there, we decided to eliminate every performance issue we had.</p><p>Keep reading to find out how we went from a 43 performance score to 99 and why (apart from being very proud of ourselves) having one of the fastest websites in the industry is worth the effort.</p><h3>Our starting point: what was the problem and why we had to solve it</h3><p>The old Brocoders’s site, live since 2011, served us well and we loved it very much as it was our first child. However, after several years we felt it was time for a change. That’s why in 2020 we decided to invest in a new website for our company.</p><figure><img alt="the old Brocoders’s website view" src="https://cdn-images-1.medium.com/max/658/0*Z7sRxurqp0m3K4CS" /><figcaption><em>This is what the old Brocoders’s website looked like. Forever in our hearts.</em></figcaption></figure><p>By rebuilding our website, we aimed to achieve three major goals:</p><ol><li>Increase conversion rates through faster page loads, better UX, and higher-quality content.</li><li>Improve SEO and get better visibility in search engines.</li><li>Improve our brand image by introducing new portfolio projects and client reviews.</li></ol><p>These goals guided us in deciding what features we had to add. Here is the essential functionality we came up with to achieve our goals:</p><ul><li>New highly flexible web pages with a great look and feel to demonstrate our services, industries, technologies, and case studies.</li><li>Updated blog post pages with a search option, tags, and categories.</li><li>‘Get in touch’ and other forms to easily contact us.</li><li>Numerous third-party integrations: Google Tag Manager, Cookiebot, and Hubspot to name a few.</li></ul><p>All in all, our goal was to build a secure static website. That’s why we chose GatsbyJS, a React framework that perfectly aligns with this goal.</p><p>Why Gatsby, you ask? The secret sauce behind <a href="https://www.gatsbyjs.com/">@GatsbyJS</a> is its ability to transform web development into a seamless and fast experience, weaving together pre-built HTML, CSS, and JavaScript during compilation. Developed with React, GatsbyJS also allowed us to create our own templates and components, using extensions from the React ecosystem.</p><p>Another thing we had to care about for the new website was the API backend. Our choice fell on <a href="https://strapi.io/">@Strapi</a>, an open-source content management system. Not only did it allow us to customize our data schemas and extend API functionality to manage different types of content like text, images, and videos, but also saved us a great amount of time and money — with its user-friendly admin panel and additional features we didn’t have to build it all from scratch.</p><p>Finally, for server requests, we used GraphQL. Perfect for collaboration with GatsbyJS, it lets us define the query structure and specify only the necessary fields and relationships, avoiding excessive data, which in turn leads to faster page loading time.</p><figure><img alt="schema of used combination of technologies" src="https://cdn-images-1.medium.com/max/1024/0*h4cRkdUzq5_YrNMz" /><figcaption><em>The combination of technologies allowed us to achieve the perfect website stability and security</em></figcaption></figure><p>Once done, the new website was there, gratifying us with higher rankings and renewed design. At first…But then, things gradually went downhill. After adding new pages, making numerous edits, and integrating third-party software, the codebase had become so heavy that our performance scores on Google’s Lighthouse, a tool that analyzes web page speed, dropped drastically.</p><figure><img alt="Low lighthouse scores before we started" src="https://cdn-images-1.medium.com/max/1024/0*XFWB4i5LwwPE6lsV" /><figcaption><em>Lighthouse scores that our website had before we started working on improvements</em></figcaption></figure><p>With such a low score, Google wouldn’t rank us high. And even if it would, users wouldn’t wait until it loads.</p><p><a href="https://www.ericsson.com/assets/local/mobility-report/documents/2016/ericsson-mobility-report-feb-2016-interim.pdf">Ericsson Research</a> found that the level of stress from waiting for pages to load on mobile can be compared to watching a horror movie. When talking about performance, every second counts. We knew the pain, so we started improving our site’s performance right away.</p><h3>Improving website performance step by step</h3><p>To achieve a significant performance boost, we analyzed the main website issues and started working on solving each of them. Here’s how we overcame the main challenges.</p><h3>1. Accelerating network connections establishment by 2X</h3><p><a href="https://gtmetrix.com/">GMetrics</a>, a tool that shows website loading behavior, helped us identify resources from external domains that caused the longest connection times.</p><figure><img alt="a diagram of downloading time" src="https://cdn-images-1.medium.com/max/953/0*GUUMazJh2CXHMyK4" /><figcaption><em>In purple, you see the time it took for a Domain Name Server to receive the request for a domain name’s IP address, and in light green, you see server connection time. They took too long, so we accelerated them by reducing server connection time.</em></figcaption></figure><p>To speed up our website, we made a few technical optimizations. First, we used Resource Hints, a method involving HTML &lt;link&gt; attributes. These hints help the browser proactively establish connections before making requests for resources from the server. For resources from external domains, we incorporated DNS-prefetch and pre-connect hints that instruct the browser in advance to set up connections with specified domains. Consequently, when the browser needs resources from external domains, they load quicker since the initial setup is already done.</p><p>For internal files like scripts and stylesheets, we applied “preloading” and “prefetch” hints. These hints ensure that when users move between pages on our site, the needed resources are loaded from their local cache, avoiding the need to fetch them from a distant server and making the process faster.</p><p><strong>These optimizations helped us shorten *Largest Contentful Paint from 2,9 seconds to 0,8 and *First Contentful Paint from 1 second to 0,6, allowing the browser to load resources as quickly as possible.</strong></p><p><em>*LCP, a </em><a href="https://developers.google.com/search/docs/appearance/core-web-vitals"><em>Core Web Vitals metric</em></a><em> that measures the time from when the user starts loading the page until the largest image appears in the viewport.</em></p><p><em>*FCP, the time from when the user first accesses the page to when the content is rendered on the screen.</em></p><h3>2. Achieving better font loading with fast text rendering</h3><p>On our website, we use both custom and open-source fonts. We host the open-source font “Manrope” from Google using the <a href="https://fontsource.org/docs/getting-started/introduction">Fontsource</a> collection as this method is the fastest way to access a font.</p><p>However, there was a delay in loading the font package, even though the text was already retrieved from the HTML file. To avoid this disruption between text and font loading, our initial strategy was to show an invisible fallback font until our intended web font fully loads. It worked, but such an approach made the LCP metric longer, which is why we decided to change the strategy and opt for fast text rendering.</p><p>Here is how it works. First, the browser finds an available font within the declared font family and uses it to render the text. Then, after loading the original font, the browser seamlessly swaps the first font with the required one. It’s the fastest way to load fonts but this approach poses risks of unexpected text shifts because of changes in font size. To address layout shifts and improve the Cumulative Layout Shift (CLS, a metric that measures how much the elements on a webpage move around unexpectedly as it loads), we applied <a href="https://www.w3.org/TR/css-fonts-5/">CSS Fonts Module Level 5</a>, a set of specifications that includes descriptors like size-adjust, descent-override, and line-gap-override, that helped us avoid shifts in page content.</p><figure><img alt="a diagram of downloading time with fonts approach" src="https://cdn-images-1.medium.com/max/1024/0*1F9azxrAiUT3Z2gq" /><figcaption><em>CSS Fonts Module Level 5 worked perfectly and now fonts change without any layout shift</em></figcaption></figure><p><strong>As a result, three metrics — First Contentful Paint, Largest Contentful Paint, and Cumulative Layout Shift improved. In particular, CLS was reduced from 0,143 to 0 seconds.</strong></p><h4>3. Improving the loading of images and video</h4><p>Another performance issue we had was enormous network payloads. Site testing revealed that we had to optimize the loading of images and videos, reducing their size without losing the quality.</p><figure><img alt="a diagram of all types of files" src="https://cdn-images-1.medium.com/max/1024/1*4iCvu6s_Qh2D3mmkDKn-kQ.png" /><figcaption><a href="https://yellowlab.tools/"><em>Yellow Lab Tools</em></a><em> testing showed us that among all types of files videos and images overweighted our website the most</em></figcaption></figure><p>On the website, we use two types of images — vector images (in Scalable Vector Graphics (SVG) format) and raster images (in PNG and JPG formats). For each type we applied different optimization approaches.</p><h4>3.1 Optimization of vector images</h4><p>Vector images are usually lightweight but the problem was that each image required a new HTTP request to load, which slowed down the performance. To address this, we decided to adopt inline SVG, a method that allows embedding the image directly into HTML. To achieve this, we adopted the<a href="https://www.gatsbyjs.com/plugins/gatsby-plugin-react-svg/"> gatsby-plugin-react-svg</a>, a Gatsby framework plugin that allowed us to abstract the process.</p><h4>3.2 Optimization of raster images</h4><p>To accelerate the loading of PNG and JPG images, we converted them to the modern .webP format that ensures excellent compression with minimal quality loss. Similarly, we converted videos from .mp4 to .webM, ensuring more efficient compression and quality. Both .webP and .webM became our primary formats, but the old browser versions do not support them. To exclude this problem, we also left fallbacks to .png, .jpg, and .mp4 formats for browsers that don’t support .webP and .webM.</p><p>Next up, we had to optimize image display for different devices. Mobile, tablets, laptops, or 4K monitors require images of different dimensions, so uploading the same image for both phones and 4K monitors only made our website longer to load. That’s why we employed adaptive graphics. We included different image options in the code, letting the browser pick the best one based on things like window size, screen resolution, network speed, and other factors. Using packages like ‘<a href="https://www.gatsbyjs.com/plugins/gatsby-background-image/">gatsby-background-image</a>’ and <a href="https://www.gatsbyjs.com/plugins/gatsby-image/">‘gatsby-image</a>,’ we created various image variants for different devices. In the <a href="https://developer.chrome.com/docs/devtools/network/">Network tab</a> screenshot below, you see the “Toggle device toolbar” where we switched between page display modes.</p><figure><img alt="a device toolbar" src="https://cdn-images-1.medium.com/max/1024/1*A4evM1GzvWWNmg9UlOj2hg.png" /><figcaption><em>This is where we toggled the device toolbar, optimizing image loading for different devices</em></figcaption></figure><figure><img alt="loading process for the same file with reduced size optimized" src="https://cdn-images-1.medium.com/max/1024/0*VbWCdhs4MLjFEbe4" /><figcaption><em>Here you can see the same file with a reduced size optimized for different devices</em></figcaption></figure><h4>3.3 Lazy loading for behind-the-scenes images</h4><p>Finally, we leveraged lazy loading with a blurred image effect to ensure images load only when the user sees them, optimizing the experience for users with limited data plans or slower internet connections.</p><figure><img alt="how the lazy loading of images works" src="https://cdn-images-1.medium.com/max/1024/0*A6ZPWIrnPNWTLIn1" /><figcaption><em>This is how the lazy loading of images works</em></figcaption></figure><p>The results were worth all the sweat — we significantly reduced the weight of the images on the website without sacrificing quality.</p><figure><img alt="all types of files after" src="https://cdn-images-1.medium.com/max/1024/1*3khuR7mDIsF8CRLayRPsjA.png" /><figcaption><em>After improvements, </em><a href="https://yellowlab.tools/"><em>Yellow Lab Tools</em></a><em> shows that the video — not surprisingly — still takes a larger portion of the page’s weight but the weight of images has significantly decreased (purple section)</em></figcaption></figure><p><strong>The optimizations greatly improved user experience and metrics like CLS and LCP. Thanks to using image optimization plugins exclusively from the Gatsby ecosystem, we made it easier to optimize performance.</strong></p><h3>4. Optimizing caching</h3><p>We have to confess that caching, a technique where the web server retains a copy of the web page, was initially overlooked during the website development. It was truly a missed opportunity because effective caching would help us speed up the website and reduce server load. We decided to catch up with cache optimization but faced several specific challenges.</p><p>Our goal was to fasten the loading of resources by keeping them saved for future visits instead of downloading them every time. To achieve this, we employed the ‘cache-control’ attribute in the HTTP header and set the time for how long the file should stay in the cache. But then another issue appeared. When we made updates to the website content or design, the changes wouldn’t show up immediately because the browser kept using the old saved copy.</p><p>How did we solve it? We added a hash to the file names, which updates with every file edit. This way, we could keep files in the cache for a long time but still make changes easily. As a result, the First Contentful Paint (FCP) metric went from high to medium.</p><p>Now, we’re considering another type of caching called browser caching. Unlike server caching, which requires a constant server connection and uses bandwidth to load the response, browser caching allows users to access the webpage without a network connection. But it also has its limitations — if the user’s device is running out of storage space, the browser might delete older stuff to make room for new things.</p><figure><img alt="how caching works" src="https://cdn-images-1.medium.com/max/1024/0*AjVzy9Q01jybC4ve" /><figcaption><em>For you to get a better idea, here is a comparison of how server-side caching and client-side caching work</em></figcaption></figure><h3>5. Eliminating large JavaScript bundles</h3><p>Bundles are simply collections of files, usually JavaScript, CSS, and other assets, grouped in a single file for more efficient delivery. As our website grew in complexity, the size of our bundles continued to expand, overweighting the website. It was high time to identify problem areas and get rid of them.</p><p>There are some handy tools for identifying and addressing problematic bundles. One of them, <a href="https://bundlephobia.com/">Bundlephobia</a>, gives insights into how much an NPM package contributes to bundle size, helping avoid too large collections of files. <a href="https://github.com/wix/import-cost">Import Cost</a>, a VSCode Extension, calculates the ‘cost’ of imported packages, helping to make informed decisions. As part of our optimization strategy, we’ve swapped out hefty JS libraries, such as replacing the widely-used ‘classnames’ package with the more efficient <a href="https://github.com/lukeed/clsx/tree/4c9a55df075eb96d968e09e56cfa3ba57a5bbdca/bench">‘clsx</a>,’ a faster and smaller drop-in replacement tailored to our website needs.</p><p>Then, with the <a href="https://github.com/webpack-contrib/webpack-bundle-analyzer">Webpack Bundle Analyzer</a> plugin, we discovered problematic areas in bundles.</p><figure><img alt="a Bundle Analyzer diagram before" src="https://cdn-images-1.medium.com/max/1024/0*5UmBYjojy5Oh1OZ1" /><figcaption><em>Bundle Analyzer highlighted our biggest bundles — client-location and map-with-flashing-dots</em></figcaption></figure><p>To break down these piles of files, we split big bundles into smaller parts using code-splitting and lazy-loading. Webpack’s built-in code-splitting feature allowed us to transform the import command into a function that points to a file path instead of directly importing files. This creates a promise, which is like a commitment that the file will be loaded. When a similar structure appears in the code, this promise is fulfilled, and the file is uploaded.</p><p>For non-critical view, HTML, and JS, we used dynamic imports which let us reduce the initial size of the webpage. Dynamic here means that the website decides whether to load additional files based on specific conditions, making sure it doesn’t disrupt the user experience.</p><figure><img alt="a Bundle Analyzer diagram after" src="https://cdn-images-1.medium.com/max/1024/0*BifrcvLQ0GDEKgW4" /><figcaption><em>Here’s the result of our optimizations: a streamlined loading with no isolated large bundles</em></figcaption></figure><p><strong>After splitting large bundles into smaller parts, we successfully lightened the page and eliminated all large file collections.</strong></p><h3>6. Minimizing HTML and CSS with code compression</h3><p>Code compression was a game-changer for us. By shrinking the code and removing unnecessary white spaces, we achieved smaller file sizes, lightning-fast downloads, and reduced bandwidth consumption. Now our server delivers website files in a gzip format, making it faster and significantly improving important metrics like FCP and FID (First Input Delay, a metric that quantifies the delay between the first click and the browser’s response) from low to medium performance levels.</p><h3>7. Code quality and memory leaks</h3><p>Finally, we reviewed our code and discovered some sneaky memory leaks. The problem was that objects were still in memory even when they were no longer needed, resulting in a cluttered space.</p><p>To fix this, we applied two methods. If the event listener (a mechanism that awaits specific occurrences, such as user interactions or system events, and responds accordingly) is only needed once, we use the {only: true} parameter. It ensures that after the listener is triggered, it’s automatically removed, preventing any memory issues. As for the second method, we made sure to explicitly remove event listeners using the removeEventListener() function. We did this before removing the element or when the listeners were no longer needed. This ensured a clean disconnection between elements and functions, avoiding memory leaks.</p><p>Another thing related to addEventListener is using the { passive: true } parameter. We adopted it for scrolling, avoiding interface hiccups, and ensuring a smoother user experience.</p><pre>  useEffect(() =&gt; {<br>    setScrolled(document.documentElement.scrollTop &gt; 50);<br>    window.addEventListener(&#39;scroll&#39;, handleScroll, { passive: true });<br>    return () =&gt; {<br>      document.body.style.overflowY = &#39;scroll&#39;;<br>      window.removeEventListener(&#39;scroll&#39;, handleScroll);<br>    };<br>  }, []);</pre><h3>Before and after: how performance boost impacted our website</h3><p>Truth be told, our starting point was far from good — a website wrestling with sluggish load times and an overloaded server that drastically impacted the user experience. But armed with insights and optimization techniques, we did our best and received impressive results. Were we happy with them? Absolutely.</p><figure><img alt="a screenshot on Lighthouse metrics" src="https://cdn-images-1.medium.com/max/1024/0*jvbVOJpZeVc6BU4j" /><figcaption><a href="https://pagespeed.web.dev/"><em>PageSpeed Insight</em></a><em> handed us a shiny report card, showcasing significant improvements</em></figcaption></figure><figure><img alt="a screenshot on Core Web Vitals metrics" src="https://cdn-images-1.medium.com/max/1024/0*MzL7XuCdiQ8fsOP9" /><figcaption><em>The testing of the 28-day performance showed impressive results — all metrics were improved several times compared with the starting point</em></figcaption></figure><p>All these improvements wouldn’t be possible without hours and days of dedicated work, but there was something else that greatly contributed to our success — the right tools. Some instruments saved us a lot of time during the work and we can’t help but mention them.</p><h3>Tools for performance optimization: PageSpeed Insights and Lighthouse</h3><p>In performance analysis and improvement, two Google instruments stand out: <a href="https://pagespeed.web.dev/">PageSpeed Insights</a> and <a href="https://developer.chrome.com/docs/lighthouse/overview">Lighthouse</a>. These tools analyze various aspects of a web page to provide insights into its speed, user experience, and overall performance. Here are the metrics that they both consider:</p><ul><li><strong>Largest Contentful Paint (LCP) </strong>— measures the time it takes for the largest content element (such as an image or text block) in the viewport to become visible to the user.</li><li><strong>First Contentful Paint (FCP)</strong> — measures the time it takes for the browser to render the first piece of content, such as text or an image.</li><li><strong>First Input Delay (FID)</strong> — measures the delay between a user’s first interaction (such as clicking a button) and the browser’s response to that interaction.</li><li><strong>Cumulative Layout Shift (CLS) </strong>— measures the sum of all individual layout shift scores that occur during the page’s lifespan. A layout shift occurs when visible elements on a page move unexpectedly.</li><li><strong>Interaction to Next Paint (INP)</strong> — measures the time it takes for the browser to respond to user interactions (such as clicks or taps) by updating the visual content on the page.</li><li><strong>Time to First Byte (TTFB)</strong> — measures the time it takes for the browser to receive the first byte of data from the server after a request is made.</li><li><strong>Total Blocking Time (TBT)</strong> — measures the total amount of time during which the main thread of the browser is blocked and unable to respond to user input.</li><li><strong>TTI (Time To Interactive) </strong>— measures the time it takes for a page to become fully interactive, meaning all necessary resources are loaded, and the page responds promptly to user input.</li><li><strong>FID (First Input Delay) </strong>— measures the delay between a user’s first interaction and the browser’s response to that interaction.</li></ul><p>You can use either of these tools to get insights into your website’s performance. Lighthouse is more flexible and provides more detailed information. PageSpeed Insights, on the other hand, focuses on monitoring the performance of individual pages.</p><p>The most commonly used, these two aren’t the only tools we recommend. Here are a couple of resources you’ll find useful in your performance optimization journey.</p><h3>Bonus tools for a deeper dive</h3><p><a href="https://gtmetrix.com/">GTMetrix</a>: a powerhouse that not only audits pages but also visualizes loading in a digestible format, making performance improvements tangible.</p><p><a href="https://yellowlab.tools/">Yellow Lab Tools</a>: an insightful dashboard that classifies and evaluates dozens of metrics. It not only pinpoints issues but also provides detailed recommendations for optimization.</p><p>These tools have been our guiding lights, helping us enhance performance and offer a superior user experience. Keep them in mind when you start to improve your website performance.</p><h3>Bottom line</h3><p>If your business depends on the website, you can’t sleep on its performance. This factor can move you to the top of the Google results or, on the contrary, make your users leave for faster websites that give them a better experience. To help you avoid this scenario, we shared the story of our website transformation.</p><p>Our performance odyssey isn’t over as there will always be room for improvement. Lately, we’ve been noticing that GatsbyJS is experiencing not the best times and we are deliberating about switching to NextJS. But this is the subject of the other article.</p><p>But like there are no identical businesses, there is no single instruction on how to improve your site performance. Every case is unique and you need to address the challenges that pose the issue in your case. Not an easy task to do, but we can help. If you want to give your website a performance boost, <a href="https://brocoders.com/get-in-touch/">drop us a note</a>, and we’ll see what we can do for you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b2ce691fbebf" width="1" height="1" alt=""><hr><p><a href="https://medium.com/brocoders-team/how-we-went-from-46-to-99-performance-score-to-improve-our-website-speed-b2ce691fbebf">How We Went from 46 to 99 Performance Score to Improve Our Website Speed</a> was originally published in <a href="https://medium.com/brocoders-team">Brocoders Team</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Building LLM — based Application Using Langchain and Open AI]]></title>
            <link>https://medium.com/brocoders-team/one-more-example-of-building-llm-based-application-using-langchain-and-open-ai-a7888cadb300?source=rss----dcb33b1b980b---4</link>
            <guid isPermaLink="false">https://medium.com/p/a7888cadb300</guid>
            <category><![CDATA[llamaindex]]></category>
            <category><![CDATA[llm]]></category>
            <category><![CDATA[chatbots]]></category>
            <category><![CDATA[gpt]]></category>
            <category><![CDATA[langchain]]></category>
            <dc:creator><![CDATA[Rodion Salnik]]></dc:creator>
            <pubDate>Wed, 19 Jul 2023 13:40:11 GMT</pubDate>
            <atom:updated>2023-07-19T13:40:11.380Z</atom:updated>
            <content:encoded><![CDATA[<h3>Building LLM-based Application Using Langchain and OpenAI</h3><p>Learn about the dev team’s first experience of building a context-aware AI chatbot based on LLM. Here I will tell how we prepared a knowledge database from various documents, compared index types, switched from Lamaindex to Langchain, and experimented with prompts, inputs and LLMs.</p><h3>The Situation</h3><p>The client had requested my team to conduct an R&amp;D of an AI chatbot capable of addressing inquiries related to property management and community association management services.</p><p>This advanced chatbot would leverage the association’s documents, videos, and frequently asked questions (FAQs) to provide accurate responses. The desired outcome was to have the chatbot deliver precise and relevant answers to questions posed by employees. This would enable the company’s team members to access information efficiently, enhance customer service, and expedite their workflow.</p><p>However, there were certain <strong>challenges</strong> that we needed to overcome:</p><ul><li>Dealing with various types of documents, including PDFs, docs, videos, and FAQs.</li><li>Ensuring the quality of documents and extracting the relevant information.</li><li>Building a chatbot capable of understanding custom questions and maintaining conversation context.</li></ul><p>After gathering all the requirements from the client, we initiated our R&amp;D process.</p><h3>Initial solution concept</h3><p>The initial concept revolved around leveraging the Documents Indexing Processor (GPT Index) to establish a connection with the GPT/LLM model.</p><h4>Process:</h4><ol><li>Building the Knowledge Database:<br>• Configure the Documents Indexing Processor to establish a connection with the client’s data sources and ingest the documents.<br>• Implement the GPT model to collaborate with the Documents Indexing Processor.</li><li>Developing a Web Interface for the Chatbot:<br>• Create a user-friendly web interface for the chatbot that captures user details and comprehends user inquiries.</li><li>Providing Automated Updates:<br>• Offer a streamlined and automated method to update the AI model based on the client’s documents and instructions.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NLq5f34K9mhIdSRUZTA8iw.png" /><figcaption><a href="https://drive.google.com/file/d/1U329tjItKfLoLuM2eVknrAbviW-nA19F/view?usp=sharing">View document</a></figcaption></figure><h3>Building knowledge database</h3><p>We embarked on the task of creating a knowledge database using the clients’ documents. This database plays a pivotal role in enabling the functionality of the chatbot.</p><h4><strong>Acquiring Documents</strong></h4><p>To gather all documents into one place, we had to either upload all the documents to our own database, by utilizing JSON file with all links (that we were provided with) or use the client’s server. We uploaded all documents to our server to have more control over the data.</p><h4>Convert all information to the text and quality analyze</h4><p>To convert all the information into text, we employed OCR technology.</p><p>Our chosen solution was the Tesseract OCR engine, a widely used open-source tool. By utilizing this technology, we could extract machine-readable text from the documents’ images or scanned pages. Additionally, Tesseract played a crucial role in evaluating the quality of each document. This assessment helped us identify any potential issues or errors introduced during the OCR process, such as incorrect character recognition or formatting discrepancies. Assessing the document quality was essential to ensure the reliability and accuracy of the knowledge database. Moreover, this allowed us to pinpoint areas for improvement in the overall process, focusing specifically on enhancing OCR accuracy and observing its impact on the final outcome.</p><p>This database, containing text-based information, serves as the foundation for the subsequent stages of our research.</p><h4>Adding embeddings</h4><p>In the field of natural language processing (NLP), embeddings serve as a technique to transform textual data into a numerical format that can be understood and processed by machine learning algorithms. For our knowledge database, we utilized <a href="https://platform.openai.com/docs/api-reference/embeddings/create">OpenAI API</a> to generate embeddings.</p><p>OpenAI’s text embeddings are designed to measure the relationship between different text strings. These embeddings find applications in various areas, including:</p><ul><li><em>Search</em>: Text strings can be ranked based on their relevance to a query, enabling effective search functionality.</li><li><em>Clustering</em>: Text strings can be grouped together based on their similarity, facilitating clustering analysis.</li><li><em>Recommendations</em>: By considering the relatedness of text strings, items with similar content can be recommended to users.</li><li><em>Anomaly Detection</em>: Outliers that exhibit minimal relatedness to other text strings can be identified, aiding in anomaly detection tasks.</li><li><em>Diversity Measurement</em>: Similarity distributions of text strings can be analyzed to assess the diversity within a dataset.</li><li><em>Classification</em>: Text strings can be classified based on their similarity to predefined labels, enabling effective classification tasks.</li></ul><h3>Developing a Context-Aware Chatbot: Exploring Potential and Challenges with LlamaChain and Langchain</h3><p>Custom data source was ready and now we had to enable connection between it and large language mode. To do this we have chosen <a href="https://www.llamaindex.ai/"><strong>Llamaindex</strong></a>.</p><p>LlamaIndex is a flexible and straightforward data framework that provides the key tools to augment your LLM applications with data, such as data ingestion, data indexing, query interface.</p><p>Initially, our approach involved utilizing the conversation context encapsulation capabilities offered by LlamaIndex. However, we encountered some challenges using LlamaIndex because its undergoing frequent updates. Additionally, the tools provided by Llamaindex for chat context handling essentially acted as a wrapper around another powerful technology known as <strong>Langchain</strong>. Therefore, to optimize our approach, we decided to delve deeper into the core technology, Langchain.</p><p><a href="https://python.langchain.com/">LangChain</a> is an open-source development framework specifically designed for applications utilizing large language models (LLMs). It provides various components that serve as abstractions, enabling more efficient and programmatic utilization of LLMs.</p><p>These components include:</p><ul><li>Models: Such as ChatGPT or other large language models.</li><li>Prompts: These encompass prompt templates and output parsers.</li><li>Indexes: Ingesting external data, including document loaders and vector stores.</li><li>Chains: Combining different components to create end-to-end use cases. For instance, a simple chain could involve Prompt + LLM + Output Parser.</li><li>Agents: Facilitating the utilization of external tools by LLMs.</li></ul><p>By exploring the potential of LangChain, we aim to enhance the abilities of LLMs and develop chatbot solutions that excel at maintaining conversation context and delivering more advanced functionalities.</p><h4>Indexes</h4><p>Indexes in LangChain are used to structure documents for optimal interaction with large language models (LLMs). The indexing module provides utility functions and examples for working with different types of indexes.</p><p>The indexing components in LangChain include document loaders, text splitters, vector stores, and retrievers. Document loaders retrieve documents from various sources, text splitters break text into smaller chunks, vector stores are the main index type relying on embeddings, and retrievers fetch relevant documents for use with language models.</p><p>The most common use of indexes in LangChain is for retrieval, where relevant documents are fetched based on a user’s query. LangChain primarily supports vector databases as the main index type.</p><p>During testing, we experimented with different index types, including tree, vector, and graph indexes. However, the Vector database showed the most promising results, leading us to focus on its utilization.</p><p>By leveraging LangChain’s indexing capabilities, we optimized our chatbot’s performance, ensuring efficient retrieval and use of relevant information.</p><p>Below is some information regarding various index types and our conclusions after testing them.</p><p><strong>1.</strong> <strong>Vector Index</strong></p><p>The vector store index stores each Node and a corresponding embedding in a <a href="https://gpt-index.readthedocs.io/en/latest/how_to/integrations/vector_stores.html#vector-store-index">Vector Store</a>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Rxh_j6F7g_ob931P" /><figcaption><a href="https://gpt-index.readthedocs.io/en/v0.5.27/guides/primer/index_guide.html">Image source</a></figcaption></figure><p><em>Our conclusion</em></p><p>The Vector Index is primarily used for the retrieval of specific context. It is particularly effective when the query contains a piece of context that can be found in the document text. Personally, the Vector Index is considered the best index available. It outperforms other indices in retrieving information and works well with all types of questions except summarization. The most significant advantage of this index type is its rapid retrieval of required information.</p><p>We experimented with different vector databases, specifically the one that Llama uses by default and another one called Chroma. We aimed to identify which database offered the most efficient storage and retrieval of data.</p><p><strong>2. Tree Index</strong></p><p>The tree index builds a hierarchical tree from a set of Nodes (which become leaf nodes in this tree).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*NArRt-Z658V8imX9" /><figcaption><a href="https://gpt-index.readthedocs.io/en/v0.5.27/guides/primer/index_guide.html">Image source</a></figcaption></figure><p>The Tree Index is best suited for summarizing documents or sets of documents. It can also be used for simple retrieval, but the Vector Index is more efficient for this purpose. The main drawback of the Tree Index is its relatively long response time, making it more suitable for summarization tasks.</p><p><strong>3. List Index</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*qMJBKepgv-oSy8df" /><figcaption><a href="https://gpt-index.readthedocs.io/en/v0.5.27/guides/primer/index_guide.html">Image source</a></figcaption></figure><p>The list index simply stores Nodes as a sequential chain.</p><p><em>Our conclusion</em></p><p>Similar to the Tree Index, the List Index is also best suited for summarizing documents or sets of documents. However, it differs in its underlying implementation. From a personal standpoint, the Tree Index outperforms the List Index in terms of speed and accuracy in finding the right information. The List Index was found to be slower and less efficient.</p><p><strong>4. Graph Indices</strong></p><p>Graph Indices are a type of index where we have a root index, such as a List Index, that contains other indices. This type of index is useful when we have a multitude of different indices and we want to combine them into one. All sub-indices should have a good description so that the appropriate index can be chosen for use. There are three types of Graph Indices:</p><p>a. List Index with Vector Indices<br>In theory, splitting one large index into smaller indices should reduce response time, but this was not observed with this type of graph.</p><p>b. Tree Index with Vector Indices<br>This is similar to the List Index with Vector Indices, but it operates slightly faster.</p><p>c. Simple Keyword Index with Vector Indices<br>This type of index works best for split indices. It significantly speeds up our response time compared to one large index. However, all sub-indices should have a very good description with a lot of keywords, as this type of graph will select the sub-index that has the most keywords in its description.</p><p><strong>Vector stores</strong></p><p>We used vector stores to store and search information via embeddings, we implemented on the previous step. VectorStore serves as a storage facility for these embeddings, allowing efficient search based on semantic similarity.</p><h3>Chains</h3><p>After confirming the effectiveness of our vector-based search in retrieving relevant documents, our next step was to input them into the LLM to generate more detailed and human-like responses.</p><p>To achieve this, we utilized the chain component of LangChain, which enabled us to create sequences of modular components tailored to specific use cases. LangChain’s index-related chains were particularly useful in interacting with indexes and combining our data with LLMs. An important use case we focused on was question answering using our own documents.</p><p>The objective was to integrate our indexed data with the LLM. LangChain provided support for four commonly used methods or chains:</p><h4>Stuffing</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*WGvp2sUS9gRm5tET" /><figcaption>image source</figcaption></figure><p>The simplest approach involves including all relevant data as context in the prompt passed to the LLM. This is implemented as the StuffDocumentsChain in LangChain.</p><ul><li>Pros: Only requires a single call to the LLM, allowing access to all the data at once.</li><li>Cons: Limited by the context length of the LLM, making it unsuitable for large documents or multiple documents exceeding the context length.</li></ul><h4>Map Reduce</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*zCkLoAHxUd6GjMYj" /><figcaption><a href="https://python.langchain.com/docs/modules/chains/document/map_reduce">Image source</a></figcaption></figure><p>This method entails running an initial prompt on each chunk of data and generating individual outputs. Subsequently, a separate prompt is used to combine these initial outputs.</p><ul><li>Pros: Can handle larger documents and more documents compared to Stuff Documents Approach. Calls to the LLM for individual documents are independent and can be parallelized.</li><li>Cons: Requires multiple calls to the LLM, losing some information during the final combination.</li></ul><h4>Refine</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*bIywYMX5Oxp8Hwer" /><figcaption><a href="https://python.langchain.com/docs/modules/chains/document/map_reduce">Image source</a></figcaption></figure><p>The refine method involves running an initial prompt on the first chunk of data and generating output. This output, along with the subsequent document, is then passed to the LLM to refine the response based on the new information.</p><ul><li>Pros: Allows for pulling in more relevant context and may retain more information compared to Map Reduce method.</li><li>Cons: Requires multiple calls to the LLM, and the calls are not independent, preventing parallelization. The order of the documents may also impact the results.</li></ul><h4>Map-Rerank</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*45GAl0VKnWt1BOS4" /><figcaption><a href="https://python.langchain.com/docs/modules/chains/document/map_rerank">Image source</a></figcaption></figure><p>This approach entails running an initial prompt on each chunk of data, considering not only task completion but also assigning a score indicating the certainty of the answer. The responses are then ranked based on these scores, and the highest-scoring answer is returned.</p><ul><li>Pros: Similar advantages as Map Reduce with fewer calls to the LLM.</li><li>Cons: Cannot combine information between documents, making it most suitable for scenarios with a single, straightforward answer within a single document.</li></ul><p>We successfully utilized the <strong>Stuffing method</strong> to process and integrate our indexed data with LLMs, resulting in more comprehensive and contextually appropriate responses.</p><p>Additionally, we constructed our chain based on the RetrievalQA and Conversational Retrieval QA components offered by LangChain.</p><p><a href="https://python.langchain.com/docs/modules/chains/popular/vector_db_qa">https://python.langchain.com/docs/modules/chains/popular/vector_db_qa</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Spd2KbOoMjq0cgGX" /></figure><h4>Agents</h4><p>In certain applications, the required chain of calls to LLMs or other tools may not be predetermined but rather dependent on the user’s input. In such cases, an “agent” is employed, which has access to a range of tools. Based on the user’s input, the agent determines which tools, if any, should be called.</p><p>During our exploration, we examined various agent implementations and the tools provided by LangChain. Unfortunately, none proved to be a satisfactory fit for our specific requirements.</p><p>Nevertheless, we discovered that LangChain offers the flexibility to create our own agent and tool implementations. With this in mind, we embarked on devising an implementation tailored to our needs. However, we encountered an error within LangChain: our tool, built using an index generated by LlamaIndex, was not recognized as a valid tool. The underlying cause of this error remains elusive at this time.</p><p>We have shifted our strategy towards constructing a tool exclusively using LangChain’s tools, without relying on LlamaChain. We speculate that this approach may yield positive results, as LangChain’s index exhibits slight differences compared to that of LlamaChain. This divergence might potentially address the error we encountered in our previous attempts.</p><h4>Prompt templates</h4><p>A PromptValue represents the final value passed to the model. Typically, this value is not hardcoded but dynamically generated based on a combination of user input, non-static information from multiple sources, and a fixed template string. The component responsible for creating the PromptValue is called a PromptTemplate. It exposes a method that takes input variables and returns the corresponding PromptValue.</p><p><strong>Prompt Experimentation</strong></p><p>We conducted experiments with various prompts to optimize the chatbot’s responses. Our goal was to engineer prompts that would elicit the most relevant and useful responses from the chatbot.</p><p>During this testing phase, we reached the following conclusions:</p><p><strong>LLM Testing</strong></p><p>We evaluated different versions of LLMs, including text-davinci-003, gpt-3.5-turbo, and gpt-4. The text-davinci-003 model performed modestly, while the differences between gpt-3.5-turbo and gpt-4 results were not significant.</p><p><strong>Input Parameter Testing</strong></p><p>We explored various input parameters for the LLM, such as the number of input tokens and output tokens, to assess their impact on the chatbot’s performance.</p><p>Key Parameters:</p><ul><li><em>Prompt</em>: This refers to the input text that you want the AI to respond to. It can be a question, statement, or any other text you want the model to process.</li><li><em>Max tokens</em>: This parameter sets the maximum length of the generated response, specifying the maximum number of tokens (text chunks) the model should produce.</li><li><em>Temperature</em>: This parameter controls the level of randomness in the model’s output. Higher values (close to 1.0) make the output more diverse and creative, while lower values (close to 0.0) make it more deterministic and focused.</li><li><em>Top p or top_k</em>: These parameters are used for techniques like nucleus sampling or top-k sampling, which probabilistically determine the next word in the sequence to add diversity to the model’s output.</li><li><em>Frequency Penalty</em>: This parameter discourages the use of common phrases or responses. Higher values promote more original output, while lower values allow more common phrases.</li><li><em>Presence Penalty</em>: This parameter encourages the model to introduce new topics in its output. Higher values lead to more diverse topics, while lower values keep the output focused on the input topic.</li></ul><p><strong>Compare/Contrast Queries Technique</strong></p><p>This technique is used for decomposing complex questions into sub-questions so that it can collect all necessary data from our documents. Sometimes it decomposes well and logically and asks the right questions, but sometimes it does not. The main issue with this technique is the response time, which is excessively long even for small sets of data.</p><p><strong>Enhancing AI Performance through Questions Decomposition and Context Retrieval Optimization</strong></p><p>Our ongoing investigations have led us to hypothesize that some inaccurate responses from the OpenAI could potentially stem from sub-optimal context retrieval by the Langchain. In light of this, we have embarked on implementing and testing custom retrieval processing to verify and potentially rectify this issue.</p><p>In our quest for enhanced accuracy, we have initiated an innovative research project focused on generating synonymous questions to more accurately capture the appropriate context from the index. Intriguingly, our preliminary testing revealed a subjective accuracy score of 0.7. We observed that slight variations in question phrasing can lead to significant differences in the accuracy of the response.</p><p>For instance:</p><ul><li>Question: “What is the due date for payments?” — produced no answer.</li><li>Question: “What are the due rules for payments?” — produced the required answer.</li></ul><p>This pattern was also observed with a different set of questions:</p><ul><li>Question: “For how long should confidential data be kept?” — produced the required answer.</li><li>Question: “For how long should confidential information be kept?” — produced no answer.</li></ul><p>In light of these findings, we explored further by rephrasing questions that initially did not yield an answer. For example, we inputted the question, “For how long should confidential information be kept?” and obtained a list of synonymous questions that yielded appropriate responses. Some of these synonymous questions include:</p><ul><li>“What is the required duration for retaining sensitive data?”</li><li>“Is there a specified time frame for maintaining private information?”</li><li>“What is the time period for the storage of classified information?”</li><li>“Does the document specify how long confidential details should be preserved?”</li><li>“For what duration is secret information intended to be kept?”</li><li>“How long does the document suggest to hold proprietary data?”</li><li>“Is there a recommended period for keeping confidential information secure?”</li></ul><p>This research indicates that we may be able to engineer prompts to indicate whether a response is successful (true/false) and possibly even the source of the response (no answer/from context/from LLM knowledge). This functionality could allow us to filter responses and feed several questions until the required answer is achieved, potentially enhancing the performance and utility of our AI systems.</p><h4>Developing a Web Interface for the Chatbot</h4><p>Finally, we moved to the main part — how to show this to the customer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TcFupySLnw_adJe5-36FwA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*SbHZam1WdvlCUUIa" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a7888cadb300" width="1" height="1" alt=""><hr><p><a href="https://medium.com/brocoders-team/one-more-example-of-building-llm-based-application-using-langchain-and-open-ai-a7888cadb300">Building LLM — based Application Using Langchain and Open AI</a> was originally published in <a href="https://medium.com/brocoders-team">Brocoders Team</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Create an Uber-like App in 2021: Overview of the Business, Features, and Costs]]></title>
            <link>https://medium.com/brocoders-team/how-to-create-an-uber-like-app-in-2021-overview-of-the-business-features-and-costs-fbc67328814f?source=rss----dcb33b1b980b---4</link>
            <guid isPermaLink="false">https://medium.com/p/fbc67328814f</guid>
            <category><![CDATA[uber-like-app-development]]></category>
            <category><![CDATA[uber]]></category>
            <category><![CDATA[uber-business-model]]></category>
            <category><![CDATA[apps]]></category>
            <category><![CDATA[ridesharing]]></category>
            <dc:creator><![CDATA[Oleg Goncharenko]]></dc:creator>
            <pubDate>Tue, 05 Oct 2021 08:11:31 GMT</pubDate>
            <atom:updated>2021-10-20T09:10:30.841Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6IlTc3w1_2ib3WN8g6gcSA.png" /></figure><p>Uber appeared on the US market 10 years ago, once it was officially announced in San Francisco. Since that time, it has grown up to be the biggest transportation network. Being represented in 85 countries and operating in over 10,000 cities, Uber does not possess any cars. The ridesharing service operates due to the independent drivers’ community, which counts over 3,5 mil people by today.</p><p><strong>How did Uber grow so big? What is the secret of their success?</strong> Apparently, there shouldn’t be any other answer than that: they have changed the rider customer’s experience, having made it more friendly and suitable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*XC8Za7TADekL7xSF" /><figcaption>Source: sfchronicle.com</figcaption></figure><p><strong>Garrett Camp</strong>, a founder and the creator of the Uber idea, claimed that the former cab service hadn’t been transparent to a passenger. He was confused when seeing the empty yellow cab on the roads of San Francisco while having to wait for his taxi continually. Besides that, the arrival time of the cab often went far from expected: customers had to wait longer and never knew the final estimate until the end of the fare.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/802/0*QOXmxA-iXdVlhd5V" /><figcaption>A fragment from the Uber pitch deck made by Garrett Camp in 2008</figcaption></figure><p>Soon after, Garrett Camp and his companion <strong>Travis Kalanick</strong> created the mobile app Uber which turned the following principles to life:</p><ul><li>A rider can order a cab in a few clicks so that a car will arrive in five minutes.</li><li>Before booking a fare, a rider can view the price of the service.</li><li>A cab should be dispatched to a rider at whatever time or place regardless of the weather conditions or community events.</li><li>Payment could be processed cashless, with no need to care about change.</li><li>Car owners could join the platform and earn money by the schedule they prefer.</li></ul><p>Now riders prefer ordering taxis via mobile apps. Lots of transportation companies are interested in constructing mobile services like Uber.</p><p><strong>If you are looking to create an uber-like application, you need to take a few steps:</strong></p><ul><li>Learn the business model of Uber.</li><li>Figure out their user experience.</li><li>Define the stack of technologies to implement.</li></ul><h4><strong>Table of Contents:</strong></h4><ul><li><a href="#c857">Uber Business Model: Value Proposition Comes First</a></li><li><a href="#af61">Drivers’ Acquisition Strategy of Uber</a></li><li><a href="#7aa5">Uber’s Revenue And Expenses</a></li><li><a href="#5d1a">Motivational Programs For Drivers</a></li><li><a href="#153f">Fare Cost And Price Composition</a></li><li><a href="#a13a">A Roadmap To Develop An Uber-like App</a></li><li><a href="#840b">Feature Implementation</a></li><li><a href="#2238">How Long Does It Take To Create An Uber-like App?</a></li><li><a href="#97d4">How To Choose A Vendor</a></li><li><a href="#31aa">Conclusion</a></li></ul><h3><strong>Uber Business Model: Value Proposition Comes First</strong></h3><p>Uber eliminated the third part from the riding process. Currently, a rider orders a fare straight to a driver located in the same area. That takes less time to pick up. Instead of a taxi service company, Uber dispatches the process automatically.</p><p>The app service simplified the taxi order process:</p><ul><li>There is no need for a passenger to call by phone and tell the dispatcher the specifics of the location. Uber indicates the passenger on the map and asks to confirm a place to start a trip.</li><li>The dispatcher doesn’t need to check for taxis in the area and explain the order details to a driver.</li><li>The driver doesn’t need to call back to the dispatcher to confirm the arrival or specify the destination.</li><li>The system automatically calculates the fare’s cost, no need for a driver to call back to the dispatcher and report the final price.</li></ul><p>Uber addressed the issues of the taxi consumers as no other tool for the same price. That is what value proposition is: a product gives a range of advantages that can’t be purchased elsewhere for equal cost.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ajy4KDqxtFsqGGLHoyuBeQ.png" /><figcaption>Source: David Sacks, ex-COO at PayPal, ex-CEO at Zenefits</figcaption></figure><p><em>When creating an uber-like application consider the value proposition at the first point. Study the current experience of passengers and drivers, find the most critical issues in their process routing and try to resolve them. This will make your product needful and encourage new users to move to your platform.</em></p><h3><strong>Drivers’ Acquisition Strategy of Uber</strong></h3><p>In 2014, according to Statista, Uber became the world’s most valuable startup. The company was evaluated so highly due to opening a new space in the transportation economy. Like Airbnb, they found a way to share unused cars with consumers. Its value has risen more, and its cost today is <strong>$70 billion</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/0*4um62Lqw1F5p8---" /><figcaption>Source: Statista.com</figcaption></figure><p><strong>Uber relied on individuals who were up to make extra money using their cars.</strong> To join the platform, drivers needed to meet feasible requirements. Right after receiving permission to their account, they could go online and pick the passengers. Besides that, Uber managed to automate the ridesharing process and provide the drivers with perfect onboarding.</p><p>The growing supply helped Uber to delight passengers with lower prices for the rides. They were provided with a range of opportunities like UberX and Pool that essentially save their money.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vxqsA9DjI20K-iCmJXzzUQ.png" /><figcaption><em>Source: appinventiv.com</em></figcaption></figure><p>Today Uber serves over 69% of the rideshare market in the US and completes 18,7 million rides per day worldwide.</p><p>But it is getting more and more challenging for Uber to ensure low-cost fares. The lesser price for the ride is, the fewer the income drivers receive. At current, their hourly rate is hardly the same as the minimum wages in the US.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-zj6RtZi1UyX9vxqt8BFBg.png" /></figure><p>Uber charges 30% lower than regular taxis. Besides that, the system takes over 33% commission from the passenger fare. For the remaining salary, drivers need to pay for the gas, insurance, self-employment taxes and vehicle expenses.</p><blockquote>“Despite ads claiming drivers could earn $90,000 a year or on average, or make $25 an hour, the average take-home pay of an Uber driver in the US in 2018 — after expenses — was estimated by the Economic Policy Institute to only be $9.21 an hour, slightly above the federal minimum wage” (<a href="https://www.cbinsights.com/research/report/how-uber-makes-money/"><em>CB INSIGHTS</em></a><em>).</em></blockquote><p>The Economic Policy Institute <a href="https://www.epi.org/press/uber-drivers-earn-the-equivalent-of-9-21-in-hourly-wages-uber-and-other-gig-platforms-account-for-far-less-of-the-economy-than-many-estimates-suggest/">studied the driver wages at Uber</a>. Based on their summary, <strong>the driver earns an equivalent of $9.21 in hourly wages</strong>. This conclusion comes from the following calculation:</p><ul><li>An Uber driver typically collects $24.77 per hour in passenger fares.</li><li>A platform takes $8.33 from that for the commission and booking fee.</li><li>Gas and technical maintenance of the vehicle cost about $4.87 per hour.</li><li>Since they are self-employed, from the remaining $11.77 per hour, a driver needs to pay $0.90 in extra Social Security and Medicare taxes.</li><li>If the driver is willing to pay ​​for health insurance or contribute to a retirement plan, he or she will eventually get $9.21 per hour, if they reduce these benefits they take home 10.87 per hour.</li></ul><p>The low compensation discourages Uber drivers. Statistically, only 4% of them remain on the platform after a year since registration. For the last two years, the number of drivers decreased from 5 to 3,5 mil. It means that Uber lost over 30% of its fleet and has to pay more to get new drivers. In April of 2021, Uber spent $250 mil for the one-off bonuses to get the drivers back.</p><h3><strong>Uber’s Revenue and Expenses</strong></h3><p>The high user churn affects the whole business of Uber. Nearly annually, the company reports billions of losses. Let’s view their revenue statistics for the previous years.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/771/0*H94klR13el0g8QYs" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/866/0*waHX7U_UUZAAMWLF" /></figure><p>The key drivers of Uber expenses are the revenue cost (software development, commission for the payment cards, insurance), administrative (expansion to the new regions), and sales and marketing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DWIPNm2zK-uWbLYiWZxXCA.png" /><figcaption>Source: Uber</figcaption></figure><p><em>Once you decide to make an uber-like application, take into account the factors leading to a churn. Find out the transparent scheme of compensation for the driver-partners, and be honest regarding the service price in front of your customers. This way you will gain their trust and establish long-term relations.</em></p><h3><strong>Motivational Programs For Drivers</strong></h3><p>Among the biggest challenges of the two-sided marketplace is user satisfaction. This type of service takes off the barriers for contractors, increasing the range of opportunities. In a while, the competition grows, and the vendors agree to work for lower prices to receive any profit. It makes the work less beneficial so that professional-level specialists leave the space for finding better opportunities. As a result, customers do not meet enough supply and don’t gain quality service.</p><p>Uber has faced the same challenges: the <strong>drivers’ supply is variable</strong> and brings a substantial risk to the marketplace.</p><blockquote>In 2020, many drivers stopped driving because they couldn’t count on getting enough trips to make it worth their time.</blockquote><blockquote>In 2021, there are more riders requesting trips than drivers available to give them — making it a great time to be a driver <em>(Uber&#39;s Blog)</em>.</blockquote><p>The following statistics help us understand the specifics of driver users:</p><ul><li>Most Uber drivers work full or part-time at another job (Princeton University).</li><li>More than 50% of Uber drivers are working less than 10 hours a week (CNBC);</li><li>46% of drivers have been there for less than one year (Ridester).</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*ScRTVLUspcaINxXk" /></figure><p>To keep up the permanent supply, Uber implemented gamification into a ride-hailing process. One of those elements is a heat map that aims to encourage drivers to reach more orders. The feature operates through the following steps:</p><ul><li>The platform predicts the highest passenger demand and shows it on the map in a real-time mode.</li><li>Arriving at a surging area, a driver gets a new order in a short time.</li><li>After completing a trip, the system adds the surge earning to the passenger fare cost.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*t0lbHcqFXV9BAG1K" /><figcaption>Image source: RideGuru (<a href="https://ride.guru/content/newsroom/the-best-times-and-places-to-drive-for-uber-make-more-money-per-hour">link</a>).</figcaption></figure><p>Most likely that before moving to yours, drivers have worked with other <a href="https://brocoders.com/blog/top-apps-like-uber-in-2021/">ride-hailing apps</a>, such as Lyft and Bolt. The same as Uber, they are using the analogy of the heat map. So, consider this option for your scope since it is matching with the current experience of drivers. Discover the main problems of the heat map in the competitor apps and find out how to address them. Resolving that, you will add more value to your product and make your uber-like app more advanced.</p><p>Uber faces not only the drivers’ but the passenger’s churn. One of the reasons is driver cancellations based on the destination. Usually, the drivers look to pick the passengers within the nearest location or offer a long-distance route. So, cancellations extend the waiting time and make passengers look through the other taxi apps.</p><h4>Because of passenger churn, Uber set the new rules to the platform:</h4><ol><li>The Uber app stopped showing the details on the upcoming rides to the drivers, who regularly cancel the offers. “It would hide the fare, destination and distance from drivers who had not accepted five of their last 10 trip requests” (<a href="https://www.washingtonpost.com/technology/2021/06/09/uber-lyft-drivers-price-hike/"><em>The Washington Post</em></a>).</li><li>If the drivers complete a certain number without cancellations, they will be rewarded with a bonus added to their salary. In Austin (TX), for instance, ​​drivers are guaranteed $1,100 if they complete 115 trips, meanwhile, in Phoenix (Ariz) they could earn $1,775 if they fulfill 200 trips (<a href="https://www.cnbc.com/2021/04/07/uber-announces-250-million-stimulus-to-bring-back-drivers.html"><em>CNBC</em></a>).</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/637/1*1cO8OzmZh0Bl5Xfo4pBNRQ.png" /><figcaption>Source: <a href="https://eng.uber.com/real-time-earnings-tracker/">https://eng.uber.com/real-time-earnings-tracker/</a></figcaption></figure><p>The screens showing the reward for completing 80 trips (which were done without cancellation).</p><h3><strong>Fare Cost And Price Composition</strong></h3><p>The most discussed topic about Uber is its pricing model. At the moments of the highest demand, the cost of the fare essentially increases. For that case, a passenger needs to decide: either to agree on the proposed price or look for other options. Or, maybe, to revisit the app in 10–15 minutes and check if the price becomes lower.</p><blockquote>Whenever rates are raised due to surge pricing, the Uber app lets riders know. Some riders will choose to pay, while some will choose to wait a few minutes to see if the rates go back down<em> (Uber).</em></blockquote><p>Uber calculates the price for each ride individually. Except for the standard cost that includes the time, distance and base fare, the price may contain a variable — <strong>a surge price</strong>. Until the latest time, the surge algorithm was comprehensive to the drivers and passengers: it had been computed based on specific circumstances, such as prime time, bad weather or special event. But currently, the pricing has changed.</p><blockquote>Uber charges more if they think you’re willing to pay more <em>(</em><a href="https://www.forbes.com/sites/nicolemartin1/2019/03/30/uber-charges-more-if-they-think-youre-willing-to-pay-more/?sh=3c8c18e17365"><em>Forbes</em></a><em>)</em>.</blockquote><p>Uber composes the price based on customer behavior. Its AI-based algorithm is aimed to find out the best moment when a user is willing to spend more. Say, it can set a higher price if the phone battery is to die. Or simply if a user’s capacity allows them to pay over the regular cost. The approach is called <strong>dynamic pricing</strong>, and the company relies on it to return the investments.</p><blockquote>“… pricing can vary from minute to minute. It can also pull in personal customer data and historical activity to determine how to price the ride. If your online behavior shows a pattern of going certain places and times, it may charge more to your account at those times” <em>(</em><a href="https://www.forbes.com/sites/nicolemartin1/2019/03/30/uber-charges-more-if-they-think-youre-willing-to-pay-more/?sh=286d81cb7365"><em>Forbes</em></a><em>)</em>.</blockquote><p>And now, get back to the driver’s earnings. Currently, if the passenger pays the surge price, Uber doesn’t split it with the driver. Previously, it shared the ultimate trip earning based on the commission fee (it took only 25% for UberX, for example). But since not long ago, Uber has excluded the surge from driver’s earnings.</p><p>Remember the heat map illustration populated with bonuses? “Instead of receiving a portion of the true value of what customers pay, drivers now instead are paid for their time and distance on the trip and a predetermined bonus, say $3, $5 or $10 for any price surges” (<a href="https://www.washingtonpost.com/technology/2021/06/09/uber-lyft-drivers-price-hike/"><em>The Washington Post</em></a>).</p><p><em>As you learned from the previous paragraphs, dynamic pricing is the key to resolving Uber’s profitability problems. While developing your uber-like project, focus on individual pricing. The more flexible you are at this point, the more safe your business will be.</em></p><h4><strong>Summary of the Uber Business Model</strong></h4><p>Thank you for reading. Knowing the aspects of the rideshare business will help you avoid the most critical issues. Based on the Uber experience, we could outline the essential points on how to make the uber-like app more efficient<strong>:</strong></p><ul><li><strong>Simplify the user journey.</strong> Conduct user interviews with the drivers and riders. Study their process routine to make it more friendly and straightforward.</li><li><strong>Prevent user churn.</strong> Keep user satisfaction in mind as a key factor affecting a churn. Find out how to decrease the number of ride cancellations, long awaiting time and unreasonable pricing.</li><li><strong>Consider the customer acquisition cost (CAC). </strong>Along with the revenue cost, it is one of the pain points of Uber. Because of that, its expenses outweigh the profit.</li><li><strong>Focus on drivers’ benefits.</strong> Please find out how to make their work profitable in the long-term perspective. Provide incentives programs to motivate them to complete more orders.</li><li><strong>Set individual pricing</strong> as it may become the primary profit source for your rideshare service.</li></ul><h3><strong>A Roadmap to Develop an Uber-like App</strong></h3><p>The development of the rideshare application includes the following iterations:</p><ol><li>Business analysis.</li><li>UI/UX design.</li><li>Feature implementation.</li><li>Testing.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*hTASOA5IkIWEdXhV" /></figure><h4><strong>Business Analysis</strong></h4><p>The first milestone ‘Business Analysis’ aims to outline the project requirements. They need to be specified in two ways: in the format of user stories and feature explanations. This way, you could convey the full image of your product to a manager and software engineers.</p><p>Let’s describe the user stories based on the Uber example. Reading this, you will learn about the scope of a similar app.</p><h4><strong>Rider&#39;s User Stories</strong></h4><p><strong>Registration and Account Creation</strong></p><ul><li>A rider user registers to the app;</li><li>A system sends a code via the SMS;</li><li>A rider continues the registration by submitting the received code;</li><li>A rider user enters the app and creates a profile;</li><li>A rider user confirms the personality.</li></ul><p><strong>Destination Settings</strong></p><ul><li>A rider specifies the destination (‘Where To Go’);</li><li>A system shows the price per each ride category (UberX, Black, UberXL, or Comfort);</li><li>A rider chooses the ride category along with the calculated price;</li><li>A rider chooses the pick-up spot and confirms it;</li><li>A rider chooses the payment method and submits the required data.</li></ul><p><strong>Sending the Request</strong></p><ul><li>A rider makes a request;</li><li>A system begins searching for available drivers;</li><li>A rider views the details on the driver and vehicle, and the estimated time for arrival;</li><li>A rider could track the driver’s movement;</li><li>A rider could track the vehicle’s movement during the ride.</li></ul><p><strong>Arrival Settings</strong></p><ul><li>A rider views the notification if the driver arrived;</li><li>A rider views the details on the free waiting time once a driver arrived;</li><li>If a rider is late to come, he/she is notified about the paid waiting time;</li><li>A rider should confirm (orally) his/her name to a driver before sitting in a car.</li></ul><p><strong>Advanced Booking Features</strong></p><ul><li>Book / Schedule a ride upfront;</li><li>Book a ride for another person;</li><li>View the driver’s profile information;</li><li>Save the frequently ordered destination;</li><li>Specify the extra stops and drop-offs;</li><li>Cancel the ride.</li></ul><p><strong>After the Ride is Completed:</strong></p><ul><li>A rider can rate a service;</li><li>A rider can leave the tips;</li><li>A rider can get a cashback.</li></ul><p><strong>Emergency and Support</strong></p><ul><li>Share ride information with other people;</li><li>Communicate with a driver (chat or the phone call);</li><li>Support and Emergency calls.</li></ul><p><strong>Payment Features:</strong></p><ul><li>A system releases the payment once a ride is completed.</li><li>A rider could pay for a trip via cash.</li><li>A rider user could split the fare cost with another passenger (this feature is not available until the end of the COVID pandemic).</li></ul><p>In the newest release version, Uber added new features that made the ride-hailing process more suitable.</p><h4><strong>The rider could specify a particular spot on the map</strong></h4><p>Uber’s product team enabled the riders with the ability to choose the spot for picking up. With that feature, drivers can view a specific place where they can meet a passenger. It makes their routine much easier since they do not need to call their clients upfront. Besides that, they are not wasting their time to find a rider if they are waiting somewhere in a crowded area (park, airport, railway station, stadium, or concert hall).</p><p>If you envision targeting the big city, you could keep the following user experience in your mind:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*BMImyj_3Gd3f4BME" /><figcaption>Uber&#39;s Rider App</figcaption></figure><p>Take into account that Uber first displays an overall price to the rider and afterward prompts a user to confirm the location. This feature doesn’t affect the price of a trip. At the end of the ride, the application reminds a user to put on a mask.</p><h4><strong>Check the rider’s identity</strong></h4><p>At the beginning of registration, passengers should confirm their identity. It should be done by submitting the data concerning either document: state ID, passport, driver’s license, or through the payment card credentials.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xbAgGALApeIrFheEwGAHbQ.jpeg" /><figcaption>Source: Uber&#39;s blog</figcaption></figure><p>Safety is a crucial point for the community-driven platform, so it makes sense to ensure the personal identity feature. Except for that, Uber implemented a <em>‘panic button’</em> feature so that a passenger may call an emergency if they ended up in a dangerous circumstance.</p><h4><strong>Overview of the Driver User Stories</strong></h4><p><strong>Uber’s Driver Registration</strong></p><ul><li>A user opens the app and submits the phone number;</li><li>A system sends a confirmation code via SMS;</li><li>A user submits the data to prove the personal identity;</li><li>A user sends a request to create the driver account at Uber*.</li></ul><p><em>* A user should request a driver’s permission from Uber.</em></p><p><strong>The applicant should meet the following requirements:</strong></p><ul><li>Age: be at least 21 years old;</li><li>Driving license: should be valid in the country for at least one year;</li><li>Transport: a five doors vehicle not older than 10 years;</li><li>Insurance: to have car insurance in their name.</li></ul><p>After sending the request, a user waits for permission. If successful, they will be invited to the local office of Uber to get the vehicle inspected.</p><p><strong>First Steps</strong></p><ul><li>A driver logs in to the account;</li><li>A driver takes a selfie to confirm the personality (only once);</li><li>A driver views the map to choose the destination;</li><li>A driver views the highest demand on the heat map.</li></ul><p><strong>Receiving a Request</strong></p><ul><li>A driver selects the riding area by using the destination filter;</li><li>A driver clicks on the ‘GO’ button to start the job;</li><li>A system begins searching for incoming requests;</li><li>A system sends an offer to a driver once a new request arrives;</li><li>A driver could accept or cancel the offer within a specific time.</li></ul><p><strong>Dispatching Process</strong></p><ul><li>If accepted, a driver can view the rider’s profile and the destination details;</li><li>A driver can view the navigation screen by clicking on the ‘Navigate’ button;</li><li>A driver chooses the preferable destination to get to a rider’s place;</li><li>A driver can track the rider’s location on the map;</li><li>A driver should confirm the arrival once they get to the place;</li><li>A driver presses ‘Start Uber X’ (or another, depending on the ride category) to initiate the ride.</li></ul><p><strong>Finishing the Ride</strong></p><ul><li>A driver finishes the ride by clicking on ‘Complete ‘UberX’ (or another trip category);</li><li>A driver could receive a new ride request (if online).</li><li>A driver could switch to offline mode.</li><li>A driver can rate a rider and leave feedback.</li><li>A driver can view the upcoming promotions.</li></ul><p><strong>Communication Features</strong></p><ul><li>A driver user can view the rider’s profile information;</li><li>A driver user could chat with a rider user.</li><li>A driver user can view the cell phone number of the rider user.</li></ul><p><strong>Earnings and Promotions</strong></p><ul><li>A driver can view the profits after a ride is completed (‘Waybill’).</li><li>A driver can view the gains after the quest is completed.</li><li>A driver can view the earnings from the tips.</li><li>A driver could track the income statistics.</li></ul><p><strong>Safety and Security Features</strong></p><ul><li>A driver could enable the ‘Follow my Ride’ option (for safety purposes).</li><li>A driver can call the 911 emergency service (by clicking on the ‘Shield’ icon).</li></ul><p><strong>Payment features:</strong></p><ul><li>A driver user could bind their payment card into account.</li><li>A driver gets compensation for the toll.</li><li>A driver receives medical insurance for the hours spent online.</li><li>A driver could get compensation if the trip was canceled.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wpr0Qc-DYgkhsflp" /></figure><p>Due to the business analysis, we are able to come up with <strong>a list of core features</strong>:</p><p><strong>To Match a Rider With a Driver</strong></p><ul><li>determine the rider’s geolocation;</li><li>measure the distance of the route;</li><li>find an available driver in a certain location;</li><li>send an offer to a driver (either they are waiting for a new offer or finishing the ride shortly).</li></ul><p><strong>To Calculate the Time and Price of the Trip</strong></p><ul><li>calculate the estimated time of arrival (ETA);</li><li>calculate the price based on the duration, distance and the base fare;</li><li>calculate the driver’s wage due to online hours and distance.</li></ul><p><strong>To Automate the Dispatch Process</strong></p><ul><li>navigate a driver to a pickup spot;</li><li>determine the surging area based on the prediction services;</li><li>display the surging area (heat map) to a driver;</li><li>notify a rider about the surge price.</li></ul><p><strong>To Set Communications</strong></p><ul><li>enable a call via the phone device;</li><li>enable SMS sending via the phone device;</li><li>leave a comment before a ride order;</li><li>establish a chat messaging.</li></ul><p><strong>To Release a Payment</strong></p><ul><li>process the payment to a driver after the order is completed;</li><li>compensate a driver’s spendings if a rider canceled a trip;</li><li>calculate the Uber’s service’s fee from each trip;</li><li>add the surge bonus to the driver’s wage;</li><li>reward the driver after finishing the quest;</li><li>enable a rider to pay tips.</li></ul><p><strong>To Write a Feedback</strong></p><ul><li>rate a driver/rider after the service is completed;</li><li>leave feedback.</li></ul><h3><strong>UI/UX Design</strong></h3><p>Before taking on the code programming, we recommend you complete the UI/UX design. The finished graphic layouts will help you examine the scope of the app and finalize the feature requirements.</p><p>If you pick Figma or Sketch systems for creating the layouts, you will be able to make them clickable. This way, you could simulate the user steps across the app and validate each function.</p><p>The clickable visuals will help your developers estimate the features and come up with the timeframe to complete them.</p><p>Approximately, the UI/UX design for the uber-like will take <strong>640 hours</strong> to complete. This calculation is based on the user stories described in the article. Along with that, we estimated a web admin side needed for management.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fsheetsu.com%2Ftables%2Fe44f873815&amp;dntp=1&amp;display_name=Sheetsu&amp;url=https%3A%2F%2Fsheetsu.com%2Ftables%2Fe44f873815&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=sheetsu" width="700" height="294" frameborder="0" scrolling="no"><a href="https://medium.com/media/34016f5da2d5050f476db8b82bcef475/href">https://medium.com/media/34016f5da2d5050f476db8b82bcef475/href</a></iframe><p><strong>How Long Does It Take To Create an Uber-like App?</strong></p><p>When estimating the project, we followed a few scenarios: optimistic, pessimistic and most realistic. Based on outcoming figures, we calculated the average time using the PERT methodology.</p><p><strong>The overall time needed to deliver the project:</strong></p><ul><li>Rider’s App — 172 days.</li><li>Driver’s App — 172 days.</li><li>Admin’s website — 125 days.</li></ul><p><strong>We calculated the time for the following team:</strong></p><ul><li>DevOps engineer — 1;</li><li>Node.js developer (back-end) — 1;</li><li>React Native developer (mobile app front-end) — 1;</li><li>React.js developer — 1.</li></ul><p>Keep in mind that the below-given timeframe pertains to the programming services only. Additionally, we would need to evaluate the Q&amp;A and project manager’s work.</p><p>Once you want to accelerate the delivery of your project, you could add more programming specialists to your team.</p><h4><strong>Rider&#39;s App</strong></h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fsheetsu.com%2Ftables%2F60f27a2dce&amp;dntp=1&amp;display_name=Sheetsu&amp;url=https%3A%2F%2Fsheetsu.com%2Ftables%2F60f27a2dce&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=sheetsu" width="700" height="1122" frameborder="0" scrolling="no"><a href="https://medium.com/media/ada742ac8e585b86f208c6405a247cc9/href">https://medium.com/media/ada742ac8e585b86f208c6405a247cc9/href</a></iframe><h4><strong>Driver&#39;s App</strong></h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fsheetsu.com%2Ftables%2Fcc46924da7&amp;dntp=1&amp;display_name=Sheetsu&amp;url=https%3A%2F%2Fsheetsu.com%2Ftables%2Fcc46924da7&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=sheetsu" width="700" height="1122" frameborder="0" scrolling="no"><a href="https://medium.com/media/0a0b47dba22592b7e636249f96180e96/href">https://medium.com/media/0a0b47dba22592b7e636249f96180e96/href</a></iframe><h4>Admin&#39;s Panel (Web-app)</h4><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fsheetsu.com%2Ftables%2F38a87dcd0f&amp;dntp=1&amp;display_name=Sheetsu&amp;url=https%3A%2F%2Fsheetsu.com%2Ftables%2F38a87dcd0f&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=sheetsu" width="700" height="892" frameborder="0" scrolling="no"><a href="https://medium.com/media/50b04bce850f7cee5c48a487b34eb5f4/href">https://medium.com/media/50b04bce850f7cee5c48a487b34eb5f4/href</a></iframe><h3><strong>Feature Implementation</strong></h3><h4><strong>How to define the technical stack?</strong></h4><p>There are no strict requirements regarding the technologies. You could select them depending on your strategy and preferences. If you are looking to develop native apps, your product will demonstrate perfect graphic rendering.</p><p>Meanwhile, you could save your budget by choosing the cross-platforming app development, which will help you reach a decent quality. Frameworks like React Native and Flutter allow creating mobile apps for iOS and Android with a single programming language. This way, you will develop the project with fewer team and budget expenses.</p><p>We would love to point out Node.js. This framework enables creating a back-end with JavaScript. Its lightweight architecture will help you build performative server-side rendering and effortless integration with mobile applications. Uber utilizes Node.js for back-end development too.</p><p>The programming languages and solutions you may choose for building your uber-like project:</p><ul><li>React/Redux, Node.js, Ruby on Rails (for web-app);</li><li>React Native / Flutter (for cross platforming mobile app);</li><li>Kotlin/Java (Android), Objective C/Swift (iOS) for native apps.</li><li>Google Cloud Platform, AWS, Microsoft Azure for cloud storage.</li></ul><h4><strong>The third-party APIs that you definitely need</strong></h4><p>The key features of Uber-like applications, like GPS tracking and payment processing, could be implemented due to external services.</p><p>Let’s overview the leading third-party solutions required for the development:</p><p><strong>GPS Location:</strong></p><ul><li>CoreLocation Framework (iOS);</li><li>Google Location Service API (Android);</li><li>Mapbox (for Android and iOS).</li></ul><p><strong>Route Destination:</strong></p><ul><li>Apple MapKit (iOS);</li><li>Google Maps Android API;</li><li>MapBox (for Android and iOS).</li></ul><p><strong>Navigation:</strong></p><ul><li>Google Maps SDK (Android and iOS);</li><li>Waze (Android and iOS).</li></ul><p><strong>Payment Gateway Integration:</strong></p><ul><li>Braintree;</li><li>Stripe;</li><li>PayPal;</li><li>Google Pay;</li><li>Apple Pay.</li></ul><p><strong>Push notifications / Messaging:</strong></p><ul><li>Apple Push Notifications Service;</li><li>Google Cloud Messaging (GCM);</li><li>Twilio.</li></ul><p>The third-party solutions leverage the development speed but require considerable investments. Let’s recall the previous paragraph on the key drivers of Uber’s expenses. The biggest one is the delivery cost, which includes the map and payment processing services fees.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*llBKkF7gt0kKUzHT" /></figure><p>Uber utilizes the <strong>Google Map SDK</strong>. It is a powerful solution, compatible with both iOS and Android platforms. Unfortunately, it is pretty expensive for early-stage companies. Our <a href="https://brocoders.com/blog/mapbox-vs-google-maps-vs-openstreetmap/">latest review</a> analyzed Google Maps API with another service, MapBox, finding it cheaper. Although it does not provide the same range of features as Google Maps, the MapBox seems to be a decent alternative.</p><p>Regarding the global payment processors, you should first check if they operate in your region. Alternatively, you could use the local payment systems. After you proved your product concept and decided to scale up, you could switch to global operators, like Stripe and Braintree.</p><h3><strong>How to choose a vendor?</strong></h3><p>The development of the uber-like application requires sufficient investments. A contractor with a similar expertise and proficiency level will guarantee that you will not waste your time and money. Consider the following criteria for choosing a vendor for building your app.</p><h4><strong>Expertise in the related area</strong></h4><p>Make sure that the vendor has similar expertise as you seek. Inquire if they ever dealt with developing the two-sided marketplace. The appropriate contractor must know about the business logic and technical requirements. The big advantage for the candidate is to have the experience of integration with Google Maps SDK and payment gateways like Stripe and Braintree.</p><h4><strong>Proficiency in product design</strong></h4><p>The product you envision creating requires essential commitment in terms of the business analysis. The software contractor should be familiar with the product specifics and help you figure out the project’s main priorities. Besides that, the software supplier should be flexible and follow your strategic goals. Inquire if the candidate contractor could assist you with the business analyses developing your product.</p><h4><strong>Extendable team</strong></h4><p>The rideshare business faces constant changes. To get it profitable, it must expand to other markets. Scaling up brings new challenges and adaptations. The development team should move fast along with you and fulfill your requirements. The supplier with a big crew could help you extend the functionality and meet your deadline expectations. It concerns not only the development crew but project managers, Q&amp;A specialists, project managers and designers.</p><p><strong>Suggested team structure for uber-like app development:</strong></p><ol><li>UI/UX designer — 1.</li><li>Node.js engineer — 2.</li><li>React Native developer — 2.</li><li>React.js developer — 1.</li><li>DevOps engineer — 1.</li><li>Quality assurance specialist — 1.</li><li>Project manager — 1.</li></ol><h3><strong>Conclusion</strong></h3><p>Business like Uber requires lots of time and finances. Before you take on it, make sure that your service will meet customer demand, and you will return from your investments. Sure thing, it is hard to predict what comes next until you launch your company. Nevertheless, some criteria can help you validate your business strategy.</p><p>Check your value proposition by answering these questions:</p><p><strong>Competitor Analysis</strong></p><ul><li>What competitor uber-like apps operate in your area?</li><li>What are the distinctive features of competitors?</li><li>How much does it cost for them to acquire new customers?</li><li>How could you minimize the customer acquisition cost?</li></ul><p><strong>UX Research</strong></p><ul><li>What are the pain points users are facing while working with the competitor uber-like apps?</li><li>Do you have an idea for enhancing the existing user flow?</li><li>What visual patterns do you envision for your app design?</li></ul><p><strong>Marketing Strategy</strong></p><ul><li>Do you plan to test your product app before launching it on the market?</li><li>How will you reach out to the early adopters?</li><li>How many users would you love to acquire for the initial period?</li></ul><p><strong>Product Development</strong></p><ul><li>What core features would you love to implement in your app?</li><li>Did you calculate the cost of using the third-party APIs?</li><li>What third-party solutions are you looking to integrate with?</li><li>What languages would you love to add to the app’s service?</li></ul><p>You could enlarge the proposed checklist. If you need assistance with evaluating your project or any consultations regarding technologies and product implementation, please feel free to address Brocoders.</p><p>We are looking to extend our expertise and find new partners. Address us once you need to get your project evaluated or need a consultation regarding its feature development.</p><p><strong><em>About </em></strong><a href="http://brocoders.com/"><strong><em>Brocoders</em></strong></a><strong><em>:</em></strong> our team helps startup companies build their online products. Since 2013 we have crafted over 70 web-based and mobile applications for our clients. Among those is Gokada — a rideshare service operating in Nigeria. While working on this project, we obtained sufficient experience in feature implementation and product design of the uber-like apps.</p><h3>Featured Articles</h3><ol><li><a href="https://www.epi.org/publication/uber-and-the-labor-market-uber-drivers-compensation-wages-and-the-scale-of-uber-and-the-gig-economy/">Uber and the labor market. Uber drivers’ compensation, wages, and the scale of Uber and the gig economy</a> // Economic Policy Institute, May 18, 2018.</li><li><a href="https://andrewchen.com/ubers-virtuous-cycle-5-important-reads-about-uber/">Uber’s virtuous cycle. Geographic density, hyperlocal marketplaces, and why drivers are key</a> // Andrew Chen’s Blog.</li><li><a href="https://www.forbes.com/sites/nicolemartin1/2019/03/30/uber-charges-more-if-they-think-youre-willing-to-pay-more/?sh=286d81cb7365">Uber Charges More If They Think You’re Willing To Pay More</a> // Forbes, March 30, 2019.</li><li><a href="https://www.forbes.com/sites/lensherman/2017/12/14/why-cant-uber-make-money/?sh=7b86c7f610ec">Why Can’t Uber Make Money?</a> // Forbes, December 14, 2017.</li><li><a href="https://techcrunch.com/gallery/here-is-ubers-first-pitch-deck/">Here is Uber’s first pitch deck</a> // TechCrunch, August 23, 2017.</li></ol><h3><strong>FAQ on Uber’s App Business</strong></h3><h4><strong>What makes Uber different?</strong></h4><ul><li>Uber provides millions of rides per day without owning the car fleet.</li><li>It is a two-sided marketplace, which ensures the fares for affordable prices.</li><li>The company relies on AI-based algorithms to compose the individual prices.</li><li>Uber managed to create the food order and delivery services based on the same app.</li><li>Most of the Uber drivers have another full-time or part-time job.</li></ul><h4><strong>How does Uber make money?</strong></h4><p>Uber gets a commission fee from each ride. It takes over 30% of the trip. Except for that, Uber receives a surge in the total amount from each fare. Lately, Uber has implemented premium accounts for riders and drivers and profit from their monthly subscriptions. Besides the ride-hailing business, the company earns from the food order and delivery service (Uber Eats) and freight shipping business (Uber Freight). In 2020, Uber sold its self-driving car unit to Aurora Innovation for $10 billion.</p><h4><strong>What programming language is Uber made in?</strong></h4><p>Uber is constructed with various frameworks and programming languages. Amazingly, its architecture is built with open source frameworks Node.js and Python. For the back-end, it also utilizes Java. The mobile apps are written with native programming languages: Java (Android) and Swift/Objective C (iOS). The database is based on MySQL, Postgres and Redis. Along with that, Uber exploits Google Map SDK and Apple MapKit for the mapping.</p><h4><strong>How to build an app like Uber?</strong></h4><p>These steps will help you develop a product similar to Uber:</p><ul><li>Study the user experience of similar applications and define their pain points.</li><li>Find out how to enhance the customer experience by eliminating the main obstacles.</li><li>Conduct user interviews to learn what features they especially need.</li><li>Share your product vision with the early adopters for getting feedback. Draw the clickable visuals to present your features to them.</li><li>Finalize the scope based on the core features and set a priority list based on them.</li><li>Study the third-party API solutions and calculate the expenses upfront.</li><li>Choose a vendor that has the related experience and could guide you through the specifics of the business during the entire process of development.</li></ul><h4><strong>Why is Uber not profitable?</strong></h4><p>Uber claims it can provide fast rides for affordable prices. To ensure that, the company needs to keep up with the passenger demand. It is pretty challenging. Since they deal with individual car owners who have other jobs, their commitment is unstable. Besides that, their wages are still low, and 96% of drivers leave the app a year after registration. The company struggles to overcome the churn, spending over 40% of its revenue on the driver acquisition.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fbc67328814f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/brocoders-team/how-to-create-an-uber-like-app-in-2021-overview-of-the-business-features-and-costs-fbc67328814f">How to Create an Uber-like App in 2021: Overview of the Business, Features, and Costs</a> was originally published in <a href="https://medium.com/brocoders-team">Brocoders Team</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[React Native Interview Questions — A Guide For The Founder (Part II)]]></title>
            <link>https://medium.com/brocoders-team/react-native-interview-questions-ea27878bf935?source=rss----dcb33b1b980b---4</link>
            <guid isPermaLink="false">https://medium.com/p/ea27878bf935</guid>
            <category><![CDATA[hiring-developers]]></category>
            <category><![CDATA[hiring-for-startup]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[interview-questions]]></category>
            <category><![CDATA[react-native]]></category>
            <dc:creator><![CDATA[Oleg Goncharenko]]></dc:creator>
            <pubDate>Fri, 09 Jul 2021 08:11:45 GMT</pubDate>
            <atom:updated>2021-07-09T08:11:44.946Z</atom:updated>
            <content:encoded><![CDATA[<h3>React Native Interview Questions — A Guide For The Founder (Part II)</h3><p><em>Here’s a complete list of top questions you should ask during interview with React Native developer for your project: general, project-specific, technical.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*G9AEiX2G5EO46sA5XH7vEg.jpeg" /></figure><p>In the previous part of the article, we observed the process of <a href="https://brocoders.com/blog/hire-react-native-developer/"><strong>preparation for the job interview</strong></a>. We paused our journey at the moment of receiving a sufficient amount of proposals and the need to pre-qualify them. To help you figure out this task, we provided you with an <a href="https://hubs.ly/H0Qzprj0">applicant screening rubric</a>.</p><p>Now that you shortlisted your applicants and invited them to the interview, your next step will be to prepare for the call meetings. The main task for this phase will be setting a list of questions to qualify the proficiency of React Native programmers.</p><p>You could check the skills of interviewees due to three categories:</p><ul><li><strong>General</strong>: communication and collaboration skills.</li><li><strong>Project-specific</strong>: understanding the product requirements.</li><li><strong>Technical</strong>: React Native programming skills.</li></ul><h3>General interview questions</h3><p>Collaboration and communication are <em>soft skills</em> and directly impact your project strategy and the business itself. So, the main point is to make sure that the candidate will get on the same page with you.</p><p>What matters here is to clarify if the prospective candidate follows the best practices in the project delivery and lets you know about the risks upfront.</p><ol><li>Tell me about the most significant React Native application that you did in the past?</li><li>What challenges did you encounter in the course of the development?</li><li>What lessons did you learn while accomplishing the project?</li><li>How would you manage a complex task that you never faced before?</li><li>How do you meet the deadlines at work? What is your best suggestion at this point?</li><li>What is the best advice to overcome a stressful situation that happens at work?</li><li>How do you proceed with your work if you are missing some materials?</li><li>Are you a solo or a team player?</li><li>What do you think of the time and material approach? Did you have a chance to apply it in your previous work?</li><li>Are you able to join the project soon? What is your current availability?</li></ol><p>You could change or add your personal questions to this list. Or even improvise with them, asking ones in the context of your dialogue. When working on these suggestions, we wanted to inspire you rather than restrict you.</p><h3>Project-specific questions</h3><p>As far as you have the specification, your next step will be to figure out if the applicant is keen on understanding the project scope. You are well prepared now, so don’t worry about discussing the details with the technical specialist.</p><ol><li>How do you conceive the product features? What would you like to propose to make them better?</li><li>What is the most challenging part of the project? How would you manage that?</li><li>What extra services or third-party solutions would we need to accomplish this service?</li><li>What React Native libraries would you suggest for building this app? Have you worked with them before?</li><li>What priorities would you like to set in the development process?</li><li>Do you have any questions regarding the graphic designs? Are they would be enough for you to start?</li><li>What do you think of the design animation? Do you consider it to be complex or not?</li><li>What approach would you follow to make the UI rendering faster?</li><li>Do you need any specifications or screens to complete the timeframe estimation?</li><li>How long will it take to accomplish the front-end work?</li></ol><p>A programmer who understands the requirements of your product will deliver the expected quality. That’s the key to handling the current discussion.</p><h3>Technical: React Native programming skills</h3><p>The following part of the interview is the technical one. To run this session successfully, you could invite a CTO or a development consultant to accompany you. If that is not an option, our guidelines will help you. The below questions are based on the requirements of the middle-level React Native programmer.</p><h3>Q1: What are the main advantages of React Native?</h3><p>The most significant advantage of React Native is that it enables building the mobile UI for iOS and Android with the same programming language — JavaScript.</p><p>Of course, some specific mobile features require Swift and Java knowledge, but generally, 70–80% of React Native code is reusable in both platforms. What does it mean for the employers? They save their expenses, as there is no need to hire front-end designers specifically for each mobile OS.</p><p>The other essential advantage of React Native is that it is friendly to web developers experienced in React. They could use the same JavaScript Syntax Extension (JSX) and components build concept.</p><blockquote>Hiring becomes easier, since JavaScript developers are plentiful, and you don’t need to seek out native specialists (<a href="https://www.toptal.com/react-native/interview-questions">Toptal blog</a>).</blockquote><p>The transition from React to mobile app development takes less effort. It gives one crucial benefit to the business: if they have in-house React developers, they could construct a mobile app by their means.</p><h3>Q2: What are the advantages of native apps over cross-platforming apps?</h3><p>Native apps are created with the same language as the programming environment where they are to run. Such an approach enables passing the rendering methods straight to the host platform and getting the native views immediately.</p><p>Cross-platforming apps use the middleware layer to translate and pass the data from one language realm (JavaScript) to another (Objective C or Java). So, it extends the time for data processing and slows down the performance.</p><p>Usually, the native applications require fewer third-party libraries to operate with the hardware services. They could communicate straight with inbuilt components to enable the camera, calendar, GPS, etc.</p><h3>Q3: What is JSX in React Native?</h3><p>JSX is a syntax extension for the JavaScript language envisioned for composing elements in React. It enables writing the HTML within the JavaScript code. Meanwhile, it has some specifics in React Native. Instead of using the HTML tags &lt;div&gt; and &lt;span&gt; it provides the component &lt;View&gt;, which is responsible for the corresponding options. For the text markup React Native uses the self-named component &lt;Text&gt;.</p><p>Even though React Native’s JSX has some differences, it follows the same principle as React: it allows writing the markup language within the main application code. Also, like in React, it translates the JSX to JavaScript using the Babel compiler.</p><h3>Q4: What is component-driven development?</h3><p>The component-driven approach allows building the UI with reusable or repeated code patterns. These patterns are called components and contain the information reflecting the UI and logic.</p><p>The same as in React, React Native’s components have a specific hierarchy and could be parents, children, and ancestors.</p><p>Two types of data have been processed by components: state and props. Props stand for properties. They are immutable data and can be fetched from a parent to a child. It works only in terms of the functional components.</p><p>The class components render the mutable or dynamic data only after a certain event happens. This data type is called State.</p><p>Besides class and functional components, React Native provides the core components. Their main categories are: &lt;View&gt;, &lt;Text&gt;, &lt;Image&gt;, &lt;TextInput&gt;, &lt;ScrollView&gt;, &lt;ListView&gt;, Android-specific and iOS-specific. They are ready-to-use and aimed to speed up the development work.</p><h3>Q5: What components in React Native are?</h3><blockquote>React Native is like React, but it uses native components instead of web components as building blocks (<a href="https://archive.reactnative.dev/docs/tutorial">React Native docs</a>).</blockquote><p>React Native components are built with React. But they are not the web views in a browser. They are the native views on the mobile OS platform.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*AAaWil9Siu4LWl6E.png" /></figure><h3>Q6: What makes components native?</h3><blockquote>In Android development, you write views in Kotlin or Java; in iOS development, you use Swift or Objective-C. With React Native, you can invoke these views with JavaScript using React components (<a href="https://reactnative.dev/docs/intro-react-native-components">React Native docs</a>).</blockquote><p>Android and iOS provide their APIs to talk with the other language environments. React Native uses a bridge that translates the data to the appropriate format and invokes needed methods via the native host API. In return, the mobile platform renders the native UI code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*vhlEi9GOPC5gtoXc.png" /></figure><p>Since the React Native components are developed with JavaScript and CSS, they need to be compiled into the native code. This is what the Yoga engine performs: it converts the React components to the native views on the run time.</p><h3>Q7: Why is JavaScript used in React Native?</h3><p>JavaScript is an event-driven language, so it helps build dynamic interfaces. While the user interacts with the mobile screens, React Native recognizes every event and responds to it with new data. This data updates the view of the mobile screen.</p><p>From the other side, each mobile platform embeds the JavaScript engine. For example, iOS includes the JavaScript Core, which displays the content in the Safari browser. With that help, React Native app executes the code within the JavaScript thread while running the app.</p><h3>Q8: What are threads in React Native?</h3><p>React Native application is processing the data within a few separated threads:</p><ul><li>Native (Main) Thread;</li><li>JavaScript Thread;</li><li>Shadow Thread.</li></ul><p>Multi-threaded data processing gets more advantages over single-threaded. It prevents performance issues due to distributing the tasks among several parts.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3oLEmXjk2quSMreh.png" /></figure><p>The UI thread is responsible for the native part of the application. It deals with the native views and checks for the events on the UI. Also, the UI thread contains the screen designs of the application. It fetches the data on layouts parameters to the native UI Manager, which updates the design on the screen.</p><p>The JavaScript thread is in charge of the logic of the application. It combines the JavaScript code written by React Native developers. The code within this thread is bundled (Virtual Machine at Android) or run by the JavaScriptCore (at iOS). As you noticed, React Native uses the existing compilers of the mobile platforms, which is efficient in terms of the app’s size.</p><p>Since React Native implements another type of layout tree, it needs to get translated to the native UI tree. The Shadow thread constructs a layout tree understandable by the host operating system. It is possible due to the Yoga engine.</p><p>The communication between the threads is available due to the React Native bridge.</p><h3>Q9: What is the React Native Bridge?</h3><p>The essential advantage of React Native is that it invokes the native UI views on the mobile platform. Due to the bridge technology, it becomes possible to connect the application logic with the UIView manager on the native side.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TQXQaB5ioWc-YGpR.png" /></figure><p>React Native bridge converts the data to the JSON format. If a user did an action on the mobile screen, the UI thread reports to the main JavaScript thread. It batches the data to a JSON message and sends it over to the JS thread.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nlUGlrgKW_b1Dcdy.png" /></figure><blockquote>The Bridge is the layer that connects JavaScript and Native modules and is basically a transport layer that transports asynchronous serialized batched response messages from JavaScript to Native modules.</blockquote><blockquote><a href="https://www.linkedin.com/in/vnovick/?originalSubdomain=il"><strong>Vladimir Novik</strong></a><strong>, </strong>Software Architect, Independent Consultant, Entrepreneur, Author, Worldwide speaker, Mentor</blockquote><p>Thus, the data between the native and react native sides are processed asynchronously. This way seems to be slower, but it is preventing message blocking.</p><p>With that said, React Native’s architecture is suited to render 60 frames per second, which is quite acceptable for the user’s perception.</p><h3>Q10: What is React Native boilerplate?</h3><p>React Native boilerplate is a set of tools needed to initiate mobile app development. It involves reusable code templates and libraries for user profile creation, authentication via social media, background themes.</p><p>The usage of boilerplate leverages the development speed and helps the team follow the unified standards. For example, React Native boilerplate helps development teams implement TypeScript in their processes.</p><p>Besides that, React Native boilerplate helps to apply new services and features to the project once they are needed: multi-language support, react hooks, automated UI tests and regular check-ups on the library updates.</p><h3>References to materials:</h3><ol><li><a href="https://www.freecodecamp.org/news/how-react-native-constructs-app-layouts-and-how-fabric-is-about-to-change-it-dd4cb510d055/">How React Native constructs app layouts (and how Fabric is about to change it).</a></li><li><a href="https://hackernoon.com/understanding-react-native-bridge-concept-e9526066ddb8">Understanding the React Native bridge concept</a>.</li><li><a href="https://brooklinmyers.medium.com/react-native-understanding-threads-e026c7d62bb2">React Native: Understanding Threads</a>.</li><li><a href="https://brocoders.com/blog/react-native-boilerplate/">How React Native boilerplate helps us build mobile apps faster [Starter Kit for 2021]</a>.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea27878bf935" width="1" height="1" alt=""><hr><p><a href="https://medium.com/brocoders-team/react-native-interview-questions-ea27878bf935">React Native Interview Questions — A Guide For The Founder (Part II)</a> was originally published in <a href="https://medium.com/brocoders-team">Brocoders Team</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How To Hire React Native Developer — A Guide For The Founder (part 1)]]></title>
            <link>https://medium.com/brocoders-team/how-to-hire-react-native-developer-a-guide-for-the-founder-part1-5e1d2377d843?source=rss----dcb33b1b980b---4</link>
            <guid isPermaLink="false">https://medium.com/p/5e1d2377d843</guid>
            <category><![CDATA[developer]]></category>
            <category><![CDATA[cto]]></category>
            <category><![CDATA[hiring]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[staffing-and-recruiting]]></category>
            <dc:creator><![CDATA[Oleg Goncharenko]]></dc:creator>
            <pubDate>Fri, 18 Jun 2021 14:43:45 GMT</pubDate>
            <atom:updated>2021-06-23T11:14:18.663Z</atom:updated>
            <content:encoded><![CDATA[<h3>How To Hire React Native Developer — A Guide For The Founder (part 1)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*sPCQgqmEbr-fAYZ2Om2VuA.jpeg" /></figure><p>The hiring process of React Native developers involves different parts, each of them requiring essential time and effort. To make the process less stressful, we suggest you follow these <strong>five steps</strong>:</p><ol><li>Prepare the specifications.</li><li>Outline the job requirements.</li><li>Create a shortlist of candidates.</li><li>Arrange the job interviews.</li><li>Qualify the candidates.</li></ol><p>In this post, we will uncover the first three parts of the hiring process:</p><ol><li><a href="#3bdc">How to create the specification for a React Native project</a>.</li><li><a href="#10c8">How to complete the job overview</a>.</li><li><a href="#d3d2">How to shortlist the candidates</a>.</li></ol><p>By the end of the reading, you will get prepared to reach out to potential candidates. In the <strong>second part</strong> of the article, we will observe the job interview process and qualifying the candidates.</p><h3>1. How to create the specification for a React Native project</h3><p>Finding the best candidate requires good preparation. Your first goal will be to outline the project requirements.</p><p>Be as specific as you can. Detailed documentation draws the attention of professional developers and encourages them to apply.</p><p>What is needed to complete the project specifications:</p><ul><li>Explain the user flows.</li><li>Create graphic layouts.</li><li>Outline technical requirements.</li></ul><h3>Explain the user flows</h3><p>User flows help to convey the core idea of the app. Based on that, the potential developer will evaluate the scope and define the biggest challenges in upcoming work.</p><p>After finishing this part, you will get the confidence to explain your product specifics to potential contractors. Except for that, you will check if your product app is ready for the market. These questions will help you to revise your current progress:</p><ul><li>Is your application flow simple and easy to use?</li><li>Does your app help users achieve their primary goals?</li><li>What are the most priority features in your app?</li><li>How do you encourage users to purchase the extra services?</li><li>What advantages do you offer to your users?</li></ul><p>Writing the user flows is a crucial part of the product build. Here is the list of suggested questions that will help you develop the user flow overview:</p><ul><li>What are user types (customers, suppliers, supervisors) presented in my application?</li><li>What abilities does each user category have?</li><li>What information will users request after their registration?</li><li>Do I need users to confirm their registration via email or SMS?</li><li>How could users view the other user profile?</li><li>How can users communicate with other users?</li><li>What kind of third-party applications would I like to integrate with my app?</li><li>How will the users complete the purchase process in my app?</li><li>How do I want to track the information about new and returned users?</li><li>Do I want to view the billing information (invoices, payments)?</li><li>What types of notifications do I want to display to users?</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*YyL5zUozFOIUWtMM.png" /><figcaption><em>Example of the user flows overview</em></figcaption></figure><h3>Create graphic layouts</h3><p>Now that you have the end-to-end descriptions of the user flows, your next turn will be to translate them to the graphic UI design.</p><p>Benefits of the graphic UI design:</p><ul><li>It helps reflect the graphic animations and business logic.</li><li>It makes it possible to find out the challenges and risks.</li><li>It enables making a realistic timeline and cost evaluation.</li></ul><p>Most popular tools for the graphic UI design:</p><ul><li><a href="https://www.figma.com/">Figma</a>;</li><li><a href="https://www.sketch.com/">Sketch</a>;</li><li><a href="https://www.adobe.com/products/xd.html">Adobe XD</a>.</li></ul><p>In general, mobile applications contain a different number of screens. There could be 20+ screens if it comes to developing a small social media app or 200+ screens if we talk about business-class mobile applications.</p><p>So, depending on your case and engagement, you could choose your way: master any of the UI design tools, create the screens by yourself or outsource this work to the UI/UX designer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*14IsYHliITF9vw3u.png" /><figcaption>Sample screens of ridesharing app</figcaption></figure><h3>Outline technical requirements</h3><p>React Native developers are creating the mobile UI. Their responsibility is to wire it up with the back-end. To handle this integration, developers need to obtain the documentation on the API first. It should involve the following parts:</p><ul><li>Resource descriptions.</li><li>Endpoints and methods.</li><li>Parameters.</li><li>Request samples.</li><li>Response examples.</li></ul><p>If you are a non-technical specialist, you could ask for the help of a consultant specializing in developing the API specification.</p><p>There are a few ways to find an eligible consultant:</p><ul><li>Ask a question on <a href="http://quora.com/">Quora</a> or <a href="http://stackoverflow.com/">Stack Overflow</a>.</li><li>Invite an expert via <a href="http://upwork.com/">Upwork</a> or <a href="http://toptal.com/">Toptal</a>.</li><li>Book a call with a consultant at <a href="http://clarity.fm/">Clarity.fm</a>.</li><li>Find a consultancy through <a href="http://clutch.co/">Clutch</a>, Upwork, YouTeam and book a call with them.</li></ul><p>Consultants usually possess any of these positions:</p><ul><li>Business analysts at a software development agency (most of the agencies produce the end-to-end documentation for the new projects).</li><li>Software engineers with the back-end background (there could be either the back-end or full-stack engineers).</li><li>Technical writers who specialize in back-end documentation.</li></ul><p>The specification on the back-end will help your team keep organized and deliver the project without unexpected distractions.</p><h3>2. How to complete the job overview</h3><p>We have reached the middle point of our road. From now, every new step will be easier to take.</p><p>Your current task is to create the job overview. Generally, it includes the technical requirements along with preferences regarding the skills of the candidate.</p><p>You could use the following template of the job overview for React Native developers.</p><h3>Job requirements template</h3><p><strong>Project overview:</strong></p><ul><li>Tell about your company and the core idea of the project.</li><li>Provide a brief summary of the user roles.</li></ul><p><strong>Main technical requirements:</strong></p><ul><li>Mention the technological stack of your project.</li><li>Preferences on UI design (graphic rendering, specific features).</li><li>Third-party integrations, like map and geo-location services, mail and SMS integrations, payment gateways.</li><li>Location.</li><li>Language.</li></ul><p><strong>Expectations:</strong></p><ul><li>Project duration.</li><li>Work engagement (full-time or part-time).</li><li>Time zone preference.</li><li>Working environment (management system and approaches).</li><li>Budget expectations.</li></ul><p><strong>Skills requirements:</strong></p><ul><li>Development experience.</li><li>Special technical skills.</li><li>Projects on GitHub.</li><li>Portfolio works.</li><li>Education.</li></ul><p><strong>References to the materials:</strong></p><ul><li>User flows overview.</li><li>Graphic UI design.</li><li>Back-end specification.</li></ul><h3>Sample of the job overview</h3><p>Let’s bring more practice to our process. At present, many companies are moving forward with creating ride-sharing services. Imagine for a moment that you represent the management of the transportation company.</p><p>Our current task is to hire a React Native developer who will accomplish the front-end for the upcoming mobile service app. The first step will be to write down the announcement for a job post.</p><p><strong>Project overview:</strong></p><p>The logistics company Rideshare Services Int. is looking to extend its customer service and hopes to create a cross-platforming mobile application. The app is aimed to help car drivers to make an additional income to minimize their transportation expenses.</p><p><strong>User roles:</strong></p><p>There are three main user categories within the app: driver, passenger, admin.</p><ul><li>Drivers indicate their daily route on the map and set a schedule. Based on that, the mobile app should find the passenger looking to request the ride at a specified time.</li><li>Passengers can offer an individual price for the desired service. Drivers could take on the opportunity if they agree on the proposed cost.</li><li>The admin user should be able to view the general statistics and moderate users.</li></ul><p><strong>Technological stack:</strong></p><p>The mobile UI code needs to be created with React Native. The app developer is free of choice regarding the state management service — Redux or Mobx will work fine.</p><p>The specification is ready and could be shared with the eligible candidate. The back-end is built with Node.js (Nest.js). The database is based on Postgresql. Preferred cloud service: Amazon Web Services.</p><p><strong>Preferences on UI design:</strong></p><p>The screen designs are already completed with Figma. There are 90 screens ready for implementation. The requirements for the graphic animation are minimal since the project is at the early MVP stage.</p><p><strong>Skills requirements:</strong></p><ul><li>previous experience of utilizing <strong>React-hook-forms</strong> in the project is much preferred;</li><li>experience of work with Swift and Android Studio (to be able to work with native modules on iOS and Android platforms);</li><li>knowledge of TypeScript is must have;</li><li>experience of work with <strong>Google Map API</strong>;</li><li>experience with Twilio and Stripe will be a big advantage.</li></ul><p><strong>Location and language:</strong></p><p>Our project will be based only in the UK for the initial stage, so that we would require only one language there. In the future, we are hoping to extend it with Norwegian and Dutch versions.</p><p>We are working in the UK time zone, but we are flexible as for your time preferences. We hope to have 3–4 hours overlap within our time zones, preferably in the morning hours.</p><p><strong>Duration of the project:</strong></p><p>Based on our preliminary estimation, the project would take 3,5–4 months to finish. Since the deadline is tight, you need to work full-time (40 hours per week).</p><p><strong>Working environment:</strong></p><ul><li>We use GitHub for the code repository.</li><li>All communications are run through Slack and Zoom.</li><li>We manage the tasks with Jira.</li></ul><p><strong>Budget expectations:</strong></p><p>Our budget capacity varies within USD 30–35K (based on our assumptions regarding the timeline).</p><p><strong>Required skills:</strong></p><ul><li>Master’s or bachelor’s degree in computer sciences.</li><li>3+ years of experience with React Native, both iOS and Android.</li><li>You have a good understanding of Agile and Scrum principles.</li></ul><p><strong>Project materials:</strong></p><p>Besides the graphic UI layouts and specifications on the back-end, we are willing to share the user flows overview. We will send you the documentation after reviewing your application form.</p><p><strong>Notes:</strong></p><ul><li>Please, send us your resume once you are interested in taking this job position. In your answer, describe your skills regarding the project requirements.</li><li>Share the links to the mobile apps you have done before and specify your team’s role while working on the project.</li></ul><p>Now we are ready to publish the job overview. You will receive a significant number of replies after placing the job announcement on those social platforms:</p><ul><li><a href="https://talent.hubstaff.com/">Hub Staff Talent</a>;</li><li><a href="http://topdevelopers.co/">Topdevelopers.co</a>;</li><li><a href="http://linkedin.com/">LinkedIn</a>;</li><li><a href="http://youteam.co/">Youteam</a>;</li><li><a href="http://upwork.com/">Upwork</a>;</li><li><a href="http://toptal.com/">Toptal</a>.</li></ul><p>Except for the mentioned, there are some global social websites, which provide job search opportunities to their community. So, you could also use their service to hire the React Native developers:</p><ul><li><a href="http://stackoverflow.com/">Stack Overflow</a>;</li><li><a href="http://angellist.com/">AngelList</a>;</li><li><a href="http://github.com/">GitHub</a>;</li><li><a href="http://dev.to/">Dev.to</a>.</li></ul><p>Each platform will make a difference in your outreach process. Upwork ensures you will get over 100 proposals on the first day. Just to prove our expectations, we simulated the hiring process on that platform.</p><p>We published the same job overview and requirements as we mentioned in our sample. Now you could check the outcomes of this experiment. The activity was so high that we obtained over 40 proposals in the first two hours.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Nysu5x3nFovHJOO7A08C6g.jpeg" /><figcaption>Break down your job requirements so that the applicants will grasp your project idea and respond fast</figcaption></figure><p>So, it makes sense to iterate your publications and post your requirements on the web resources one by one.</p><h3>3. How to shortlist the candidates</h3><p>As you could see, you will get dozens of applications straight after publishing your detailed job overview.</p><p>Now you need to pre-qualify the candidates based on the following criteria:</p><ul><li>Did the applicant specify the works related to your industry area?</li><li>Did the applicant describe their skills and experience based on your mentioned requirements?</li><li>Could the applicant work full-time on your project?</li><li>Did the candidate describe their role in the previous projects?</li><li>Did the applicant provide the link to their profile at GitHub?</li><li>Do they have some recommendations from past clients or employers?</li></ul><p>You could use the applicant screening rubric. The following template will help you come up with your criteria and make the right decision.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xL_vUO5bV-H8et3f3ub02g.png" /><figcaption>Applicant Screening Template</figcaption></figure><p>Create a list of the first 20 candidates matching your expectations. Respond to them via email or the job search platform, appreciating their time and interest. Propose them to book a meeting with you, sending them a link over <a href="http://calendly.com/">Calendly</a> or any other booking service that you normally use. Along with that, share your specifications with the candidates, so they could prepare for a job interview.</p><p>In our next post, we will provide you with further details on the hiring process of the <strong>React Native engineer</strong>. The essential part of it will be devoted to the questions you could ask your candidate during the job interview.</p><p>Thanks for reading, and good luck with your preparation!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5e1d2377d843" width="1" height="1" alt=""><hr><p><a href="https://medium.com/brocoders-team/how-to-hire-react-native-developer-a-guide-for-the-founder-part1-5e1d2377d843">How To Hire React Native Developer — A Guide For The Founder (part 1)</a> was originally published in <a href="https://medium.com/brocoders-team">Brocoders Team</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Vue vs. React — Which One To Choose in 2021?]]></title>
            <link>https://medium.com/brocoders-team/vue-vs-react-which-one-to-choose-in-2021-503c6449bda7?source=rss----dcb33b1b980b---4</link>
            <guid isPermaLink="false">https://medium.com/p/503c6449bda7</guid>
            <category><![CDATA[framework]]></category>
            <category><![CDATA[vuejs]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[front-end-development]]></category>
            <dc:creator><![CDATA[Oleg Goncharenko]]></dc:creator>
            <pubDate>Tue, 01 Jun 2021 18:16:52 GMT</pubDate>
            <atom:updated>2022-03-17T18:01:55.949Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*aVhwOENIqs3IL4CsCAFnEg.png" /></figure><h3>Vue vs. React — Which One To Choose in 2021? [Update Oct-Nov]</h3><p>Vue.js and React.js are JavaScript-based toolkit systems. They help build dynamic user interfaces. Regarding their concept, the whole UI is the data, and every change leads to new functions. These functions are refreshing certain page blocks, commonly known as UI components.</p><p>In Vue.js and React.js, components are the pieces of JavaScript and HTML code organised into one file. The components have similar hierarchy principles, with parents and children, who could pass the data to each other.</p><p>To find out the distinctive features between React and Vue.js, we should take these criteria into account:</p><ul><li>How the components are created with React and Vue.js.</li><li>How the components communicate with each other.</li><li>How the components impact the browser DOM.</li></ul><p>So, knowing that, we will be able to make a choice. Needed to mention that React could not be called a framework, but it has always been considered so. Even though it is a JavaScript library, it is suited to build an entire view part of the web application.</p><h3>Table of contents:</h3><ul><li><a href="#995f">Component build principles in React and Vue.js</a></li><li><a href="#686c">How do components impact browser DOM?</a></li><li><a href="#713d">Data binding of the components</a></li><li><a href="#0fbc">Brief industry comparison of Vue and React</a></li><li><a href="#1144">Useful resources</a></li><li><a href="#71c3">FAQ</a></li></ul><h3>Component build principles in React and Vue.js</h3><h4>JSX and single-file component structure in React</h4><p>Components render the data on web browsers. They include the UI part, which is shown to a user (HTML) and logic (JavaScript). The logic describes functions and methods to communicate the data in the browser.</p><p>React uses <strong>JavaScript Syntax Extension (JSX)</strong>, a syntax language that helps write functions corresponding to native methods of browsers. Safari, Chrome and Firefox are based on JavaScript engines that can directly talk with the logic functions written in React. Since JavaScript code is enriched with HTML tags, it can’t be recognized by a web browser. So, React is converting the programming code to pure JavaScript, using Babel Transpiler.</p><p>const message = &lt;h1&gt;React is cool!&lt;/h1&gt;</p><p>Dynamic variables could be put into bracket syntax ( { … } ) in the middle of JSX.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/984/0*2plBpEqvStuwMANX.png" /><figcaption><em>An example of React component, written with JSX (image source </em><a href="https://betterprogramming.pub/secret-about-react-render-function-abefcd32f625"><em>link</em></a><em>).</em></figcaption></figure><p>According to <a href="https://stackshare.io/react">Stackshare</a> statistics, the most favourite features of React are components (747) and simplicity (484). JSX, though, takes less user appreciation (31).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/987/0*ZSJSvCXlsU1kk1b5.png" /><figcaption>Pros of React accordingly to votes on the Stackshare.io</figcaption></figure><p>I think the biggest concern about JSX is that it doesn’t require a specific code structure. The logic and UI of components are in one file so that it could lead to messy code.</p><p>The idea of the single-file component is opposed to Angular, which proposed keeping HTML, JavaScript and CSS in separate files. Completing components in a single file didn’t get enough popularity unless Airbnb and Netflix joined the React community and began using React for their MVP construction.</p><p>When searching for materials related to our topic, I found the ‘Do Better Dev Show podcast’. In one of their <a href="https://podcasts.google.com/feed/aHR0cHM6Ly9hbmNob3IuZm0vcy80NjY3ZDcyMC9wb2RjYXN0L3Jzcw/episode/MWE0NzYwODAtZjYyNi00MzI5LWE0MjEtZTBmNmU4YjhhMWM1?ep=14">episodes</a>, Nathan Calvank and his co-host Gyanesh Mishra discussed the main difference between Vue and React. In the middle of the podcast show, Nathan shared his technique of code adjustment in React.</p><p><strong>Nathan Calvank</strong>, co-author of “Do Better Dev Show” podcast:</p><blockquote><em>JSX combines logic and presentation. You have got your HTML alongside your JavaScript in the same component. The way it is separated now: you have all your logic at the top, and you just return all your JSX below that.</em></blockquote><blockquote><em>If you have a sufficiently complex application, you can pull out all of that logic to a container. The container holds all that logic and loads components, including this logic</em>.</blockquote><blockquote><em>So, dealing with the potential frustration of those things combined is a reasonable way of keeping these things separated.</em></blockquote><blockquote><em>You will get the benefit of JSX, getting the separation of concerns from the development side.</em></blockquote><h4>Vue.js follows HTML templates for the component design</h4><p>The same as React, Vue.js proposes keeping the UI and logic in the same file. The component code in Vue.js is contained within a specific HTML template.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*wCIbAyx94_6KsTCP.png" /><figcaption>Component structure in Vue.js</figcaption></figure><p>The templating brings a clear image of the component code. It helps programmers keep an eye on the methods, view the properties and observe the render functions.</p><p>Vue.js has a specific syntax. It uses double braces {{ }} as place-holders for data. HTML attributes are the directives in Vue.js and contain the prefix <strong>v-</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/404/1*JYZs2iN7dRVLI89vnYJRrA.png" /><figcaption>Syntax in Vue.js</figcaption></figure><p>The framework’s system involves objects, classes and behavior categories. It matches with the experience of programmers who had worked with object-oriented programming.</p><p>In the meanwhile, Vue.js enables writing with JSX, which extends the programmatic power of the framework.</p><h4>Summary of requirements:</h4><p>React requires solid JavaScript skills, while Vue.js is more oriented to novice developers. Similar to React, Vue.js enables writing with JSX, but the components are written with HTML templates.</p><h3>How do components impact browser DOM?</h3><h4>React renders data through the virtual copy of browser DOM</h4><p>When a user opens the web page, the Internet browser parses it to a tree-like structure and reads it up to down. This tree-structured file is called the Document Object Model (DOM).</p><p>If the user did some action on the page, the browser needs to recreate and re-read the DOM. It takes more loads and decreases the resources of the browser.</p><p>React avoided the traditional DOM rendering and leveraged the capacity of data rendering in the browser.</p><p><strong>Pete Hunt</strong>, a core member of React team, described the idea for the InfoWorld magazine:</p><blockquote>The browser itself is in retain mode. You click an HTML element on the screen, and then you change it over time. The programming model we wanted for React was basically to throw out and redraw everything. We think that’s easier to understand. However, the browser is not designed to work like that. What we did is we built something that we’re calling the virtual DOM to abstract that. And so we have a way of basically rendering to a virtual DOM, throwing out the whole virtual DOM and re-creating it every time the data changes, and then React under the hood will convert that, will get the old virtual DOM with the new virtual DOM and then convert that to manipulations of the real browser DOM.</blockquote><p>Thank you, Pete. Based on your explanation, we could figure out how does the Virtual DOM operates:</p><ol><li>Before the web page is loaded in the web browser, React makes a copy of the DOM and places all the objects in a new component.</li><li>When a user opens the web page, React doesn’t access a real DOM but renders the copy of DOM. It is called the Virtual DOM.</li><li>While the user walks through the page, React is computing the changes. If the user clicked a button or performed any other action, React creates a new snapshot of the DOM and compares it with the previous version.</li><li>If one more node element has changed, React updates the page rendering the real DOM.</li></ol><p>Amazingly, that React team kept in mind an idea of the game engine when developed the virtual DOM:</p><blockquote><em>The difference with React is the way that your program is much more like a game engine, as opposed to these alternative approaches, with data-binding (Pete Hunt).</em></blockquote><p>Further, Pete Hunt explains: “With a game engine effectively what happens is the screen is cleared at the beginning of every frame, and then you redraw the scene&quot;.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3K5RJ0GIh8tbzu6F.png" /><figcaption>Virtual DOM rendering in React</figcaption></figure><h4>Vue.js is tracking only the dynamic parts in virtual DOM</h4><p>Vue.js has followed the idea of React’s virtual DOM, but it is processing differently.</p><p><strong>Evan You</strong>, a founder of Vue.js, made a critical review of React virtual DOM. He shared his insights during the presentation in Toronto:</p><blockquote>Some of you might know that virtual DOM allows us to compare two snapshots of your view structure and figure out what actual changes you should apply to the DOM. In most cases, it is relatively cheap and fast. However, there is still a cost because you are recreating lots of JavaScript objects. You have to walk through the whole tree on each update to figure out what has actually changed. And it counts pounds as your application gets larger. But the worst part about the virtual DOM is no matter how little dynamic content you have in your template, you always have to walk through the whole tree to find out what has exactly changed.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*fnATiLWPGc62_Y-z.png" /><figcaption>Vue.js is now tracking the dependencies within each object of the DOM tree.</figcaption></figure><p>The virtual DOM in Vue 3.0.11 is tracking the dynamic elements only, which contain &lt;p v-if=&quot;ok&quot;&gt;.</p><h4>Summary on comparison of the virtual DOM processing:</h4><p>Templating in Vue.js helps to represent a mini-DOM of a component. Instead of tracking each object, Vue.js goes over the dynamic parts in templates. So, it sufficiently optimized the operation of virtual DOM and leveraged the client-side rendering in Vue.js projects.</p><p>Virtual DOM in React needs to track all the nodes in the tree, whether they are static or dynamic.</p><h3>Data binding of the components</h3><p>While looking through the articles comparing React vs. Vue.js, you could find different views regarding the data binding. You could often read that React follows just a one-way data flow. Meanwhile, Vue.js provides just the two-way binding like Angular. That is not true.</p><p>Both React and Vue.js support the one- and two-way data flow simultaneously. Moreover, they suggest the one-way data flow as most preferred.</p><p>Let’s get a look at the piece of <a href="https://v3.vuejs.org/guide/component-props.html#one-way-data-flow">documentation</a> on Vue 3.0.11 that emphasizes the benefits of one-way data-binding:</p><p>“All props form a one-way-down binding between the child property and the parent one: when the parent property updates, it will flow down to the child, but not the other way around. This prevents child components from accidentally mutating the parent state, which can make your app’s data flow harder to understand.</p><p>In addition, every time the parent component is updated, all props in the child component will be refreshed with the latest value. This means you should not attempt to mutate a prop inside a child component. If you do, Vue will warn you in the console.”</p><p>Even though React components are designed for one-way flow, they could work with the two-way direction.</p><p>React supports callback functions so that the children components could fetch the props to their parents. For example, if a user is typing the text in the input field of the child component, these changes will reflect the parent and update its content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*Fi1FbjUTvj6l2HEJ.png" /><figcaption>One-way data flow in React</figcaption></figure><p>With that said, the React community is provided with react-hook libraries, which enable two-way data binding.</p><h4>Summary:</h4><p>Vue.js and React support one-way as well as two-way data binding for components. In general, one-way data flow helps establish better control of the project functionality. Both frameworks recommend it as the best option.</p><h3>Brief industry comparison of React and Vue.js</h3><h4>React</h4><p>React.js is flexible and open to a variety of choices. It doesn’t imply any opinionated direction or mentality for development. However, this approach has some cost because the developers need to have a strong knowledge of JavaScript and be experienced with Single page applications (SPA) design.</p><h4>Pros of React:</h4><ul><li>Fast client-side rendering.</li><li>Good control of the data flow.</li><li>Light-weight architecture.</li><li>Extensibility and scalability.</li><li>Large community support.</li></ul><h4>Cons of React:</h4><ul><li>Steep learning curve.</li><li>Does not operate without other libraries and services, like Redux, routing, etc.</li><li>Structure-free code may get to spaghetti and boilerplate.</li></ul><h4>What companies should choose React:</h4><ul><li>Early-stage startups that need fast feature development and validation campaigns on the market.</li><li>Companies that are looking to outsource their development. It is much easier to find a React developer compared to the one with Vue.js expertise.</li><li>Product-based companies will also require cross-platforming app development (React Native based on React technology, that it will be a good fit).</li></ul><h4>Vue.js</h4><p>Vue.js combined the top-level features of React and Angular, but its main feature is the perfect user experience. Also, it leveraged the capacity of the virtual DOM and optimized the code structure.</p><h4>Pros of Vue.js:</h4><ul><li>Developer-friendly framework.</li><li>Outstanding performance.</li><li>Well-structured code.</li><li>Elegant language syntax.</li><li>Fine user documentation.</li></ul><h4>Cons of Vue.js:</h4><ul><li>Lack of experienced developers.</li><li>Small community.</li><li>A big part of the documentation is written solely in Chinese.</li></ul><h4>What companies should choose Vue.js:</h4><ul><li>Companies that approach the market of web-based products.</li><li>Companies that are looking to implement a single flow in their development process.</li><li>Companies with no previous experience of using frameworks in their build process or those looking to leverage their proficiency with JavaScript.</li></ul><h4>Top 10 companies that built their projects with React:</h4><ul><li>Atlassian (Jira, Trello)</li><li>Codecademy</li><li>Dropbox</li><li>Netflix</li><li>Airbnb</li><li>Facebook</li><li>Instagram</li><li>Twitter</li><li>Reddit</li><li>WhatsApp</li></ul><h4>Top 10 companies that constructed their projects with Vue.js:</h4><ul><li>Behance</li><li>Dribbble</li><li>Adobe</li><li>GitLab</li><li>Alibaba</li><li>Grammarly</li><li>Nintendo</li><li>Zoom</li><li>Louis Vuitton</li><li>Google Careers</li></ul><h3>Useful resources</h3><h4>Articles and tutorials:</h4><ol><li><a href="https://www.infoworld.com/article/2608181/react--making-faster--smoother-uis-for-data-driven-web-apps.html">React: Making faster, smoother UIs for data-driven Web apps</a>, by Paul Krill, InfoWorld.</li><li><a href="https://www.doria.fi/bitstream/handle/10024/177433/levlin_mattias.pdf?sequence=2&amp;isAllowed=y">DOM benchmark comparison of the front-end JavaScript frameworks React, Angular, Vue, and Svelte</a>, master’s thesis in computer science by Mattias Levin.</li><li><a href="https://www.w3schools.com/whatis/whatis_vue.asp">What is Vue.js?</a>, <a href="https://www.w3schools.com/whatis/whatis_react.asp">What is React?</a> | Tutorials at W3schools.</li></ol><h4>Podcast shows:</h4><ul><li><a href="https://podcasts.google.com/feed/aHR0cHM6Ly9hbmNob3IuZm0vcy80NjY3ZDcyMC9wb2RjYXN0L3Jzcw/episode/MWE0NzYwODAtZjYyNi00MzI5LWE0MjEtZTBmNmU4YjhhMWM1?ep=14">React vs Vue vs Angular</a>, 03.29.2021 | Do Better Dev Show podcast</li><li><a href="https://podcasts.google.com/feed/aHR0cHM6Ly9waW5lY2FzdC5jb20vZmVlZC9sYWR5YnVnLXBvZGNhc3Q/episode/aHR0cHM6Ly9waW5lY2FzdC5jb20vZ3VpZC9jNWYxNDUxZC1mNTg3LTQ0OTgtYWE0ZS1lZGU2OTYxMjk0OTI?ep=14">React, Vue, &amp;&amp; Angular, OH MY!</a>, 10.14.2019 | Ladybug Podcast</li><li><a href="https://podcasts.google.com/feed/aHR0cHM6Ly9hbmNob3IuZm0vcy8xM2NkYzc0OC9wb2RjYXN0L3Jzcw/episode/MTAwZjRmMDYtZDBlMC00YmYxLThkM2QtNzViZjczZjZmNzQ0?ep=14">A Conversation about ReactJS</a>, 05.26.2020 | Headless {Creator Podcast}</li><li><a href="https://podcasts.google.com/feed/aHR0cHM6Ly9yc3MuY3RvLmFpL2lmZWxzZQ/episode/OTcyNzBhMzMtMWI4Yi00MjMyLWI5YWQtODY5MTAzNzBhOTEy?ep=14">React vs. Vue: With Guests Cassidy Williams &amp; Erik Hanchett</a>, 10.21.2019 | If/Else</li></ul><h4>Videos on YouTube:</h4><ol><li><a href="https://youtu.be/WLpLYhnGqPA">Design Principles of Vue 3.0 by Evan You</a>.</li><li><a href="https://youtu.be/1oK8AvSlXyM">Differences between Vue and React</a> (an interview with Sara Vieira).</li><li><a href="https://youtu.be/DUP5TJtBL3I">Tech Talk: 1 vs 2 way Data Binding in React and Angular</a> (Matthew Elmquist for Fullstack Academy).</li></ol><p>Originally published at <a href="https://brocoders.com/blog/react-vs-vue-comparison-2021/">https://brocoders.com</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=503c6449bda7" width="1" height="1" alt=""><hr><p><a href="https://medium.com/brocoders-team/vue-vs-react-which-one-to-choose-in-2021-503c6449bda7">Vue vs. React — Which One To Choose in 2021?</a> was originally published in <a href="https://medium.com/brocoders-team">Brocoders Team</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How React Native boilerplate helps us build mobile apps faster]]></title>
            <link>https://medium.com/brocoders-team/how-react-native-boilerplate-helps-us-build-mobile-apps-faster-f8ce952cfe35?source=rss----dcb33b1b980b---4</link>
            <guid isPermaLink="false">https://medium.com/p/f8ce952cfe35</guid>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[cross-platform]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[boilerplate]]></category>
            <dc:creator><![CDATA[Serhii Tonkoshkur]]></dc:creator>
            <pubDate>Fri, 07 May 2021 08:31:24 GMT</pubDate>
            <atom:updated>2021-06-14T10:23:59.766Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DPJ3hQtlIkObKVkQovdyqQ.jpeg" /></figure><p>When initiating a new mobile application project, we usually face tasks similar to the previous one. Whether it would be a social networking application or event booking service, we need to redo the same work, like building a user profile, implementing sign-up registration and authentication via social media profiles.</p><p>We searched through various solutions that could help us reuse our code in simultaneous projects. Our target was towards the following sides:</p><ul><li>Building the screens for the user profile;</li><li>Creating the sign-in and sign-up features;</li><li>Implementing the user authentication via socials.</li></ul><p>In a while, we found the React Native boilerplate and considered it to be the best fit for our current needs. The boilerplate is a custom collection of assets and tools needed for an efficient product build. It assembles the code patterns from various parts and supports the development process with automated features.</p><p>Regarding our team, the boilerplate is used by the back-end and front-end developers. Its current release is focused on integration with our <a href="https://nestjs.com/">NestJS</a> boilerplate but could be adjusted to any other back-end framework.</p><h3>Developing mobile UI with the React Native boilerplate</h3><p>React native boilerplate includes the necessary assets required from the start:</p><ul><li>Form controls (inputs, buttons);</li><li>Typography elements;</li><li>User avatars.</li></ul><p>These components are the basic elements and could be customized later. With their help, a front-end engineer can build a prototype and simulate the feature on the screen view.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*GtIx2P-mix_yl-me.jpg" /><figcaption>Creation of the user profile with boilerplate</figcaption></figure><p>The boilerplate involves the avatar pictures that our developers are using for the profile design. If the web link to the user picture has been broken, our module fixes the issue. Instead of leaving the image area empty, it populates this space with the initial letters taken from the user name.</p><h4>Dark theme</h4><p>Besides mentioned, we implemented the <strong>dark theme</strong> for the user interface. Previously it was required at our taxi driver application. As far as the dark mode becomes trendy now, we expect to apply it in our new projects again.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*KsbAy2rnP1vKxus1.jpg" /><figcaption>A dark theme mode</figcaption></figure><h4>Text component</h4><p>For the text design, we utilize the React Native <a href="https://reactnative.dev/docs/text">Text</a> component. Based on that, we have implemented our custom Typography library, which helps us prevent style repeats in the text markup.</p><h3>User feature implementation</h3><h4>Sign-in / sign-up process</h4><p>In general, the user registration takes one week to complete. It spans various tasks like a user sign-up and log-in via email or social media (Google, Facebook, Apple), password recovery, and its change. To shorten the time for development, we arranged the code library. With its help, delivery of user sign-in and sign-up features requires two times less time.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cGmgH-8wu3RxpFJ2.jpg" /><figcaption>Social authentication functions</figcaption></figure><p><em>Vladyslav Schepotin, lead software engineer at Brocoders:</em></p><blockquote><em>Usage of React Native boilerplate at Brocoders team makes product build efficient. It cuts essentially our efforts at the beginning, allowing us to concentrate on clients’ business goals.</em></blockquote><h3>Technical support of the build process</h3><h4>Mobile UI testing</h4><p>We utilize <a href="https://github.com/wix/Detox">Detox</a>, one of the most popular frameworks in React Native projects. It helps us deliver end-to-end mobile UI tests during the build process.</p><h4>Regular checks on updates</h4><p>Since we utilize various React Native libraries, it becomes actual to check on their new version updates. To keep up with the latest version releases, we use the <a href="https://github.com/dependabot">Dependabot</a> utility.</p><p>The Dependabot is tracking the dependencies through the library code on Github. If any changes appear, the bot is making new pull requests to our GitHub repository. Before merging the code, the bot runs automated user tests over CI. It checks whether the application normally works with the new library version. If so, the Dependabot notifies us over email about the tests that have been performed successfully and we complete the merging.</p><h4>Performance support</h4><p>Since we use the various form libraries in our projects, we need to make sure they are working correctly on the user side. To validate their performance, we utilize the <a href="https://react-hook-form.com/">React-hook-forms</a> utility. Thanks to that, we are implementing the quality proven forms in our mobile application projects.</p><h4>Multi-language localization</h4><p>Usually, our clients prefer using multiple languages for their applications. To make it faster, a developer creates a document with the language translations and uploads it to the project over boilerplate.</p><h4>TypeScript integration</h4><p>Since most of our projects are large-sized, we need our code to be valid and plain. To ensure its quality, we implemented <a href="https://www.typescriptlang.org/">TypeScript</a>, which maintains our programming language standard.</p><p>Usage of the React Native boilerplate is saving our time by taking off the routine work. This approach has proven its value, and we are going to extend our boilerplate with more features.</p><p><em>This article was originally published at </em><a href="https://brocoders.com/blog/react-native-boilerplate/"><em>Brocoders.com</em></a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f8ce952cfe35" width="1" height="1" alt=""><hr><p><a href="https://medium.com/brocoders-team/how-react-native-boilerplate-helps-us-build-mobile-apps-faster-f8ce952cfe35">How React Native boilerplate helps us build mobile apps faster</a> was originally published in <a href="https://medium.com/brocoders-team">Brocoders Team</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Flutter vs. React Native in 2022 — Detailed Framework Comparison [Update January]]]></title>
            <link>https://medium.com/brocoders-team/flutter-vs-react-native-in-2021-detailed-framework-comparison-fbce3e835645?source=rss----dcb33b1b980b---4</link>
            <guid isPermaLink="false">https://medium.com/p/fbce3e835645</guid>
            <category><![CDATA[cross-platform-mobile-app]]></category>
            <category><![CDATA[app-development]]></category>
            <category><![CDATA[react-native]]></category>
            <category><![CDATA[flutter]]></category>
            <dc:creator><![CDATA[Oleg Goncharenko]]></dc:creator>
            <pubDate>Thu, 15 Apr 2021 13:33:14 GMT</pubDate>
            <atom:updated>2022-01-01T21:39:27.784Z</atom:updated>
            <content:encoded><![CDATA[<h3>Flutter vs. React Native in 2022 — Detailed Framework Comparison [Update January]</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*GjadvhnkkkJGkEe7eWcoBA.jpeg" /></figure><p>Native applications work smoothly on mobile devices. Their graphic transitions take less time for UI rendering compared to the cross-platforming. The reason is simple: their code can communicate straight to the mobile OS core, enabling UI methods.</p><p>In the meantime, the native mobile platforms (OS) are written in different languages. For instance, Android OS is a mix of Java, C and C++. In comparison, the iOS platform is built with Objective C and Swift. So, native mobile development requires the knowledge of a few languages like Swift and Java simultaneously. That’s a big deal, as not many companies could afford to hire developers for each platform.</p><p>Cross-platforming mobile applications are less competitive in graphic animation, though it is hard to notice at first glance. Moreover, they are cost-efficient and could be a good fit for early-staged companies.</p><p>Facebook was the first significant player who announced React Native in 2015. The cross-platforming development became true: you create the code once, but it turns to native designs.</p><p>The next big event occurred in 2017. Google introduced Flutter, which is based on Dart programming language.</p><h3>Table of contents</h3><ul><li><a href="#8df7">UI Rendering</a></li><li><a href="#662c">Business Logic</a></li><li><a href="#dbbe">Programming Language</a></li><li><a href="#f4b5">UI Design Tools</a></li><li><a href="#229a">Community Support</a></li><li><a href="#5983">Conclusions</a></li></ul><h3>UI Rendering</h3><h4>React Native</h4><p>With React Native, developers create a single code compatible with iOS and Android platforms. Facebook implemented the Yoga engine, which translates the JavaScript and CSS code to the native UI. Regarding Facebook, they reached code reuse in 87% for their Ad Manager Application. It shows a high result.</p><p>When the application is installed on the Android system, the APK file is unpacked in two parts — the native UI and the Javascript code. All components and JavaScript libraries will be ported to the device too.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*gg9gPniAcUrxuU8S.png" /><figcaption>A visual scheme on the process of installation for React Native app (used from the <a href="https://youtu.be/ZwX3i3e1Vfs?t=383">speech of Lev Vidrak</a>)</figcaption></figure><p>The UI layer is responsible for user interactions. If any event happens on display (like clicking or scrolling over a screen), the native controller must pass this information to the bridge.</p><p>The bridge connects to the mobile platform API and serves as a transport layer. It binds JavaScript and C/C++ language environments. It can read the Javascript code and translate it to a relevant view method. The native C/C++ platform exposes the machine code for rendering the UI using it.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*UeSINWAM13PY9GTy.png" /><figcaption>A simplified scheme explaining the bridge in React Native (accord. to React Native&#39;s documentation)</figcaption></figure><p>The React Native’s bridge contains the JavaScriptCore. It was created by Apple and is inbuilt to the iOS platform. Hence, React Native app operates with its native JavaScript engine. For debugging, it uses another JavaScript engine, V8, which runs in Google Chrome and renders data for Node.js.</p><h4>Flutter</h4><p>While React Native invokes the OEM widgets, Flutter is shipped with its own widgets. After the installation, the Flutter engine draws the UI through the Skia. Such a rendering approach helps Flutter provide 60 frames per second (fps) performance or 120 fps on devices capable of 120Hz updates.</p><p><strong>Google Team on Flutter&#39;s performance:</strong></p><blockquote>“Flutter is fast. It’s powered by the same hardware-accelerated Skia 2D graphics engine that underpins Chrome and Android. We architected Flutter to be able to support glitch-free, jank-free graphics at the native speed of your device. Flutter code is powered by the world-class Dart platform, which enables compilation to native 32-bit and 64-bit ARM code for iOS and Android.”</blockquote><p><strong>Martin Aguinis, Product Marketing Manager at Google:</strong></p><blockquote>There is never any bridge or context switch needed to go between your app and the platform. All the Flutter requires from the platform is a canvas to render the widgets. They will appear on the device screen and access events like finger taps and services like the camera and geolocation.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9XeROuuiUJ14WydeAdRISQ.png" /><figcaption>The rendering pipeline in React Native and Flutter</figcaption></figure><h3>Business Logic</h3><p>Both Flutter and React Native use the best practices, distinguishing the UI from the business logic. Flutter represents the BLoC methodology, while React Native is based on Flux.</p><h4>React Native</h4><p>React Native keeps all the data communication within a single process, saving the device’s memory. Meanwhile, the system keeps the three equal threads simultaneously, distinguishing their responsibilities.</p><p>For instance, if the data is not coming to the UI side yet, the app will not stop, keeping up with the changes as soon as they arrive from the JavaScript side (which plays the business logic role here). So, its data management prevents the blockage of the performance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*TzKPBREBkeXir1wI.png" /><figcaption>The data processing in React Native (regarding Vladimir Novick&#39;s book)</figcaption></figure><p>It may seem that the existence of the bridge as a middle layer may decrease the application performance. Regarding the Airbnb case, React Native’s architecture is not leading to that problem:</p><p><strong>Airbnb on React Native’s performance:</strong></p><blockquote><em>“One of the largest concerns around React Native was its performance. However, in practice, this was rarely a problem. Most of our React Native screens feel as fluid as our native ones. Performance is often thought of in a single dimension. We frequently saw mobile engineers look at JS and think “slower than Java”. However, moving business logic and layout off of the main thread actually improves render performance in many cases. When we did see performance issues, they were usually caused by excessive rendering and were mitigated by effectively using </em><strong><em>shouldComponentUpdate</em></strong><em>, </em><strong><em>removeClippedSubviews</em></strong><em>, and better use of Redux”.</em></blockquote><p><strong>Vladimir Novick</strong>, an author of the book ‘React Native — Building Mobile Apps with JavaScript’, explains the reasons for low performance:</p><blockquote><em>If you do complex calculations in your application that lead to a lot of UI changes, these can lead to bad performance. The rule of thumb is that if your UI changes slower than 16.67 ms, then your UI will appear sluggish.</em></blockquote><p>Along with that, React Native’s team acknowledges the framework’s limitations. Since 2018, they have been working on a new architecture to eliminate the bridge. The upcoming version will use Fabric, making the UI rendering process more lightweight.</p><p><strong>Joshua Gross</strong>, a member of React Native’s core team, claimed that the Facebook app is already running with Fabric renderer. As he shared on his tweeter on July 14, 2021, their team is to publish it on open source:</p><h3>josh #blm on Twitter: &quot;Today, React Native reached a major milestone - all 1K+ RN screens in the Facebook app use the new Fabric renderer. This is something we have been working toward since January 2018!Next, we&#39;ll be starting to work on bringing this to open source for everyone to use - stay tuned! / Twitter&quot;</h3><p>Today, React Native reached a major milestone - all 1K+ RN screens in the Facebook app use the new Fabric renderer. This is something we have been working toward since January 2018!Next, we&#39;ll be starting to work on bringing this to open source for everyone to use - stay tuned!</p><p>If React Native team implements Fabric to its public release as promised, the framework will get superior performance.</p><h4>Flutter</h4><p>The deep dive into the business logic of Flutter’s architecture shows it has more similarities with React Native than differences. It also allows building the UI with the components or widgets that are immutable descriptions of the interface.</p><p><strong>Matt Sullivan, <br></strong>Developer Advocate, Google:</p><blockquote><em>A widget is an immutable description of part of a user interface.</em></blockquote><p>The immutability of the widgets helps Flutter separate the concerns. The UI is only data. The functionality is brought out to the logic side, called <strong>BLoC (Business Logic Component)</strong>. The primary responsibility of this part is to recognize the events taken on the UI and set the corresponding state for the widgets. The same as in React Native or React, the changes in the state fetches new data.</p><p>If you look at the below diagram, you will find the state management concept of Flutter very similar to React Native:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8XBgnHbmMVGde8fCqANRfg.png" /><figcaption>Concept of UI rendering in Flutter</figcaption></figure><p>As well as in React Native, the Flutter app uses data storage. The data arrives asynchronously, which prevents the application from the I/O blockage.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bi0wjVJmSpKRw1Ear9Dpmw.png" /><figcaption>State management in Flutter with BloC</figcaption></figure><p>At the same time, Flutter’s concept has more advantages over React Native. While in React Native, the UI Thread talks with the JavaScript Thread (logic) passing the communication over the bridge, the Flutter’s BloC works seamlessly.</p><p>Many new apps like taxi driver services and ride-sharing marketplaces require synchronous processing. Flutter is a better match in this case. Unlike React Native, Flutter prioritizes the incoming requests, placing them in essential and isolated threads. For instance, <strong>Uber’s partner in Russia, the Yandex Driver team, chose Flutter as the primary SDK for building their app</strong>.</p><p>Nevertheless, React Native is a good fit even for transportation and delivery apps at their early stages. For example, our team <a href="https://brocoders.com/case-studies/gokada-ridesharing-app/">developed an uber-like app ‘Gokada’.</a> The application’s design was solely created with React Native. The client company has validated its MVP and acquired new customers. This app’s performance hasn’t been an issue due to the UI’s split and the business logic.</p><h3>Programming Language</h3><h4><strong>Dart</strong></h4><p>Google founded Dart in 2011, though it was not popular until 2017. It became popular due to Flutter, of course. Dart is simple to learn. It doesn’t take much time to get familiar with it. It is an object-oriented programming language based on C and looks similar to Java. Like JavaScript, Dart is an event-driven language and supports asynchronous data processing.</p><p>Though Dart is very new, it is loved by many programmers. Flutter community admires the documentation on Dart, above all, it is pleasant to read. The only issue that the community faces now is they are not enough large. However, Google’s team regularly contributes to the framework at GitHub and is keen on answering the upcoming question on StackOverflow.</p><p>Lastly, Dart supports Ahead Of Time compilation (AOT). This feature significantly improves app performance and startup time. Its other advantage is the Just In Time compilation (JIT), which enables developers with the Hot Reload feature.</p><h4><strong>JavaScript</strong></h4><p>JavaScript was developed for the web in the middle of the 1990s, and it is the core language for many frameworks, including React Native. It represents functional programming. JavaScript’s main advantages are event-driven functioning and scalability.</p><blockquote>In terms of UI management, Flutter is similar to JavaScript, as it constructs its user interface <a href="https://flutter.dev/docs/development/data-and-backend/state-mgmt/declarative">“to reflect the current state of your app”</a>.</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*tH6VZv6euG7Hb0Yz.png" /><figcaption>Flutter inherited the React.js approach</figcaption></figure><h4>JavaScript and Dart are prospective languages. Despite being young, Dart obtains tremendous support from the Google team. React Native’s society will be growing as JavaScript comes from the web-programming area and proves its efficacy.</h4><h3>UI Design Tools</h3><h4>Flutter</h4><p>Flutter inherited the React methodology from the start. They have been using the same component structure. The whole application is constructed as one single widget which is breaking down into many others. Components are called widgets and have the same hierarchical principles as at React Native.</p><p>Flutter has two particular spaces for the UI code design. They provide Cupertino widgets specifically for iOS and Material widgets for React Native. The developer needs to work with two libraries to align them with the app’s final design. Even though this approach helps build the customizable look and feel design, this work doubles the development time.</p><h4>React Native</h4><p>React Native provides a developer with a UI library compatible with both platforms. The most popular libraries are: Native Base, React Native elements, React Native Material UI.</p><p>Worth mentioning that Flutter contains a hot loader feature that is highly valued by its community. The feature enables to view the ongoing changes on-screen without the need to recompile the whole project again. React Native involves a similar feature too, but there are lots of claims that it (is buggy) doesn’t work properly.</p><p>Flutter and React Native are different in terms of their market strategies. The first one targets native mobile developers, and the second one focuses on specialists from the web-programming world. It explains the difference in programming tools and the environment of both SDKs.</p><p>React Native saves the developers time for design since its UI code is reusable for both platforms. Also, React Native provides a developer with better visual features to simulate the code view on different platforms.</p><h3>Community Support</h3><p>React Native’s open-source library is supported consistently by Facebook and its community. They provide a whole set of technologies, like, React Native components, JSX and JavaScript code. Though, as shared on the IBM developers community website, ‘React Native is still evolving, and it can be confusing when you try to decide which libraries to use when you need functionality that is not provided by React Native today, such as how to do UI navigation or use maps’.</p><p>React Native developers claim that they often come across incomplete libraries. That’s unclear if the code is valid unless you tried to implement it. There are many libraries of poor quality, which will take extra hours to figure out the issue. So, working with open-sourced libraries is a pain point for React Native developers.</p><p><strong>Top 10 companies that built their products with React Native:</strong></p><ol><li>Facebook;</li><li>Instagram;</li><li>Pinterest;</li><li>Uber Eats;</li><li>Bloomberg;</li><li>Walmart;</li><li>Shopify;</li><li>Skype;</li><li>Tesla;</li><li>Wix.</li></ol><p><strong>Top 10 companies that created their products using Flutter:</strong></p><ol><li>Google Ads;</li><li>eBay Motors;</li><li>Toyota;</li><li>BMW;</li><li>Alibaba;</li><li>Groupon;</li><li>Realtor.com;</li><li>Reflectly;</li><li>Square;</li><li>The New York Times.</li></ol><p><strong>Uber Eats on React Native:</strong></p><p>“We ultimately architected UberEATS in much the same way as we would a regular React /Redux web app, eschewing iOS patterns and modules wherever possible. Fortunately for our needs and preferences, web concepts and technologies, on the whole, translate quite nicely to native development” (<a href="https://eng.uber.com/ubereats-react-native/">source of the quote</a>).</p><p><strong>Alibaba Cloud on Flutter:</strong></p><p>“Flutter features strong UI expressiveness to enable fast, efficient and low-cost development of attractive UIs. Flutter is especially suitable for e-commerce businesses that emphasize UI-based visual interaction, helping them create highly expressive web pages” (<a href="https://www.alibabacloud.com/blog/the-advantages-of-developing-a-flutter-system-for-alibaba_597760">source of the quote</a>).</p><h3>Conclusions</h3><p>Flutter uses the same concept as React Native. However, it moved a big step ahead in terms of performance and architecture.</p><p><strong>A Brief Comparison of Flutter and React Native:</strong></p><ol><li>Flutter and React Native have much in common regarding components design and state management.</li><li>Flutter is targeted at the native app developers group, whereas React Native is focused on web programmers.</li><li>React Native is based on JavaScript code, which renders the native design via the mobile host API.</li><li>Flutter is suited for apps requiring synchronization and animation rendering.</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*nNo9pdpKFaLls0gr.png" /></figure><p><em>Originally published at </em><a href="https://brocoders.com/blog/flutter-vs-react-native/"><em>https://brocoders.com</em></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fbce3e835645" width="1" height="1" alt=""><hr><p><a href="https://medium.com/brocoders-team/flutter-vs-react-native-in-2021-detailed-framework-comparison-fbce3e835645">Flutter vs. React Native in 2022 — Detailed Framework Comparison [Update January]</a> was originally published in <a href="https://medium.com/brocoders-team">Brocoders Team</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Crime and Punishment: Hype Driven Development]]></title>
            <link>https://medium.com/brocoders-team/crime-and-punishment-hype-driven-development-c5a4a71bbd3c?source=rss----dcb33b1b980b---4</link>
            <guid isPermaLink="false">https://medium.com/p/c5a4a71bbd3c</guid>
            <category><![CDATA[program-architecture]]></category>
            <category><![CDATA[it-project-management]]></category>
            <category><![CDATA[hype]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[software-architecture]]></category>
            <dc:creator><![CDATA[Maxim Vynohradov]]></dc:creator>
            <pubDate>Fri, 13 Nov 2020 11:54:20 GMT</pubDate>
            <atom:updated>2020-11-13T11:54:19.949Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*IsxGG9F0ZhPUFFv4zZfOZA.jpeg" /></figure><p><strong><em>Disclaimer</em></strong> : long read. About the painful stuff, what I want to share for more than a month. Also does not claim to be complete, it is more about how I try to deal with it.</p><h4>Table Of Contents</h4><ul><li><a href="https://maxvynohradov.github.io/blog/crime-and-punishment-hype-driven-development#intro">Introduction: what is <em>Hype Driven Development</em></a></li><li><a href="https://maxvynohradov.github.io/blog/crime-and-punishment-hype-driven-development#hdd-as-a-crime">HDD definition as a crime</a></li><li><a href="https://maxvynohradov.github.io/blog/crime-and-punishment-hype-driven-development#consequences-of-crime">Objective side and consequences of the HDD crime</a></li><li><a href="https://maxvynohradov.github.io/blog/crime-and-punishment-hype-driven-development#prevent-hdd">How to prevent HDD in project</a></li><li><a href="https://maxvynohradov.github.io/blog/crime-and-punishment-hype-driven-development#conclusion">Conclusion and afterword</a></li></ul><h4>Introduction: what is Hype Driven Development?</h4><p>Here I want to share a few thoughts on how to convince the team / manager / product owner to not use the <em>“hype”</em> technology or make proof that this technology fits good in your project.</p><p>It is well known that representatives of different professions often invent ways to solve a particular problem. For instance, which approach and constituent materials to use and positions, the choice of a specialist often determines the success of achieving the goals. For example, would the cafe be profitable, and would the bridge withstand the load successfully, would the operated heart beat for many years. And, unfortunately, one wrong decision can lead to fatal consequences and suffer great losses, and even worse — harm the health and life of people.</p><p>Engineers, software developers, web developers, and other technical guys are no exception. Moreover, the final software products are extremely dependent on real business, with real people and finances. And the harm that can be caused by badly designed and implemented software can potentially be huge and irreparable damage to the entire business.</p><p>Let’s look at one of the most common crimes committed by various teams that somehow participate in the design and development of various types of IT projects, named <strong>Hype Driven Development</strong> (hereinafter referred to as HDD).</p><p>This concept is <a href="https://blog.daftcode.pl/hype-driven-development-3469fc2e9b22#.t3yqgxync">not new</a>, but it does not go back to the past century and means <em>a decision about a technological stack or software architecture that is taken without technical justification, research, based only on loud and popular words from the Internet or other sources, “buzzwords “, unverified rumors</em>. It’s a development based on fashion and trends, without explanation of your choice from a technical point of view and not confirming by checking or evaluating the proposed solution.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/0*fEo0BHQTwGh-0Dc0.jpg" /></figure><p>What I have most often seen: blockchain, data science, machine / deep / any other learning, MongoDB, GraphQL, Serverless, Clouds, Kubernetes, and more. These “hype” technologies and much more I’ve seen in different proposals of various technical requirements, in RFPs (Request for proposal), spreadsheets with estimates, and so on. Don’t get me wrong, I have a deep respect for the above-listed technologies, and, as an example, I often use MongoDB and Serverless. The problem is that these technologies were proposed to be used and added in the post-production phase, and their connection with business logic seemed as far-fetched as possible.</p><h4>HDD definition as a crime</h4><p>Why I started with such a long prelude at the beginning — you can imagine when a builder chooses from what material to build a skyscraper “because it is so fashionable”. Or maybe a doctor who prescribes pills according to the principle “well, those people take similar pills abroad, and this may help you too.” Personally, I have not, I have never seen this, I wish the same to you. <strong>For me, such an approach and attitude to work looks like a crime. Therefore, I propose to consider HDD a crime, at least in the article</strong>.</p><p>To begin with, I think it’s worth remembering what constituent elements of a crime are. Without the presence of corpus delicti, an act cannot be considered criminal.</p><p>It’s a quite extensive and complex definition, but let’s summarize and simplify it a little, coz after all, this is not a jurisprudence article, especially since the laws of countries and states are different enough. We are interested in the following components of constituent elements of a crime:</p><ul><li><em>the object</em> — is the part to which the damage was caused;</li><li><em>the objective side</em>- is the external manifestations of the crime, action or inaction, the consequences of the crime, as well as the connection between them or, for example, the time, method, means of committing;</li><li><em>subject</em> — the one who committed the crime;</li><li><em>the subjective side</em> — is a person’s attitude to a crime that he has committed. Was it intent (direct or indirect) or it was negligence (frivolity or negligence), there is a motive and what is the purpose of the crime.</li></ul><p>Let’s start with the <strong>subject</strong>. In our case, this is one of the members of the development team in the broad sense of the word: engineers, managers, product owners. That is all those people who in one way or another influence the development process. But they can be divided into two categories. Some of them work on business logic, tasks, and functional requirements — usually the manager, business analyst, and product owner. On the other hand, we have technical specialists — test engineers, developers, architects, team leads. Of course, they can work at the junctions of the technical and non-technical parts of the project, but now it is important that both the former and the latter can offer, perhaps even insist on using the hype technology.</p><p>And here we smoothly move on to the <strong>subjective side</strong> of the HDD crime — did anyone want to harm when choosing an HDD technology? I think nobody would choose technology or design architecture to the detriment of their project or product. Then why?</p><p>Based on personal experience, I can say, that typically, customers (meaning people or companies which order development of product, not product users ), product owners choose one of these technologies to attract the attention of investors and potential users as sources of funds and income. The reason is more than clear and transparent — often investors are not technical specialists, so, many of them are being led by beautiful marketing slogans, that promise many profitable things for the product. But at the same time, they usually don’t understand the real essence of things. As a result, we get a technical solution based on marketing. There are also cases when a customer already comes with technical requirements for a future product. When asked “why does he want such a stack of technologies?”, we usually get one of the options: “one of my projects uses such a stack and everything is fine”, “my partner’s project uses such a stack — and he is happy with everything”. People who say this usually do not think about the fact that if functional and non-functional requirements are different, then the technologies used do not have to be the same.</p><p>Sometimes it happens that someone from the technical part of the team initiates the use of “hype” technology. Usually, this is less experienced teammates (juniors), which still cannot always assess the risks and make appropriate time estimations. For them, it all comes down to the fact that they want to try a new technology, which is given in a beautiful wrapper. And also usually they do not look at the license of the solution (let’s say it is a library or a framework), or at its maturity.</p><h4>Objective side and consequences of the HDD crime</h4><p><strong>The objects of the HDD crime</strong> can also be different. It depends on what side of the project we are considering — technical or business. If we are talking about the technical side, there are codebases in general, its architecture, the infrastructure of deployments. On the other side, the business operated by other concepts, like include cash flows, investments, profits, and other business processes.</p><p>So, let’s say a “hype” technology penetrates the project, seeps into the code base, a lot of logic, additional code and configurations begin to rise around the technology. In this case, what and who will suffer from the introduction of “hype” technology, and how (we are talking about the <strong>objective side</strong>) will the HDD affect the project and the business as a whole (<strong>the object of the crime</strong>)?</p><p>There are a lot of things, consider that you are playing dice — it all depends on how hype and not properly researched technology is deeply integrated into the business logic of your application, code and development processes in general. The list below presents the most obvious consequences.</p><p>🚫 <strong>Building a business model around technology, not adopting technology to business</strong>. This happens relatively rarely, but extremely unfortunate. It happens when a “hype” technology is at the very core of the business logic and, accordingly, the code base, when the very idea of ​​the application is to build something over the technology. Accordingly, if the technology breaks down in one way or another (for example, an unobvious bug pops up) — with a high probability, the product that is based on it breaks too.</p><p>🚫 <strong>Low conversion from “hype” technologies</strong> — that is, the discrepancy between the expected profit from the technology and the real one, as they often do not take into account that needs to pay for additional infrastructure along with the support of such a solution, as well as the work of specialists who will configure this solution.</p><p>🚫 <strong>The black box problem</strong>. Usually, the external dependency is perceived as something atomic, as an integral component within our system, with its public API (interfaces, methods, endpoints). But in fact, this is the same program code as the one in which we integrated this component, with its dependencies and bugs, performance, and security problems. You probably say: “But often the code of such components is open source!”. Now think, how often do you have enough time, desire, and immediate need to look into the program code of one of your libraries or database (which is also a software product with its source code)? I think not often (but usually it tends to never). For us, a bug (this is how it can harm your project) in any external dependency is a kind of analog of “Schrodinger’s cat in a box”, which is both there and not. We often find out about the presence of bugs only when this external bug affects the state of our system.</p><p>🚫 <strong>Lack of professionalism and experience in the introduced technology</strong>. It’s simple — the devil is in the details. Even if you have over-qualified specialists in your team who love work and are ready to delve into everything new on their way, hardly anyone can comprehend the depth of this or that technology in a short time.</p><p>🚫 <strong>Increasing the entropy of the program code and the system as a whole.</strong> Hmm, okay, but what is entropy? It is a very broad concept, rooted in natural sciences, thermodynamics, and later mechanics and software. The initial idea is that in an isolated system the degree of chaos and uncertainty will not decrease over time but will remain the same or increase. On the other hand, entropy is a measure of the unknown about the system as a whole. The concept first appeared in the context of software in the book Object-Oriented Software Engineering (by Ivar Jacobson, Patrik Jonsson, ACM Press Staff, Magnus Christerson, Gunnar Overgaard). In general, think of entropy as a measure of the dishonesty of the system. The more disorder, uncertainty, the higher the probability of breakage. Compare a hammer and a car, which is a hundred times more complex in its structure — which one is broken down more often and faster? A car has many more constituent components with its level of entropy, and therefore the total entropy is higher. Returning to HDD, the more complex and more unknown technology we involve in the process, the higher the likelihood that the project entropy will increase, and hence the number of bugs and <a href="https://en.wikipedia.org/wiki/Mean_time_between_failures">Mean time between failures (MTBF)</a>.</p><p>🚫 <strong>Life cycle and aging of software</strong>. Are you sure that the hype framework, the server, will exist, developed, and be supported for a long time, at least as long as the life of your project / product? And that in the next version the public API will not change completely — you need to either translate the API to a new one or live with the deprecated API. Have you assessed these risks correctly? Let’s discuss this further.</p><p>🚫 <strong><em>Increased risks</em></strong>. New technologies usually mean new risks:</p><ul><li>Going out of bounds by time estimation.</li><li>Risk of unsuccessful completion of the project.</li><li>The additional overhead for infrastructure, development, and support.</li><li>Additional vulnerabilities of the system crash.</li><li>Nobody guarantees that critical security updates will be issued and fixed on time.</li></ul><h4>How to prevent HDD in project</h4><p>Ok, it seems that we have considered all the components of this crime. But how to prevent and avoid the use of HDD on a project without realizing full awareness of what technology the team will live with on the project? Or you can prove the validity of the implementation and evaluate all the pros and cons. Once again, just in case, if the technology is hype, this does not mean at all that it is full of bugs, has not matured, or does not apply to your project. It’s just that there should be common sense in everything, namely in the analysis of technology from a technical and business point of view, a sound assessment of risks and additional costs.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/642/0*j8HWQAwzz3CGIKz8.jpg" /></figure><p>Here are some ideas and approaches, the use of which can influence the views and awareness of the team regarding the choice of hype technology.</p><p>💡 <strong><em>The opinion of experts</em></strong>, both in the technical part and in the subject area of business — “do we need it?” Before getting into Data Science, Serverless, and the like, consult a specialist with experience with this technology. Probably, you will not give up the technology, but completely rethink its use in the project. Moreover, it has a positive effect on grades.</p><p>💡 <strong><em>Proof of Concept</em></strong> creation is as old as the world — before doing a full-scale implementation and implementation, you should make the simplest demo version tied to any technology. Most likely, you will not notice any deep and hidden problems, but you can throw away the technology at the start if you see that it does not suit you in any way.</p><p>💡 <strong><em>A collective brainstorm “for” and “against”</em></strong> — decisions should never be made alone or in a narrow circle of employees. It is worth discussing and listening to all opinions, perhaps a sensible thought will come from an unexpected side. Also, interesting is the Three amigos approach, which is rooted in BDD and Agile, and means that there are three parties involved in the process: Business, Development, Testing. Thus, you can try to identify the largest number of problems and corner cases associated with the introduced technology. <a href="https://cucumber.io/docs/bdd/who-does-what/#the-three-amigos">More details here</a>.</p><p>💡 “<a href="https://en.wikipedia.org/wiki/Five_whys"><strong><em>5 Whys</em></strong></a>” — and again about how not to drag unnecessary things to your project. Try to apply this technique to the next technology adoption issue. Ask yourself and your colleagues — “why are we doing this,” and so on, 5 times according to the list (see the article). It may well be that simpler steps are sufficient to solve the original problem.</p><p>Also, consider whether you can achieve the desired results without using this technology. How much more difficult and costly it will be.</p><p>💡 <strong><em>KISS (keep it simple stupid) And YAGNI (you ain’t gonna need it).</em></strong> A huge number of articles have been written about these principles, and I see no need to retell them. Just make sure you don’t break them when you introduce the next technology to your project.</p><h4>Conclusion and afterword</h4><p>We’re finally here, and I’ll try to make the ending shorter! There is a huge difference between “<em>adding and usage of new technology</em>” and “<em>deliberately adding and usage of new technology</em>”. It would seem that the phrases differ by one word, but there is a huge gap between them. Hype technologies are often interesting, progressive, the main thing is to choose and apply them deliberately, without risking the project and business, not forgetting about your technical debt.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c5a4a71bbd3c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/brocoders-team/crime-and-punishment-hype-driven-development-c5a4a71bbd3c">Crime and Punishment: Hype Driven Development</a> was originally published in <a href="https://medium.com/brocoders-team">Brocoders Team</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>