[TriLUG] Slightly OT: Question about Reuse of Code in Web Projects

Scott Chilcote via TriLUG trilug at trilug.org
Sat Jul 11 08:27:23 EDT 2015


Hello LUGers,

Suppose you're working on a large-ish web application project with an
established body of JavaScript, jQuery, and Python code in a proprietary
framework.  Then you get tasked with a new web application that needs to
use several of the existing source code files in its own instance of the
framework.

Web frameworks require specific kinds of code and document files (e.g.
CGI, XML) to be in specific directory paths.  How do you create a new
web framework B that exists within a source code repository and uses
source code from A, without duplicating all of those files?

I have been gradually moving from my employer's server/infrastructure
development over to the web browser side, and as our development of the
new web application progresses this issue has become very difficult to
ignore. 

One option would be to build a deployment script for B.  It would update
the working directory for A, then copy the updated source code files
that B requires over to B's framework.  This would probably work, but in
a somewhat hackish and error-prone manner.  What if I forget to run it? 
What if I add a new file from A and forget to update the deployment
script?  Or someone else does?  Lots of hassles.

When I get this far into a software development conundrum, it occurs to
me that someone has probably already come up with an answer.  I've done
a some searches, but am finding it challenging to find the right set of
keywords for Google in this case. 

Would anyone be able to get me headed in the right direction on this? 
Much appreciated!

Scott C.

-- 
Scott Chilcote
scottchilcote at ncrrbiz.com
Cary, NC USA



More information about the TriLUG mailing list