<?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[Donatix - Medium]]></title>
        <description><![CDATA[Technology blog centered around web,mobile development and building new products. Our team shares insightful tips, know-how and stories. - Medium]]></description>
        <link>https://medium.com/donatix?source=rss----41233812de16---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Donatix - Medium</title>
            <link>https://medium.com/donatix?source=rss----41233812de16---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 19:06:03 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/donatix" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Top 8 Companies that use Laravel in 2019]]></title>
            <link>https://medium.com/donatix/top-8-companies-that-use-laravel-in-2019-1330ad0d7b82?source=rss----41233812de16---4</link>
            <guid isPermaLink="false">https://medium.com/p/1330ad0d7b82</guid>
            <category><![CDATA[tech-stack]]></category>
            <category><![CDATA[php]]></category>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[company]]></category>
            <dc:creator><![CDATA[Dobromir Kotsev]]></dc:creator>
            <pubDate>Tue, 17 Sep 2019 12:39:12 GMT</pubDate>
            <atom:updated>2019-10-10T12:14:55.305Z</atom:updated>
            <content:encoded><![CDATA[<h3>Top 10 Companies that use Laravel in 2019</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kt2LDvTiYEyxq_aGslowHQ.jpeg" /><figcaption><a href="https://www.freepik.com/free-photos-vectors/icon"><em>Icon vector created by fullvector — www.freepik.com</em></a></figcaption></figure><p>The Laravel framework is one of the best things that has happened in the PHP world and its popularity is growing rapidly. <br>However, there is still an urban myth that PHP as a whole is dead in 2019 when there are cooler languages and technologies around the block. Nothing could be further from the truth and at Donatix we are a huge fan of both PHP and Laravel. Most importantly, we are far from the only ones.<br>We have curated a list of top companies (according to us) that use <strong>PHP and Laravel</strong> in their web development efforts.</p><h3>1. 9GAG</h3><p>9GAG is an online platform and social media website. It allows users to upload and share funny content and memes. In an interview, its founder Ray Chan shared that the website receives more than 150 million visits per month! Such an impressive load should be handled by modern and scalable technology and infrastructure. The 9GAG engineering team uses PHP, Laravel and Vue.js along with many other tools according to their Stackshare.io page.</p><h3>2. Pfizer</h3><p>Pfizer is one of the world’s largest pharmaceutical corporations. It ranked 57 In 2018 Fortune 500 list of the largest United States corporations by total revenue. If we go to their career page we would see that they are hiring PHP developers with explicit experience in Laravel:<em> He would lead and deliver complex PHP, AWS and service-driven applications on Pfizer’s Cloud Development Platform. This stack powers many of Pfizer’s newest and most innovative custom web properties.</em></p><p>Although it is somewhat common for huge companies to use many technologies, usually they have been dominated by giants like Microsoft, Salesforce etc. There is a corporate saying: Nobody Ever Got Fired For Buying Microsoft. Seeing PHP and Laravel used for such important projects in a blue-chip Fortune 100 company holds testament to its abilities.</p><h3>3. BBC</h3><p>BBC is the oldest national broadcasting organisation and the largest broadcaster in the world by a number of employees. Apart from traditional media channels, the BBC also works on multiple web applications across TV and Content Production. They use Angular JS &amp; Angular 6 and PHP Laravel.</p><h3>4. PedidosYa</h3><p>PedidosYa is the leading food ordering and delivery service in South America. The platform connects 15,000 restaurants across the region with millions of users, operating in more than 400 cities. According to their profile in Stackshare they use PHP, Laravel and React.js in their web app and API.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*cUkN8QoRGzgDLERO.jpg" /></figure><h3>5. About you</h3><p>If you are thinking about Unicorn start-ups and Germany,<a href="https://www.aboutyou.de/"> About you</a> should be on your list. This Hamburg-based company is one of the fastest-growing e-commerce companies in Europe and has a valuation of over USD 1 billion. About you digitilizes the shopping experience by offering more than 250,000 products from 1,200 brands on your smartphone.</p><p>PHP, Laravel, Lumen, Vue.js and React stand proudly on their technology stack page as the company boast about using state-of-the-art tech in front of prospective employees.</p><h3>6. Ratio</h3><p><a href="http://www.ratio.co.uk/?utm_source=news&amp;utm_source=medium.com&amp;utm_campaign=donatix">Ratio</a> is an innovative Fintech software company from the UK. They have several products aimed at helping people better manage their finances. For example, their website<a href="http://www.choosewisely.co.uk/?utm_source=news&amp;utm_source=medium.com&amp;utm_campaign=donatix"> ChooseWisely.co.uk</a> has helped more than 12 million users to find the right financial product: providing data on different credit cards, bank accounts, loans options. According to their site and Stackshare.io profile, the team uses primarily PHP, Laravel and React.js in their products.</p><h3>7. TourRadar</h3><p><a href="https://www.tourradar.com/">TourRadar </a>is an online marketplace for travellers to compare and book multi-day tours. Headquartered in Vienna, they list over 1 million tour departures and have integrated with over 2000 tour operators. The company is one of the hottest names in the travel-tech and it has attracted more than USD 66 million in funding(source: Crunchbase).</p><p>According to their site and tech blog, they use PHP (Symfony and Laravel as frameworks), Golang, Python and NodeJS/TypeScript lambda functions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/994/1*nx-c17Tyj6MnDiBDb5Y-9A.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/@jonastebbe?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Jonas Tebbe</a> on <a href="https://unsplash.com/s/photos/hamburg?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><h3>8. Exporo</h3><p><a href="https://exporo.de/">Exporo </a>is another success story from Hamburg. It offers investors an overview of real estate projects in which they can invest easily, transparently and free of charge. The idea started back in 2013 with the realization that real estate project developers are increasingly looking for alternative sources of finance apart from banks. Today the platform is the leader in digital real-estate investments in Europe, has helped more than 200 real estate projects through more than 20,000 clients and has raised more than €500 million brokered capital. To achieve such ambitious goals the team uses the entire AWS-stack along with PHP and Laravel to create scalable high-performance solutions and apps.</p><h3>9. Crowdcube</h3><p><a href="https://www.crowdcube.com/">Crowdcube </a>is one of the world’s leading equity crowdfunding platforms. It helps private investors easily find and invest in promising Start-ups. They have more than 750,000 registered investors, and over 800 British businesses are funded through the platform. <br>The platform uses primarily PHP/Laravel/Nginx/MySQL coupled with React/TypeScript.</p><h3>10. Delio</h3><p>Delio is a fast-growing UK fintech that is disrupting the financial services industry with its digital infrastructure and tools for alternative investments. Their award-winning portfolio of technology platforms has been embraced by over 200 financial institutions including top-tier global banks.<br>The development stack sits within AWS, the technology runs across PHP on the Laravel framework, nodeJS, AngularJS and SQL / NoSQL databases.</p><p>That wraps it up. <strong>Have we missed any interesting companies on our list? </strong>We would be looking to update the list so <strong>tell us in the comments!</strong></p><p><em>Originally published at </em><a href="https://donatix.net/top-8-companies-use-laravel/"><em>https://donatix.net</em></a><em> on September 16, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1330ad0d7b82" width="1" height="1" alt=""><hr><p><a href="https://medium.com/donatix/top-8-companies-that-use-laravel-in-2019-1330ad0d7b82">Top 8 Companies that use Laravel in 2019</a> was originally published in <a href="https://medium.com/donatix">Donatix</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How the Strong Customer Authentication(SCA) Regulation Could Impact Your Online Business in 2019?]]></title>
            <link>https://medium.com/donatix/how-the-strong-customer-authentication-sca-regulation-could-impact-your-online-business-in-2019-79263572dbe6?source=rss----41233812de16---4</link>
            <guid isPermaLink="false">https://medium.com/p/79263572dbe6</guid>
            <category><![CDATA[ecommerce]]></category>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[regulation]]></category>
            <category><![CDATA[europe]]></category>
            <category><![CDATA[online-business]]></category>
            <dc:creator><![CDATA[Dobromir Kotsev]]></dc:creator>
            <pubDate>Sun, 09 Jun 2019 19:02:43 GMT</pubDate>
            <atom:updated>2019-06-09T19:00:26.000Z</atom:updated>
            <content:encoded><![CDATA[<h3>How the Strong Customer Authentication(SCA) Regulation Could Impact Your Online Business in 2019? | Donatix</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RZvgUQlc0YhNOuWigzHaWA.png" /></figure><p>It has been nearly a year and a half since the Payment Service Directive 2 went into force. It has been a game changer and opens the door for many new fintech start-ups to offer new innovative services. However, many people do not know that a big chunk of PSD 2 has not been implemented yet: namely the Strong Customer Authentication(SCA). It puts forward new requirements for authenticating online payments. Starting from 14 September 2019 banks would decline payments that do not meet the new rules. We would examine if this is something that online businesses should be worried about.</p><h3>What is Strong Customer Authentication(SCA)?</h3><p>Strong Customer Authentication (SCA) is a new European regulatory requirement to reduce fraud and make online payments more secure. In order to achieve this the EU has put forward 3 methods of authentication:</p><ul><li>Something the customer <strong>knows</strong>(e.g PIN code, Password)</li><li>Something the customer <strong>has (</strong> Mobile phone or other physical devices)</li><li>Something the customer<strong> is (</strong>e.g Biometrics: fingerprint, face recognition<strong>)</strong></li></ul><p>In order payment to be accepted authentication has to be carried out via 2 of the above-mentioned elements.<br>Here is a real-life scenario: Customer wants to buy sneakers from an e-commerce shop. According to the new rules at checkout, he would need to approve the transaction — for instance by receiving a push notification from their bank or scanning their fingerprint on their smartphone bank app. Failing to do so would result in a rejected transaction.</p><h3>Exemptions</h3><p>We should mention that certain payments would be exempted from the SCA.</p><ul><li><strong>Low-value transactions</strong> that total less than 30 Euros. This is limited to 150 euros, meaning that after 5 transactions you would still need to do authentication.</li><li><strong>Recurring transaction</strong>s — Merchants offering subscription must apply SCA on only the first transactions, as long as the following charges are for the same value.</li><li><strong>Trusted Beneficiaries </strong>or merchants that are whitelisted by a consumer.</li></ul><h3>How does it affect my e-commerce store or online business?</h3><p>Ultimately the responsibility of SCA would fall to the shoulders to the banks and the payments service provider (PSP) that supports your online store.</p><p>However, that does not mean you won’t be affected. The single biggest thread is the drop in conversion rates in the short term after 14th September. Shopping cart abandonment are already one of the biggest challenges in the business. If a customer needs to do a few extra steps to complete their purchases or his transaction is constantly declined: it is likely that some of them would leave the site prematurely. That would result in big overnight loses</p><p><strong><em>‘’Europe’s Online Economy is set to Lose €57bn from SCA” 451 Research Report</em></strong></p><p>The fact is that Europe is not a pioneer in such type legislation. Back in 2014 India enforce similar legislation. Some businesses reported an overnight conversion drop of over 25 per cent overnight.</p><p>Despite the short-term troubles, Strong Customer Authentication (SCA) would have a positive impact on the long term. The regulation would battle the fraudulent transactions. Businesses are likely to see fewer customer chargebacks and hence potentially a drop in operating costs.</p><h3>How to prepare my online business for SCA?</h3><p>Now that we know that SCA could have a significant effect on your online business, here are some steps that you could take to make sure you are adequately prepared:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/636/0*R4vl6ZSMbXecHCmn.png" /><figcaption>Source: Stripe.com</figcaption></figure><p>The Strong Customer Authentication (SCA) would affect a lot of online transactions in the EU starting in September 2019. Although it would bring some short term pain to online businesses, it would address the issue of billions of Euros lost in frauds. By timely following some of the steps above, you would probably evade a big drop in sales overnight.</p><p><em>Originally published at </em><a href="https://donatix.net/strong-customer-authentication-impact-your-online-business/"><em>https://donatix.net</em></a><em> on June 7, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=79263572dbe6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/donatix/how-the-strong-customer-authentication-sca-regulation-could-impact-your-online-business-in-2019-79263572dbe6">How the Strong Customer Authentication(SCA) Regulation Could Impact Your Online Business in 2019?</a> was originally published in <a href="https://medium.com/donatix">Donatix</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Lessons Learned from Some of the Best Fintech Apps | Donatix]]></title>
            <link>https://medium.com/donatix/lessons-learned-from-some-of-the-best-fintech-apps-donatix-e43f1f4f9dfc?source=rss----41233812de16---4</link>
            <guid isPermaLink="false">https://medium.com/p/e43f1f4f9dfc</guid>
            <category><![CDATA[fintech]]></category>
            <category><![CDATA[mobile]]></category>
            <category><![CDATA[apps]]></category>
            <dc:creator><![CDATA[Dobromir Kotsev]]></dc:creator>
            <pubDate>Thu, 18 Apr 2019 07:46:48 GMT</pubDate>
            <atom:updated>2019-04-18T07:44:58.769Z</atom:updated>
            <content:encoded><![CDATA[<h3>Lessons Learned from Some of the Best Fintech Apps</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0NHPtmieqk38u7RvJKkbwg.jpeg" /></figure><p>The world of fintech has become a competitive place. Back in 2017<br>Satya Patel, a partner at Homebrew Ventures said: <br>“We don’t need another fintech app frankly”. Yet dozen of new fintech apps are being launched every month. Some of them manage to become unicorns, others miss the market completely and fail. We took a look at some of the best fintech apps out there trying to understand some of the features both technical and non-technical that made them succeed. All of them have at least 4-star rating in the App Store and Google Play. Although some of the features overlap, we have synthesised the ones that we think made the biggest impression.</p><h3>Revolut</h3><p>Revolut is one of the fastest growing and well-known fintech companies. What started as an app for money management allowing to send, receive and spend money has grown into one of the leading European mobile banks. For 3 years the company managed to attract 4 million users and reach a valuation of $1.7bln. Mobile lays in the heart of its successful business model. It is considered as one of the best fintech apps. Some of the features that put them ahead of the competition are:</p><p><strong>Fast onboarding: </strong>The team at Revolut did not only focus on creating cool looking mobile app but one that you could start using as quickly as possible. It is important to remember that 21% of people use an app only once and then abandon it (Localytics, 2018). One of the reasons is the poor onboarding experience. Revolut however, has a fast sign-on process with a minimum need of information that you could complete under 2 minutes. Compare that to the traditional bank where you’d need to fill in lengthy forms to open your account.</p><p><strong>Great Visual Language</strong>: The design team knows their target customers well: the millennials(people under 40. Colours are fresh and vibrant away from the corporate grey of HSBC for example. Other small touches are the emojis and GIFs in transactions and messages. Although the millennials are tech-savvy: Revolut has also world class UX: the app is easy to navigate and work. <br><strong>Full control: </strong>Customers can decide themselves what level of security they prefer. For example, the user can turn off NFC functionality, block online payments or freeze your card etc. And also unfreeze at any time very easily. This puts the user in control and builds loyalty.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/285/0*dba97T18K85mFfk-.png" /></figure><h3>Mint</h3><p>Mint is one of the forefathers of personal finance management and budgeting apps. It is a classic success story and role model for many.</p><p><strong>Security: </strong>Lack of consumer trust is one of the biggest problems in front of fintech app adoption. If you want to have access to your user financial information, security should be high on the priority list. Mint protects the sensitive data in a separate database using multi-layered hardware that matches the security standard of banks. All of your data is encrypted with a 256-bit encryption level and the data exchanged with Mint is encrypted with 128-bit SSL. Furthermore, they do a great job explaining to the user on the homepage of their website and in the app that their data is at safe hands.</p><p><strong>User engagement and retention: </strong>There is a high chance that even downloaded your app is going to be used only once. Mint tackles this problem by sending the right messages at the right time with the right content. For instance, events like withdrawing for ATM would trigger a push notification or email to users to inform them. It goes one step further and in the same message offers you information on how to refund your ATM fees. Suddenly as a user you see more value in the product and your loyalty increases. Furthermore Mint also send recurring messages with an overview of how you spend your money.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/731/1*uPLQ-K9OnOIp7BnuSv2k_A.png" /><figcaption>Source: <a href="https://practicoanalytics.com/">practicoanalytics.com</a></figcaption></figure><h3><strong>YuLife</strong></h3><p>YuLife is a kid on the fintech block. Their app offers life insurance plus wellbeing tools for businesses and individuals. Yulife’s aim is to “create lasting, positive lifestyle changes by rewarding simple, everyday activities through insurance and game-based app.</p><p><strong>Gamification at its finest</strong>: The app uses some of the perks of your phone like pedometer combined with different game challenges to encourage users to collect their unique wellbeing currency called yucoin. The more users do healthy things, like walking the more yucoins they earn to spend in places like Asos, Amazon, Avios etc.</p><p>The app uses an underlying human need: the need to play. Gamification is a huge opportunity and still somewhat underestimated by many fintechs as a viable way to increase user engagement. Some behavioural experts claim that we use super successful apps like Uber not only because of the convenience factor but also because it represents a mini-game: seeing how the driver comes to you on the map etc</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/0*SbMJI4NHcEkbDIU4.png" /></figure><p>These are only 3 examples of the best fintech apps out there. When planning your app you could consider some of the features outlined above that could give you a competitive advantage.<br>If you are a fintech entrepreneur looking for an experienced design and development team: <a href="https://donatix.net/contact-us/">drop us a line</a></p><p><em>Originally published at </em><a href="https://donatix.net/lessons-learned-the-best-fintech-apps/"><em>https://donatix.net</em></a><em> on April 17, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e43f1f4f9dfc" width="1" height="1" alt=""><hr><p><a href="https://medium.com/donatix/lessons-learned-from-some-of-the-best-fintech-apps-donatix-e43f1f4f9dfc">Lessons Learned from Some of the Best Fintech Apps | Donatix</a> was originally published in <a href="https://medium.com/donatix">Donatix</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Better Error Messages in Tests]]></title>
            <link>https://medium.com/donatix/better-error-messages-in-tests-2a6c04a4166e?source=rss----41233812de16---4</link>
            <guid isPermaLink="false">https://medium.com/p/2a6c04a4166e</guid>
            <category><![CDATA[php]]></category>
            <category><![CDATA[tdd]]></category>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[testing]]></category>
            <category><![CDATA[phpunit]]></category>
            <dc:creator><![CDATA[Tihomir Tonov]]></dc:creator>
            <pubDate>Mon, 18 Mar 2019 09:48:14 GMT</pubDate>
            <atom:updated>2019-03-18T09:48:14.079Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DvJgeV_GHPkkA2aXq3Vr5g.png" /></figure><p>We all have encountered error messages in our test suits like, Failed asserting that null is not nullor Failed asserting that false is trueand we have no clue what is the reason and what we have broken.</p><p>Of course, under the error message there is the file name and the line number of the failed assertion, so we open the file and here is the content:</p><pre>$this-&gt;assertTrue($user-&gt;is_active);</pre><p>Aha, now we know what is the real error and hopefully how to fix it. And if we think this is an important path of our code and a commonplace to have errors, we might add an additional message to the assertion to be displayed when this assertion fails, like this:</p><pre>$this-&gt;assertTrue($user-&gt;is_active, &#39;The user should be active&#39;);</pre><p>So we made the test a bit better, but I would argue if this is the best bang for the buck and don’t encourage anyone to submit a big PR, which fixes all non-descriptive errors in their project. The goal here is to know about the tool and use it when you need it.</p><p>Now let’s see some more complicated examples:</p><h4>Enhancing array assertions</h4><p>We all know about assertCount(), assertContains() and assertNotContains(), but when it comes to asserting, that some DB record presents or not in the returned response it gets a bit tricky. One way to do it is to pluck the ids and assert on them, but when such a test fails, it only says Failed asserting that [1,2,3] not contains 2, which is not telling us anything.</p><p>So what we could do?</p><p>One way is to use some string column on the model as the key to pluck and assert on its contents. And to make it clear why the test fails, we will name the column with the reason the test fails. Here is an example:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/498ba1907b684e3d36bdb89431e2ba26/href">https://medium.com/media/498ba1907b684e3d36bdb89431e2ba26/href</a></iframe><p>This way if the test fails we will see from its output that the result contains the product named Too expensive, which should not be the case.</p><p>This trick also could be used for ordering, when naming items something like: <em>first, middle and last</em>, and when the test fails we will see an error like Failed asserting that [first, middle, last] is equal to [last, middle, first], which means we broke the ordering.</p><h4>Enhancing callback based assertions</h4><p>Laravel allows us to mock its facades and check if given action was performed. Even further we can pass an additional callback to perform some more checks on the data with which the action was performed. Too abstract? Let’s see an example:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/d48abf69cdfb61a6aacc10434028820f/href">https://medium.com/media/d48abf69cdfb61a6aacc10434028820f/href</a></iframe><p>This is a really powerful and useful concept, but with one downside, when it fails it says The expected [CheckNotification] was not sent. Failed asserting that false is true.and we have no idea what the error is.</p><p>Let’s think about the possible errors:</p><ul><li>We sent the notification to the wrong notifiable</li><li>We sent the wrong notification</li><li>The notification data misses <a href="http://domain1.com/"><em>domain1.com</em></a></li><li>The notification data Includes <a href="http://domain2.com/"><em>domain2.com</em></a></li></ul><p>And even though we cannot do much for the first two from this list, they are much less likely to be the problem.</p><p>On the other hand, the error message for the second two cases could be changed easily. We could write the assertions for the cases and return trueat the end. If some of the assertions fail, an exception will be thrown by <em>phpunit</em> and better error will be presented to us. Here is the example from above rewritten in such a way:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/10b44d618eab7f54c542fb594b6b56cd/href">https://medium.com/media/10b44d618eab7f54c542fb594b6b56cd/href</a></iframe><p>Now if the test fails we will see an error like this: Failed asserting that [&#39;problem.com&#39;, &#39;normal.com&#39;] not contains &#39;normal.com&#39;, and we will immediately know what failed the test case, without debugging the content of the variables passed to the callback.</p><p>This approach also might be used with assertions on the parameters with whom some mocked method was called. Abstract again? Let’s see an example:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/35801d0ab7590447e1e9d28430ce46d9/href">https://medium.com/media/35801d0ab7590447e1e9d28430ce46d9/href</a></iframe><p>There is one thing to keep in mind if you are trying to use withArgs in <em>laravel </em>project. You have to upgrade to a newer version of <em>Mockery</em> because <em>laravel </em>uses an older one, and withArgsmethod on mocks is not available. In my case, the upgrade was painless and went without any problems.</p><p>With that being said I hope you liked the “tricks” I presented and you will try them in your own projects and have better errors when your tests fail.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2a6c04a4166e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/donatix/better-error-messages-in-tests-2a6c04a4166e">Better Error Messages in Tests</a> was originally published in <a href="https://medium.com/donatix">Donatix</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[No-deal Brexit: 3 Immediate Risks and Solutions For Your Tech Startup.]]></title>
            <link>https://medium.com/donatix/no-deal-brexit-3-immediate-risks-and-solutions-for-your-tech-startup-bfde6ee838de?source=rss----41233812de16---4</link>
            <guid isPermaLink="false">https://medium.com/p/bfde6ee838de</guid>
            <category><![CDATA[brexit]]></category>
            <category><![CDATA[solutions]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[business]]></category>
            <category><![CDATA[risk]]></category>
            <dc:creator><![CDATA[Dobromir Kotsev]]></dc:creator>
            <pubDate>Fri, 25 Jan 2019 14:46:13 GMT</pubDate>
            <atom:updated>2019-01-25T14:46:13.124Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/864/1*Yp4R9YAxyl1tbZ8BlsknoQ.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/oyUXVzq-7Po?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Luca Micheli</a> on <a href="https://unsplash.com/search/photos/london?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Unsplash</a></figcaption></figure><p>In 2016 the people of UK decided to leave the European Union after a referendum. Two and a half years later there are more unknowns and open questions than at the start. It seems that there is a multitude of outcomes, none of which have been determined yet.</p><p>So far the UK start-up ecosystem has been generally unaffected. On the contrary, investment in Start-ups has risen after the Brexit decision Recent developments, however, leave room for worry as no-deal Brexit looks probable. Transferwise was one of the first prominent Startups to raise the alarm as it activated its contingency plan and applied for a license in Brussels earlier this month. We take a look at the two most common Brexit threats that Start-ups face and their possible solutions:</p><h3>Risk#1: Tech employees shortage and rising employee costs</h3><p>EU professionals already form 10 % of the workforce in the UK. A recent survey of members of the union Prospect has found that two-thirds of EU citizens working in a range of specialist sectors say they might leave the UK because of Brexit. Needless to say, this would hurt tech startups. It would be harder to recruit skilled professionals and their salaries would go up. Many Startups have limited runway, in terms of time and financial resources. If they need to wait for months to hire a good developer, it would impact their time-to-market and overall chances for business success.</p><p>On the other hand, even if the majority of employees decide to stay, all of them will have to come in through the Tier system. This means that those relying on an international workforce will have to incur the cost of registering as a Licensed Sponsor and all the issues associated with being a Licensed Sponsor.</p><h3>Possible Solution:</h3><p>Find a nearshore partner that could help you out with your tech resource needs. For years UK companies have looked east when it comes to tech talent. For example in Bulgaria, Startups could find booming IT industry, great technical expertise, good English skills at a reasonable cost.</p><h3>Risk #2: Currency risk</h3><p>After the referendum in 2016, the pound slumped to a 31-year low. No-deal Brexit would most probably have a similar effect (at least in the beginning) as markets would be uncertain around the future of the UK economy.</p><p>On the one hand, this would make British products and services cheaper for export. On the other hand, UK companies would pay more for the same services from abroad.</p><h3>Possible Solution:</h3><p>Negotiate prices with your current vendors and sign new partnership agreements or forward contracts.</p><h3>Risk#3: No Access to the Digital single market</h3><p>Starting 2015 the European Commission started implementing its Digital Single Market strategy, which seeks to harmonize the rules across members regarding the distribution of digital services. This would lead to difficulties in selling new products and services from the UK.</p><h3>Possible Solution:</h3><p>Apply for Estonian E-residency. Estonia is the first country that offers E-residency. This is not an equivalent of normal citizenship but allows foreigners to set-up companies and business accounts in the country. The application is done entirely online and costs only 100 Euros. With the residency, you could establish EU counterpart to your Startup.</p><p>Although no-deal Brexit is unlikely to happen, it is a wise idea for UK start-ups to insure themselves for this scenario. If you are a UK Start-up looking for tech expertise or resources, <a href="https://donatix.net/contact-us/">contact us</a> today.</p><p><em>Originally published at </em><a href="https://donatix.net/no-deal-brexit-2-immediate-risks-and-solutions-for-your-tech-startup/"><em>donatix.net</em></a><em> on January 22, 2019.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=bfde6ee838de" width="1" height="1" alt=""><hr><p><a href="https://medium.com/donatix/no-deal-brexit-3-immediate-risks-and-solutions-for-your-tech-startup-bfde6ee838de">No-deal Brexit: 3 Immediate Risks and Solutions For Your Tech Startup.</a> was originally published in <a href="https://medium.com/donatix">Donatix</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[4 effective tips to grow and promote your mobile app]]></title>
            <link>https://medium.com/donatix/4-effective-tips-to-grow-and-promote-your-mobile-app-e7b7cf37f221?source=rss----41233812de16---4</link>
            <guid isPermaLink="false">https://medium.com/p/e7b7cf37f221</guid>
            <category><![CDATA[mobile-marketing]]></category>
            <category><![CDATA[app-store-optimization]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[mobile]]></category>
            <dc:creator><![CDATA[Dobromir Kotsev]]></dc:creator>
            <pubDate>Mon, 03 Dec 2018 13:10:48 GMT</pubDate>
            <atom:updated>2018-12-03T13:10:48.394Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UjBs0Nehw5Xyl_jS12o49g.jpeg" /></figure><p>You have put thousands of hours planning, preparing, developing, testing and launching a mobile app… Yet, the number of downloads, users and amount of revenue is lower than you expected. The world of mobile apps has become a fierce battle-ground as thousands of app compete with each other. We have outlined 4 tips that you could use to spur your mobile app growth.</p><h3>Influencer Marketing</h3><p>Influencer marketing has grown big in the last years. Influencers are usually well-known people in your market and niche that could affect your buyer’s decisions. Usually, they have a big social following on Facebook, Instagram, YouTube etc. They are a good alternative to traditional advertising channels. Influencers could promote and recommend your app from the viewpoint of the normal user. This could be a better option rather than sending them an anonymous advertisement. According to <a href="http://emarketer.com/">emarketer.com</a> 31% of people download apps following recommendations.</p><h3>Discount Prices</h3><p>Marketers know the advantages of discounting for years. Why not use it in your mobile app? If your app is paid ,offer a limited free offer. If you make money via in-app purchases offer a free one-off in-app purchase for a limited time. Leverage human psychology to create a powerful incentive in your prospective customer minds.</p><h3>Leverage App reviews</h3><p>Ratings are an important part of your App store optimization strategy. Not only do they help you rank better, but also have a psychological impact on potential users. According to a survey by Apptentive, 59 % of people usually or always check ratings before downloading a new app. Therefore, it is important that once you launch asks all your friends and contacts to write a positive review of the app.</p><p>If you have the budget to spare, you could turn to paid app review provider to supply you with reviews This strategy is widely employed in games app, but proceed with caution as it could be a costly and double-edged sword. Apple and Google are also trying to battle the incentivized app reviews in their stores. If your reviews have been posted by a bot (Cheapest option) or script you run the risk of your app to be banned. Good (10+ words) reviews by a real user could cost between $2-$4 depending on volume and platform.</p><p>The last thing you could do is simply prompt your early adopters to leave reviews. You could implement this easily in the app without making them go to the respective store. The main step is to ask for the review in a proper time. I would suggest asking for review whenever the user has accomplished a major work or achievement in the app.</p><h3>Become featured on the App stores</h3><p>Apple redesigned significantly the App store in 2017 in order to offer app developers better exposure, as well as a better app discovery experience for consumers. According to study from Sensor Tower, getting a featured spot on the new App Store can increase downloads by as much as 800 per cent, with the “App of the Day” or “Game of the Day” spots offering the most impact. Google Play also relies on both automation and their editorial team to highlight the best apps in several categories and award them with extra publicity.</p><p>Needless to say, being featured in either of the two stores is not an easy task. Firstly, you should have well designed, developed and optimized app following Apple and Google guidelines. You may need to start thinking even before the development process is started. For example, Apple gives preferences on new apps that are iOS exclusive. Google, on the other hand, releases a lot of software products and technologies such as Gpay, Google Cloud, Maps, Firebase etc . They introduced Android excellence program in 2017. Found under editor’s choice in the Google Play it aims to promote apps that “are noteworthy for adopting the latest Android features.” If you’d strive to incorporate as much of Google latest technologies in your app you increase your chances to be selected. The award is given every quarter so as a developer you’d be enjoying months of increased exposure.</p><p>Another way to become featured is to directly pitch your app to Apple and Google. If you look in LinkedIn, you could find App Store Manager profiles and send them email or message. Developers have overused this tactic and you have to be really creative and persistent in order to catch their attention.</p><p>Developers face a lot of challenges when promoting and making their aps stand out from the rest. If you use some of the tips above as part of your marketing plan, you could make the journey easier. In the meantime, if you’d like to help you develop an app, <a href="https://donatix.net/contact-us/">drop us a line.</a></p><p><em>Originally published at </em><a href="https://donatix.net/4-effective-tips-grow-and-promote-mobile-app/"><em>donatix.net</em></a><em> on November 30, 2018.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e7b7cf37f221" width="1" height="1" alt=""><hr><p><a href="https://medium.com/donatix/4-effective-tips-to-grow-and-promote-your-mobile-app-e7b7cf37f221">4 effective tips to grow and promote your mobile app</a> was originally published in <a href="https://medium.com/donatix">Donatix</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 communicate your ideas to a development company]]></title>
            <link>https://medium.com/donatix/how-to-communicate-your-ideas-to-a-development-company-4a5e014f58af?source=rss----41233812de16---4</link>
            <guid isPermaLink="false">https://medium.com/p/4a5e014f58af</guid>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[agile]]></category>
            <category><![CDATA[communication]]></category>
            <dc:creator><![CDATA[Dobromir Kotsev]]></dc:creator>
            <pubDate>Thu, 22 Nov 2018 15:34:09 GMT</pubDate>
            <atom:updated>2018-11-22T15:34:09.368Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XXmtkQ9dDKQGpwM9b8lPrw.jpeg" /><figcaption>Photo by <a href="https://unsplash.com/photos/7tXA8xwe4W4?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText">Startaê Team</a></figcaption></figure><p>If you are building a new digital product or redesigning an old one you are probably in one of two camps: you are either doing it in-house or outsourcing it to a contractor or development company. One of the biggest hurdles for business owners that choose the latter approach is ineffective communication. Businesses and development companies often struggle to convey their ideas, messages and expectations, which usually ends up with a lot of wasted time, resources and a great deal of frustration among both sides. A study conducted by the Project Management Institute (PMI) revealed that ineffective communication is the cause for the failure of one-third of projects. However, by doing some homework upfront you could be better prepared next time when you knock on a development company’ s door to ask them to do a project together.</p><h3>Be clear on the scope</h3><p>Software development is a complex job that requires a great dose of niche skills and creativity. Just like building an automobile or a house there are a lot of materials, time and effort that goes into it. You should be as much specific as possible about your product and idea. You should try to outline all the functional requirements that you expect at the completion of the work. Document every bit and small details in a concise and meaningful style. Identify all inputs and outputs: every process begins with some inputs that need to be transformed into specific outputs. Don’t be afraid to go visual: a picture is worth a thousand words. Prepare mock-ups or wireframes that communicate your design and functionality vision.</p><h3>Create User Stories</h3><p>Another popular way to communicate your idea without writing lengthy requirements documents is User Stories. User Stories describe every feature of your product by focusing on your user. In order to prepare a user story you should be able to answer the following: Know your user persona: who is using this specific functionality? What are their goals and priorities? What value they get from using the feature and why should they use it? Focus on who, why, what? and leave the how? part open for suggestions from the development team. User stories convey ideas on a high level and do not contain enough detailed information. They should be used for a starting point for a more in-depth conversation between you and the development team</p><h3>Think big but take small steps.</h3><p>Think about whether you need a full-fledged product with a feature from day one or you could start with an MVP version or limited functionality. Developers are engineers by nature and as such appreciate simplicity and elegance in their solutions. Listen to their suggestions and input and you could save a lot of money and efforts in the long run.</p><h3>Be clear on timeline and budget</h3><p>When going for outsourcing, one of the biggest motivations is cost-optimization. Yet many businesses shy away to share their budget expectations for a project even in round figures. That creates a lot of mistrust and confusion from day one. The money talk is one of the hardest topics in business communications, but if asked by development company regarding your budget and what you expect for it, be open about it. Most companies want your business so they would be receptive and open to some compromise (like narrowing the scope) even if you are below their budget threshold. Also, share your vision regarding the timeline and when you would like certain features of your product ready. The earlier you clear those things out in the process and reach some agreement, the faster you could really focus on the parts that matter: developing and launching the product.</p><p>When working with an external development team, communication is a key. By following the simple tips from above you should get a headstart on the competition. In the mean-time got an idea for a project? <a href="https://donatix.net/contact-us/">Get in touch</a> with us to start the communication.</p><p><em>Originally published at </em><a href="https://donatix.net/communicate-ideas-development-company/"><em>donatix.net</em></a><em> on May 9, 2018.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4a5e014f58af" width="1" height="1" alt=""><hr><p><a href="https://medium.com/donatix/how-to-communicate-your-ideas-to-a-development-company-4a5e014f58af">How to communicate your ideas to a development company</a> was originally published in <a href="https://medium.com/donatix">Donatix</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[5 ways how web push notifications could help your e-commerce sales]]></title>
            <link>https://medium.com/donatix/5-ways-how-web-push-notifications-could-help-your-e-commerce-sales-147669c36218?source=rss----41233812de16---4</link>
            <guid isPermaLink="false">https://medium.com/p/147669c36218</guid>
            <category><![CDATA[e-commerce-business]]></category>
            <category><![CDATA[push-notification]]></category>
            <category><![CDATA[mobile]]></category>
            <category><![CDATA[marketing]]></category>
            <category><![CDATA[black-friday]]></category>
            <dc:creator><![CDATA[Dobromir Kotsev]]></dc:creator>
            <pubDate>Mon, 19 Nov 2018 15:16:42 GMT</pubDate>
            <atom:updated>2018-11-19T15:20:13.216Z</atom:updated>
            <content:encoded><![CDATA[<h3>5 ways how web push notifications could help your e-commerce business</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*MMIPVZc0sSJrIwYhICu0WQ.jpeg" /></figure><p>The rise of smartphones and mobile apps in the last decade supplied developers and marketers with one powerful weapon: the push notification. They could now send timely messages and offers to their users/customers. This, in turn, increased conversions and engagement. For years they were present only on the native mobile platforms (Android and iOS). However, in recent years push notifications have come to the web. They look quite like the in-app notifications but are sent by the browser instead of the mobile apps. They could be accessed on all devices, including desktop, android mobile, tablets, etc. We would outline some of their benefits that make them useful for your site:</p><h3>Alternative to the email</h3><p>The proven old-fashioned method to communicate with your web customers is the email. Although email newsletters and campaigns could be effective, they still have some weaknesses. The average open rate is only 20.81% in 2018(<a href="https://mailchimp.com/resources/email-marketing-benchmarks/">according to Mailchimp</a>). The mailbox has also become a contested place as many businesses are vying for the user’s attention. Furthermore, email clients like Gmail are making it even harder by automatically shuffling emails in categories. If your email ends up in the promotions or updates tab, it is less likely to be seen as users focus mainly on their primary inbox. Thus push notifications are a good complimentary way to stay in touch with your clients. They are permission-based service and the user has to opt-in by just clicking allow on the pop-up in the browser when visiting your site. They do not have to fill in forms with their names and email address to subscribe where often they would leave rarely used email address.</p><h3>Better engagement</h3><p>Push Notifications are short and delivered instantly just like their native mobile counterpart. They enable you to send messages to web visitors even if their browser isn’t open. That makes web push a powerful tool for keeping your web audience engaged — and for re-engaging visitors who have stopped visiting. For example, one big problem in e-commerce is the abandonment of the shopping cart. A lot of users browse and add products to their shopping cart but leave the site before finishing the purchase. Sending them email may end up never opened. Employing timely push notification that prompts the user that he has some unfinished business may actually bring him back to the site. Jumia, a large African online electronics retailer, saw an increase of 9 times in conversions using the above-mentioned approach.</p><h3>Instant communication</h3><p>Another benefit of web push notifications is the fact that is an instant communication channel. They arrive quickly to the screen of the user where he could see them within minutes. That makes them especially efficient when you’d like to communicate simple ideas urgently. For example, there is a 30% discount in your store in the next 24 hours. However, you should not overuse this. Only send notifications when your idea you want to communicate is timely, precise and relevant.</p><h3>Save costs on building an app</h3><p>Building an app is significant investment both in terms of development and support cost. With better mobile phones coming out every year and good wireless network speeds more people shop on their phones without needing an app. If you have well designed and optimised mobile site that implements browser push notifications, you could reap many of the benefits of a mobile app. This could be a good idea if you don’t have the budget to invest in an app. We have to note that the native mobile app still offers better User Experience, performance, check-out process etc. An alternative solution is to develop a Progressive Web App(PWA) . They combine the UX of a mobile app with the ease of accessibility of the mobile web.</p><h3>They cover desktop</h3><p>Another advantage of web push notifications is that they cover the desktop. Desktop still accounts for 37% of the web traffic(according to Stonetemple) and not going away anytime soon.</p><p>Clearly, web push notifications have the ability to drive more revenue to your website. You should consider including them in a wider omnichannel marketing strategy..</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=147669c36218" width="1" height="1" alt=""><hr><p><a href="https://medium.com/donatix/5-ways-how-web-push-notifications-could-help-your-e-commerce-sales-147669c36218">5 ways how web push notifications could help your e-commerce sales</a> was originally published in <a href="https://medium.com/donatix">Donatix</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Scaling your development team? 3 ways working with а remote contracted team could beat in-house.]]></title>
            <link>https://medium.com/donatix/scaling-your-development-team-3-ways-working-with-%D0%B0-remote-contracted-team-could-beat-in-house-34cd8c2d744e?source=rss----41233812de16---4</link>
            <guid isPermaLink="false">https://medium.com/p/34cd8c2d744e</guid>
            <category><![CDATA[development]]></category>
            <category><![CDATA[startup]]></category>
            <category><![CDATA[scaling]]></category>
            <dc:creator><![CDATA[Dobromir Kotsev]]></dc:creator>
            <pubDate>Fri, 02 Nov 2018 12:42:14 GMT</pubDate>
            <atom:updated>2018-11-02T12:41:58.736Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mmbUNReTBz4OaX9Soax5LQ.jpeg" /></figure><p>You have started your tech company and it goes well and you want to scale it or maybe you plan to start a new venture? Great, but now you have to grow your development team as well. Yet developers are hard to come-by, costly and business timelines are ever so pressing. The dilemma that many tech leaders and CTO’s face should they hire entirely in-house or start working with contracted remote development team or development agency.<br> While keeping everything strictly in-house has many benefits in this article we would examine some overlooked details that may tip the scales otherwise</p><h3>Cost and Flexibility</h3><p>Working with remote contracted team offers better cost optimization and flexibility. A full in-house group requires significant overhead, including salaries, benefits, office space, equipment, training, recruiting, and more. Hiring development agencies or contractors could be expensive. However, most of the time you will pay hourly, meaning that you’d pay only for the productive time. Not to mention, you would have access to a broader range of specialists from design to QA. If things do not work-out, usually contracts could be cancelled rather painlessly compared to the labour law.</p><h3>Result Driven Mindset</h3><p>Sometimes in-house developers and employees operate on pay-roll mode. That means that you rely on internal politics. You show up every day for 8 hours, the boss likes you so even if you do not deliver he won’t necessarily fire you. Remote contractors and agencies, on the other hand, have to bring results otherwise their invoices may not be paid or the engagement with the company prolonged.</p><h3>Less Micromanagement and distractions</h3><p>In our conversation with technology managers and CTO’s, the one point they always bring against working with an external development team or having remote employees is the notion of control. How I would be sure you do the work you are supposed to do? Controlling the results is very important but is often misunderstood for meddling and micromanagement. Checking in with your developer every day could be counter-productive and sometimes contradicts the agile principles. Having remote developers could help you focus on the bigger picture and the results. After all CTO’s job is half technology and half management.</p><p><em>A leader is best when people barely know he exists when his work is done, his aim fulfilled, they will say: we did it ourselves.</em> Lao Tzu</p><p>Now you could argue that working with external and remote people could bring more overhead to communication. This could be true but if you have a well-established and tried process it shouldn’t be a problem. Agencies and external teams have a lot of experience in working remotely so they have devised processes for effective communication.<br> On the other hand, in the modern open space office often time there a lot of distractions and useless communication. For example, a simple question could turn into half an hour long discussion involving all the people around. It usually drifts away from the topic and adds no value to the company.</p><p>Scaling development teams is hard and requires a lot of time and effort. Working with agencies or remote development team poses some challenges and risks, it also provides benefits. At Donatix we have worked with clients from multiple countries and if you are on the look-out to add some ad-hoc dev resource give us a shout</p><p><em>Originally published at </em><a href="https://donatix.net/scaling-your-team-3-ways-working-with-%D0%B0-remote-contracted-team-could-beat-in-house/"><em>donatix.net</em></a><em> on November 2, 2018.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=34cd8c2d744e" width="1" height="1" alt=""><hr><p><a href="https://medium.com/donatix/scaling-your-development-team-3-ways-working-with-%D0%B0-remote-contracted-team-could-beat-in-house-34cd8c2d744e">Scaling your development team? 3 ways working with а remote contracted team could beat in-house.</a> was originally published in <a href="https://medium.com/donatix">Donatix</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Null Object Pattern in Laravel]]></title>
            <link>https://medium.com/donatix/null-object-pattern-in-laravel-79ab109a3cee?source=rss----41233812de16---4</link>
            <guid isPermaLink="false">https://medium.com/p/79ab109a3cee</guid>
            <category><![CDATA[nullobjectpattern]]></category>
            <category><![CDATA[laravel]]></category>
            <category><![CDATA[oop]]></category>
            <category><![CDATA[php]]></category>
            <dc:creator><![CDATA[Tihomir Tonov]]></dc:creator>
            <pubDate>Thu, 18 Oct 2018 13:02:44 GMT</pubDate>
            <atom:updated>2018-10-18T13:02:43.838Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zsYyIOPS3BH4ol33RStgGA.png" /></figure><p>There are many times when we take for granted the relations in our database or some fields in an external API, CSV file or other data source. And in such situations, we often receive some kind of <strong>NullPointerException</strong>.</p><p>Laravel with its convenient ORM might bring us in such troubles unless we are careful. Imagine a simple blog site where you have users who can write posts and you display the author’s name under the title. With Laravel, you just write <strong>$post-&gt;author-&gt;name</strong>, pretty cool right? But what happens when the author deletes his account. You might consider one of the following:</p><ul><li>Delete all user’s posts, but why losing such useful information without a valid reason?</li><li>Denormalize the posts table and save some of the user information there, for example, the name, so you never need to worry, if the user is there.</li><li>Use soft deletes and never delete the user, but this might be a problem with the new GDPR regulations. Furthermore, you need to remember to load the relation with the trashed records. You can fix these problems if on delete you rename the user to “Unknown” and assign them a random email and password, but this is logic write.</li><li>Create a method on the blog post class which returns the author’s name, where you check for its existence and return some sensible default.</li></ul><p>As you can see, there are a lot of possible solutions and depending on the case you might need some of them or even another one which is not listed here. But I would like to present you an alternative, that you can use when you think you need it.</p><p>The Null Object Pattern is a design pattern, where some function/method returns an object or literal, that should act as a “null” version of the expected one. You can read more on <a href="https://en.wikipedia.org/wiki/Null_object_pattern">Wikipedia</a> about it. A simple example might be a function, that should return an array of items, which you want to filter, map over its items or just pass it into foreach. But what happens when there are no items to return? You might return null, but now you need to check, every time before performing, that foreach loop. The <em>null object</em> alternative would be to return an empty array and skip the check, just run the foreach.</p><blockquote><em>If you are using such techniques, you are implementing the pattern, so congrats on that.</em></blockquote><p>You can find the pattern implemented in many places in the framework. Some examples are the <strong>get()</strong> method of the <strong>Models</strong>, which always returns <strong>Collection,</strong> no matter if there are records or not, or the magic methods of the models, which allows you to access not existing properties. But more interesting are the methods, that allows you to specify, your own version of the <em>null value</em>. Here are some examples of such methods:</p><p>You can specify a default value to be returned, on the “to one” relations, as they would return null by default. This is done via the <strong>withDefault()</strong> method when defining the relation, which can even accept an array of params to make the model with, so it has some sensible defaults. If you don’t pass anything when no <strong>User</strong> is found, empty one will be returned.</p><p>Now we can call <strong>$post-&gt;author-&gt;name</strong>, without worrying if there is a user, and when a user deletes its account we can just delete it.</p><p>Of course, there are other solutions to the problem and you can argue if the default name should be specified in the relation method, or in some method for determining the author’s name. Here is how it might look using the <strong>??</strong> operator:</p><p>Bellow, I will describe some other functions which utilize the <em>null object pattern</em> across the framework.</p><p>They are really useful, when dealing with responses from other systems, reading files, accepting requests or every time you are not sure that the value will be there. There are two functions <strong>array_get</strong> and <strong>object_get</strong> for the different types of data structures. You should use <strong>array_get</strong> for associative arrays, no matter that <strong>object_get</strong> seems logical there. Here are 2 quick examples for both of them:</p><ul><li><strong>object_get($cloth, ‘brand’, ‘unknown brand’)</strong> — returns the <em>brand</em> property of the <em>cloth</em> object, if such exists, or <strong>unknown brand</strong></li><li><strong>array_get($colors, ‘black’, ‘000000’)</strong> — returns the value for the <em>black</em> key of the <em>colors</em> array or our default black value</li><li>another option is to simply use the <strong>??</strong> operator, which was introduced in php7, and simplify the code, even more, <strong>$colors[‘black’] ?? ‘000000’</strong></li></ul><p>Of course, you can use them without the default values and they will return <em>null</em> but will prevent exceptions about not defined indexes and items.</p><p>You can call the <strong>get()</strong> method on the <strong>$request</strong> object to receive the value of some input field, but it also accepts a second parameter, which is the default value returned, when the property does not exist. So <strong>$request-&gt;get(‘wants_emails’, false)</strong> return the value of <em>wants_emails</em> or <em>false</em>, if such is not defined. It could be also used with the <strong>request(‘wants_emails’, false)</strong> function if you prefer to use it.</p><p>Sometimes you might want to create “null” classes, which mimics the methods of the real implementation, but does “null”. You can implement all methods of the mimicked class or just a handful of them. This might be especially helpful in tests to replace some object. Another place to use the pattern might be when you have many similar classes and you don’t want to break the flow with null checks. If you create a class, that is instantiated in the null case, you can use it like the others and not clutter the code with null checks. In those cases, you can even implement common interfaces, if you are into it since it is a real class.</p><p>The <strong>optional()</strong> helper is another function, which helps to deal with nulls in the code, even tho it does not provide a way to specify a default value. Here is a little example where it can save us from unexpected exceptions, <strong>optional($user-&gt;address)-&gt;city</strong>. This way we will receive null even when there is no address property on the user class.</p><p>In conclusion, I hope that the next time you are wondering, how to deal with the possibility, of deleted relation or missing property of an API response, you would have one more weapon in your arsenal and don’t have to write <strong>if statement</strong>, because nobody likes them.</p><p><em>Originally published at </em><a href="https://donatix.net/null-object-pattern-laravel/"><em>donatix.net</em></a><em> on September 28, 2018.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=79ab109a3cee" width="1" height="1" alt=""><hr><p><a href="https://medium.com/donatix/null-object-pattern-in-laravel-79ab109a3cee">Null Object Pattern in Laravel</a> was originally published in <a href="https://medium.com/donatix">Donatix</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>