<?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[WorkoutApp - Medium]]></title>
        <description><![CDATA[This is a work blog for my school project - Medium]]></description>
        <link>https://medium.com/workoutapp?source=rss----a18f2870fb02---4</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>WorkoutApp - Medium</title>
            <link>https://medium.com/workoutapp?source=rss----a18f2870fb02---4</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 02:13:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/feed/workoutapp" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Update no. 2 in my quest for Rails and AngularJS fun]]></title>
            <link>https://medium.com/workoutapp/update-no-2-in-my-quest-for-rails-and-angularjs-fun-beb0b1416ae0?source=rss----a18f2870fb02---4</link>
            <guid isPermaLink="false">https://medium.com/p/beb0b1416ae0</guid>
            <category><![CDATA[rails]]></category>
            <category><![CDATA[angularjs]]></category>
            <dc:creator><![CDATA[Chris Stehm]]></dc:creator>
            <pubDate>Sat, 07 Oct 2017 03:10:51 GMT</pubDate>
            <atom:updated>2017-10-07T03:08:10.858Z</atom:updated>
            <content:encoded><![CDATA[<p>Having moved quite a bit further in the development of my little workout app I have realized that I quite like the freedom that Angular on top of Rails has given me. I am able to do some fun things like pull multiple resources into a view without having to nest them, and the instant update ability that Angular gives me is nice, if not frustrating the rest of the time.</p><p>I will say that I ran into huge road blocks with routing. I could not, for the life of me, wrap my head around how I was going to get all the routing working. It just wasn’t clicking. I ended up trying a couple different solutions before settling on Angular-Rails-Resource gem. I was using the built in $http previously, and having no luck getting it to do what I wanted to I moved onto the dependency ngResource, that is part of Angular itself, but you have to inject it.</p><p>After some trial and error, mostly error, with that I found an easier way in the Angular-Rails-Resource gem. It does basically the same things, but for some reason it just clicked, and finally work was getting done. One nice thing that it does is that it allows me to just define the base route that all the Rails routes will build off of. Then I can just build the requests inside an angular controller to control what I want to happen. This frees me up from having to write a factory that controls all the routing, and patching it together manually with the controller in a way that seems like to many steps.</p><p>This has, of course, not been without its troubles, but they are more manageable now that I am able to understand it a bit better. My latest bane has been trying to get things to update without the user refreshing the screen. I could, simply, just tell angular to refresh the page, but that defeats some of the purpose of using Angular with Rails since you could easily just do the same thing with naked Rails. So that’s basically where I stand in my current development. I am getting close to a full working model, and I am moving on to getting the actual “engine” of this beast working so that it can spit out some workouts!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=beb0b1416ae0" width="1" height="1" alt=""><hr><p><a href="https://medium.com/workoutapp/update-no-2-in-my-quest-for-rails-and-angularjs-fun-beb0b1416ae0">Update no. 2 in my quest for Rails and AngularJS fun</a> was originally published in <a href="https://medium.com/workoutapp">WorkoutApp</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Making an App with AngularJS and Rails — Baby Steps]]></title>
            <link>https://medium.com/workoutapp/making-an-app-with-angularjs-and-rails-baby-steps-145c77d6246c?source=rss----a18f2870fb02---4</link>
            <guid isPermaLink="false">https://medium.com/p/145c77d6246c</guid>
            <category><![CDATA[angularjs]]></category>
            <category><![CDATA[ruby-on-rails]]></category>
            <category><![CDATA[ruby-on-rails-development]]></category>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[web-development]]></category>
            <dc:creator><![CDATA[Chris Stehm]]></dc:creator>
            <pubDate>Sat, 07 Oct 2017 03:10:35 GMT</pubDate>
            <atom:updated>2017-09-21T21:24:39.312Z</atom:updated>
            <content:encoded><![CDATA[<p>This is the first post in a series of posts that will be chronicling my journey thru an independent study in which I have tasked myself with creating two Web applications that are both classic web apps as well as mobile apps that can be installed.</p><p>None of these posts will be tutorials, so if you happen to find this, and you are looking for help with AngularJS or Rails then you will be disappointed. I do plan on making tutorials for AngularJS, Rails, and using both together, but that will be at a much later date.</p><p>A quick description of the app I plan to make: I have always had trouble working out. It’s boring and it’s tedious, but I know that it is necessary for me to live a healthy life. Especially since I do a lot of sitting at a computer doing computer-y things. I have bought exercise equipment, and I have even set up a small gym in my garage, but one of the biggest road blocks I face, outside of motivation, is knowing what exercises to do, and knowing enough to fill a full workout. So this app aims to solve that need for me by letting me randomly generate workout routines of varying lengths to simplify the process of working out for me.</p><p>So how will I make this happen? Beats me. Four years of education at two colleges, a focus towards web development, and over forty thousand dollars spent has taught me more Spanish then coding. So that’s why I took on this independent study. I have learned over the years that I work better when learning on my own anyway. To bad I couldn’t have paid myself forty thousand dollars to teach myself. But I digress.</p><p>First, some high level functionality. It will need to give me the ability to separate which exercises I can actually perform by asking me what equipment I have access to. Then store that information in a User profile so I won’t have to re-pick all my equipment every time I go to workout. For the functionality of the app, it will allow you to filter workouts by which part of the body you would like to focus on, but also have a “quick start” option that has no preference on focus. The app will give you the ability to set a time limit for your workout so if you want to workout for 30 minutes it will generate just enough workouts to fill that time up. It will make assumptions about how long each workout will take you, but at the end of the time limit, if you have not filled up your time, you can generate more workouts on a workout-by-workout basis until you select that you are finished.</p><p>I went thru a couple different technology prospects before settling on AngularJS. AngularJS is great, and it has some really awesome things that it brings to front-end, but I needed to have some data persistence so I needed a back end. I fumbled around with a bit of PHP and Node.js, and, at some point later, I will most likely use Node.js for my Angular apps, but I unfortunately do not have the time to learn something completely new. Plus, as of this writing, I have a potential internship at a company that uses Rails so it seemed like a good idea to get back into it, and see if I can tie it up with Angular for the front. With both front-end and back-end decided, the rest was all just making sure everything else works with what I know. MySQL with be the DB manager, and Foundation 6 will be my “styling” framework, for lack of a better term.</p><p>Off to the learning! I ran thru the AngularJS <a href="https://docs.angularjs.org/tutorial/step_00">PhoneCat</a> tutorial to help get my basics down. I did the <a href="https://www.codecademy.com/learn/learn-angularjs">Code Academy</a> AngularJS tutorial, and started with the Ruby, RoR’s, and RoR:Authentication tutorials, because things need some refreshing. I have been looking for more information on connecting Angular with Rails, and I stumbled upon a few resources. Most of which are out of date, and I ended up just wasting a bunch of time, before I found a tutorial that made sense and was made this year: <a href="https://thinkster.io/tutorials/angular-rails">Learn to Build Modern Web Apps with AngularJS and Ruby on Rails</a>. There will also be some Lynda.com in my future as I struggle endlessly to get this, and my second project, completed.</p><p>So what have I learned so far? Well, I learned it’s possible to have AngularJS work as a front-end framework, then tie it into Rails as my backend. Excellent. It seems most of the Angular and Rails tutorials I have found have expected you to understand a lot of what is going on already, but I have questions…Most of the questions relate to how ActiveRecord works with Angulars routing. For the most part, you can just create a Angular service that gets, posts, puts, deletes, etc thru, what seems to be, Rails routing then serve up the information into the Angular controllers where you have to put then bind the changing information to the Angular models or variables. I think that it is simple, but if feels very complicated right now since Rails does things that are magic, smoke and mirrors, and completely mystical unless you have a super strong hold on what is going on with Rails. That and I am not completely comfortable with Angular as of right now. I butchered my way thru a webpage for <a href="http://www.redlinemotorcyclesnj.com/">Redline Motorcycles</a> that used Angular, but there was no backend, and it was a brutal crash course learning experience. I am now trying to follow standards for Angular, as well as Rails, and make them work together while creating code that is serviceable, modular, and all the other buzz words.</p><p>As of this writing, right now, there has been no actual coding on the first project. I wish I could just jump in, and go at it, but I had to lay a lot of ground work first. I will not be doing a lot of visual design for this app, and it will mostly be text based unless I can stop time with some sort of time distortion machine so that I can make all the graphics that would be needed. That’s not going to happen, so I’m not concerned with it. I needed to spend a good amount of time just figuring out what kinda of process I would need to use to get Angular working in Rails. It’s really not all that difficult, but it would have been very frustrating trying to figure it out on my own. I will be writing a tutorial of my own after this semester is over since I feel like some of the concepts are just not explained properly, and if you’re coming from just Rails, or just Angular, there some concepts that probably need to be explained more properly.</p><p>Either way, I did manage to design the database structure, it is pretty simple. Just has a user, user_equipment, equipment, focus, and workout models. Then all the joining tables and such. Rails makes all that really easy thankfully. Also, I have built my template for each app that will speed up getting started since there are a few specific gems to add, bower files, some config, and a few lines that just need to be present for it all to work. One nice point I found out while learning about Rails and Angular is that I have access to both Bower and, ofcourse, Gems. That leaves me with a pretty massive library of tools at my disposal. Sweet.</p><p>I guess that is where I stand right now. I could go in more detail, but this would end up being forever long, and probably just turn into a rant. Oh! One other thing. Test Driven Development. Both Angular and Rails push for TDD, and I would like to start moving my thought process more towards that! But…I have run into issues. The first issue being that I have no clue how to do TDD, but I am willing to learn! The second issue is that Rails uses RSpec and Capybara, and I am on WSL on Windows 10 (Their bash shell) which does not have a GUI so it can not launch a browser meaning that I need to find another way to use both gems. Third, I can get Angular testing working no problem, but that wont work with Rails, or at least I assume, and even if it did it may only work for Angular code. So I will have to revisit TDD with Capybara, but I need to move forward for now. I spent two days trying to get it to work on my laptop, but I will need to find another way around my issues.</p><p>So that’s update numero uno. I will be updating nearly weekly with blabbering’s on my journeys to becoming a Angular Rails Mobile Web Developer…haha…I kinda like that title.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=145c77d6246c" width="1" height="1" alt=""><hr><p><a href="https://medium.com/workoutapp/making-an-app-with-angularjs-and-rails-baby-steps-145c77d6246c">Making an App with AngularJS and Rails — Baby Steps</a> was originally published in <a href="https://medium.com/workoutapp">WorkoutApp</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>