Skip to main content
Full Stack Radio

107: Sam Selikoff - Pushing Complexity to the Client-Side

50 min episode · 2 min read
·

Episode

50 min

Read time

2 min

AI-Generated Summary

Key Takeaways

  • JSON API Resources gem: Eliminates controller code by declaratively defining resources in Rails that automatically handle CRUD operations, routing, and model mapping. Developers specify relationships and attributes, letting the gem generate standard endpoints without writing custom controller logic.
  • Client-driven validation strategy: Implement duplicate validations on client and server, using client-side checks for immediate feedback and server validations as the canonical guard. For uniqueness checks, query the API for existing records rather than creating custom validation endpoints, keeping the server dumb.
  • Direct S3 uploads pattern: Request signatures from the server as a resource, upload files directly to S3 from the client with that signature, then update the model with the returned URL. This eliminates server bandwidth doubling and enables rich upload experiences with progress bars.
  • Escape hatches for custom logic: Use before_save and after_save hooks on resources or drop into custom controllers when needed for operations like Stripe payments or email notifications. Ninety percent of code remains declarative CRUD operations, with custom logic only where absolutely necessary.

What It Covers

Sam Selikoff explains how to build client-side applications using Ember and Rails APIs, focusing on keeping server code simple by pushing complexity to the client through JSON API conventions and declarative resource definitions.

Key Questions Answered

  • JSON API Resources gem: Eliminates controller code by declaratively defining resources in Rails that automatically handle CRUD operations, routing, and model mapping. Developers specify relationships and attributes, letting the gem generate standard endpoints without writing custom controller logic.
  • Client-driven validation strategy: Implement duplicate validations on client and server, using client-side checks for immediate feedback and server validations as the canonical guard. For uniqueness checks, query the API for existing records rather than creating custom validation endpoints, keeping the server dumb.
  • Direct S3 uploads pattern: Request signatures from the server as a resource, upload files directly to S3 from the client with that signature, then update the model with the returned URL. This eliminates server bandwidth doubling and enables rich upload experiences with progress bars.
  • Escape hatches for custom logic: Use before_save and after_save hooks on resources or drop into custom controllers when needed for operations like Stripe payments or email notifications. Ninety percent of code remains declarative CRUD operations, with custom logic only where absolutely necessary.

Notable Moment

Selikoff describes building a real-time conference app using Firebase and Ember where creating models in the Firebase console instantly updated the Ember application in another browser without any custom synchronization code, demonstrating the power of hosted backend services.

Know someone who'd find this useful?

You just read a 3-minute summary of a 47-minute episode.

Get Full Stack Radio summarized like this every Monday — plus up to 2 more podcasts, free.

Pick Your Podcasts — Free

Keep Reading

More from Full Stack Radio

We summarize every new episode. Want them in your inbox?

Similar Episodes

Related episodes from other podcasts

This podcast is featured in Best Cybersecurity Podcasts (2026) — ranked and reviewed with AI summaries.

You're clearly into Full Stack Radio.

Every Monday, we deliver AI summaries of the latest episodes from Full Stack Radio and 192+ other podcasts. Free for up to 3 shows.

Start My Monday Digest

No credit card · Unsubscribe anytime