473,788 Members | 2,672 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

project directory tree/structure your favorite?

I have been working on a rather large project. And I have been
thinking about the structure of how I organize my project apps and
libraries. It's intended as a framework type system where you can
place in parts and configure as needed, there are shared libraries for
authentication, and common code for validation and data management.

Presently the directory tree is like this:

Menu.php
-app 1 dir (maillist.php, mailedit.php, mailreport.php etc.)
-app 2 dir (libraryedit.ph p, library reports.php, etc.)
-app 3 dir
-config dir
-shared libraries dir (datetimelib, dblib, etc.)
-system apps dir (admin tools: useredit.php, groupedit.php, etc.)

It works OK, but I go horizontally to include a library:
require_once "../libraries/somelib.php";

Having used Dokuwiki I've been pondering its always up structure,
where you have a shell doument at the root level of your project and
everything are in subfolders and you include included as needed into
the main (shell) app..

appshell.php (everything happens here)
- libraries
- config
- modules (apps)
- - admin module
- - module 1 (includes for app 1)
- - module 2
- - module 3

Have you tried this sort of structure?
What do you guys use/prefer?
Any tips that makes management easier?

Thanks
Dec 10 '07 #1
3 2957
la***@portcommo dore.com wrote:
...snipped...

Have you tried this sort of structure?
What do you guys use/prefer?
Any tips that makes management easier?
Well the structure depends on the project requirements. On my own
framework i use following structure:

/etc - misc files (readable)
/img - images (readable)
/lib - libaries (readable)
/sys - php files, classes and config files
/tpl/designname - template files of a design
/var - files created by the system/application
index.php - main file (readable)

(readable) mean that the web user can access these diretories/files.

The system and every application has their own folder in every of these
directories.

That way the system files and files of every application have their own
storage and are completly separated.

Joe
Dec 11 '07 #2
On Dec 10, 11:50 pm, Joe Scylla <joe.scy...@gma il.comwrote:
[snip]
>
The system and every application has their own folder in every of these
directories.

That way the system files and files of every application have their own
storage and are completly separated.

Joe
So, do the programss all run through index.php, or are they called
directly
Dec 11 '07 #3
la***@portcommo dore.com wrote:
On Dec 10, 11:50 pm, Joe Scylla <joe.scy...@gma il.comwrote:
[snip]
>The system and every application has their own folder in every of these
directories.

That way the system files and files of every application have their own
storage and are completly separated.

Joe

So, do the programss all run through index.php, or are they called
directly
Every request goes through the index.php. The index.php calls a router
object that acts like the Zend_Controller _Router_Rewrite extraction the
information of the request and calling the requested application classes
and scripts.

So the scope of the script is always on the same level as the index.php.
A include statement for a libary will be the same for every application.

Joe
Dec 11 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
5339
by: FISH | last post by:
Ever have one of those days when you're not sure if it's you who's gone mad, or the rest of the world? I have an Open Source project on SourceForge for communication with YSMG - Yahoo's IM protocol. I keep the project source in three directories, based upon the code's function: one for the network API code itself, one for the support APIs (basic chat spam filtering, Swing models, rich text decoders, etc), and one for the test client...
2
5367
by: MENTAT | last post by:
Hi, I am trying to create an installer for my web application. So I added a web setup project to my solution (I am using VS.NET 2003). Been playing around with it since then and it basically works. Now, I am wondering if there is any way to change the directory that the installer installs the files to. I want to be able to put my files in a specified directory (user specified is good, but i don't mind hardcoding the path either) and...
4
9245
by: shane | last post by:
From searching around, Ive seen this question asked numerous times, but havent seen a usable answer unfortuantly. What Im trying to do is something I would have thought would be quite common, but there just seems to be no information on the topic that I can find. Basically I need to store a directory structure in memory, from a flat list of files and paths. ie given: C:\dir\dir1\abc.txt C:\dir\toop.txt
1
1210
by: PeterPr | last post by:
I need a routine that will step through a text file of consistent structure and, based on the content of each line, construct and save another text file. Outline of the project is as follows: 1. Prompt for location and name of input text file by displaying directory structure from a default location. 2. Prompt for location of new file with default location tree navigation shown. 3. New file name to be same as original but with suffix...
3
2558
by: _DS | last post by:
Problem with mapping a directory tree to a tree control: It takes a while to recurse subdirs and map them to nodes. This is solved in some books I've seen (MacDonald, Albahari) by reading the subdir only when its node on the tree control is opened. Has anyone pre-packaged this functionality into a control?
10
2083
by: Alan Searle | last post by:
I would like to scan a directory structure into XML to offer navigation functionality in HTML / XSL pages. My questions are: 1. Which is the best structure to store variable depth heirarchies in XML (i.e. different branches of the directory structure will have different 'depths'). 2. I am currently using VBA to prepare the pages and export to XML and
0
5576
by: gunimpi | last post by:
http://www.vbforums.com/showthread.php?p=2745431#post2745431 ******************************************************** VB6 OR VBA & Webbrowser DOM Tiny $50 Mini Project Programmer help wanted ******************************************************** For this teeny job, please refer to: http://feeds.reddit.com/feed/8fu/?o=25
13
2816
by: lawpoop | last post by:
Hello all - I have a two part question. First of all, I have a website under /home/user/www/. The index.php and all the other website pages are under /home/user/www/. For functions that are used in multiple files, I have php files under / home/user/www/functions/. These files simply have So, in index.php and other files, I have
1
3835
RRick
by: RRick | last post by:
I have a unix C++ project that needs to be converted over to windows visual studio. I'm not sure of the exact version of VS, but it's a recent version, probabIy 2003 or 2005. I would like the windows directory tree to mimic the unix tree as closely as possible, but I don't want duplicate files and other inconsistencies. I have come up with an idea but I don't know how close it fits a "typical" windows project. If you know of specific...
0
9498
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10373
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10177
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10118
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9969
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8995
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5403
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5538
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2897
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.