<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Tomasz Babiuk on Medium]]></title>
        <description><![CDATA[Stories by Tomasz Babiuk on Medium]]></description>
        <link>https://medium.com/@tomasz.babiuk?source=rss-b94620e86d2c------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*zvqlgDaJ9ha7M3-e.</url>
            <title>Stories by Tomasz Babiuk on Medium</title>
            <link>https://medium.com/@tomasz.babiuk?source=rss-b94620e86d2c------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 11:25:46 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tomasz.babiuk/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Kara od skarbówki za zawieszenie działalności? Ku przestrodze!]]></title>
            <link>https://medium.com/@tomasz.babiuk/kara-od-skarb%C3%B3wki-za-zawieszenie-dzia%C5%82alno%C5%9Bci-ku-przestrodze-924335c06907?source=rss-b94620e86d2c------2</link>
            <guid isPermaLink="false">https://medium.com/p/924335c06907</guid>
            <category><![CDATA[działalność-gospodarcza]]></category>
            <category><![CDATA[prowadzenie-działalności]]></category>
            <category><![CDATA[biznes]]></category>
            <category><![CDATA[urząd-skarbowy]]></category>
            <category><![CDATA[kara]]></category>
            <dc:creator><![CDATA[Tomasz Babiuk]]></dc:creator>
            <pubDate>Tue, 04 Aug 2020 09:19:45 GMT</pubDate>
            <atom:updated>2020-08-04T11:38:46.039Z</atom:updated>
            <content:encoded><![CDATA[<p>Czy przedsiębiorca, który dopełnia wszystkich formalności może zostać obarczony karą? Okazuje się, że tak!</p><p>W moim przypadku źródłem całego zamieszania było zawieszenie działalności w której wykorzystywano kasę fiskalną. Cała kara dotyczy przepisów związanych ze zwrotem ulgi na zakup kasy. Mój przypadek nie jest szczególny… sądząc po ilości kas fiskalnych w Polsce to myślę nawet, że dość powszechny.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kF3QNim9MH-zj9-gUKzieA.jpeg" /><figcaption>Thanks to <a href="https://unsplash.com/@travisessinger">Travis Essinger</a> for sharing their work on Unsplash.</figcaption></figure><h3>Historia jakich wiele w polskim biznesie…</h3><p>W 2017 założyłem działalność gospodarczą polegającą głównie na sprzedaży w internecie (nie tylko, ale sprzedaż była podstawową dziedziną). Aby sprzedawać osobom fizycznym musiałem posiadać kasę fiskalną. Biznes funkcjonował przez rok, ale rozwijał się słabo. W 2018 roku zdecydowałem się zawiesić działalność. Ponieważ była to spółka z o.o., to przepisy kodeksu handlowego zmuszają spółki do wznawienia działalności na conajmniej jeden miesiąc (przed kolejnym zawieszeniem) dlatego w roku 2020 odwiesiłem działalność.</p><p>Sprzedając np na allegro nie masz wpływu kto od Ciebie kupi. Jeżeli kupi osoba fizyczna… nabijasz na kasę… jeżeli kupi firma — najczęściej wystawiasz fakturę — takie są przepisy. Kasę jednak musisz mieć bo jak akurat “kup teraz” kliknie osoba fizyczna, a ty nie nabijesz na kasę — popełniasz przestępstwo skarbowe. Więc kasa w firmie jest, bo musi być. Jak kupują tylko firmy to kasa paragonów nie nabija.</p><p>Dochody z tej działalności nie były satysfakcjonujące (na szczęście pracuję jeszcze na umowie o pracę), więc stwierdziłem że takie dorabianie na boku nie ma sensu — czas działalność zlikwidować.</p><h3>Bezużyteczna kasa fiskalna!</h3><p>Kasa fiskalna to największy idiotyzm jakie wymyślił Urząd Skarbowy. Obowiązków jest masa: rejestracja, fiskalizacja, przeglądy, raporty codzinne, raporty miesięczne, serwis, problemy z wyrejestrowywaniem, utrzymywanie kopii paragonów — jednym słowem: rzygać się chce. Z każdym rokiem dochodzą nowe obowiązki (patrz: kasy on-line!).</p><p>Przez cały okres prowadzenia działalnośći każda sprzedaż była dokumentowana przelewem lub jakimś innym zapisem elektronicznym. Kasa nigdy nie operowała gotówką. Jej posiadanie było wyłącznie wymagane prawem. Jak coś było sprzedawane to i tak było potem dodatkowo ujawniane w deklaracjach JPK_VAT/JPK_FA.</p><p>W budce z lodami i generalnie tam, gdzie rzeczywiście przewija się gotówka prowadzenie kasy ma jeszcze jakiś sens, ale dla większości przypadków jest to wyłącznie zaspokajanie potrzeby mikrokontroli u urządników i żywienia mafii kas fiskalnych.</p><h3>Odsetki karne za zwrot ulgi za zakup kasy fiskalnej</h3><p>Urząd Skarbowy “dotuje” zakup kasy fiskalnej. Łaskawie rzuca 700zł co stanowi w najlepszym wypadku 60% kosztów jakiejś najtańszej ale znośnej w obsłudze kasy.</p><p>Sytuacja wygląda na pozór normalnie. Kończę działalność, likwiduję kasę — zwracam ulgę z dniem likwidacji (zwracam ulgę bo kończę działalność przed upływem 3 lat od momentu zakupu kasy, przy czym okresy zawieszenia działalności nie wliczają się do tych 3 lat). Skąd odsetki?</p><blockquote><strong>Termin zwrotu ulgi liczony jest od daty wystawienia ostatniego paragonu!</strong></blockquote><p>W moim przypadku ostatni paragon został wystawiony dawno, dawno temu w 2018 roku — jeszcze przed zawieszeniem działalności. Przez okres zawieszenia musiałem płacić za przeglądy techniczne kasy. Po wznowieniu działalności kasa fiskalna dalej była wymagana. Fakt, że spółka nie działała aktywnie i nie trafił do mnie żaden klient nie ma żadnego znaczenia. Mam utrzymywać kasę i jednocześnie płacić odsetki za nie zwrócenie ulgi w termienie oraz odsetki od tych o dsetek wstecz aż do 2018 roku.</p><h3>Kara za nie bycie prorokiem?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*JoLJGkRsHBml7DKiu4pyNQ.jpeg" /><figcaption>Thanks to <a href="https://unsplash.com/@lisandrow11">Lisandro Garcia</a> for sharing their work on Unsplash.</figcaption></figure><p>Zawieszając działalność w 2018 nie wiedziałem co będzie za dwa lata (przypominam, że prawo zmusza spółki do wznawiania działalności). Kasa była prowadzona w sposób legalny (wszystkie obowiązki podatnika były przestrzegane). Firma nie posiadała żadnych zobowiązań i nie kombinowała na podatkach. Wszystko było tip-top!</p><h3>Mądry Polak po szkodzie?</h3><p>W firmie była księgowość… był nawet doradca podatkowy, który takiej sytuacji nie przewidział. W teorii dałoby się wyjść z sytuacji ochronną ręką wystawiając jakiś lipny paragon na jeden grosz przed zlikwidowaniem kasy (tyle, że po pierwsze: trzeba o tym kruczku wiedzieć, a po drugie: trzeba by wtedy specjalnie otwierać księgowość na jeden miesiąc, żeby ten lipny paragon razem z garścią innych raportów rozliczyć).</p><p><strong><em>Czy o to chodzi w tym kraju, żeby non-stop kombinować i lawirować w gąszczu przepisów? Niestety, ale chyba tak :(</em></strong></p><p><em>Do napisania artykułu natchnęła mnie Pani z Urządu Skarbowego, która niechcący się wygadała, że wszyscy wpłacają zwrot ulgi w kwocie 700 zł, a potem się dziwią, że dostają odsetki! U mnie i tak się udało: likwidowałem spółkę z o.o. i skarbówka i tak wyciągnęłaby ręce po swoje w trakcie postępowania likwidacyjnego. W przypadku zwykłej działalności gospodarczej urzędnik grzecznie czeka aż minie 5 lat — wtedy odsetki przekraczają 50% oryginalnej kwoty!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=924335c06907" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Reducing boilerplate in Android UI tests by using Page Objects and POMgranate]]></title>
            <link>https://medium.com/@tomasz.babiuk/reducing-boilerplate-in-android-ui-tests-by-using-page-objects-and-pomgranate-af2c0473b040?source=rss-b94620e86d2c------2</link>
            <guid isPermaLink="false">https://medium.com/p/af2c0473b040</guid>
            <category><![CDATA[testing]]></category>
            <dc:creator><![CDATA[Tomasz Babiuk]]></dc:creator>
            <pubDate>Thu, 10 Jan 2019 10:37:47 GMT</pubDate>
            <atom:updated>2019-01-10T10:37:47.025Z</atom:updated>
            <content:encoded><![CDATA[<p>Page Object Model (or sometimes just: Page Object) is a popular pattern for writing UI automation tests. A page object comes from the web as it was primarily use there to automate web pages. On Android we automate activities and fragments but the pattern name and appliance didn’t change.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*sv2RduV6VBbW9tDp" /><figcaption>Photo by <a href="https://unsplash.com/@yunmai?utm_source=medium&amp;utm_medium=referral">i yunmai</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><p>Just to be quick:</p><blockquote>A page object is a class that serves as an interface for controlling an activity, a fragment or view in your automation test.</blockquote><p>Your tests use the methods of this page object whenever there’s a need to interact with the UI. If the UI changes, only the page object need to reflect that change. In most cases you’re fine and your tests won’t need to change as much. Subsequently all changes are located in one place. That’s why Page Object Pattern has become popular in test automation for enhancing test maintenance and reducing code duplication.</p><h3>Let’s automate login form</h3><p>As an example I choose simple login form:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8dc63d939acd68367f93bd78a8aa1358/href">https://medium.com/media/8dc63d939acd68367f93bd78a8aa1358/href</a></iframe><p>Nothing fancy here. Login form with two text fields, a checkbox and a button.</p><h3>Using Espresso (a hard way)</h3><p>If you write UI automation tests for Android you’re probably using Espresso. That’s ok as Espresso is probably the best framework out there but there’s one problem: <strong>it’s really hard to build page object models with Espresso</strong>. You need to deal with matchers, view actions, performers and other espresso specific stuff that bloats your implementation.</p><p>If we are to create page object of login activity using Espresso, it would like like this:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/1623f57f9d8742e97fd9ffae31a2198e/href">https://medium.com/media/1623f57f9d8742e97fd9ffae31a2198e/href</a></iframe><p>As you can see… it’s a lot of code to write. You can extract base class for your page objects and keep some generic methods there (like setChecked, getTextFromView) but still — it’s a lot to do.</p><p>Final automation test will be much simpler thanks to login page object:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/aff720260c79b1851a92be1867d6b6da/href">https://medium.com/media/aff720260c79b1851a92be1867d6b6da/href</a></iframe><h3>Using POMgranate (a smart way)</h3><p>There’s much smarter way of generating Page Objects in android: a <a href="https://github.com/tomaszbabiuk/pomegranate">POMgranate</a> fremework.</p><p>The inspiration for this framework comes from two projects: Selenium tools for web and ButterKnife framework for Android. POMegranate combines both: boilerplate reduction and code generation.</p><p>POMegranate is using annotation processing to generate page objects when you build/run your automation tests. No reflection is used! Generated code is clean and self-describing.</p><p>The page objects with POMegranate are much lighter:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/69496730d184be4ae9606ca8e17bcb46/href">https://medium.com/media/69496730d184be4ae9606ca8e17bcb46/href</a></iframe><p>The final test is almost the same:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c8d3568d39f681feebea1eff33417211/href">https://medium.com/media/c8d3568d39f681feebea1eff33417211/href</a></iframe><h3>Summary</h3><p>That’s it. In most basic cases you don’t even need to know Espresso at all. Maintaining declarative code is much easier than dealing with tons of Espresso code. The benefits of this approach are:</p><ol><li>It’s much easier to use <a href="https://martinfowler.com/bliki/PageObject.html">Page Object Mode</a>l pattern on Android</li><li>If yot use Selenium for web automation before, it’s gonna be easier for you to switch to Android tests</li><li>Declarative code is cleaner and self describing</li><li>POMegranate uses annotation processing, so it’s fast (no reflection)</li><li>You can always mix Espresso with POMegranate in edge cases.</li><li>Better isolation of page elements due to specialization (you won’t be able to type text on a label or a checkbox).</li></ol><h3>More information</h3><p>The first release of POMgranate is available on jCenter so you can give it a try by adding those few lines to your gradle:</p><pre>dependencies {<br>  androidTestImplementation &#39;com.github.tomaszbabiuk:pomegranate-core:0.1.0&#39;<br>  <br>  androidTestImplementation &#39;com.github.tomaszbabiuk:pomegranate-espresso:0.1.0&#39;<br>  <br>  androidTestAnnotationProcessor &#39;com.github.tomaszbabiuk:pomegranate-processor:0.1.0&#39;</pre><pre>  (...)<br>}</pre><p>Links:</p><ol><li><a href="https://github.com/tomaszbabiuk/pomegranate">https://github.com/tomaszbabiuk/pomegranate</a> — POMgranate framework on GitHub</li><li><a href="https://martinfowler.com/bliki/PageObject.html">https://martinfowler.com/bliki/PageObject.html</a> — page object pattern</li><li><a href="https://www.seleniumhq.org/docs/06_test_design_considerations.jsp#page-object-design-pattern">https://www.seleniumhq.org/docs/06_test_design_considerations.jsp#page-object-design-pattern</a> — best practices and guidelines from Selenium</li></ol><p>Have fun!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=af2c0473b040" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Jak “przypadkiem” złamałem księgowość w mBanku]]></title>
            <link>https://medium.com/@tomasz.babiuk/jak-przypadkiem-z%C5%82ama%C5%82em-ksi%C4%99gowo%C5%9B%C4%87-w-mbanku-23c86b0ac298?source=rss-b94620e86d2c------2</link>
            <guid isPermaLink="false">https://medium.com/p/23c86b0ac298</guid>
            <category><![CDATA[hacks]]></category>
            <category><![CDATA[taxes]]></category>
            <category><![CDATA[poland]]></category>
            <category><![CDATA[hacking]]></category>
            <category><![CDATA[banking]]></category>
            <dc:creator><![CDATA[Tomasz Babiuk]]></dc:creator>
            <pubDate>Wed, 07 Nov 2018 14:56:38 GMT</pubDate>
            <atom:updated>2019-05-21T06:32:11.838Z</atom:updated>
            <content:encoded><![CDATA[<h3>Jak “prawie” złamałem księgowość w mBanku [aktualizacja (błąd ludzki?)]</h3><p>…czyli jak nie robić systemów informatycznych (na przykładzie prawdziwego zgłoszenia serwisowego do systemu superksiegowa.pl i mBanku)</p><h3><strong>Aktualizacja:</strong></h3><h3><strong>Po akcji z opublikowaniem artykułu na wykop.pl udało się zwrócić uwagę zespołu “Superksięgowej”. Powodem zablokowania konta miał być błąd ludzki. System zostanie w najbliższym czasie uszczelniony i przynajmniej część zgłoszonych tutaj rzeczy zostanie poprawiona.</strong></h3><h3><strong>Aktualizacja (ponad pół roku po zdarzeniu):</strong></h3><h3><strong>“Superksięgowa” nie podjęła żadnych akcji. Zabezpieczenia nie zostały poprawione. Mimo RODO, osoby z obsługi systemu mają dostęp do kilku produktów na raz, więc błąd ludzki dalej może się powtórzyć.</strong></h3><p>Prowadzenie biznesu w Polsce jest trudne. Wiedzą o tym wszyscy przedsiębiorcy. Od 2018 roku prowadzenie samodzielnej księgowości bez komputera jest praktycznie niemożliwe (ze względu na konieczność komputerowego wysyłania deklaracji VAT7 i JPK_VAT). Oprogramowanie dostarczane przez Ministerstwo Finansów działa tylko na komputerach z systemem Windows i na niektórych Linuxach. Co mają zrobić przedsiębiorcy z Mac OS X? Pocałować klamkę Urzędu Skarbowego lub prowadzić swoją księgowość w internecie. I tutaj właśnie zaczyna się cała historia…</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/932/1*Pwjd7TCWr8smjOohsw8Dww.png" /></figure><p>Rynek “księgowych online” w Polsce kwitnie. Musiałem szybko znaleźć coś co wygeneruje za mnie JPK_VAT zanim dojedzie mnie Urząd Skarbowy. Sprawdziłem kilka ofert (iFirma, wFirma, inFakt, księgowość 360, super księgowa itp., itd.). O intuicyjności tych systemów nie chciałbym się wypowiadać… żaden z tych produktów nie poprowadzi cię za rękę i musisz liczyć na siebie. Jak już stwierdziłem, że kurs “jak zostać księgowym przez internet” mam zaliczony padło ostatecznie na księgowość w mBanku (a tak naprawdę na produkt “Super księgowa”, który sprytnie został upchnięty w zakładki mBankowego systemu obsługi konta). Najpierw otworzyłem konto testowe w “Super księgowej” na przyszły NIP swojej działalności, żeby sprawdzić jak to działa, a następnie otworzyłem konto w mBanku (z tym samym numerem NIP).</p><h3>Na początku było nieźle, aż tu nagle…</h3><p>Minęło pół roku… księgowanie faktur i zamykanie miesiąca zajmuje mi już tylko godzinę zamiast początkowych 10-ciu. Były małe zgrzyty i pewnie cała historia skończyłaby się dobrze, gdyby nie fakt że z niewiadomego powodu mój dostęp do księgowości w mBanku został nagle zablokowany.</p><p>Jakakolwiek próba uruchomienia księgowości przez mBank kończyła się komunikatem: <strong>Firma została zablokowana</strong>, albo <strong>Konto zostało zablokowane.</strong></p><p>Nie jest fajnie prowadzić biznes z zablokowaną księgowością. Urząd Skarbowy ma to gdzieś. Musisz wystawiać faktury dla swoich kontrahentów bez względu na wszystko. Więc przez kilka dni wystawiałem faktury w Excelu (a dokładniej w jego Mac’owym odpowiedniku: Numbers), a w międzyczasie próbowałem wyjaśnić sprawę w banku.</p><p>Pierwszy rozmowa z pracownikiem infolinii w mBanku postawiła sprawę jasno:</p><blockquote>System księgowości jest zarządzany przez podmiot trzeci. Z naszej strony wszystko wygląda w porządku.</blockquote><p>Jednym słowem: my ten system tylko sprzedajemy z naszym kontem i kasujemy za konta biznes. Proszę sobie radzić samemu i cieszyć się naszymi lokatami 0,5%. No nic… pewno chłopy w banku siedzą i myślą jak to powiedzieć swoim klientom że następne lokaty będą w promilach :)</p><p>Pracownik z infolinii “Super księgowej” też nie starał się zrozumieć mojego problemu:</p><blockquote>Proszę zgłosić sprawę w dziale technicznym.</blockquote><h4>Wtedy w mojej głowie zaświtało: moje konto testowe było otwarte na ten sam numer NIP, co konto w mBanku.</h4><p>Kolejne maile z losowymi osobami z działu obsługi klienta potwierdziły moje obawy: konto testowe w “Super księgowej” zostało zamknięte razem z kontem księgowym w mBanku. Wystarczył ten sam numer NIP, aby moja księgowość poszła do piachu. To taki “mały” błąd w systemie.</p><p>Mijają kolejne godziny i interwencje aż w końcu ktoś ręcznie zdejmuje blokadę z mojego konta.</p><h3>W czym problem?</h3><p>Otóż problemów jest kilka. To nie jest jeden błachy błąd, który nie ma żadnych konsekwencji… cała sprawa to seria nieporozumień, braku chęci współpracy, oszczędzania na programistach, sprzedawania niezabezpieczonego produktu i walki o bezpieczeństwo własnych danych osobowych. Ale po kolei…</p><h3>Możemy zablokować dostęp każdej osobie do księgowości w mBanku znając tylko jej numer NIP?</h3><p>Systemów informatycznych nie powinno się projektować tak, żeby jedno konto użytkownika wpływało na inne. Jest to olbrzymi błąd spójności danych. Wystarczy założyć konto testowe na dowolny numer NIP który chcemy zablokować. Po kilku miesiącach “Super księgowa” zablokuje to konto i wszystkie inne produkty powiązane z danym numerem NIP (w tym księgowość w mBanku)!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/588/1*ajWQWFc802EoA1kCow1u_g.jpeg" /></figure><h3>Nikt nie sprawdzał mojej tożsamości na infolinii “Super księgowej”</h3><p>Wykonałem kilka telefonów do działu obsługi klienta. Wystarczało, że tylko podawałem numer NIP. W którymś mailu pojawiły sięnawet załączone faktury ze wszystkimi danymi i kwotami za nieopłacone konto testowe. Mógł to robić każdy po ściągnięciu mojego NIPu z CEiDG.</p><h3>Regulamin serwisu czasem znika</h3><p>Jeżeli chcemy założyć konto jesteśmy przekierowywani na nieistniejący link: <a href="http://www.superksiegowa.pl/o-serwisie/regulamin/">http://www.superksiegowa.pl/o-serwisie/regulamin/</a>. Generalnie trzeba wiedzieć gdzie kliknąć, żeby znaleźć prawidłowy link. Jak już się doklikacie do regulaminu to jest on dynamiczny. Nie podpisujemy regulaminu przy zakładaniu konta, a musimy się na niego zgodzić. W dowolnym momencie administrator serwisu może zmienić jego treść.</p><h3>Regulamin serwisu ma błędy prawne</h3><p>Regulamin jest napisany pod przedsiębiorców. Zakładając konto testowe byłem jeszcze osobą fizyczną. Nikt tego nie sprawdził. Czy cokolwiek z tego regulaminu ma w takim przypadku zastosowanie?</p><h3>Nikt nie weryfikuje tworzonych kont</h3><p>Możemy utworzyć konto na dowolny numer NIP. Nikt nie sprawdzi naszej tożsamości. Nikt nie zażąda skanu dowodu. Nie zostanie wysłane pismo z kodem weryfikującym na nasz adres pocztowy. Jak to ładnie skwitował mój znajomy:</p><blockquote>przecież podanie NIPu to jak podpis cyfowy i zgoda na zawarcie umowy, nie wiedziałeś? ;)</blockquote><h3>Weryfikacja adresu e-mail ma “dziury”</h3><p>Możemy tworzyć konta korzystając z publicznych adresów email do których każdy ma dostęp (t.zw. “anty-spamów” lub “adresów testowych”). Przykładami takich stron są np. mailinator.com lub disposable.com. “Super księgowa” pozwala na rejestrację konta mailem z obu serwisów. Ułatwia to automatyzację całego procesu “blokowania” numerów NIP. Nie musimy ręcznie tworzyć kont email do ataku, wystarczy że wpiszemy “cokolwiek@mailinator.com” i już na stronie <a href="http://mailinator.com/">http://mailinator.com</a> możemy publicznie oglądać całą pocztę wysyłaną na ten adres.</p><h3>Automaty mogą tworzyć dowolną ilość kont na dowolną ilość numerów NIP</h3><p>Wszystkie ważniejsze formularze (tworzenie konta, “zapomniałem hasła”, logowanie) powinny być zabezpieczone przed botami. Służy do tego t. zw. captcha — np. taka: <a href="https://www.google.com/recaptcha/intro/v3.html">https://www.google.com/recaptcha/intro/v3.html</a>.</p><p>Captcha musi być mocna, inaczej boty nie będą miały problemów z jej złamaniem. Captcha z “Super księgowej” może zostać złamana najprostszym algorytmem typu OCR do pisma odręcznego.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FVK4fdUn5q0oVlOuedEUyQ.png" /><figcaption>Tak wygląda łamanie formularzy “Super księgowej” prostą aplikacją androidową.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fm3VtFoJaFfdaQkcnTxTfA.jpeg" /><figcaption>…a tak wygląda łamanie captcha programem Google Lens.</figcaption></figure><p>Sam zapewnie bym użył czegoś z ML Kit’a od Google, np. tego: <a href="https://firebase.google.com/docs/ml-kit/android/recognize-text">https://firebase.google.com/docs/ml-kit/android/recognize-text</a></p><h3>Formularz “zapomniałem hasła” pozwala sprawdzić, czy dany email jest zarejestrowany w “Super księgowej”, czy nie</h3><p>To bardzo zła praktyka. Mając bazę danych adresów email, możemy łatwo wytypować konta do następnych ataków. Oczywiście musimy dalej łamać captchę, ale jest ona taka sama jak ta z rejestracji (czyli tak, jakby jej nie było).</p><h3>mBank nie widzi problemu: to nie my, to nasz partner</h3><p>Złapałem się za głowę jak uświadomiłem sobie jak niewiele trzeba, żeby rozłożyć ten system na łopatki. Skonsultowałem się ze znajomym programistą-wymiataczem Markiem (pozdrowienia Marku), który potwierdził moje obawy. Dziura jest tak duża, że trzeba zawiadomić bank.</p><p>Z samego rana zadzwoniłem do mBanku. Poinformowałem o błędach, przedstawiłem scenariusz ataku i wspomniałem o 5-ciu problemach z bezpieczeństwem (2-krytyczne i 3-średnie). Do dzisiaj nie dostałem odpowiedzi…</p><p>Księgowość w mBanku jest wkomponowana w system płatności właśnie po to, żebyśmy myśleli że korzystamy z “konta z księgowością”. Czemu teraz umywać ręce?</p><h3>“Super księgowa” każe płacić i nie widzi problemów z zablokowaniem innego konta (opłacanego przez mBank) klientowi</h3><p>W “Super księgowej” kilkukrotnie wspominałem o błędzie, ale osoby z infolinii nie były zainteresowane genezą całego zamieszania, tylko faktem czemu moje faktury za konto testowe nie zostały opłacone! Jak ban to na całego. Byłem traktowany jak koleś, który miga się od spłaty. Przynajmniej dowiedziałem się, że mam jakieś zaległe faktury w ich systemie.</p><p><em>Jesteśmy księgowymi, a nie technicznymi…</em></p><p>Najwidoczniej ich programiści nie popełniają błędów, a moje drugie konto zostało zablokowane z jakichś tajemnych powodów… może krasnoludki nasikały na dyski twarde w serwerowni, albo zabłąkany elektron zmienił flagę na moim koncie na “nieaktywne”. Po prostu magia, gusła i efekt halloween (w tym przypadku “psikus”, bo cukierki kupi się za pieniądze z faktur :P).</p><p>Na szczęście gdzieś po drodze ruszyło ich sumienie i za nieużywane konto testowe nie każą mi dalej płacić. Chyba do nich dotarło, że nie można komuś zablokować księgowości bez powodu. Zamienienie konta testowego w konto płatne też nie było miłym zagraniem (zwłaszcza, że strona z regulaminem nie istnieje i mógł założyć je każdy znając tylko mój numer NIP!). Moje konto było zablokowane od 26-go października do 6-go listopada 2018 roku.</p><h3>To kto w takim razie za to zapłaci?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wgFU2uuS5AnP6CI7zpyqBw.jpeg" /></figure><p>No jak to kto? Pan płaci… Pani płaci… Państwo płacicie :)</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=23c86b0ac298" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Choosing the best cross-platform framework for sharing code between iOS and Android.]]></title>
            <link>https://medium.com/@tomasz.babiuk/choosing-the-best-cross-platform-framework-for-sharing-code-between-ios-and-android-fa45b8162c81?source=rss-b94620e86d2c------2</link>
            <guid isPermaLink="false">https://medium.com/p/fa45b8162c81</guid>
            <category><![CDATA[ios]]></category>
            <category><![CDATA[mobile-app-development]]></category>
            <category><![CDATA[android]]></category>
            <category><![CDATA[xamarin]]></category>
            <category><![CDATA[kotlin-native]]></category>
            <dc:creator><![CDATA[Tomasz Babiuk]]></dc:creator>
            <pubDate>Tue, 23 Oct 2018 19:28:08 GMT</pubDate>
            <atom:updated>2018-11-02T07:13:25.554Z</atom:updated>
            <content:encoded><![CDATA[<p>Do you want to share your code between Android and iOS? Don’t know which framework fits best? See my comparison of Xamarin, React native, Flutter and Kotlin/Native backed by few years of playing on cross-development field.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZWrhokVKJ14VhVlaWTKgzQ.jpeg" /></figure><p><em>Photo by </em><a href="https://unsplash.com/photos/qVywyNo9_-E?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText"><em>Benjamin Wong</em></a><em> on </em><a href="https://unsplash.com/search/photos/apples-mixing?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText"><em>Unsplash</em></a></p><p>Most popular mobile apps need to be written twice: first time in Java (or Kotlin) for Android and second time in ObjectiveC/Swift for iOS. In most cases the code is duplicated and developer effort is doubled. The more code you need to produce, the more bugs you may expect so testing efforts are doubled as well.</p><p>Sharing code between iOS and Android is good for everybody. Developers may focus on business requirements instead of interoperability tasks. Clients are getting product for a lower price in much shorter time. Finally, your end users are getting better tested product. That’s the theory.</p><h4>TL;DR; I know it’s a long time read… you can find the rating table (and the winner of course) at the end of this story.</h4><p><strong>Why another cross-platform comparison article?</strong></p><p>I’m an Android developer with strong .NET background (I wrote some Xamarin apps in the past). I decided to write this article when I got my last “You’ve been found by this skills…” email from LinkedIn. It appears that my Xamarin skills are more valuable than Android ones. The math was simple: 23 hits for Xamarin vs 5 for Android. I was surprised at the beginning… Xamarin is hard to work with so it’s obvious that it’s more difficult to find somebody who knows it. There’s a lot of free Android developers available.</p><p>Another surprise was when I was briefly looking at remote jobs in mobile. For 20 job ads there were only 2 for Android, 6 for Swift and 12 for Xamarin. Is this so hard to find somebody for Xamarin? Or is this technology so cool that demand is rising? Are there any vital alternatives for this tech? I’ll try to answer to all of this questions.</p><p><strong>Comparing Xamarin, Flutter, React native and Kotlin/Native</strong></p><p>I was using Xamarin since 2012. I remember times when it was a full paid framework with no relation to Microsoft. Xamarin was my key to Android world as I was a .NET developer before. I wrote few commercial applications using this tech.</p><p>When it comes to React/Native, Flutter and Kotlin/Native: I got the chance to create some proof of concepts to test them out. That was more than enough to do this comparison.</p><p><strong>How to rate best cross-platform framework for mobile?</strong></p><p>I choose 14 criteria to rate the frameworks. My goal was to touch every aspect of cross-platform development starting from required skills, knowledge aspects, tooling, maintenance and performance. I even tried to find the best answers to question “how hard it is to find developer on the market” for every cross-platform solution. So let’s start!</p><p>Rating points means:</p><p>1 — poor, actually not so bad but nothing extra comparing to others</p><p>2 — good and at least better than competition</p><p>3 — excellent, definitely better than others</p><h3><strong>Criteria 1: What skills do you need to know to build business logic (entry level)?</strong></h3><p><strong><em>Xamarin</em></strong><em> (1 point)</em> — You need to know C# and most popular .NET libraries for things like dependency injection, data binding, networking, etc.</p><p>The problem is that you are not able to use everything from .NET world but only limited set of cross-platform libraries that are written in .NET (previously called Portable Class Libraries).</p><p>Don’t expect C# knowledge will let you roll on Android and iOS. You still need to know Java or Kotlin and Swift to read the docs. Sooner or later you also need to write more advanced part of interoping code and deep knowledge of Android SDK and iOS framework are required.</p><p><strong><em>Flutter</em></strong><em> (1 point)</em> — Same as in Xamarin but except of C# and .NET you’re dealing with Dart. You’ll also need to get familiar with Dart specific libraries for everything. Forget everything you know and dive in here: <a href="https://pub.dartlang.org/packages?q=dependency%3Aflutter&amp;page=1">https://pub.dartlang.org/packages?q=dependency%3Aflutter&amp;page=1</a>.<br>It’s also important to know how to use Dart performance tricks like isolates.</p><p>Same as in Xamarin… you still need to know Kotlin + Android SDK + Swift + iOS SDK for more advanced development.</p><p><strong><em>React native</em></strong><em> (1 point) </em>— You need to know JavaScript (ES6) and it’s relatives (npm, JSX and all the stuff). I won’t lie if I tell that there’s a lot of stuff to learn.</p><p>Same as in Xamarin and Flutter… you still need to know Kotlin + Android SDK + Swift + iOS SDK for more advanced development.</p><p><strong><em>Kotlin/Native</em></strong><em> (2 points) </em>— You need to know Kotlin + Android SDK + Swift + iOS SDK. There’s no need to learn another layer or language that is not present on regular mobile development (C#, XAML, JXL, Dart, ES 6, etc.)</p><p>It’s easy to convert Java code to Kotlin. Porting existing Java code directly to Kotlin/Native is extremely simple. Kotlin/Native is also a part of Kotlin 1.3.</p><blockquote>Skill set criteria is the most controversial. The final judgement depends on what languages you know. If you’re coming from .NET world it would be easier for you to get better traction in Xamarin. If you’re coming from the web — React native is the only choice, etc.</blockquote><blockquote>The extra point for Kotlin/Native is for not introducing another language that’s not being used in mobile development (modern Android developers are using Kotlin already).</blockquote><h3>Criteria 2: What skills do you need to know to build UI interface?</h3><p><strong><em>Xamarin</em></strong><em> (2 points)</em> — In Xamarin you have two options. You can use the bridge between .NET and Java/Swift and write the UI as you were regular Android/Swift developer (except the syntax is C#). You still need to know all the rules on how interface has to be built on specific platform.</p><p>You can also use Xamarin Forms and XAML markup to share the view tree across iOS and Android. In this approach XAML tree is translated to platform specific view tree. Theoretically you don’t need to build the views twice but the problem is that sooner or later you’ll need to write custom renderers for more advanced views — and that’s becoming really difficult.</p><p><strong><em>Flutter</em></strong><em> (3 points) </em>— Flutter seems to be the best option here as building UI with Flutter is like you were developing a game. Instead of physics engine you have widgets.</p><p>You still need to possess advanced knowledge of Dart. The whole UI has to be written in code what affects maintenance (we’ll go back to this later).</p><p><strong><em>React native</em></strong><em> (2 points)</em> — React native is using JavaScript and JSX to build it’s views. The solution is very similar to Xamarin Forms (the only difference is that we’re dealing with JSX instead of XAML)</p><p><strong>Kotlin/Native</strong> (1 point) — You have to write UI twice as you were regular Android/Swift developer (only business code syntax is Kotlin). The good news is that you’re using native toolset to do this and you’ll have full IDEs support.</p><blockquote>In case of UI simplicity Flutter is definite winner here. You can build comprehensive views using Dart only. Xamarin is providing XAML and that’s why it’s having more points than Kotlin/Native. Same amount of points is coming to React native as the solution is very similar to Xamarin Forms.</blockquote><blockquote>Building UI criteria seems to be the most crucial when dealing with cross-platform frameworks. Please don’t take it as your final decision as the devil is in the details. General truth is the easiest it is to build UI the more limitation we have in the future and that leads us to next criteria: look and feel.</blockquote><h3>Criteria 3: Look and feel</h3><p><strong><em>Xamarin</em></strong><em> (2 points)</em> — The views created in Xamarin are using target platform SDK so they are identical to original ones.</p><p><strong><em>Flutter</em></strong><em> (1 point)</em> — The views created in Flutter are build in Vulcan. For today you can change the Cupertino skin (for iOS) or Material (Android).</p><p><strong><em>React native</em></strong><em> (2 points) </em>— The views created in React-native are using target platform SDK so they are identical to original ones.</p><p><strong><em>Kotlin/Native</em></strong><em> (2 points)</em> — Same as Xamarin/React. The views created in Kotlin/Native are using target platform SDK so they are identical.</p><blockquote>There’s little sense in writing cross-platform apps that are not looking and performing as regular ones. This criteria is the most important for your end-users. You won’t get high notes in the store if your app is looking strange and kind of “not in place”. Flutter rendering engine is totally different than the one that’s on the target platforms. If you’re noticeable user you will feel that something is not right (like android animations are material-ish and feel different). You will also get into problems when new style of UI is introduced (for example if iOS SDK get major UI update — your app quickly get into problems).</blockquote><h3>Criteria 4: Being platform up-to-date</h3><p><strong><em>Xamarin</em></strong><em> (1 point)</em> — Xamarin is using .NET. If there’s new version of Android support library — it must be wrapped to .NET. You need to wait for Xamarin team until is done. You are always at least one step behind target platform.</p><p><strong><em>Flutter</em></strong><em> (1 point)</em> — Flutter is a different world. It’s got it’s own view rendering engine. If there’s some cool new feature in the platform — you need to wait for Flutter update.</p><p><strong><em>React native</em></strong><em> (2 points) </em>— React native is always up-to-date as you’re using platform components together with JavaScript code.</p><p><strong><em>Kotlin/Native</em></strong><em> (2 points)</em> — Same as React… You’re using platform components together with Kotlin/Native code.</p><h3>Criteria 5: Average code sharing level</h3><p><strong><em>Xamarin</em></strong><em> (2 points)</em> — About 80%</p><p>You can share business logic, presenters, unit tests and part of UI. You still need to write platform specific services or view renderers (even if you’re using Xamarin Forms).</p><p><strong><em>Flutter</em></strong><em> (3 points)</em> — 90%</p><p>You can share practically everything. The chance you need to interop with Java or Swift is small.</p><p><strong><em>React native</em></strong><em> (2 points) </em>— About 80%</p><p>You can share business logic, presenters, unit tests and part of UI. You may still need to write platform specific services or views.</p><p><strong><em>Kotlin/Native</em></strong><em> (1 point)</em> — About 60%</p><p>You can only share business logic, presenters and unit tests. You still need to write views for both platforms separately.</p><blockquote>You’ll never be able to share 100% of your code. Android and iOS are different as a mobile platforms. Sooner or later you’ll need to write platform specific behavior. Kotlin/Native seems to be definite loser here but that’s the price for being 100% flexible.</blockquote><blockquote>The creators of Kotlin/Native are not trying to create another common-denominator solution. Android UI is different than iOS and Kotlin/Native is ready for that.</blockquote><blockquote><strong>Please also note that Kotlin/Native is not officialy released yet. After final release the level of shared code will increase. Let’s assume someone will create library for sharing the view tree (it’s not so hard to do it actually)… suddenly the amount of shared code will raise to 80%. And it’s only going to be better from here!</strong></blockquote><h3>Criteria 6: How easy it is to write platform specific code (code interop)?</h3><p><strong><em>Xamarin</em></strong><em> (1 point)</em> — You need to write missing 20% of your code. Your C# knowledge won’t help you in that. You still need to know the details of Android and iOS development. What’s more you need to know how platform specific invocation is wrapped in .NET (like instead of using View.GONE you need to use sth like that:<a href="https://stackoverflow.com/questions/36829454/xamarin-android-hide-a-textview"> https://stackoverflow.com/questions/36829454/xamarin-android-hide-a-textview</a>). There’s practically no direct interop between Java/Swift and C#.</p><p><strong><em>Flutter</em></strong><em> (2 points)</em> — You need to write missing 10% of your code. You’re able to use interop between Dart and Java/Swift but it’s limited to primitive types and simple messaging (platform-channels). Things get ugly really soon but at least you are able to do it.</p><p><strong><em>React native</em></strong><em> (2 points) </em>— You need to write 20% of your code.</p><p>To do that you still need to know the details of Android and iOS development.</p><p>It’s a little bit better than Xamarin as you can mix React views with native ones. The interop is still limited to primitive types and there’s a lot of boilerplate code to communicate JavaScript with native world.</p><p><strong><em>Kotlin/Native</em></strong><em> (3 points)</em> — Code interop between Java/Swift and Kotlin are fundamentals of Kotlin/Native.</p><p>You’ve even got special language keywords like “expect” and “actual” to mix your code with other platforms.</p><blockquote>Here’s another example when framework fundamentals are the most important. Kotlin/Native is definite winner here. You’re not limited to primitive types and interop is on much higher level.</blockquote><h3>Criteria 7: Reusing platform specific libraries</h3><p><strong><em>Xamarin</em></strong><em> (1 point)</em> — You need to wrap java libraries and use the wrappers. In practice it’s barely working (I was able to wrap only one “.jar” of 20 — for the rest I got compile errors or dependency problems).</p><p><strong><em>Flutter</em></strong><em> (2 points)</em> — You can create platform specific package with platform specific dependencies and communicate with Dart using platform-channels. You’re still limited to primitive types.</p><p><strong><em>React native</em></strong><em> (3 points) </em>— No limits.</p><p><strong><em>Kotlin/Native</em></strong><em> (3 points)</em> — No limits.</p><blockquote>Reusing platform specific libraries criteria is something you will never know how important it may become until you dive into the platform. Xamarin has bad fundamentals and you’ll quickly get into trouble. Flutter is a little bit better as code interop is possible. For Kotlin/Native or React: you’re good to go.</blockquote><h3>Criteria 8: Hardware requirements</h3><p><strong><em>Xamarin</em></strong><em> (2 points)</em> — you can develop on Windows or Mac. It’s up to you but Visual Studio on Windows + ReSharper are more efficient than Visual Studio for Mac. You can install build server on Mac machine and stream it to Visual Studio on Windows.</p><p><strong><em>Flutter</em></strong><em> (1 point)</em> — you definitely need to have Mac to run iOS builds.</p><p><strong><em>React native</em></strong><em> (2 points)</em> — for simple proof of concepts you may use <a href="https://expo.io/">https://expo.io</a>. For professional development you still need to have Mac (to debug iOS emulator).</p><p><strong><em>Kotlin/Native</em></strong><em> (1 point)</em> — you definitely need to have Mac to run iOS builds.</p><blockquote>For cross-platform mobile development Mac is definitely a better choice.</blockquote><h3>Criteria 9: How framework is dealing with Android development?</h3><p><strong><em>Xamarin</em></strong><em> (1 point)</em> — You stick to Visual Studio (or Visual Studio for Mac known before as MonoDevelop). The only support you have is for writing and refactoring C# code and XAML. When you need to touch some of Android XML files (resources, manifests) you get no support. There’s dedicated designer for Android but comparing to what we got in Android Studio it’s just embarrassing.</p><p><strong><em>Flutter</em></strong><em> (2 points)</em> — You need to use IntelliJ IDEA with Flutter and Dart plugins. In some cases you need to open Android Studio and work with both IDEs at once. There’s no support for designing UI interface. You need to use online designers and copy the code back and forth.</p><p><strong><em>React native</em></strong><em> (2 points) </em>— You need to use Android Studio for Android part and Visual Studio Code (or different JavaScript IDE). There’s no support for designing UI interface in both IDEs. You need to use online designers and copy the code back and forth. You also need to be connected to Chrome.</p><p><strong><em>Kotlin/Native</em></strong><em> (3 points)</em> — For Android you’re using multi platform projects on IntelliJ IDEA (CE or IntelliJ IDEA Ultimate) with Android plugin. Docs says you can also use Android Studio.</p><p>As you are using native toolset, you’re getting full IDE support: from code building, refactoring to user interface design.</p><h3>Criteria 10: How framework is dealing with iOS development?</h3><p><strong><em>Xamarin</em></strong><em> (3 points)</em> — You need to use same Xamarin IDE but iOS development feels much better. You have designer support for UI controls (you don’t need to create outlets as tool creates special partial class with bindings for you).</p><p><strong><em>Flutter</em></strong><em> (2 points)</em> — The situation looks very similar as for Android. For most of the time you’re using IntelliJ idea with dedicated flutter and Dart plugins. Sometimes you need to switch to XCode do write iOS specific code.</p><p><strong><em>React native</em></strong><em> (2 points) </em>— There’s nothing new comparing to Android. You need to use XCode and something else for JavaScript. To debug JavaScript you also need to use remote JS debugging (i.e. Chrome).</p><p><strong><em>Kotlin/Native</em></strong><em> (2 points)</em> — You work with both IDEs at once: IntelliJ IDEA and Xcode. Building multi platform project creates an apple framework that you’re free to use in Swift like any other external framework.</p><p>JetBrains are also offering Kotlin/Native plugin for AppCode so you can write Kotlin and Swift in one product (but you still need to use XCode for designing views).</p><blockquote>As Xamarin is terrible for Android it’s pretty cool for iOS development. The problem is that if you’re writing cross platform you must use Android tooling as well.</blockquote><blockquote>For Flutter, React and Kotlin/Native we’ve got a tie. You need to mix between IDEs.</blockquote><h3>Criteria 11: How easy it is to find developer on the market?</h3><p><strong><em>Xamarin</em></strong><em> (2 points)</em> — You need somebody who knows C#, Android SDK, iOS SDK, Java or Kotlin and Swift. At least there’re people familiar with C# (yes Dart… I’m referring to you :))</p><p><strong><em>Flutter</em></strong><em> (1 point)</em> — You need somebody who knows Dart, Android SDK, iOS SDK, Java or Kotlin and Swift.</p><p><strong><em>React native</em></strong><em> (2 points) </em>— You need somebody who knows JavaScript, Android SDK, iOS SDK, Java or Kotlin and Swift. Everybody likes JavaScript… right?</p><p><strong><em>Kotlin/Native</em></strong><em> (3 points)</em> — You need somebody who knows Android SDK, iOS SDK, Kotlin and Swift.</p><blockquote>For Xamarin or React native you’re looking for 3 people in one person. In practice you need to train Android or iOS developer in C#/JavaScript or vice-versa. In best case you end in at least two teams. JavaScript and C# are definitely more popular than Dart*. That’s why Flutter got less points.</blockquote><blockquote>For Kotlin/Native you just need to take Android developer (probably knowing Kotlin already) and teach him/her Swift and iOS SDK. It’s much easier. Kotlin* is the second most loved language according to stack overflow survey and that’s a big bonus. You can also take iOS developer willing to learn Kotlin**.</blockquote><p>* <a href="https://insights.stackoverflow.com/survey/2018/">https://insights.stackoverflow.com/survey/2018/</a></p><p>** Yes, I know… the “real” iOS developer never will never-ever touch the robot until it’s blessed by Apple :P</p><h3>Criteria 12: Maintenance</h3><p><strong><em>Xamarin</em></strong><em> (1 point)</em> — If it’s so hard to find Xamarin developer on the market we shouldn’t expect the code to be written perfectly.</p><p>You will find code which is C# perfect (probably written by .NET developer) but not fitting to mobile platform. You can also find good mobile platform usage terribly coded in C#.</p><p>For Android you get practically no support from the tools (so dealing with unused resources or badly written xml’s are most common issue in Xamarin).</p><p>The framework is too complex. Apps sometimes crashes of MONO SIGSERV or out of memory errors. Sometimes you need to revert the code line by line to see what’s breaking the flow.</p><p>The good news is that you can debug all code in one IDE.</p><p><strong><em>Flutter</em></strong><em> (1 point)</em> — Flutter loves Dart. It loves Dart so much so even the views are created in Dart.</p><p>It seems to be good in the beginning but you need to be really careful when coding. If you take just one shortcut, your code will soon become maintenance hell. It’s also impossible to share the work between developers and UI designers like you can do in other platforms so don’t expect technical designer will help you out with views. You’ll also need to use view-debugging dumps to analyse what’s going on (and that is not pleasant task).</p><p><strong><em>React native</em></strong><em> (1 point) </em>— React native is addressed to web developers doing their first steps in mobile. That’s resulting in same consequences like we have in Xamarin. People working in React native projects got mixed skills and not always are able to code fluently in that mix.</p><p>Thankfully there’s possibility to debug JavaScript remotely otherwise it would be maintenance hell.</p><p><strong><em>Kotlin/Native</em></strong><em> (2 points)</em> — Kotlin/Native is using all the goodness you have in Android Studio/IntelliJ IDEA and XCode. You’ve got full access to view inspectors, profilers and everything else).</p><p>You even have tooling for writing common unit tests across all platforms.</p><p>The only thing that’s not clear to me is how to debug Kotlin code in XCode. It may be impossible just yet but AppCode plugin will support dual Kotlin/Swift debugging.</p><blockquote>There’s nothing for free. Cross-platform development is always harder than regular one.</blockquote><h3>Criteria 13: Performance</h3><p><strong><em>Xamarin</em></strong><em> (1 point)</em> —Xamarin performs well on iOS but terrible on Android.</p><p>Android was designed to work on budget devices and adding .NET framework virtual machine to the stack is not helping. Some old phones even need splash screens to load everything.</p><p><strong><em>Flutter</em></strong><em> (3 points)</em> — Flutter is using Vulcan in the same way as game engines.</p><p>If you follow the Dart performance rules (eg. isolates) your UI will perform really fast (almost 60 fps).</p><p><strong><em>React native</em></strong><em> (1 point) </em>— React apps need to run a heavy JavaScript machine in the background. Even official docs says that you need to pay attention to balance the workload between native part and JavaScript calculations. In the end, the apps got tendency to lagging.</p><p><strong><em>Kotlin/Native</em></strong><em> (2 points)</em> — Kotlin/Native compiles to native code or JVM. The goal of the framework was to be as fast as native platform… and it is.</p><blockquote>Flutter is the winner here thanks to its unique approach to build the views in Vulcan.</blockquote><h3>Criteria 14: Market ready</h3><p><strong><em>Xamarin</em></strong><em> (3 points)</em> — Xamarin is the longest time on the market. For a long time there was no vital competition for it.</p><p><strong><em>Flutter</em></strong><em> (1 point)</em> — Flutter is in release-candidate phase. It’s still hard to find good examples on how to use it but Google is keeping an eye on that and documentation is improving every day. On Flutter page you may find some showcase apps but the numbers are not that impressive like Xamarin or React/Native.</p><p><strong><em>React native</em></strong><em> (2 points) </em>— React native is supported by Facebook and React community for a few years. The framework is becoming a good alternative to Xamarin.</p><p><strong><em>Kotlin/Native</em></strong><em> (1 point)</em> — Kotlin/Native is also in release-candidate phase. Almost nobody knows about it as Google is mentioning Flutter more. It’s the newest player on cross-platform field.</p><h3>And the winner is…</h3><p>Not so fast… Let’s sum everything up!</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fsheetsu.com%2Ftables%2F284c489a32&amp;dntp=1&amp;url=https%3A%2F%2Fsheetsu.com%2Ftables%2F284c489a32&amp;key=a19fcc184b9711e1b4764040d3dc5c07&amp;type=text%2Fhtml&amp;schema=sheetsu" width="700" height="800" frameborder="0" scrolling="no"><a href="https://medium.com/media/fa9b3da3bc249849bcc4357672f8a6fe/href">https://medium.com/media/fa9b3da3bc249849bcc4357672f8a6fe/href</a></iframe><h3>There’s new sheriff in town</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nz1OSZOrj6cLD8_9K0Tb3A.jpeg" /></figure><p><em>Photo by </em><a href="https://unsplash.com/photos/dR77em3nyJY?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText"><em>Glen Carrie</em></a><em> on </em><a href="https://unsplash.com/search/photos/texas?utm_source=unsplash&amp;utm_medium=referral&amp;utm_content=creditCopyText"><em>Unsplash</em></a></p><p>Kotlin/Native is the winner because it got the best fundamentals from all cross-platform frameworks I’ve ever seen. The framework goal is to provide native performance with the most powerful interop features. You can mix Kotlin with Swift and even do cross-inheritance. Interop is just perfect comparing to the others. Kotlin/Native is not a common denominator solution. This framework is aware that Android and iOS are different and there’s no sense to combine UI on both platforms.</p><p>You still need to take into account that Kotlin/Native is in beta but even that I’m sure it still deserves the first place. Most developers (or at least 75,8% according to stack overflow) want to start coding with Kotlin. That will boost Kotlin/Native adoption soon.</p><blockquote>As you noticed I treated all criteria equally. You can use my article and apply your custom weight to things that are most important to you and choose your own winner.</blockquote><p><strong>Why it is so hard to create cross-platform framework?</strong></p><p>iOS applications are similar to desktop apps. Of course there are limitations but in general the app lives in memory (suspended or not… its state is preserved). Android apps are like distributed systems: activities, services and fragments live its own lifecycle coexisting with broadcasts, receivers, alerts and other system components. The truth is that Android developers have much harder life. That’s why cross-mobile framework must come from Android knowing its memory restrictions and architecture. The creators of Xamarin and React native seems to forget about that. Adding another virtual machine or JavaScript interpreter affects performance and overall user experience…</p><p>The Flutter is different. That’s the only framework having its own view rendering engine. The problem is that Flutter apps seem different and sometimes unnatural. There’s also no separation between code and user interface — that will impact maintenance as your app grows.</p><p>Kotlin/Native comes from Android and understands it’s restrictions. The idea is to build Android application and transplant some of the code to iOS — and that’s perfect, efficient and much better solution. After Kotlin 1.3 is officially released — adoption will grow rapidly and the amount of shared code will increase.</p><p>Thanks for reading! I hope this article will help you choose cross-platform framework for mobile.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fa45b8162c81" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>