Home - Thewessen/tic-tac-toe_ruby_backend GitHub Wiki
Welcome
For a potential new job, they asked me to make a simple tic-tac-toe game using Emberjs in the frontend and Ruby on Rails in the backend. Both frameworks which I'm not familiar with. Pretty exciting and a good learning oppertunity!
In this wiki I'll describe the progress of creating a tic-tac-toe game using Ruby on Rails and Emberjs. The repositories for these projects can be found here:
Disclaimer
Creating this app serves two purposes:
- Creating an app for the job interview.
- Learning both languages/frameworks.
Because learning is a big part of creating this app, you might see me do things that overcomplicate the app. For example: creating nicknames for working with a many to many relationship. Or creating a different route for picking a nickname in Emberjs. I do this because I want to dive into different aspects of both frameworks (the learning part).
Ruby on Rails
I have no experience with the Ruby programming language. Let alone the Ruby on Rails framework. I just recently dived into Laravel (php framework) which helped my learning process quite a bit.
This app doesn't need much of a backend too run. But, creating this app also for learning, I wanted to make the backend an almost equal part of the app.
Emberjs
Coming from Angular and React, I thougt working with Emberjs wouldn't be that much different. But I was naive. A big difference is the use of classes vs Ember Object, and the way they are used for databindings. It wasn't until the last day I realized what Emberjs and Ember Object are all about.
If I just had more time...
Creating this App was great! It made me cover quite a lot of ground in the Emberjs framework. For learning, their are some parts I didn't cover, and would have if I had more time:
- Creating unit/application tests.
- It's a good idea, before (or after) implementing something, to write a test. I skipped this part, because I thouged learning it would be to much time consuming
- Working with EmberObjects as 'classes'.
- I didn't dive as much into the Ember Object system as I would liked.
- Creating route params.
- It would be so nice to go back to a game in progress after reloading
For development purposes:
- Scoring and 'next game' option.
- Proper error handling.
- their are still way's to break the game. For example: when the backend api is unavailable
- Creating a 'load' and 'save' game option.
- Working with signed in users:
- Creating a multiplayer options by sharing a url between two users currently signed in.
- A global highscore to view different user's winning/loosing stats.
- Creating a 'A.I'-user for playing against the computer.
- Better styling.
- _I didn't want to give styling much attention. The instructions hint using Material Design Light for quick styling. Although I didn't know the css-framework. I thouged making it part of my learning experience. But the framework didn't feel native to me, and I made some 'quick-fixes' just to get it to work properly. This could have bin done nicer.'