Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 782125
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T20:20:14+00:00 2026-05-14T20:20:14+00:00

Recently, when I tried to explain why Ruby on Rails is a domain-specific language

  • 0

Recently, when I tried to explain why Ruby on Rails is a domain-specific language (DSL) to an intern at my organisation, I was not able to articulate my reasoning to the effect I would like to. Maybe I do not understand the space well enough to teach the nuances. Redirecting him to Martin Fowler’ article or the Google ranked one InfoQ or other material has not helped much either.

Can some explain why Rails is a DSL with an example / parallel situation which is not voodoo stuff for someone who is fairly new to the world of code? Understanding the ideology might also help in elaborating the intricacies of the rails ecosystem?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T20:20:15+00:00Added an answer on May 14, 2026 at 8:20 pm

    Technically, ruby is not a DSL, it just lends itself to writing internal DSLs very cleanly. This link to Martin’s Fowler’s blog wiki should help clarify things.

    Rails has been described as a DSL although I think of it more precisely as a framework that makes very good use of a few DSLs.

    Edit: The intro to the public version of Martin Fowler’s DSL book has a motivating example, although it is still aimed a bit more at programmers.

    Edit again: The “voodoo” example can be useful if you point out that ruby allows ruby code to look like

    port 2001
    
    respond :resource=>"/hello" do  |request, response|
      response.body = "<message>hello</message>"
    end
    

    which is cleaner than calling the methods directly. Implementing a DSL can require “voodoo” like code (it is much harder creating a DSL than using one), and in general someone relatively new to coding should worry first about what the DSL does and not so much how it is implemented.

    What makes ruby good at internal DSLs includes (1) use of blocks (any language with clean closures has this advantage), (2) method class that do not require parentheses, and (3) the ability to modify classes on the fly (which is what validates does). There are probably more I haven’t thought of.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 441k
  • Answers 441k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer This will give you the number of nanoseconds between the… May 15, 2026 at 5:26 pm
  • Editorial Team
    Editorial Team added an answer when I do the following it works { new SelectListItem{… May 15, 2026 at 5:26 pm
  • Editorial Team
    Editorial Team added an answer The length() of such a POSIXlt used to be reported… May 15, 2026 at 5:26 pm

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.