<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Venkatesh Prasad</title>
    <description>The latest articles on DEV Community by Venkatesh Prasad (@excogitatr).</description>
    <link>https://dev.to/excogitatr</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F294739%2F727ab630-1b27-4ae8-a986-10a136986338.jpeg</url>
      <title>DEV Community: Venkatesh Prasad</title>
      <link>https://dev.to/excogitatr</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/excogitatr"/>
    <language>en</language>
    <item>
      <title>A Flutter app with Clean architecture + TDD + GraphQL + flutter_bloc + CodeCov + GitHooks + GitHub Actions (CI/CD)</title>
      <dc:creator>Venkatesh Prasad</dc:creator>
      <pubDate>Mon, 20 Apr 2020 17:56:05 +0000</pubDate>
      <link>https://dev.to/excogitatr/a-flutter-app-with-clean-architecture-tdd-graphql-flutterbloc-codecov-githooks-github-actions-ci-cd-506p</link>
      <guid>https://dev.to/excogitatr/a-flutter-app-with-clean-architecture-tdd-graphql-flutterbloc-codecov-githooks-github-actions-ci-cd-506p</guid>
      <description>&lt;p&gt;I apologize for bloating the title with terms. I have linked everything down below.&lt;/p&gt;

&lt;h2&gt;
  
  
  What?
&lt;/h2&gt;

&lt;p&gt;The app uses this amazing GraphQL &lt;a href="https://rickandmortyapi.com/"&gt;API&lt;/a&gt; to fetch the Rick and Morty TV show data. It includes Characters, Episodes and Locations of the show. There is more to it than the basic fetch with pages, but I chose to make the app simple and not the implementation. This is how the app looks&lt;/p&gt;

&lt;p&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--9gjxAUA4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/excogitatr/rick-and-morty-info/develop/assets/screen_1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--9gjxAUA4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://raw.githubusercontent.com/excogitatr/rick-and-morty-info/develop/assets/screen_1.png" alt="Screen 1" width="250"&gt;&lt;/a&gt;
&lt;/p&gt;

&lt;h2&gt;
  
  
  Why?
&lt;/h2&gt;

&lt;p&gt;Many companies nowadays (from startups to enterprises) are adopting flutter and apps can easily become complex when more than one person work on one app. And when that happens, In &lt;a href="https://martinfowler.com/"&gt;Martin Fouler&lt;/a&gt;'s words,&lt;br&gt;
“Any fool can write code that a computer can understand. Good programmers write code that humans can understand.”&lt;br&gt;
With this idea in mind, I wanted to demonstrate how to make a simple app in production grade (where it stands the test of time with multiple developers working on it or over-engineer it :P) and I migrated my code with the following "production level" implementations. &lt;/p&gt;
&lt;h2&gt;
  
  
  How?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;CI/CD with &lt;a href="https://github.com/features/actions"&gt;GitHub Actions&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Githooks to enusre clean commit and push

&lt;ul&gt;
&lt;li&gt;Pre commit formats with &lt;code&gt;flutter format&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Pre push checks the code with &lt;code&gt;flutter analyze&lt;/code&gt; and &lt;code&gt;flutter test&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;Linting style with &lt;a href="https://dart.dev/guides/language/effective-dart"&gt;Effective Dart&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Test coverage with &lt;a href="https://codecov.io/"&gt;Codecov&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Dependency Injection with &lt;a href="https://pub.dev/packages/injectable"&gt;injectable&lt;/a&gt; and &lt;a href="https://pub.dev/packages/get_it"&gt;get_it&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;Testing with &lt;a href="https://pub.dev/packages/mockito"&gt;mockito&lt;/a&gt; and &lt;a href="https://pub.dev/packages/bloc_test"&gt;bloc_test&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can find more "how" by directly going through the repo.&lt;br&gt;
&lt;/p&gt;
&lt;div class="ltag-github-readme-tag"&gt;
  &lt;div class="readme-overview"&gt;
    &lt;h2&gt;
      &lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--qF2jUiUG--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://practicaldev-herokuapp-com.freetls.fastly.net/assets/github-logo-6a5bca60a4ebf959a6df7f08217acd07ac2bc285164fae041eacb8a148b1bab9.svg" alt="GitHub logo"&gt;
      &lt;a href="https://github.com/excogitatr"&gt;
        excogitatr
      &lt;/a&gt; / &lt;a href="https://github.com/excogitatr/rick-and-morty-info"&gt;
        rick-and-morty-info
      &lt;/a&gt;
    &lt;/h2&gt;
    &lt;h3&gt;
      Made with Clean architecture + TDD + GraphQL + flutter_bloc + CodeCov + GitHooks + GitHub Actions (CI/CD) and finally with 💙
    &lt;/h3&gt;
  &lt;/div&gt;
&lt;/div&gt;


&lt;h2&gt;
  
  
  What now?
&lt;/h2&gt;

&lt;p&gt;Let's follow the best practices incorporated by &lt;a href="https://en.wikipedia.org/wiki/Robert_Cecil_Martin"&gt;unclebob&lt;/a&gt; in his books &lt;a href="https://www.goodreads.com/book/show/3735293-clean-code"&gt;Clean code&lt;/a&gt; and &lt;a href="https://www.goodreads.com/book/show/18043011-clean-architecture"&gt;Clean architecture&lt;/a&gt; and try to build an app that stands the test of time. I have created some &lt;strong&gt;good first issue&lt;/strong&gt;, feel free to make Pull Requests and close the issues. I have even created &lt;a href="https://en.wikipedia.org/wiki/Kanban_board"&gt;kanban board&lt;/a&gt; in github projects to track the issues. It will be a fun journey for all us.&lt;/p&gt;

&lt;h2&gt;
  
  
  Who?
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://github.com/unclebob"&gt;unclebob&lt;/a&gt; - For the infamous Clean Architecture)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/ResoDev"&gt;resocoder&lt;/a&gt; (Followed his style in Clean architecture)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/felangel"&gt;felangel&lt;/a&gt; (For his amazing state management solution)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://github.com/afuh"&gt;Axel Fuhrmann&lt;/a&gt; (For the Rick and Morty &lt;a href="https://rickandmortyapi.com"&gt;GraphQL API&lt;/a&gt;)&lt;/li&gt;
&lt;li&gt;Authors of all the packages I have used, who made our lives easier.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>dart</category>
      <category>architecture</category>
      <category>flutter</category>
      <category>tdd</category>
    </item>
  </channel>
</rss>
