<?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: Chazona Baum</title>
    <description>The latest articles on DEV Community by Chazona Baum (@chazonacodes).</description>
    <link>https://dev.to/chazonacodes</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%2F9065%2F982410a2-5375-4e28-9665-6e830a20e063.jpeg</url>
      <title>DEV Community: Chazona Baum</title>
      <link>https://dev.to/chazonacodes</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/chazonacodes"/>
    <language>en</language>
    <item>
      <title>Freelance Web App with Rails 5.1 API and React Frontend, Part 1: Getting Set Up</title>
      <dc:creator>Chazona Baum</dc:creator>
      <pubDate>Tue, 14 Nov 2017 01:56:09 +0000</pubDate>
      <link>https://dev.to/chazonacodes/freelance-web-app-with-rails-51-api-and-react-frontend-part-1-getting-set-up-5ep</link>
      <guid>https://dev.to/chazonacodes/freelance-web-app-with-rails-51-api-and-react-frontend-part-1-getting-set-up-5ep</guid>
      <description>&lt;p&gt;It's time to get started with the Rails API and React front end. In &lt;a href="https://chazonabaum.com/blogs/freelance-app-rails-5-1-api-with-react-frontend-part-0-why" rel="noopener noreferrer"&gt;Part 0&lt;/a&gt;, I gave some background about the project, what technologies would be used and why. Feel free to check it out if you haven't already.&lt;/p&gt;

&lt;h2&gt;
  
  
  Prerequisites
&lt;/h2&gt;

&lt;p&gt;To get started with this project, you will need the following installed on your system. Let's get downloading!&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://www.ruby-lang.org/en/" rel="noopener noreferrer"&gt;Ruby&lt;/a&gt; - I will be using version 2.4.2 for this project. &lt;a href="https://github.com/rbenv/rbenv" rel="noopener noreferrer"&gt;rbenv&lt;/a&gt; is a popular way to manage your Ruby versions, but &lt;a href="https://rvm.io/" rel="noopener noreferrer"&gt;RVM&lt;/a&gt; is still an option. I recommend reviewing the two options and deciding for yourself.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.postgresql.org/" rel="noopener noreferrer"&gt;PostgreSQL&lt;/a&gt; - PostgreSQL is a robust, feature-rich database system, and it's the one I'll be using.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://www.getpostman.com/" rel="noopener noreferrer"&gt;Postman&lt;/a&gt; - Postman will make it easier to build the API and test out the API calls.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Get the right version of Rails
&lt;/h2&gt;

&lt;p&gt;For this project, I'll be using Rails 5.1 (currently the latest is 5.1.4), so if you don't have it, be sure to install the correct version:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;gem &lt;span class="nb"&gt;install &lt;/span&gt;rails &lt;span class="nt"&gt;-v&lt;/span&gt; &lt;span class="s1"&gt;'~&amp;gt; 5.1'&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Set up the API app
&lt;/h2&gt;

&lt;p&gt;Let's go ahead and generate our new API app:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;rails new freelance-api &lt;span class="nt"&gt;--database&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;postgresql &lt;span class="nt"&gt;--api&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Not too many changes here, just setting the database to Postgres and using API mode. For testing, this project will stick to the default MiniTest.&lt;/p&gt;

&lt;p&gt;Go ahead and look at the directory structure in your text editor or in your terminal with &lt;code&gt;tree&lt;/code&gt;. If you've worked with Rails for regular web applications, you'll notice this app is a lot slimmer.&lt;/p&gt;

&lt;p&gt;The first changes to make are with the Gemfile and the CORS initializer:&lt;/p&gt;

&lt;p&gt;Uncomment the &lt;code&gt;gem rack-cors&lt;/code&gt; line in the Gemfile and run &lt;code&gt;bundle install&lt;/code&gt; in your terminal.&lt;/p&gt;

&lt;p&gt;And in the API directory, open &lt;code&gt;config &amp;gt; initializers &amp;gt; cors.rb&lt;/code&gt;, uncomment and modify it to read:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="no"&gt;Rails&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;application&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;config&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;middleware&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;insert_before&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="no"&gt;Rack&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Cors&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
  &lt;span class="n"&gt;allow&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt;
    &lt;span class="n"&gt;origins&lt;/span&gt; &lt;span class="s1"&gt;'*'&lt;/span&gt;

    &lt;span class="n"&gt;resource&lt;/span&gt; &lt;span class="s1"&gt;'*'&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="ss"&gt;headers: :any&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
      &lt;span class="ss"&gt;methods: &lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="ss"&gt;:get&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:post&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:put&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:patch&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:delete&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:options&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:head&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;
  &lt;span class="k"&gt;end&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This will allow the API to play nicely with the front end app. The origins can be adjusted once you know what domain you'll use for the front end app and are ready to deploy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Version control and documentation
