# Common application models

**URL:** <https://www.ruby-forum.com/t/common-application-models/89000>\
**Category:** Rails\
**Created:** [March 16, 2007, 11:50am UTC](https://www.ruby-forum.com/t/common-application-models/89000 "2007-03-16T11:50:28Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![timperrett](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/c5a1d2/32.png) [@timperrett](https://www.ruby-forum.com/u/timperrett)\
**Post date:** [March 16, 2007, 11:50am UTC](https://www.ruby-forum.com/t/common-application-models/89000/1 "2007-03-16T11:50:28Z")

</div>

Hey all

I have the situation where i will be building 3 seperate applications  
that use the same database; and hence the same models.

As I dont really want to duplicate that code for the models, is there a  
way to make it common? They will all be held on the same application  
server

Thanks guys

Tim

---

<div class="post-metadata">

**Author:** ![timperrett](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/c5a1d2/32.png) [@timperrett](https://www.ruby-forum.com/u/timperrett)\
**Post date:** [March 16, 2007, 4:52pm UTC](https://www.ruby-forum.com/t/common-application-models/89000/2 "2007-03-16T16:52:38Z")

</div>

Tim P. wrote:

> Hey all
> 
> I have the situation where i will be building 3 seperate applications  
> that use the same database; and hence the same models.
> 
> As I dont really want to duplicate that code for the models, is there a  
> way to make it common? They will all be held on the same application  
> server
> 
> Thanks guys
> 
> Tim

symbolic links?

---

<div class="post-metadata">

**Author:** ![timperrett](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/c5a1d2/32.png) [@timperrett](https://www.ruby-forum.com/u/timperrett)\
**Post date:** [March 17, 2007, 12:40pm UTC](https://www.ruby-forum.com/t/common-application-models/89000/3 "2007-03-17T12:40:13Z")

</div>

This was my initial thought but i was not sure that it would work? Have  
you ever tried this?

Also, it might mess up capistrano deployment - or there would need to be  
a bespoke recipe at least i would have thought

What do you think?

Ilan B. wrote:

> symbolic links?

---

<div class="post-metadata">

**Author:** ![timperrett](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/c5a1d2/32.png) [@timperrett](https://www.ruby-forum.com/u/timperrett)\
**Post date:** [March 17, 2007, 1:35pm UTC](https://www.ruby-forum.com/t/common-application-models/89000/4 "2007-03-17T13:35:34Z")

</div>

As you use Capistrano, I assume that you use SVN for deployment, too.

I often use svn:externals for such tasks. Create a shared repository for  
all the shared models and use them as external whenever needed. We use  
this at work for our plugin-management, it is a simple approach that  
works quite well.

---

<div class="post-metadata">

**Author:** ![timperrett](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/t/c5a1d2/32.png) [@timperrett](https://www.ruby-forum.com/u/timperrett)\
**Post date:** [March 17, 2007, 1:44pm UTC](https://www.ruby-forum.com/t/common-application-models/89000/5 "2007-03-17T13:44:34Z")

</div>

Florian G. wrote:

> As you use Capistrano, I assume that you use SVN for deployment, too.
> 
> I often use svn:externals for such tasks. Create a shared repository for  
> all the shared models and use them as external whenever needed. We use  
> this at work for our plugin-management, it is a simple approach that  
> works quite well.

Ahh good plan, i will have a lookinto this.

Thanks for the suggestion 🙂

Tim
