Code Challenge - Day 13. Choosing Rails, getting into the swing and thoughts on a multi tenancy app.
In my previous posts, I was arguing with myself what ‘stack’ I would use for the codebase. I was certain that ASP.NET Core would tick the right boxes. I already know C# and thought I would be fairly comfortable just getting into it.
Installing and launching Visual Studio for Mac was as easy as just downloading it. Yeah, it had to grab some extra stuff… so like in the usual Microsoft fashion it downloaded gigabytes of stuff ¯\_(ツ)_/¯
I created a new project to get me right into it. Faced with a learning curve to get to know the new and improved ASP.NET Core v2, the last time I looked they just rolled out the first RC1 for version 1. That was an exciting time!
Then it dawned on me… I really had to learn a lot. Not too much, but enough to make me re-think my blip of judgment.
I fell asleep that night and actually dreamt about Ruby on Rails… the great podcasts, the amazing community around it and the amount of help found just around the internet. I listen to “The Bike Shed” podcast a lot… well, used to. I have a memory from one of the hosts a few years back saying that they called their newborn “Ruby” because they loved the language so much. Any “C#”’s walking around? Email me!
It was those years that I really longed to learn Ruby and write an actual app using Rails.
This morning I re-visited the Ruby on Rails tutorial by Michael Hartl to jog my memory as it has been some time… oh boy did I get hooked straight away! The book is amazing! So if you’re starting out or need to jog your memory I urge you to buy it! There is also a free online version.
My heart longs for Ruby, I just didn’t let it in enough of fear of being behind on it.
I’m happy I chose to stick to what my deep inner developer wants. I don’t know why I go through this stage with projects… at the end of this I will me more confident than I ever was, I am sure of that!
So with all that out the way, I started the dev build… `rails new SimpleSchedule.App.Rails`.
That’s the splash screen after you first run `rails server`. I really like that! And yeah… I know it’s just a picture… but go on and check out the ASP.NET one… I’d love to show you but Visual Studio is taking around 50 seconds to launch and is beach balling on me… It’s the little things! Nothing like instantly launching Sublime Text and off you go and develop.
Oh, here you go:
I guess a bit more useful… but it decided to add a lot of things for me. And yeah, I can set it up so it starts with nothing…
Anyway, sidetracking there. Visual Studio is nice, but I just can’t get past the little things… they matter in a developers life I think.
Getting into the swing
This is my first full Rails app. There you go, I said it! I did dabble around with it in the past, but nothing ever as serious as this app. I am happy I have taken the plunge… finally!
Today, I just spent most of the day going through the Rails Tutorial, building on that. I think I did this twice already, but I find it’s a great way to get me thinking about it all.
I’ll continue until it’s done and hope to, either tomorrow or the day after, start building out the first few sections of the app. Namely the login and register sections.
Whilst doing this I also played around with Heroku and the Heroku Pipelines. I want to obviously separate the “dev” to the “live” site always. Pipelines seem to tick that box nicely.
I’m planning to share the “dev/staging” url during development as I think would be fun for other people to try and break stuff on the way. You could probably guess the URL. Anyway, I won’t share until the login and register is done, as that is a crucial first milestone. Unfortunately I will probably wipe the database a few times before beta, just for fun!
I’ll need to play a bit more with pipelines but I think I have the hang of those!
Certainly easier than navigating Microsoft Azure. Although, I do like the Azure UI for some bizarre reason.
Hope to have something early next week!
Multi Tenancy
I’ve never created a multi tenancy app. Multi Tenancy basically is an app that allows many users, with one database, each with their own data (to keep that really really simple). You can read up about it here though.
I’m scratching the surface on how to best handle this, with storing user id’s next to each entry (yes and no... and if I want to sleep at night... no) or if I should use something like Apartment which basically creates a new schema in PostgreSQL, which is quite cool.
I do like to write something to handle this myself as I’m not a huge fan of using too many third party gems/plugins. It’s always been like that with me. Even my own iOS apps have no third-party code… just mine (except the Apple frameworks of course).
Let’s see how it goes though. Yet to really nail that database design. I’m used to database design using SQL Server, from Microsoft, which was cool. But I always wanted that code first approach anyway.
Next steps and thoughts
Quick thoughts on Rails is that I’m happy that I bit that bullet. It feels natural and Ruby is a great language!
For the next steps, apart from missing designs like email templates etc, I’d like to get something out to use early next week for people to try. There are a fair few beta sign ups already, which is really great!
I’ll need to think of a way to get feedback before beta too, may it be Slack, Discord or some other medium. I don’t want to be a closed box or anything and I rather develop in the open.
The pressure is on, so I better get going.
I wrote this article mainly for myself to follow along when I look back at it at some stage. If you like to contribute, please email me or let me know via Micro.blog. There is also the Simple Schedule holding site where you can sign up for a beta.
For other posts on the challenge, check out the links below:
- Code challenge - from zero to web app in 60 days.
- Code challenge - Prelude and Day 1 - Setting things up.
- Code challenge - Day 2.
- Code challenge - Day 3. Holding page.
- Code Challenge - Day 4. A login page and a few tweaks.
- Code Challenge - Day 5. Registration page and preliminary app navigation.
- Code Challenge - Day 6. Getting in the groove, new events, MVP considerations.
- Code Challenge - Day 7. 'My Events' view.
- Code Challenge - Day 8. Burning the midnight oil, loud music and good progress.
- Code Challenge - Day 9. Progress, changes and regrets.
- Code Challenge - Day 10. There are no events, pricing thoughts and badges.
- Code Challenge - Day 11. New logo, further changes to event details and a tiny tweak.
- Code Challenge - Day 12. Final frontend stretch.