&lt;/h2&gt;

&lt;p&gt;While this API needs a lot of work before it's done, it's a good idea to get in the habit of updating the documentation and keeping track of changes as we go.&lt;/p&gt;

&lt;p&gt;You can start by creating a repository in GitHub or another repository hosting service that uses git. It should be fairly straightforward:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fs3.amazonaws.com%2Fchazona-portfolio-bucket%2Fuploads%2Fblog%2Fgithub_repo_freelance_api.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fs3.amazonaws.com%2Fchazona-portfolio-bucket%2Fuploads%2Fblog%2Fgithub_repo_freelance_api.jpg" alt="Create GitHub Repository for Freelance API App"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Before adding the files to the repo, it's a good idea to start on some of the basic files you may not feel like working on as the project wraps up: the README, LICENSE, and CONTRIBUTING files.&lt;/p&gt;

&lt;p&gt;Your README should already exist, but go ahead and modify it to make sense with what you have so far. For example, right now mine looks like:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight markdown"&gt;&lt;code&gt;&lt;span class="gh"&gt;# Freelance API&lt;/span&gt;

Make your freelancing more efficient by managing leads, proposals, project documents, clients and more.

&lt;span class="ge"&gt;*This is a work in progress.*&lt;/span&gt;

&lt;span class="gu"&gt;## Getting Started&lt;/span&gt;

&lt;span class="gu"&gt;### Prerequisites&lt;/span&gt;

&lt;span class="gu"&gt;#### Ruby ~&amp;gt; 2.4&lt;/span&gt;

Download and manage via &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;rbenv&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;https://github.com/rbenv/rbenv&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; or &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;RVM&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;https://rvm.io/&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

&lt;span class="gu"&gt;#### Rails ~&amp;gt; 5.1&lt;/span&gt;&lt;span class="sb"&gt;

    gem install rails -v '~&amp;gt; 5.1'

&lt;/span&gt;&lt;span class="gu"&gt;#### PostgreSQL ~&amp;gt; 9.6&lt;/span&gt;

Follow the &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;instructions for downloading PostgreSQL&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;https://www.postgresql.org/download/&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; based on your operating system, and be sure to &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;create a database user with privileges&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;https://wiki.postgresql.org/wiki/First_steps&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;.

&lt;span class="gu"&gt;### Installing&lt;/span&gt;

Clone the repository:&lt;span class="sb"&gt;

    git clone https://github.com/chznbaum/freelance-api.git
    cd ./freelance-api

&lt;/span&gt;Install the gems:&lt;span class="sb"&gt;

    bundle install

&lt;/span&gt;And set up the database:&lt;span class="sb"&gt;

    rails db:create
    rails db:migrate

&lt;/span&gt;Start the development server:&lt;span class="sb"&gt;

    rails s

&lt;/span&gt;You can test this by making a GET request to &lt;span class="sb"&gt;`localhost:3000`&lt;/span&gt; using Postman or an alternative.

&lt;span class="gu"&gt;## Tests&lt;/span&gt;

&lt;span class="gu"&gt;### End to End Tests&lt;/span&gt;

TBA

&lt;span class="gu"&gt;### Coding Style Tests&lt;/span&gt;

TBA

&lt;span class="gu"&gt;## Deployment&lt;/span&gt;

TBA

&lt;span class="gu"&gt;## Built With&lt;/span&gt;
&lt;span class="p"&gt;
*&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;Rails&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;http://rubyonrails.org/&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; - Web Framework
&lt;span class="p"&gt;*&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;rbenv&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;https://github.com/rbenv/rbenv&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; - Environment Managemet
&lt;span class="p"&gt;*&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;Bundler&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;http://bundler.io/&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; - Dependency Management
&lt;span class="p"&gt;*&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;Heroku&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;https://www.heroku.com/&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; - Deployment Platform
&lt;span class="p"&gt;*&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;Travis CI&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;https://travis-ci.org/&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; - Continuous Integration

