Rails - JS Project

Posted by Sruthi Krishna on June 19, 2019

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.