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 9168839
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T15:43:40+00:00 2026-06-17T15:43:40+00:00

In ASP.NET MVC applications and Java web applications, there’s a common practice of keeping

  • 0

In ASP.NET MVC applications and Java web applications, there’s a common practice of keeping business logic in a separate package/dll and treating things like the database and delivery mechanisms (web application, web service, native mobile or desktop, etc.) as details that are plugged in.

Some of the advantages of this type of structuring I can tell are:

  • Reuse of the business logic with different delivery mechanisms or persistence layers
  • It’s possible to run acceptance and unit tests of the business logic without having to load up a web framework or connecting to a database; the tests are very fast
  • Thinking of the application in terms of what it is, not how it is delivered

But this practice is not common in the Rails community; I don’t see any Rails application where the business logic is kept in gems and the main ORMs all tie together persistence logic and business logic. Is there something about Ruby that makes structuring applications in the way I mentioned unnecessary?

  • 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-06-17T15:43:41+00:00Added an answer on June 17, 2026 at 3:43 pm

    Define “necessary”. It’s not necessary to do this in .NET or Java, it’s convenient.

    Rails apps often only expose the web app and related services completely within a single app.

    Testing is similar; there’s no need to break up application functionality in order to test code separately, and testing in Rails is no different: there are unit tests, specs, etc. which can run at any level of the code, and various mechanisms to mock out arbitrary portions of functionality.

    Persistence layers are generally handled by the AR layer, although in practice it’s fairly unusual to actually switch persistence layers (I’ve done so exactly once in thirty years of development, but that’s anecdotal, obviously). In addition, some such switches in Ruby are transparent at the code level because of duck typing (e.g., I switched one app from a local DB to a service, almost transparently, by moving to ActiveResource instead of ActiveRecord, although I did not try to optimize anything afterwards, and the data model was pretty simple.)

    All this said, IMO the Rails community has often overlooked practices from “enterprise” shops because Ruby-the-language makes it very easy to build functionality without a need to over-architect. The limitations of this only become clear after apps reach a certain size, however.

    Recent trends in Ruby and Rails development include things I’ve done in the enterprise for years (and are much easier to implement in Ruby than, say, Java). Breaking out functionality into libraries for its own sake, though, isn’t particularly useful. Identifying code that should be broken out is, but that happens across environments, when it’s necessary to do so.

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

Sidebar

Related Questions

what is the preferred practice when linq2sql using (in asp.net mvc applications): to create
I have two ASP.NET MVC web applications. One of them logs unhandled exceptions to
Are there any open-source examples of ASP.NET MVC applications that use the Entity Framework?
ASP.Net MVC applications has two web.config s. One in the root folder and one
I'm currently transforming my Web Application tn Java with Spring MVC framework from ASP.NET
I'm developing Asp.net MVC applications and since there's quite a bit of in-place server
I'm currently pretty decent at coding C# web applications in ASP.NET MVC 3, PHP
Is it possible to create ASP.NET MVC applications in VS 2010? What should I
I have got a question with regards to upgrading asp.net mvc applications from v1
How to do Forms Authentication Across Applications in asp.net mvc Lets say that two

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.