&lt;span class="gu"&gt;## Contributing&lt;/span&gt;

Please read &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;CONTRIBUTING.md&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;CONTRIBUTING.md&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; for details on the code of conduct, and the process for submitting pull requests.

&lt;span class="gu"&gt;## Versioning&lt;/span&gt;

TBA

&lt;span class="gu"&gt;## Authors&lt;/span&gt;
&lt;span class="p"&gt;
*&lt;/span&gt; &lt;span class="gs"&gt;**Chazona Baum**&lt;/span&gt; - Initial work

&lt;span class="gu"&gt;## License&lt;/span&gt;

This project is licensed under the MIT License - see the &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nv"&gt;LICENSE.md&lt;/span&gt;&lt;span class="p"&gt;](&lt;/span&gt;&lt;span class="sx"&gt;LICENSE.md&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; file for more details.

&lt;span class="gu"&gt;## Acknowledgements&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;There's still a long way to go, but already a surprising amount can be included!&lt;/p&gt;

&lt;p&gt;Go ahead and create a &lt;code&gt;CONTRIBUTING.md&lt;/code&gt; file and a &lt;code&gt;LICENSE.md&lt;/code&gt; file in your project root. My CONTRIBUTING file just lists TBA, and I am using the MIT license for my project.&lt;/p&gt;

&lt;p&gt;Now that these documents are set up, the files can all be added to the repository you created.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;git add &lt;span class="nb"&gt;.&lt;/span&gt;
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"initial commit"&lt;/span&gt;
git remote add origin https://github.com/&amp;lt;YOUR GITHUB USERNAME&amp;gt;/freelance-api.git
git push &lt;span class="nt"&gt;-u&lt;/span&gt; origin master
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Wrapping up
&lt;/h2&gt;

&lt;p&gt;You're almost done with the basic setup! To create and update the database, go ahead and run:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;rails db:create
rails db:migrate
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It seems like we've done a lot without much to show for it, but we've set up the environment we'll need to start giving the API functionality.&lt;/p&gt;

&lt;p&gt;At this point, you can test the API out by opening Postman and starting your Rails server in the terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;rails s
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Once the terminal indicates the server is running, in the Postman request bar, send a GET request to &lt;code&gt;localhost:3000&lt;/code&gt;. You should see the following:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fs3.amazonaws.com%2Fchazona-portfolio-bucket%2Fuploads%2Fblog%2Fpostman_screenshot_ruby_on_rails.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fs3.amazonaws.com%2Fchazona-portfolio-bucket%2Fuploads%2Fblog%2Fpostman_screenshot_ruby_on_rails.jpg" alt="Postman Screenshot Ruby on Rails Welcome"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Look deeper into the HTML you received, and you'll see it's Rails' "Yay, you're on Rails!" success page.&lt;/p&gt;

&lt;p&gt;With that accomplished, the next step is to actually plan out what the API should do in a little more detail and actually start creating the data models.&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>rails</category>
      <category>react</category>
      <category>api</category>
    </item>
    <item>
      <title>Freelance Web App with Rails 5.1 API and React Frontend, Part 0: Why?</title>
      <dc:creator>Chazona Baum</dc:creator>
      <pubDate>Tue, 14 Nov 2017 01:50:53 +0000</pubDate>
      <link>https://dev.to/chazonacodes/freelance-web-app-with-rails-51-api-and-react-frontend-part-0-why-bgl</link>
      <guid>https://dev.to/chazonacodes/freelance-web-app-with-rails-51-api-and-react-frontend-part-0-why-bgl</guid>
      <description>&lt;p&gt;In my rush to try to earn something from my code learning so far, I've had to shelve some of my plans to dive deeper into Ruby on Rails and to learn front end frameworks like Angular and React. When marketing freelance work to non-coders, the most common request seems to be to make something fast, pretty and cheap, which means focusing on static or WordPress sites.&lt;/p&gt;

&lt;p&gt;But I'm finding that trying to reach out to potential clients the traditional way is extremely inefficient, especially when conversion rates as a newbie freelancer are basically nonexistant. And solutions for non-technical folks to manage their clients and improve their sales are expensive when it might take several months to actually earn anything.&lt;/p&gt;

