<?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 Innocent Amadi on Medium]]></title>
        <description><![CDATA[Stories by Innocent Amadi on Medium]]></description>
        <link>https://medium.com/@tru2cent?source=rss-2ece039837f5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*LmWWfvh7Ncq8XCOa.</url>
            <title>Stories by Innocent Amadi on Medium</title>
            <link>https://medium.com/@tru2cent?source=rss-2ece039837f5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Tue, 24 Nov 2026 07:21:47 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@tru2cent/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[How to leverage styled components and css variables to build truly reusable components in React]]></title>
            <link>https://medium.com/fbdevclagos/how-to-leverage-styled-components-and-css-variables-to-build-truly-reusable-components-in-react-4bbf50467666?source=rss-2ece039837f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/4bbf50467666</guid>
            <category><![CDATA[styled-components]]></category>
            <category><![CDATA[react]]></category>
            <category><![CDATA[css]]></category>
            <dc:creator><![CDATA[Innocent Amadi]]></dc:creator>
            <pubDate>Thu, 19 Apr 2018 09:08:00 GMT</pubDate>
            <atom:updated>2018-04-19T09:53:21.099Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WGzJxb3UdEy58a4t8YcaDw.jpeg" /></figure><p>tl;dr:</p><ul><li>A truly reusable UI component requires no changes to adapt itself to its environment.</li><li>CSS variables are a way to set variables to be used in CSS stylesheets.</li><li>Styled Components is a library that allows you add CSS styles to a React component itself</li></ul><h3><strong>What makes a truly reusable component?</strong></h3><p>The word ‘reusable’ is used a lot in <a href="https://medium.com/@_alanbsmith/component-based-design-168811e0c4ab">component-based design</a>. The idea of writing a component once, then using it anywhere is efficient and follows the ‘<strong>D</strong>on’t <strong>R</strong>epeat <strong>Y</strong>ourself’ principle.</p><p>Typically at the beginning of a project we create shared components like buttons and panels. Let’s look at how a button is typically defined.</p><pre>.btn {<br>  color: tomato;<br>  background-color: #eee;<br>  border: 2px solid tomato;<br>  letter-spacing: 1px;<br>  font-weight: 700;<br>  border-radius: 5px;<br>  font-size: 1.8rem;<br>  padding: 10px 15px;<br>};</pre><p>Then we create variants of the same button.</p><pre>.btn.large {<br>  padding: 20px 30px;<br>  font-size: 3rem;<br>}</pre><pre>.btn.small {<br>  padding: 5px 10px;<br>  font-size: 1.4rem;<br>}</pre><p>The button component end up becoming something like this:</p><pre>const button =&gt; ({ styles }) =&gt;<br>  &lt;button class={`btn ${styles}`}&gt;<br>    Awesome button<br>  &lt;/button&gt;</pre><p>Now you can add other CSS classes to the button without stress.</p><p>Everything is going smoothly. Then the project requires you to make a promotional banner. The call-to-action on it should be large but with a bit less padding. Also the color should be aqua green. No problem. You whip up your editor and write:</p><pre>.promotion .btn {<br>  padding: 15px 20px;<br>  color: aquagreen;<br>  background-color: white;<br>}</pre><p>You have a nice promotion button. The Product Manger calls. This promotion button is to be used in two banners, one would require the inverted version of your button. Piece of cake. Editor out.</p><pre>.promotion .btn.inverted {<br>  color: white;<br>  background-color: aquagreen;<br>}</pre><p>The inverted banner is to be used in the sidebar bar and the header. The sidebar button should almost cover the width of the sidebar. You end up with a button component that looks like:</p><pre>&lt;button class=“sidebar promotion btn inverted large”&gt;<br>  Awesome button<br>&lt;/button&gt;</pre><p>Play this a few months forward. It quickly gets to a time you have no idea what else would break if you tweak the .promotion.btn property even the slightest.</p><p>To get around this developers add classes, rarely change and almost never subtract. Very quickly a simple button becomes host to a long list of classes. See how CSS often becomes a nightmare to maintain years into a project?</p><p>Let’s get back to the button. Can we say the button component itself is truly reusable?</p><blockquote>A truly reusable UI component will require no changes to the component itself to adapt it to its surroundings.</blockquote><p>You should be able to literally copy and paste the button code from sidebar to header and it just … works!</p><p>To achieve this level of adaptability, we’ll build on principles from Glen Maddern’s 2016 talk on <a href="https://www.youtube.com/watch?v=XR6eM_5pAb0">The future of reusable CSS</a>.</p><blockquote>An element shouldn’t set its width, margin, height and color. These attributes should be set by its parent(s).</blockquote><p>This concept isn’t new in itself. At the time of the talk however it wasn’t very practical to me for two reasons:</p><ol><li>CSS variables weren’t widely supported across browsers. Polyfilling just didn’t work.</li><li>Adding a ‘style’ prop to pass on width, margin, height and color stops being a very attractive proposition when it has to be done for every adaptable component, every time.</li></ol><p>It’s 2018. CSS variables boasts of <a href="https://caniuse.com/#feat=css-variables">over 80% browser adoption</a>. Add styled components to the mix and we have a truly adaptable component.</p><h3>What are CSS variables?</h3><p>From <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/Using_CSS_variables">Mozilla docs</a>:</p><blockquote><strong>CSS variables</strong> are entities defined by CSS authors that contain specific values to be reused throughout a document. They are set using custom property notation (e.g. <strong>— main-color: black;</strong>) and are accessed using the <a href="https://developer.mozilla.org/en-US/docs/Web/CSS/var">var()</a> function (e.g., color: <strong>var( — main-color)</strong>;) .</blockquote><p>To keep things simple, see css variables as similar to good old SASS variables written with a ‘ — ’ prefix to let CSS know it is a variable. Let’s set a CSS variable — primary-color on the promotion banner and define a border with it.</p><pre>.promotion {<br>  --primary-color: aqua green;<br>  --bg-color: white;<br>  /* some other style rules*/<br>  border: 1px solid var(—primary-color);<br>}</pre><p>Yeah, boring right? Hey, remember our guidelines for building reusable components? An element shouldn’t set its own width, margin, height and color. Implementing this guideline is where CSS variables really begin to shine. Let’s modify the button style rules to obey these principles.</p><pre>.btn {<br>  /* set fallback defaults in case the CSS variables aren&#39;t set */<br>  --btn-fg: var(--primary-color, tomato);<br>  --btn-bg: var(--bg-color, #eee);<br>  --btn-font-size: var(--font-size, 18px);<br>  color: var(--btn-fg);<br>  background-color: var(--btn-bg);<br>  border: 2px solid var(--btn-fg);<br>  letter-spacing: 1px;<br>  font-weight: 700;<br>  border-radius: 5px;<br>  font-size: var(--btn-font-size);<br>  padding: 10px 15px;<br>}</pre><p>Here we set the color to expect the primary-color variable to be set from a parent element (or grandparent, somewhere up the hierarchy tree). When setting the button CSS variables, we add default values just in case a variable is never set by a parent. Adopting this ‘fallback’ practice allows you make as many properties as you want adaptable to parent elements while still being able to use them on their own.</p><p>With our CSS variables approach, we can do away with defining multiple variations of buttons. The parent would control the button’s look and feel.</p><h3>What are styled components?</h3><p>If you have no idea what styled components are, it’s okay to do some reading up <a href="https://www.styled-components.com/">on their website</a> before coming back here.</p><p>Styled Components is a library that allows you add CSS styles to a React component itself. I’m sure it’s used in other libraries, but this post covers React usage. The style rules are written as close to CSS as possible. Styled components even allows SASS-like nesting.</p><p>To convert our button to a styled component, copy the rules defined as .btn, then modify the button component:</p><pre>import React from &#39;react&#39;<br>import styled from &#39;styled-components&#39;</pre><pre>const StyledButton = styled.button`<br>  color: var( — primary-color);<br>  background-color: #var( — bg-color, #eee);<br>  border: 2px solid var( — primary-color);<br>  letter-spacing: 1px;<br>  font-weight: 700;<br>  border-radius: 5px;<br>  font-size: var( — btn-font-size, 18px);<br>  padding: 10px 15px;<br>`</pre><pre>export const Button = (props) =&gt; &lt;StyledButton {…props} /&gt;</pre><p>So what’s the big deal? How is it different from me declaring inline styles?</p><ol><li><strong>We do away with style names</strong>. Remember the nightmarish style names problems we explained at the beginning of this article? Styled-components take care of making sure your class names are unique by creating a hash out of the style rules themselves. You never have to worry about what class names your component ends up having.</li><li><strong>We retain the succinctness of writing css</strong>. Writing backgroundColor with <a href="https://facebook.github.io/react-native/docs/stylesheet.html">react stylesheet</a> never felt natural anyways 🙂</li><li>We retain the ability to use CSS variables. CSS variables still work down the components hierarchy.</li><li>We write SASS-like CSS. It might be difficult to completely do away with classes when working with CSS. I see this as a good thing though. The CSS problem have never been with the classes declared on bootstrap or materialize, but arise over time as developers continue to target, modify and add to these classes. With styled-components you can still target classes hierarchically as you would do in SASS. This lets you modify the look and feel of children elements but in a scoped domain, so damage is very easily managed.</li></ol><h3>How do we use CSS variables with styled components to make truly reusable components?</h3><p>To make for good contrast, let apply button styles using StyleSheet.create({}) and then write the button in a way that we can pass in inline styles to override the default.</p><pre>import React from &#39;react&#39;</pre><pre>export const PromoBanner = () =&gt; {<br>  const btnStyles = {<br>    color: acquagreen,<br>    border: 1px solid acquagreen,<br>    backgroundColor: white,<br>    fontSize: 18px<br>  }</pre><pre>  return (<br>    &lt;div class=“promotion”&gt;<br>      &lt;Button styles={btnStyles}<br>              btnText=“Buy now”/&gt;<br>    &lt;/div&gt;<br>  )<br>}</pre><pre>export const Button = ({ styles, btnText }) =&gt;<br>       &lt;Button style= {styles}&gt;{btnText}&lt;/Button&gt;</pre><p>This is completely valid since the ability to write reusable components lie more in where the rules are applied than how. Major advantages styled components has over <a href="https://facebook.github.io/react-native/docs/stylesheet.html">React StyleSheets</a> are the ability to write CSS-like, sass compliant rules and the ability to use css variables. Notice we had to set color and border with the same color separately? Also if the button is not directly rendered under promo (a grand or great-grand child) then we would have to keep passing down the btnStyles props until the button gets it.</p><p>Let’s modify our promotion panel to use our improved styled component button leveraging its css variables.</p><pre>import React from ‘react’<br>import Button from ‘./Button’<br>import styled from ‘styled-components’</pre><pre>const StyledPromoBanner = styled.div`<br>  --primary-color: aquagreen;<br>  --bg-color: #eee;<br>  --btn-font-size: 18px;<br>  /* other style rules */<br>`</pre><pre>export const PromoBanner = () =&gt;<br>  &lt;StyledPromoBanner&gt;<br>    /* other components */<br>    &lt;Button&gt;Buy now&lt;/Button&gt;<br>  &lt;/StyledPromoBanner&gt;</pre><p>See what’s going on here? We’re able to reuse our button without directly modifying the button itself. It reads like basic CSS, we don’t need to pass styles around and we can target specific variables the button will use. This allows us make use of the button without any modification to the button itself, making it a truly reusable component in this sense.</p><h3>What could improve in future?</h3><ol><li>As at the time of writing this, styled components have no support for lighten() or darken() SASS functions that are used to tweak a specific color in a way that still returns a complementary color. You could use the <a href="https://github.com/styled-components/polished">polished</a> library to achieve the same functionality though.</li><li>CSS variables aren’t yet supported in Opera Mini and Samsung Internet v4 (version 6.2 fully supports it though). So if you care a lot about your Opera Mini users, you should definitely include regular style rules as fallbacks when using CSS variables. Also Microsoft Edge 15 <a href="https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/12143022/">doesn’t evaluate nested calculations</a> for css variables and crashes when <a href="https://developer.microsoft.com/en-us/microsoft-edge/platform/issues/11676012/">animations use css variables</a>. The good news is the Edge issues have already been fixed for newer versions of Edge.</li></ol><p>Edit: Max Stoiber, one of the creators/maintainers of styled-components just told me <a href="http://polished.js.org/">polished.js</a> is actually the official solution for SASS-style helpers like lighten() and darken() .</p><h3>Max Stoiber on Twitter</h3><p>@tru2cent @glenmaddern Yep, it is-we made it specifically to get support for those Sass-style helpers in CSS-in-JS, that&#39;s the whole point!</p><h3>The bigger picture.</h3><p>We already see this design concept scale up to entire systems in Microservice architecture. The guiding principle I use is to build the component or system in a way that it could be broken off into a stand-alone library or Microservice very easily if we choose to.</p><p>Admittedly this doesn’t play too well with the current extremely popular MVC architecture. However the fact that we’ve been able to adopt it successfully in the frontend tells us it is already happening.</p><p>As component-based design continues to gain on page-based design on the frontend, we would continue to see better ways to make components more reusable.</p><h3>Conclusion</h3><p>Hopefully huge monstrous CSS files would become a thing of the past, along with confusing class names that become difficult to manage.</p><p>Have you tried out styled-components, CSS variables or a combination of both? Is there an angle I might have missed? I’m looking forward to reading what your experience was, what you learnt, what you loved and what you didn’t.</p><h4>Further reads</h4><p><a href="https://www.youtube.com/watch?v=XR6eM_5pAb0">Glen Maddern: The Future of Reusable CSS</a></p><p><a href="https://www.youtube.com/watch?v=MT4D_DioYC8">Glen Maddern: The Road to Styled Components: CSS in component-based systems</a></p><p><a href="https://medium.com/@_alanbsmith/why-we-use-styled-components-at-decisiv-a8ac6e1507ac">Alan B. Smith: Why we use styled components at Decisiv</a></p><p>Thanks to the <a href="http://fb.com/groups/devclagos">Developer Circles Lagos </a>Writers’ Corner for the proof-reads.</p><p>If you enjoyed reading this, help others find it too by clicking on the 💚. Thank you! 🙂</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4bbf50467666" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fbdevclagos/how-to-leverage-styled-components-and-css-variables-to-build-truly-reusable-components-in-react-4bbf50467666">How to leverage styled components and css variables to build truly reusable components in React</a> was originally published in <a href="https://medium.com/fbdevclagos">Facebook Developer Circles Lagos</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Developer Circles Lagos: 2017 in retrospect]]></title>
            <link>https://medium.com/fbdevclagos/developers-circle-lagos-2017-in-retrospect-872d352ccb1f?source=rss-2ece039837f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/872d352ccb1f</guid>
            <category><![CDATA[developer-circles-lagos]]></category>
            <category><![CDATA[developer-circles]]></category>
            <category><![CDATA[featured]]></category>
            <category><![CDATA[facebook-developer]]></category>
            <dc:creator><![CDATA[Innocent Amadi]]></dc:creator>
            <pubDate>Sun, 31 Dec 2017 16:26:31 GMT</pubDate>
            <atom:updated>2018-01-15T18:18:52.378Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2vOmZKs78zU_OL_IPjzkpw.png" /></figure><p>2017 started bleak. In January, a tomato plague rendered the commodity as scarce as gold. Fall in global oil prices pushed the value of the naira down by over 250%. The ripple effect is definitely another blog post. Today we look at the year for the <a href="http://fb.com/groups/devclagos">Developers Circle Lagos</a></p><h4>tl;dr</h4><p>In 2017, the Developers Circle Lagos</p><ul><li>grew in members by &gt; 700%</li><li>held 14 tech events with 1166 signups to attend.</li><li>increased online engagement by ~40%</li><li>set over 20 people on the path towards becoming AI experts</li></ul><h3>Events this Year</h3><h4>Bot Party: 4th of March</h4><p>The year 2017 kicked off with the bot challenge by Facebook. The challenge was to create bot solutions in three categories — Gaming and entertainment, Productivity and Utility, and Social Good.</p><p>We needed to help members as they learn how to build bots. So we threw a bot party!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*nz8R2acSFEkwaAhjlHESWA.jpeg" /><figcaption>Spoiler: This group didn’t win. Lol</figcaption></figure><p>76 people signed up, 51 people attended. Oscar Oranagwa led us through a step-by-step coding session on how to create bots for messenger. The day ended with at least 10 people showing off working bots!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*I53f933b79FO4H4B3Ac5JQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*UmgGtaiQHHwzhJzd4Xov1g.jpeg" /></figure><h4>Facebook F8 Conference (18th — 19th April)</h4><p>For the first time, we gathered in CCHUB, Sabo to join live the Facebook F8 Conference that was taking place in California!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*LhaN5N7xNr6pb2RGrvDdxg.jpeg" /></figure><p>It was great to be able to share ideas, hear thoughts and opinions as Facebook unveils its 10 year plan and announced updates to the Messenger API, augmented reality, open source among other things.</p><p>And Facebook Developers Circle Lagos got a shout out. It was HUGE !</p><h3>Iyinoluwa Aboyeji on Twitter</h3><p>Innocent is world famous!!!!</p><h4>React Summit 1.0: 6th May 2017</h4><p>Victor Oche, of HelpThinkers Inc., led this. The React summit was our first attempt at building a React community. Sessions were led by Omonori Jesmine (Hands-on introduction to React Native) and Prosper Otemuyiwa (Better authentication for React apps). 64 people signed up, 85 attended.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4U6vDdBX9CGVDHetv3N6Fg.jpeg" /><figcaption>At Hotels.ng. Can’t find yourself? Not to worry. I can’t find me too.</figcaption></figure><h4>GraphQL Meetup (3rd June)</h4><p>Organized by Akinjide Bankole, Oluwatobi Owolabi, Daniel Osineye, Ezechukwu James and Ademola Adegbuyi. This meetup introduced us to what GraphQL was about and how to port an existing app from REST to GraphQL. Shoutout to Ademola for the talk and sample app repository.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6-i-gj50qwwv_jDj01j4yA.jpeg" /><figcaption>Jesmine on the extreme left, Oscar on the extreme right. Figure out the rest</figcaption></figure><h4>Developers Circle Lagos Women In Tech Meetup (29th July)</h4><p>This was the first women-centric event held by the Circle. It was organized by Alimi Eyitayo, Egbelaje Victoria, Ruth Sobande, Ayeni Blessing and Tosin Kay. 56 women signed up to attend, 29 ladies and 7 guys attended.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*5qd9x3aSejOKXxAMD5bQ5g.jpeg" /><figcaption>To cut this cake became an issue. Felt desecrating.</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TXCsJvg7u355JnvOp6NncA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wgaxUAyWSIuAt03CBAlxGw.jpeg" /></figure><p>It was our first meeting with <a href="https://medium.com/u/1b1e6022a465">Nkiruka Ilewi</a>, who would go ahead to become a Community Manger for the Developers Circle Lagos and also chief host of the careers in tech series.</p><h4>Launch of the Developers’ Circle Uyo [Guest Event] (14th September)</h4><p>The Circle in Uyo kicked off with a bang and have gone ahead since to grow to over five times their starting numbers. Huge props to leads Hanson Johnson, Ekene Christian and Edidiong Asikong.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uE4GhhTs5Ao1-jSoW-rLKw.jpeg" /><figcaption>Developers Circle Uyo Launch. They raised the bar! With their hands!</figcaption></figure><h4>Women In Tech Owerri [Guest Event] (23rd September)</h4><p>Ugochi Amako partnered with us and held a Women in Tech event in Owerri. Over 60 women expressed interest, 23 women showed up and we got enough pictures and testimonies to suggest they had pretty inspiring moments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*FM5l32W-gRjY2OVMniPZxQ.jpeg" /><figcaption>Ugochi Amako and crew: Women in Tech Owerri</figcaption></figure><h4>Nigerian Women in Tech Meetup (3rd October)</h4><p>Jennifer Fong, Barbara Mbanefo, Cynthia Obioha and other really amazing women working in Facebook were coming to Lagos so we seized the opportunity to hold a <a href="https://nigerianwomenintech1.splashthat.com/">Women in Tech event</a>. I still have my jottings from that event. It was deep.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*vAIUmorl_h8LEVFOY7ZOLA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wuTmWeGYVKPweOBS3py6CQ.jpeg" /><figcaption>Attendees at a group photo</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u0IVivTLapjvJzxFMsP6vA.jpeg" /><figcaption>The facebook team at the Women In Tech Event</figcaption></figure><h4>Developers Circle Lagos Community Dinner (3rd October)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6UUhByhO2P5xxFdZ68bBvQ.jpeg" /></figure><p>The first of its kind we’ve had. The Facebook team had the chance to meet with members of the developers circle in a relaxed setting, arrested by an army of assorted Nigerian dishes. Proud Dzambukira (Zimbabwean) finally understood why Jollof was such a big deal. Barbara kept dropping chicken-inspired nuggets of wisdom.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IZozX6NEPckJxyaUboe0CA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rHiMrnw3sob4PbVqZBVvFA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ivk1tvA2qnSyDtxVM-CE9g.jpeg" /></figure><h4>Developer Circles Leads Masterclass [Guest Event] (5th — 11th October)</h4><p>A section of the leads of Developer Circles in Sub-saharan Africa converged in Nairobi, Kenya for intensive sessions on Facebook Analytics, React and React Native and Messenger bots. This sessions were taken by Rod Rolan who leads Developers Circle Toronto, Canada. The bonding experience was better experienced than heard. There was a lot of learning to be shared. The biggest learning of all: Our countries, people and cultures aren’t so different after all.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/960/1*274BQD7fdNEqqsq_G9Y0dw.jpeg" /><figcaption>Developers Circles Leads (Subsaharan Africa) in Nairobi, Kenya</figcaption></figure><h4>React Summit 2.0 — The Complete React Developer (21st October)</h4><p>With 485 people expressing interest to attend, this event caught 571% more attention than the first. It was organized by Seyi Adeleke, Vanessa Ejikeme, Chinedu Daniel, Tolulope Duyile, Kingdom Orjiewuru and Bolaji Olajide.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YajapcqicS5tzxBIPFbLQg.jpeg" /></figure><p>Boluwatife, Ohans Emmanuel, Precious Madubuike, Kingdom Orjiewuru and Innocent Amadi delivered on different talks, while Tolulope Duyile and Tejumade were our hosts for the day.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*FM_jF7NydfJXDg3tQsrRMw.jpeg" /><figcaption>React Summit 2.0: The complete React Developer</figcaption></figure><p>The organizing crew delivered an experience that made us agree to make React Summits an annual React Conference. With the React Community growing in the sure hands of Anayo Azuike, Ugbala Valentino, Sheddy Nathan and Ademola Adegbuyi, I’m looking forward to how next year would react.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZuTbvP8RZ8pFzM78WzoVcg.jpeg" /><figcaption>React Summit 2017: The Planning Team</figcaption></figure><h4>Developers Circle Community Challenge Pitch Day (4th November)</h4><p>Facebook rolled out a Community Challenge: build solutions that helps developers improve their craft, get things done or helps developers connect. We came together on the pitch day to listen to people with ideas and then formed teams around viable ideas.</p><p>86 people signed up, 95 attended, 10 teams were formed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*yZEzE4IGzEBr0hN0JBB-Cw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*dtgHzVWaJBhXXwMJCEOzww.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Btnvcm6W111y-PY3Kjanjg.jpeg" /></figure><h4>AI Masterclass — Neural Networks (8th November)</h4><p>This class was taken by Timothy Lacroix in Paris, France and attended by Developer Circles all over the world. It kicked off the Developers Circles AI Community here in Nigeria.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8Mcada1ZO7xcxYDYO5s0YA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2vB99TPVGdiCnN7pFSnNsw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tXVV20bYwcLYdALVgFryDg.jpeg" /></figure><h4>Community Challenge Hack Day (18th November)</h4><p>For two weeks since the teams formation on the 4th of November, teams grilled and grinded to have working products to demo on the Hack Day. When the day came, some people showed up with increased love for Redbull. Eight software solutions were demoed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2o-2uGVeIMlpokjr7Y6Bfg.jpeg" /></figure><p>Thankfully, Ike Eze and Ovo Emorhorkpor (VCs from Beta Ventures) and Ayodeji Balogun (CTO of Terragon Groups) joined us. They dug deeper into the ideas, revealed valuable insights to the rest of us, picked three promising ideas and offered mentorship support and sponsored hosting space throughout development. When the apps prove viability, the next stage will roll out.</p><p>You’ll hear more about Startups Discovery in 2018.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*seTVeDx_DhKDKzleXZpfyw.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*IMSGFU040F3s1UvvulolTQ.jpeg" /></figure><h4>AI Masterclasses on Speech 101 and Computer Vision (23rd November, 30th November)</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ehd2pw03oy396hF9i2rTjQ.jpeg" /></figure><p>The rest of November saw AI on the front seat. Introductory classes on Speech and Computer Vision saw us forming study groups and distributing more materials for further reading, learning and practice.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DVd-bSC6B6uU2nGyKaGnCQ.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*-M4VPPCZuYPjIxR_IagGVw.jpeg" /></figure><p><strong>AI Masterclasses on Natural Language Processing and Convoluted Neural Networks (8th December, 18th December)</strong></p><p>Yes, it was like that. All Artificial Intelligence until the end of the year. I discovered my love for Data Science and Machine Learning. So did at least 20 other people. So we’ll wait and see what 2018 brings.</p><p>The AI Community is led by Peculiar Ediomo-Abasi, Ace Falobi, Calistus Igwilo, Ifeanyi Igwegbe, Kpongette Augustine and Seun Agbeye.</p><h3>Members</h3><h4>~700% increase in membership in 2017</h4><p>We started the year 2017 just scratching <strong>1000 members</strong>. At the time of writing this article, we are <strong>7296 members</strong> strong. Many new members find us by either search, offline events or recommendation by friends.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d7GhPfHZ73nwul8CjRIxQA.png" /></figure><p>If you joined us this year, thanks for contributing in every way you did to our community.</p><h4>[Only] 4.6% Increase in members gender diversity</h4><p>We started the year with ~5.8% female members and ended with ~10.4% female members. Looking at these numbers at the very end of the year, I’m realizing we never really set defined targets on exactly how much gender diversity we want to have.</p><p>To move our push for gender diversity in the group from a dream to a goal, we’ve empowered the Women in Tech arm of the Developers Circle to champion this. Looking forward to what they roll out in the first quarter of 2018.</p><h3>Online Engagement</h3><h4>Overall</h4><p>Even with just ~1000 members, engaging online was a bit difficult at the beginning of the year. Active members average below 20% steadily. The general excuse was “Developers don’t comment on stuff on Facebook that often”. Good thing we didn’t listen. Bleh.</p><p>At the end of 2017, 59.6% of 7296 members are engaging. Special shoutouts to members who just won’t keep what could help/inspire/educate others to themselves. You guys are amazing!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*deIk4yTQhHM8wQn4diZJng.png" /></figure><h4>Female engagement</h4><p>This is difficult to measure. Facebook Analytics just didn’t help. However for the first time in our history, we’ve had female members making up 30% of the top 10 posts for three consecutive months! Duffed hats to <a href="https://medium.com/u/409ce0607792">Oluebube Egbuna</a>, <a href="https://medium.com/u/6ba507592f4f">Peculiar Ediomo-Abasi</a>, <a href="https://medium.com/u/a722dd7f553f">Amako Ugochi</a> and the contributions by the #careers-in-tech series hosted by <a href="https://medium.com/u/1b1e6022a465">Nkiruka Ilewi</a>.</p><h3>Offline Engagement</h3><h4>Increased preference for domain-specific events</h4><p>This year we saw the increased call for messenger bot meetups, ReactJS summits, GraphQL Meetup, Artificial Intelligence Masterclass, etc.</p><p>We’ll be doing more of these in 2018. We’ll also be tracking the impact of these events better. Thanks to specialized sub-communities like the Developers Circles React Nigeria, AI Masterclass Nigeria, etc. and their respective community managers, we would also be getting quarterly reports on the progress of these.</p><h4>Waaaay more men than women at tech events</h4><p>For a group with 10.4% female members, we get an average of less than 5% of female members show interest to attend regular tech events, and less than 3% actually show up. For some reason this number skyrockets by at least 400% when the event is a women-centric one.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iiHY1TrlpzRIL_wH64Q6Xg.png" /></figure><p>This makes me feel like we could make regular events more women-friendly (perhaps). Yes, it’s definitely top on our list of things to do better in 2018.</p><h3>Partnerships</h3><h4>Andela</h4><p>Always at the fore-front in supporting the community, Andela has spared space, resource persons, finance and even moral support in making sure the Developers Circles community continues to stay impactful.</p><p>If you don’t know, <a href="https://andela.com/">Andela</a> invests in Africa’s most talented developers and integrates them into the world’s best tech companies.</p><h4>Univelcity</h4><p>Raised hands to <a href="https://medium.com/u/4316528d29b6">UNIVELCITY</a>!! All through our AI Masterclasses, Univelcity provided a secured, conducive environment for us to host up to 60 people. They have even offered to work with us next year to continue the AI meetups/classes. Thank you Univelcity!</p><p>Univelcity offers very effective 8-weeks coding bootcamps that move you from zero-experience to a level competent enough to apply for an entry-level developer job. So kickstart your tech career and hit them up today!</p><h4>Terragon Groups</h4><p>Our go-to pillars when the odds are stacked. <a href="http://terragongroup.com/">Terragon Groups</a> bent their rules to accommodate our weirdly-timed requests during the React Summit 2.0 and the Community Challenge HackDay. Their support comes not just financially but almost every member of the entire engineering team puts their weight behind community support. Thanks Terragon!</p><p>Terragon groups helps businesses reach their preferred audience by gathering and applying insights from data. <a href="http://terragongroup.com/">Check them out here</a>.</p><h4>Beta.Ventures</h4><p>Passionate about investing in Africa’s potential, Beta.Ventures were more than happy to step in during the 2 weeks long hackathon to share knowledge on what an idea needs to become a successful, scalable startup. We’re still working with them with Startups Discovery, to get more founders/wannabes thinking about the right things.</p><p><a href="http://beta.ventures/">Beta.Ventures </a>invests in driven, early-stage entrepreneurs scaling tech and tech-enabled startups to become market leaders.</p><h4>StartZone</h4><p><a href="http://startzone.org/">StartZone</a> came onboard with the React Summit and astounded every member of the planning committee by their commitment and motivation to seeing it to success. They championed publicity, gave us their amazing 600-person capacity conference room and were with us almost every step of the way. Muchas gracias StartZone.</p><p><a href="http://startzone.org/">StartZone</a> is one of Africa’s leading Innovation Hubs focused on solving the continent’s biggest challenges by supporting the tech ecosystem</p><h3>Conclusion</h3><p>Community programs would be rolling out in the group before the end of January. Artificial Intelligence, React JS, Design, etc are but a few that would be part of these announcements.</p><p>It’s been an inspiring, educative year for me personally, and for us as a community. If 2017 taught us anything, it’s that we can get to whatever heights we set our sights on. Together.</p><p>Huge shoutout to co-leads <a href="https://medium.com/u/62271aeb1e0c">Oscar Oranagwa</a> and Akinjide Bankole, our community managers, Masterclass leads and other people who volunteer in different ways within the Developer Circle community.</p><p>Join us in <a href="http://fb.com/groups/fbdevclagos">Facebook Developers Circle Lagos</a> today. Or <a href="https://developers.facebook.com/developercircles">join a circle near you</a>.</p><p>If you’re a member of Developer Circles (Lagos or any other city), how was the year for you? Looking forward to hearing from you in the comments!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=872d352ccb1f" width="1" height="1" alt=""><hr><p><a href="https://medium.com/fbdevclagos/developers-circle-lagos-2017-in-retrospect-872d352ccb1f">Developer Circles Lagos: 2017 in retrospect</a> was originally published in <a href="https://medium.com/fbdevclagos">Facebook Developer Circles Lagos</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Teencode: How teaching teenagers to code will make a difference in Africa]]></title>
            <link>https://medium.com/teencode-africa/teencode-how-teaching-teenagers-to-code-will-make-a-difference-in-africa-97ac8917c8a6?source=rss-2ece039837f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/97ac8917c8a6</guid>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[education]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[africa]]></category>
            <dc:creator><![CDATA[Innocent Amadi]]></dc:creator>
            <pubDate>Sun, 04 Jun 2017 12:17:46 GMT</pubDate>
            <atom:updated>2017-06-07T00:09:56.429Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*4ONMSVNUqTNZiYB7kCAnPg.jpeg" /><figcaption>Kariobangi North Girls, Nairobi</figcaption></figure><h3><strong>Why teach teenagers Programming?</strong></h3><p>In 2004, frustrated by the volume of animal classification and botanical names I needed to memorize, I asked my High school biology teacher:</p><blockquote>Why is biology a compulsory subject? I’m a mathematics person. Why are we trying to fit everyone into one shoe size?</blockquote><p>She laughed, looked me in the eye and gave me a response that won my heart.</p><blockquote>Innocent, Biology is the study of life. When you hold your breath to find out how long you can go without air, or pluck a flower to see how its petals are arranged, you are already studying biology. We are only here to teach you what others before you have discovered. One day, you’ll find that you will be able to make better decisions about what to eat, how to live and who to associate with just by your knowledge of biology.</blockquote><p>Was she right?</p><p>Today, whether it’s the percentage of saturated fat, dietary fiber, cholesterol or protein in food, or it’s personal hygiene and choice of habits, I find myself constantly turning to my foundational knowledge of biology.</p><p>How does this relate?</p><p>It’s 2017.</p><p>The alarms that wake us up, the tools with which we plan our day, our interactions with friends and colleagues, automations in business processes, you name it. Almost everything we do either already has a touch of technology or the potential to be overtaken by it.</p><p>Gradually computers are becoming inseparable from our daily lives.</p><p>We took the study of life seriously. Why not do the same for the study of how computers work?</p><p>Everywhere around us the quality of output in every sector is improved by introducing computers to the mix. Wired Inc <a href="https://www.wired.com/brandlab/2015/04/rise-machines-future-lots-robots-jobs-humans/">predicted in 2015</a> that 47% of the jobs in the US could be automated within the next decade. I didn’t find any Africa-specific prediction, but I doubt those numbers are relatively far behind.</p><p>We need to do better than telling teenagers who Ada Lovelace was, or what ‘www’ stands for.</p><p>So … right back at you. Why not programming?</p><h3>What is teencode?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Cu5gxwZhYucz-bfgqjDOrQ.jpeg" /><figcaption>Rolake, Yemisi and Akunna atUniversal College, Ikotun</figcaption></figure><p><a href="http://teencodeafrica.com/">Teencode</a> is a movement to build the foundation for the next generation of Africa’s tech leaders by teaching teenagers to code.</p><p>At a high level, success for us would be building a system where the Computer Studies curriculum used in High Schools is fully supported by professional developers in the field.</p><p>Our plan to achieve this is very simple: first we work with schools to develop the right curriculum content, then mentor High School computer teachers to deliver the content right.</p><h3><strong>How did we start?</strong></h3><p>Planning started in November 2016. We needed:</p><ol><li>An army of developers who would volunteer to commit to this mission. (Great developers are almost always ‘very busy’).</li><li>Schools to partner with who would be willing to assign at least one teacher, a computer laboratory and a chunk of students’ time.</li><li>Sponsorship to cater to logistics.</li></ol><p>One of the perks of working at a company like <a href="http://andela.com/">Andela</a> is the company’s <a href="https://andela.com/about-us/">mission</a> and values (of excellence, passion, integrity and commitment) is sewn into everything. In less than two weeks items 1 and 3 were knocked off the list.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ISs0n0JiXUgOu6TlJWqS8g.jpeg" /><figcaption>Teencode partners with GirlsCoding: Rotimi and Seyi give the teens reasons to smile</figcaption></figure><p>We had over 76 Andelans from both Lagos and Nairobi who were willing to commit 110% towards making Teencode successful.</p><p>Andela officially signed on to cater to the financial and logistics needs of both the pilot and execution phases.</p><p>Getting partner schools proved to be the not-so-easy part. Nonetheless, after a pilot phase in March, we officially kicked off in May with 14 schools and 236 students in both Lagos, Nigeria and Nairobi, Kenya.</p><h3>What would the rest of the year look like?</h3><p>For (at least) the next three months, our volunteer facilitators would go into schools to teach students once a week or twice a month.</p><p>During this period, we hope to understand how best to deliver the knowledge to teenagers in a way that would be effective and scalable to schools across Africa. One of our successful outcomes of this phase would be a public curriculum tailored for High School students.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KiIa_HkppV2fpOrqpD2caw.jpeg" /><figcaption>Kinuthia Ndugwu,</figcaption></figure><p>We are forging relationships with teachers who love what we are doing, where we are going and are willing to go there with us. We want to make sure that by working with us, teachers build their knowledge of tech and see small ways to improve their own daily lives with the skills they pick up.</p><p>At the end of the three months (or longer, depending), our ‘Understanding’ phase would sunset and our ‘Mentorship’ phase would roll out fully. By then, the curriculum would have gone through countless iterations and be ready to be used by schools/teachers in locations we might not be able to physically reach.</p><p>The mentorship phase would see us focused on building a support community to make it easier for any school that want to take advantage of this opportunity, teachers who want to become facilitators and students who are going through the program to receive further guidance.</p><h3>How might this impact the continent in the next five years?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*gIiPVW-QoGQ6_zZ2KVzYEw.jpeg" /><figcaption>Adebayo, Chidi, Bolaji and Fortune at Mavir Leaders College, Ajegunle</figcaption></figure><p>Teaching Biology in High school didn’t reduce the need for doctors. No. Instead, medical educational institutions could assume a foundational knowledge of classes of food and go ahead to teach about <a href="https://en.wikipedia.org/wiki/Food_microbiology#Microbial_biopolymers">microbial bipolymers</a> and <a href="https://en.wikipedia.org/wiki/Polymerase_chain_reaction">polymerase chain reactions</a>. Needless to say, it improved the quality of doctors.</p><p>We see a future where an 18 year old Arts student can write a few lines of code that help her mom transform records in excel sheets into a beautiful printed report.</p><p>We see our Computer Science students going ahead to partake in Space Technology or make a dent in the world of Virtual Reality with their accomplishments.</p><p>We see an improvement in the overall quality of life, as more Africans are empowered to use readily accessible resources to create solutions to everyday problems.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p4vbEW0us5g3cogSfkZHDw.jpeg" /><figcaption>Teecode Team, Andela, Lagos</figcaption></figure><h3>Conclusion</h3><p>There is a lot to be done if we want to get to where we need to be as a continent. We can’t do everything, but everybody can do something.</p><p>Teencode has a goal of reaching 100 schools and 1000 students by the end of the year. We haven’t done this before. We are literally building the plane as we fly it.</p><p>If you’ve got some tips on tutoring, operations and scaling, ideas on partnerships, sponsorships or just general supportive goodwill messages, send us an email at <a href="/service/mailto:teencodeafrica@gmail.com">teencodeafrica@gmail.com</a> or visit <a href="http://teencodeafrica.com/contact-us">teencodeafrica.com/contact-us</a>.</p><p>We’ll be happy to hear from you.</p><p>PS: If you loved this article, could you help click on the 💚 to help others find it too? Thanks!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=97ac8917c8a6" width="1" height="1" alt=""><hr><p><a href="https://medium.com/teencode-africa/teencode-how-teaching-teenagers-to-code-will-make-a-difference-in-africa-97ac8917c8a6">Teencode: How teaching teenagers to code will make a difference in Africa</a> was originally published in <a href="https://medium.com/teencode-africa">teencode-africa</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Demystifying software architecture for the junior developer]]></title>
            <link>https://medium.com/@tru2cent/demystifying-software-architecture-for-the-junior-developer-98f982239927?source=rss-2ece039837f5------2</link>
            <guid isPermaLink="false">https://medium.com/p/98f982239927</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[software-architecture]]></category>
            <dc:creator><![CDATA[Innocent Amadi]]></dc:creator>
            <pubDate>Wed, 19 Apr 2017 12:49:14 GMT</pubDate>
            <atom:updated>2017-04-24T10:50:21.550Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*wMKi7W2RwsfPbTO2OEoj2Q.jpeg" /></figure><p>You have an idea. Yes!</p><p>Your big idea - Help dog owners buy the dream collar. No, not the dog’s dream, the owner’s :)</p><p>As a software developer, it’s time to put your skills to use. The sooner you’re able to develop a working software solution, the happier the world will be.</p><p>The next step should be firing up your editor to start churning out code right?</p><p>Of course! As soon as you answer a few questions:</p><h4><strong>What would you like your users to do?</strong></h4><p>Easy. I want to help dog owners buy the dream collar for their dogs.</p><h4><strong>What roles might your software need to perform to help users in the way you intend?</strong></h4><p>Keeping it simple here, the software should:</p><ul><li>allow different vendors upload pictures of different dog collars so users can buy their choice.</li><li>allow potential customers see and buy what’s being sold.</li><li>allow admins monitor what’s being sold.</li></ul><h4><strong>How complex are the roles you just defined? Can they be broken down into smaller chunks?</strong></h4><p>Taking a closer look, <em>“allow different vendors put up pictures of different dog collars”</em> could be broken down into:</p><ul><li>allow vendors register.</li><li>allow registered vendors put up details of dog collars they have in stock.</li></ul><p>Similarly, <em>“users can buy their choice”</em> could be:</p><ul><li>allow visitors sign up/login as users so they can make purchases.</li><li>allow users add a selected item to their cart.</li></ul><p>“<em>The software should allow administrators monitor what’s being sold</em>” could also could be decomposed into:</p><ul><li>users can sign in as admin.</li><li>admins can view an admin dashboard that shows basic statistics of what’s being sold.</li></ul><p>Now can you confidently represent these features in your software? Sure! Admins, vendors and users can be treated as different classes that will…</p><p>Wait …</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*FJdYf1qB3MmJ0dW-x4H24Q.png" /><figcaption>Defining roles is often the first step …</figcaption></figure><p>What will these classes do?</p><p>How do they depend on each other?</p><p>Why aren’t they modules? Or a bunch of functions in one huge class?</p><p>How will your database be modeled? What relationships will need to be defined?</p><p>How heavy do you expect the application to be? What computing power will the server need? Private servers or cloud?</p><p>The list goes on ….</p><p>Ah. We’ve hit a point where you pause on your editor and look up. Maybe whip out a jotter. There are some decisions to be made. Some requirements to be defined. Some structures that need to be put in place to meet defined requirements.</p><p>When you catch yourself trying to figure out the answer to all these prerequisite questions, you are already architecting software.</p><blockquote><strong>“</strong><a href="https://msdn.microsoft.com/en-us/library/ee658098.aspx"><strong>Software architecture</strong></a> is the process of defining a structured solution that meets all the technical and business needs of an application, while optimizing common attributes like performance, security and manageability.”</blockquote><blockquote>— Software development and design, Microsoft Developer Network</blockquote><p>Put more straightforward, Software architecture encompasses all the important decisions made when a software solution is being organized. Naturally, these decisions would include:</p><ul><li>The structural elements (modules and/or classes)</li><li>Relationships between elements</li><li>Relationships between elements in one or more external environments</li></ul><h3>1. The structural elements</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*2MpJ5zz_gpRmFhgCVKu6Tg.png" /></figure><p>If you are building a software solution to sell dog collars, then different roles of the software might be:</p><ul><li>Admin Management System</li><li>Authentication system (to distinguish between admins, vendors and customers)</li><li>Store content management systems (to enable vendors manage offerings)</li><li>Purchasing system (that helps users actually buy stuff)</li></ul><p>Again, this is keeping it as simple as we possibly can.</p><p>If you can successfully break down the system to be built into different roles like this, then each role can be a class or a module assigned a specific responsibility (students admissions module concerned with only students admissions).</p><p>When building software systems, it is important to have this logical breakdown of roles into modules. If a module is too large, it can be further broken down into smaller compositions.</p><p>But how will you know when a module is too large?</p><p>Simple. Repeat the process you used to identify that the module needs to be created in the first place. What roles can be found within the module?</p><p>For example, a typical purchasing process usually involves users adding items to their cart, inspecting their cart and bill and then proceeding to checkout and pay for items in their cart. So within the ‘Purchasing system’, we could have:</p><ul><li>Cart Management system</li><li>Billing systems (to handle billings and invoices)</li><li>Checkout systems (to handle payments or third party payment platform integration)</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*Zr8fR4B1Yi_xicvvA_1IVA.png" /><figcaption>Roles — possible modules and/or classes.</figcaption></figure><p>How do you know when to stop the breakdown process?</p><p>When a module becomes specific enough.</p><p>The Cart Management System will be concerned with creating a cart, adding and removing items from it, and keeping track of its content. That’s all. Sounds specific enough to me.</p><h3>2. Relationship between elements</h3><p>Now you have tiny building blocks all culminating to one giant system. Time to start implementing right? Wrong.</p><p>You need to define how the amazing modules and classes you have already defined will inter-relate.</p><p>I don’t know if there are existing formulas for doing this. When I get to this stage, I just look at each module or class and ask it:</p><ol><li>What would other modules or classes need from you? (interfaces)</li><li>What would you need from other modules? (dependencies)</li></ol><h4><strong>Defining interfaces</strong></h4><p>Interfaces are the connectors or plugs exposed by an entity (module or class) so other entities can interact with it. More popularly called APIs (application programming interfaces).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*Vh_9nhD-Fuu2KvpF7xSbKA.png" /></figure><p>With our Cart Management System, we will need to create a new cart, add items to the cart, remove items from the cart and view items in the cart. This implies we need to have interfaces we can call to ask the Cart MS to do these operations for us.</p><p>Typed languages refer to these interfaces as public methods or functions. Our Cart MS could look like:</p><p>Cart MS</p><ul><li>create_cart</li><li>add_item</li><li>delete_item</li><li>view_items</li></ul><p>We’ve defined how to talk to our Cart, but who does it need to talk to? What external data does it need?</p><p>When understanding the relationship between entities, defining interfaces is the first step. We also need to document dependencies and how to access them.</p><h4><strong>Documenting dependencies</strong></h4><p>Would this module need most or some functionality in other modules? If it does, what is the best way to make this functionality accessible? Should it inherit, use an adapter or some other <a href="https://en.wikipedia.org/wiki/Software_design_pattern">design pattern</a>? Is the library external? Is it sharing any data?</p><p>Back to our Cart MS. Our solution for carts will need to know some detail about an item it is adding. Maybe an item_id will do. We can always look up other item details through the id.</p><p>Or can we?</p><p>What if item prices change while the user is still in the middle of a purchase? Two choices here — we might want to bill the user the new price, or allow them buy with the price they met. Whichever approach we choose will affect if we store price details with the items in our cart or not.</p><p>Quite explicitly, whether you do</p><blockquote>items = [2, 4, 5]</blockquote><p>or</p><blockquote>items = [ {id: 2, price: 300}, {id: 4, price: 230}, {id: 5, price: 70} ]</blockquote><p>Will depend on how much detail you will really need from a business standpoint.</p><p>Relationships between elements in one or more external environments</p><p>Now we’re talking both external APIs and<a href="https://newrelic.com/devops/what-is-devops"> DevOps</a>.</p><h3><strong>External APIs</strong></h3><p>For our Checkout System, let’s assume we agree that asking users to give us their credit card information is not something we would want to do. We would rather use PayPal or Stripe.</p><p>We really can’t go ahead and plan out the Checkout system without first understanding how it’s going to interact with PayPal. What APIs does PayPal expose to developers? How is the data structure of the response sent back?</p><h3><strong>DevOps</strong></h3><p>Here’s an ideal setup: You (and your team) make a change to a version controlled source code. You push the code, compare with existing changes and merge in the new changes. Automatically, tests are run, lints (rules surrounding code style) are checked, the code is compiled/built and then deployed.</p><p>That’s <a href="https://www.thoughtworks.com/continuous-integration">continuous integration</a>. DevOps encourages automation of the change, configuration, and deploy processes. But there’s more to it.</p><p>Let’s talk servers.</p><p>Which environment will you be hosting in? Something close to your development environment? Or something suitable for the kind of software you will be writing?</p><p>How much memory will the server need (RAM and Hard disk)? How much processing power will be sufficient?</p><p>How many users can you expect in the best case scenario or your peak periods? Might you need to scale up vertically (add more hardware to the server) and/or horizontally (add more servers)? How often do you need to scale?</p><p>Might it be valuable if your servers are elastic too? In other words, should they be added on the fly and decommissioned when requests drop?</p><p>Deeper still: How many <a href="https://devcenter.heroku.com/articles/dynos">dynos</a> (or it’s equivalent in non-linux servers) will you need? What processes might your software start to run effectively?</p><p>Okay, yeah. DevOps is usually the scary conversation. The good news? You don’t need to figure everything out to start. God bless Platforms as a Service (PaaS) like <a href="http://that%20enables%20developers%20to%20build%2C%20run%2C%20and%20operate%20applications%20entirely%20in%20the%20cloud./">Heroku</a> that enable developers to build, run, and operate applications entirely in the cloud. So you really don’t need to think about all the hard details. Just spin up a free Heroku instance by creating a new app, and you’re a DevOps pro :)</p><h3><strong>Conclusion</strong></h3><p>Building software is an art. An artist prepares his canvas, paint brushes, color palettes and state of mind (at least) before touching brush on paint.</p><p>Thinking about software architecture is a step more experienced developers have learnt to embed from the beginning of a software project. It sometimes seem more tempting to just jump in, but planning a bigger picture always saves you from needless back and forth as you progress.</p><p>That said, planning architecture is not an excuse to sit forever in the analysis room. Agile methodologies require that you plan out only as much as you need to get started, and then continue the process through the software development life cycle.</p><p>Was this helpful? Hit the 💚 to help others find it too :)</p><p>Have you approached software solutions differently or in a similar fashion? Do let me know in the comments section. I’ld love to hear 🙂</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=98f982239927" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>