Share or clone code.

Not for 'how-to' coding questions but PHP theory instead, this forum is here for those of us who wish to learn about design aspects of programming with PHP.

Moderator: General Moderators

Ginja_Ninja
Forum Newbie
Posts: 3
Joined: Wed Jan 17, 2007 11:21 am

Share or clone code.

Post by Ginja_Ninja »

Hello all.

I am new to the forums so a big hello is in order.

HELLO.

I have a quick question.

Imagine you have two websites which run on identical code.
Is it more efficient to get both site's to share the same code base, or should each site have its own repository of code. I am trying to weigh this up and maybe you all could shed some light.
My concern is the performance drops under heavy loads.

I have a feeling it wont make a difference but i am unsure. All your thoughts are greatly appreciated.
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

I think it depends on whether you are continuing to develop the code base. If you never change it or it is from an external source then keep it central. If it gets improvements and additions then each site should have their own copy to reduce the need to maintain BC.
(#10850)
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

I am currently developing a series of sites (a network, if you will) for a league. I am hosting their entire network on a dedicated server and as a result, the entire network is using a single codebase. The nice thing is that maintenance keeps everything in one place, and if they ever bail, I can copy the codebase and hand it over to them. Portable coding makes it a drop in place type of app that they upload to another server, set the database up, change a param and be up and running in no time.
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

Welcome Ginja_Ninja, I am also a ninja. Image :lol:

Hay YA! Wha-POW!

/offtopic
User avatar
daedalus__
DevNet Resident
Posts: 1925
Joined: Thu Feb 09, 2006 4:52 pm

Post by daedalus__ »

Everah wrote:I am currently developing a series of sites (a network, if you will) for a league.
GAMING LEAGUE?!
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

The Ninja Space Goat wrote:Welcome Ginja_Ninja, I am also a ninja. Image :lol:

Hay YA! Wha-POW!
Uhhhhh ... uhhhhh .... uhhhhhh ... neither of you are really ninjas ..... :nono:

PS - is that a ninja emoticon or a blinking meatball?!?
(#10850)
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Post by jayshields »

arborint wrote:
The Ninja Space Goat wrote:Welcome Ginja_Ninja, I am also a ninja. Image :lol:

Hay YA! Wha-POW!
Uhhhhh ... uhhhhh .... uhhhhhh ... neither of you are really ninjas ..... :nono:

PS - is that a ninja emoticon or a blinking meatball?!?
/me rolls eyes

It's obviously a blinking meatball..!
User avatar
Christopher
Site Administrator
Posts: 13596
Joined: Wed Aug 25, 2004 7:54 pm
Location: New York, NY, US

Post by Christopher »

jayshields wrote:It's obviously a blinking meatball..!
Ok ... I think it's holding a toothpick so it must be an hors d'oeuvre meatball.

<chant>
Ninja's an hors d'oeuvre meatball!
Ninja's an hors d'oeuvre meatball!
Ninja's an hors d'oeuvre meatball!
Ninja's an hors d'oeuvre meatball!
(#10850)
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

:evil: it's a sword!
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

arborint wrote:PS - is that a ninja emoticon or a blinking meatball?!?
In the words of a Bacon Burrito...

mmm... meatballs
User avatar
Ollie Saunders
DevNet Master
Posts: 3179
Joined: Tue May 24, 2005 6:01 pm
Location: UK

Post by Ollie Saunders »

* ole attempts to start a new catchphrase
It's off topic but I like it.
User avatar
Maugrim_The_Reaper
DevNet Master
Posts: 2704
Joined: Tue Nov 02, 2004 5:43 am
Location: Ireland

Post by Maugrim_The_Reaper »

Why is the meatball's eyes so shifty?
User avatar
Luke
The Ninja Space Mod
Posts: 6424
Joined: Fri Aug 05, 2005 1:53 pm
Location: Paradise, CA

Post by Luke »

he's got to guard himself from being eaten?
User avatar
RobertGonzalez
Site Administrator
Posts: 14293
Joined: Tue Sep 09, 2003 6:04 pm
Location: Fremont, CA, USA

Post by RobertGonzalez »

No, it's because he's hungry and afraid he might eat himself.
User avatar
Ambush Commander
DevNet Master
Posts: 3698
Joined: Mon Oct 25, 2004 9:29 pm
Location: New Jersey, US

Post by Ambush Commander »

Steering the thread back on topic, as much as possible, try to keep the two codebases as close together as possible. A versioning tool like SVN will help greatly.
Post Reply