&lt;p&gt;So it seems to make sense to go ahead and put together an app that will allow me to keep track of and reach out to leads, as well as managing proposals and project documents, and provide clients with access to materials relevant to them. Once the basics are there, I'll look at integrating an invoicing API like FreshBooks to get more out of the app.&lt;/p&gt;

&lt;p&gt;And since it's been a while since I've blogged about what I'm learning, this seemed like a great opportunity.&lt;/p&gt;

&lt;p&gt;Over the next few weeks I'll be building a freelance dashboard app, using Rails 5.1 for the API backend, and &lt;a href="https://reactjs.org/"&gt;React.js&lt;/a&gt; on the front end.&lt;/p&gt;

&lt;p&gt;To follow along, it's a good idea to be comfortable working with your terminal and console, have a basic understanding of how a simple Rails app works, and to have a working knowledge of JavaScript. But I'll try to keep things simple just in case.&lt;/p&gt;

&lt;p&gt;You can either wait for the next post to start building, or feel free to dig a bit deeper into why I went with this stack below:&lt;/p&gt;

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

&lt;p&gt;I'm setting aside for a moment the fact that I love working with Ruby, since it's not always going to be the best tool for the job.&lt;/p&gt;

&lt;p&gt;For one, Rails is pretty fast and easy to set up compared to other options. Given that I intend to use this toward trying to make some income soon, being able to get something up quickly and iterate improvements is a huge advantage.&lt;/p&gt;

&lt;p&gt;If I wanted to build the back end and front end in the same application, Rails makes that easy, too. Starting with 5.1, Rails includes Webpack and makes it easy to create apps that use front end frameworks and libraries like Angular, React, Vue, or Ember rather than jQuery. I've played around with that a bit, but I think I'd still rather separate out these two key parts into an API and a front end app.&lt;/p&gt;

&lt;p&gt;Rails is also well-known for being a great framework for building RESTful APIs. Rails 5 even provides an API mode that makes getting a JSON API up and running even smoother.&lt;/p&gt;

&lt;p&gt;And I have some basic experience building applications with Rails. While I want to learn new things, having some familiarity with the back end will help get this built quicker, especially since I'm picking a front end framework I have no experience with.&lt;/p&gt;

&lt;p&gt;If I didn't go with Rails, I would have considered:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="http://phoenixframework.org/"&gt;Phoenix&lt;/a&gt; - Phoenix is built on &lt;a href="https://elixir-lang.org/"&gt;Elixir&lt;/a&gt;, and the framework was recently brought to my attention as a more performant alternative to Rails. I definitely want to play around with the pair some, but possibly on a different project. Plus, the performance issues with Rails are generally more of a problem when it's a lot bigger than I expect this to get.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://nodejs.org/en/"&gt;Node.js&lt;/a&gt; - When working with JSON and a JavaScript front end framework, a JavaScript back end would seem like a convenient option. I've only played around with Node in small pieces, like building Twitter bots. I want to explore Node more in the future, but Rails' benefits edge out for this project.&lt;/li&gt;
&lt;li&gt;
&lt;a href="http://www.sinatrarb.com/"&gt;Sinatra&lt;/a&gt; - Sinatra is another Ruby-based option, one that's supposed to be great for tinier applications where Rails might just get in the way. I'm expecting this app to be a little larger than one I might use Sinatra for, though I'm eager to try it out on a project one of these days.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;React has gotten a lot of attention lately between concerns about licensing issues (which it seems were ultimately much ado about nothing) and its parent company Facebook constantly ending up in the headlines.&lt;/p&gt;

&lt;p&gt;It seems most companies that have gone with JavaScript front end frameworks have landed with either Angular or React. From a pragmatic perspective, there are more jobs out there for either one than for, say Vue.&lt;/p&gt;

&lt;p&gt;React is also a more mature framework than Vue, while having fewer breaking changes than Angular.&lt;/p&gt;

&lt;p&gt;And React also has the benefit of React Native. If I wanted to implement a native mobile app for this web application, which I eventually do, React Native makes it much easier.&lt;/p&gt;

