Tech


Javascript vs Ruby

My React Project Takeaways

While working on my final project, I had to create both Functional as well as Class components. In the following sections, I have attempted to highlight some of the major differences and some thoughts on when they are relevant to use in an application.


React-Redux project

I honestly did not think that I would able to pull of the React and Redux project. I wanted to build a price comparison app and specifically wanted to use an external API for it. It took me days to find a price comparison app. My initial idea was to use individual retailer APIs. I tried looking up APIs for many retailers such as WalMart, Ebay, Amazon, Target, Etsy and Best Buy. However, I ran into some challenges in getting access to these APIS. I could not register as a new developer or either had to be an employee in order to have access to the APIs. I was quite frustrated at that point. Yet, I kept going. I tried not to give up so easily. I was able to sign up for developer accounts with Etsy and Ebay. However, I was not so keen on having just two APIS. I wanted to be able to compare prices among mutiple retailers. I kept searching for external price omparison API. I finally found one that provided information of multiple retailers…yes, all within one API. It got me so excited! I used the PriceYuge API to make my app happen. I guess this was one of my biggest challenges during the React-Redux project process.


MVC vs Component based Architecture

When I started my web development journey, I was introduced to Ruby and Rails. I was fascinated with framework and the tools that it provided to build an end to end application using the MVC architecture. The simple routing mechanism along with the Active record based ORM helped a beginner like me stitch together a full blown functional application rather quickly and I was completely in love with this framework.


Scope & Hoisting

This blog is going to discuss two important concepts of JavaScript - Scope and Hoisting.


Rails - JS Project

The Rails and JavaScript project gave me the opportunity to learn as well as implement AJAX to my web application as well as see the the big picture. I took a 4 week prep course last summer and learned the basics of JavaScript such as loops, objects and functions. At that time, I didn’t really know when functions and iterations would come in handy However, i never saw the big picture until now - until I applied these to my Rails and JS web app. I also learned a term in the process of building my Rails and JS app and that is SPA or known as Single Page Application. I believe SPA makes a better user experience. My Rails app consist of three models - students, instructors and appointments. Within my app, Instructors have the options to view students as well create students. I ajaxified the ‘view students’ and ‘create student’ for the instructors. So, when instructors click on the the ‘view students’ button, they can see a list of all the active students but without a page refresh. It goes the same for the create students. When instructors click on the ‘view students button’, they have the option to click on the each student’s name(each one is a link) and view more information about that student - specifically the appointment details. I think this project also helped me see the difference between a an internal API and external API. I look forward to building more SPA’s in the future.