Our great sponsors
-
InfluxDB
Power Real-Time Data Analytics at Scale. Get real-time insights from all types of time series data with InfluxDB. Ingest, query, and analyze billions of data points in real-time with unbounded cardinality.
I recently laucnhed an app that captures screenshots, downloads source code, and monitors DNS records. reflect of it like the Wayback Machine on steroids. I had a lot of fun working on this and wanted to share the source code and some concepts I learned. * Demo * Source Code # Concepts I learned * I took my first stab at metaprogramming. This came in handy when I needed to gather DNS records. I used the keys from an enum to dynamically instantiate different classes in Resolv. * I have a much better understanding of how to build subscription models now. I used the Pay Gem for the first time, and can't stress how helpful it is. You can see how I implemented it in the SubscriptionsContoller, ResumeSubscriptionsController, and the CreditCardsController. * I went headfirst into service objects. I structure them all using OpenStruct. I owe Nick Haskins' Playbook Thirty-Nine all the credit since I learned about that concept from his book. * I avoided using callbacks in favor of executing code in the controllers. I also started adding methods to my models that are more expressive like this. * I learned that has_one (and other similar methods) can be used to create more custom associations.
I recently laucnhed an app that captures screenshots, downloads source code, and monitors DNS records. reflect of it like the Wayback Machine on steroids. I had a lot of fun working on this and wanted to share the source code and some concepts I learned. * Demo * Source Code # Concepts I learned * I took my first stab at metaprogramming. This came in handy when I needed to gather DNS records. I used the keys from an enum to dynamically instantiate different classes in Resolv. * I have a much better understanding of how to build subscription models now. I used the Pay Gem for the first time, and can't stress how helpful it is. You can see how I implemented it in the SubscriptionsContoller, ResumeSubscriptionsController, and the CreditCardsController. * I went headfirst into service objects. I structure them all using OpenStruct. I owe Nick Haskins' Playbook Thirty-Nine all the credit since I learned about that concept from his book. * I avoided using callbacks in favor of executing code in the controllers. I also started adding methods to my models that are more expressive like this. * I learned that has_one (and other similar methods) can be used to create more custom associations.
Related posts
- Implement paypal in my Rails 6 app
- PayPal checkout integration with v2 API
- DB Design for SaaS Subscriptions
- Help with simple payment app! Which components can I use to build a full stack Rails and Hotwire based page, that can take subscription based payments?
- New Episode! Chris Oliver on Code and the Coding Coders who Code it