&lt;p&gt;If I didn't go with React, I would have considered:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://vuejs.org/"&gt;Vue.js&lt;/a&gt; - Vue, like Ruby, is a joy to use. I've tinkered with it before to build a &lt;a href="https://codepen.io/chznbaum/full/GWqpqj"&gt;simple PokÃ©mon-based monster battle game&lt;/a&gt;. If I wasn't going with React, I would have definitely gone with Vue to have the most flexibility with my front end.&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://angular.io/"&gt;Angular&lt;/a&gt; - The other pragmatic approach, Angular is used by a lot of companies I know. It's also frequently paired with Rails.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Other Considerations
&lt;/h2&gt;

&lt;p&gt;I considered breaking this project up into microservices to make individual features easier to develop and maintain, and initially started it that way. However, it's been brought to my attention that microservices should be left to situations where teams of people will be working on different services, so this project will take a monolithic approach.&lt;/p&gt;

&lt;p&gt;And since I'll be attending RubyConf this week, posts about this project may be interrupted by posts about the conference.&lt;/p&gt;

&lt;p&gt;This should be a fun project to work on, and I look forward to showing you along!&lt;/p&gt;

</description>
      <category>tutorial</category>
      <category>rails</category>
      <category>react</category>
      <category>api</category>
    </item>
    <item>
      <title>Roughing It Dev Style: Coding Without a Computer</title>
      <dc:creator>Chazona Baum</dc:creator>
      <pubDate>Wed, 19 Apr 2017 20:15:51 +0000</pubDate>
      <link>https://dev.to/chazonacodes/roughing-it-dev-style-coding-without-a-computer</link>
      <guid>https://dev.to/chazonacodes/roughing-it-dev-style-coding-without-a-computer</guid>
      <description>&lt;p&gt;A terrible, horrible, no good, very bad thing happened to me this month: the Surface Pro that was my exclusive personal and work computer died. Even though I found an inexpensive replacement to order, I couldn't imagine not coding for about a week. I was totally freaking out.&lt;/p&gt;

&lt;p&gt;After a few unsatisfying days of merely reading about web development topics, I set to work on figuring out how I could get some real work done, armed only with my iPhone.&lt;/p&gt;

&lt;h2&gt;
  
  
  Trial and Error
&lt;/h2&gt;

&lt;p&gt;Not wanting to hunt down a new solution if it was unnecessary, I first turned to tools I've used before:&lt;/p&gt;

&lt;h3&gt;
  
  
  Codepen
&lt;/h3&gt;

&lt;p&gt;Codepen wasn't terrible in a pinch. However, the layout and on-screen keyboard really wasn't optimized for coding on a phone. Making minor changes took a lot of time, and it was easy to end up with really buggy code.&lt;/p&gt;

&lt;h3&gt;
  
  
  Cloud9 IDE
&lt;/h3&gt;

&lt;p&gt;Cloud9 had the same problems but with an already more cluttered interface. It explicitly &lt;a href="https://community.c9.io/t/supported-browsers/1988/4" rel="noopener noreferrer"&gt;doesn't support mobile browsers&lt;/a&gt; and it has been made clear multiple times that making Cloud9 mobile-friendly or developing a native mobile app for it is not anywhere on the roadmap.&lt;/p&gt;

&lt;h3&gt;
  
  
  CodeAnywhere
&lt;/h3&gt;

&lt;p&gt;When exploring the Cloud9 issue, I saw mention of an alternative cross-platform cloud IDE called CodeAnywhere. However, the iOS app appeared to have not been updated since 2014 and after four unsuccessful attempts to so much as create an account and login, I figured there had to be something better.&lt;/p&gt;

&lt;h2&gt;
  
  
  What Finally Worked
&lt;/h2&gt;

&lt;p&gt;After some frustrating experiences, I came across tools and techniques that worked beyond my expectations, allowing me to code productively with just a phone and that can allow you to do it, too.&lt;/p&gt;

&lt;h3&gt;
  
  
  Editor: &lt;a href="http://buffereditor.com/" rel="noopener noreferrer"&gt;Buffer Editor&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;a href="http://buffereditor.com/" rel="noopener noreferrer"&gt;Buffer Editor&lt;/a&gt; was a hidden gem in the App Store. It didn't have a presence from advertising or word of mouth or even enough reviews to warrant a rating. It would be easy to underestimate Buffer.&lt;/p&gt;

&lt;p&gt;When actually downloaded, though, it's clear that Buffer Editor is a real, powerful editor truly optimized for a mobile experience. Features that won me over included:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;An extended keyboard that makes typing quick (for one-handed) and intentional.&lt;/li&gt;
&lt;li&gt;A well-designed built in terminal.&lt;/li&gt;
&lt;li&gt;Full-screen editing, a necessity on such a small screen.&lt;/li&gt;
&lt;li&gt;Syntax highlighting and autocomplete for 40+ languages and technologies.&lt;/li&gt;
&lt;li&gt;The ability to connect via SSH, FTP, SFTP, GitHub, Dropbox and iCloud.&lt;/li&gt;
&lt;li&gt;Sending files by email.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F91wdnmj76i0r0uqyd2ha.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F91wdnmj76i0r0uqyd2ha.jpg" alt="Buffer Editor Extended Keyboard"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It also included useful &lt;a href="http://buffereditor.com/features/" rel="noopener noreferrer"&gt;features&lt;/a&gt; that I didn't utilize such as Vim support and support for bluetooth keyboards.&lt;/p&gt;

&lt;p&gt;While it isn't free, the 4.99 USD price I got it for was well worth it, especially compared to the popular Coda at almost 25 USD.&lt;/p&gt;

&lt;h3&gt;
  
  
  Server: &lt;a href="https://www.digitalocean.com/" rel="noopener noreferrer"&gt;Digital Ocean&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Being confined to a phone gave me the push I needed to start building more websites and applications directly in a VPS solution like &lt;a href="https://www.digitalocean.com/solutions/" rel="noopener noreferrer"&gt;Digital Ocean&lt;/a&gt; rather than starting out solely on a local machine. Using a Virtual Private Server (Digital Ocean calls them droplets) allows setting up a development environment and managing files/servers without needing a local environment to work with, since it's on another computer in the cloud. Another benefit of VPS is that from the start, a project isn't tied down to one local machine, even if it hasn't been checked in to version control yet.&lt;/p&gt;

&lt;p&gt;Digital Ocean has proven to be easy to use (and inexpensive), and there is a wealth of documentation and guides for folks new to running servers.&lt;/p&gt;

&lt;p&gt;Accessing the droplet remotely was easy in Buffer Editor, simply involving adding a new SSH connection and filling out the relevant settings with information from the droplet.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fgbb7k3irbt7uz0y2juyw.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fgbb7k3irbt7uz0y2juyw.jpg" alt="Buffer Editor New Connection Form"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Browser Access: Local Server Binding
&lt;/h3&gt;

&lt;p&gt;The wonderful and problematic thing about web development is, of course, the primary thing you need is a browser. Using a VPS to develop, you have access to a terminal console, but not a Graphical User Interface or a traditional web browser.&lt;/p&gt;

&lt;p&gt;When developing a web app, you often need to be able to start a local server and access &lt;code&gt;localhost&lt;/code&gt; in the web browser, since that's where the development server displays the app. Unfortunately &lt;code&gt;localhost&lt;/code&gt; means &lt;em&gt;this computer&lt;/em&gt;, and so it's inaccessible outside of the VPS hosting the app files.&lt;/p&gt;

&lt;p&gt;The workaround here involved learning more about servers and requests:&lt;/p&gt;

&lt;p&gt;When starting a server, it sends what is called a bind request to indicate that it is ready to receive requests associated with an IP address. Local servers typically bind to &lt;code&gt;127.0.0.1&lt;/code&gt; because that IP address is used to loop back to the requesting computer; each computer can only request &lt;code&gt;127.0.0.1&lt;/code&gt; from itself, which is usually convenient for developing.&lt;/p&gt;

&lt;p&gt;That's clearly not an option. You need to have the server bind request indicate its publicly accessible IP address instead so that it's accessible from a browser outside of that computer. This IP address is easily obtained from Digital Ocean, and the workaround involved adding a &lt;code&gt;--binding&lt;/code&gt; flag like this, for starting a Rails server:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;rails s --binding=XX.XX.XX.XX
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, instead of typing &lt;code&gt;localhost:3000&lt;/code&gt; into the browser's address bar to view the app, you would type the publicly accessible IP address, like &lt;code&gt;XX.XX.XX.XX:3000&lt;/code&gt;. As long as the local server is running with the binding flag, the app will be accessible remotely from the server's IP address.&lt;/p&gt;

&lt;p&gt;Buffer Editor is especially convenient by keeping the server running after you back out of the terminal (so you can open it again and continue to develop). This can be confusing at first, but to stop the server, lock and unlock your phone.&lt;/p&gt;

&lt;h3&gt;
  
  
  Get Back to Coding Productivity
&lt;/h3&gt;

&lt;p&gt;From here, you can utilize git like usual, get to work and debug your code wherever you are and regardless of WiFi/Ethernet availability. In fact, the day before my new computer arrived, I was able to make 6 commits and push them to GitHub, all from my iPhone.&lt;/p&gt;

&lt;p&gt;While my day to day coding will be on a traditional desktop or laptop when it's available (since two hands are faster than one), I continue to utilize these tools to work on my projects when I can't bring my laptop somewhere or when mobile internet is all I'll have access to, such as riding in a car.&lt;/p&gt;

&lt;p&gt;I'm actually thankful for the experience of losing access to the computer, because it forced me to find a solution that now allows me to code virtually anywhere.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>coding</category>
      <category>iphone</category>
      <category>tools</category>
    </item>
    <item>
      <title>Nevertheless, Chazona Baum Coded</title>
      <dc:creator>Chazona Baum</dc:creator>
      <pubDate>Wed, 08 Mar 2017 12:44:08 +0000</pubDate>
      <link>https://dev.to/chazonacodes/nevertheless-chazona-baum-coded</link>
      <guid>https://dev.to/chazonacodes/nevertheless-chazona-baum-coded</guid>
      <description>&lt;h2&gt;
  
  
  I began coding because...
&lt;/h2&gt;

&lt;p&gt;English was not my first language. I think partly because of that I've always been fascinated by languages as a means of expression and creativity, both as way to include others as well as to withhold information from those who didn't understand. (Side note: writing your teenage diary in Tolkien runes is a great way to ensure no one you know can ever read it.) Every spare moment growing up was spent on reading or creative writing. By college I had learned English, Latin, Spanish and Japanese, and toyed around with basic HTML and CSS. To me it was the same thing, just a different audience, vocabulary and different grammatical structure.&lt;/p&gt;

&lt;p&gt;Accepted coding culture at my college at the time was pretty different, even though it was only a decade ago. IT and CS were pretty firmly divided, web developers were looked down on by programmers, and no one I knew studying these topics was a woman or nonbinary person; my own presentation was pretty masculine at the time. Even though I was fascinated by the web and was objectively good at math, I let other people's comments get into my head. I never viewed this as a possible "real job" for me, so when the time came to get a real job, I stopped coding altogether.&lt;/p&gt;

&lt;p&gt;Along the way I've been gradually drawn back into code, inquiring about ways to transition into IT departments, but being pushed out of the workforce when I had my kids. When I discovered Free Code Camp's online curriculum last summer, it was the catalyst that got me back to learning code and building things. It kind of feels like coming home.&lt;/p&gt;

&lt;h2&gt;
  
  
  I'm currently hacking on...
&lt;/h2&gt;

&lt;p&gt;I'm currently working with Vue.js to make reactive web apps and games.&lt;/p&gt;

&lt;h2&gt;
  
  
  I'm excited about...
&lt;/h2&gt;

&lt;p&gt;The rapidly changing web development landscape. What we can do with the web has come so far in the last decade! I'm excited to see what new frameworks and technologies emerge and how the web changes as everything gets connected to it, even if we do see some wacky IoT shenanigans along the way.&lt;/p&gt;

&lt;h2&gt;
  
  
  My advice for other women who code is...
&lt;/h2&gt;

&lt;p&gt;Find online communities of women in tech, and if there are Women Who Code meetups or something similar near you, check them out in addition to your regular learning/networking efforts. As a local code meetup organizer, I've definitely noticed how often I am the only woman in the room.ðŸ˜… Having somewhere where you know that won't be the case can help when you feel intimidated or like you don't belong.&lt;/p&gt;

&lt;p&gt;Also, if you happen to be in a position where you can do this: speak up about inclusion of parents even if you don't have kids or plan to yourself. If you haven't had kids, you really don't know how much of our systems in society (at least in the US) are designed to keep women at home if they have young children. Ensuring your workplace has good family leave policies and that your meetups are either family-friendly or show consideration for those who need childcare are a great way to help. Nursing tends to get all the attention, but the barriers don't end there.&lt;/p&gt;

</description>
      <category>wecoded</category>
    </item>
  </channel>
</rss>
