Difference between revisions of "Developers"

From Cliquesoft
Jump to: navigation, search
Line 1: Line 1:
Below we cover several uniform aspects of our software to make it easy to work on projects even if you're not the original author(s).
+
Below we cover several uniform design aspects of our software to make it easy to work on, even if you're not the original author(s)!  This can be considered our version of "software industrialization" so parts can be swapped out for other manufacturers replacements.
  
  
Line 36: Line 36:
 
<b>* libraries:</b> is used to store the various toolsets, frameworks, and other software to increase functionality.  Examples of sub-directories would be smarty, markdown, jquery, and more.  It's also important to note that each used language of the project will have its own sub-directory as well - php, perl, js, etc.  Those directories will contain envars (discussed below) and global (discussed below) files containing environment various and globally accessed functions for the project.
 
<b>* libraries:</b> is used to store the various toolsets, frameworks, and other software to increase functionality.  Examples of sub-directories would be smarty, markdown, jquery, and more.  It's also important to note that each used language of the project will have its own sub-directory as well - php, perl, js, etc.  Those directories will contain envars (discussed below) and global (discussed below) files containing environment various and globally accessed functions for the project.
  
<b>* modules:</b>
+
<b>* modules:</b> will be used to house each installed module for the project or website.  An example of a module for a project would be notes, journal, email, etc for Threads.  Examples of modules for websites might be "contact us", "road map", "products", "terms and conditions", etc.  This is a way to isolate code for specific tasks that can be easily migrated between projects.  Each module should have it's own sub-directory just like in the images and layouts directories above.
  
<b>* styling:</b>
+
<b>* styling:</b> contains the styling of the form objects and will most likely consist of css files.  Just like the images and layouts directory, each installed style will have it's own sub-directory while also using the same symlinking system to mark the currently selected style by the user(s).  These are also layout specific due to developer-specific naming conventions.
  
<b>* temp:</b>
+
<b>* temp:</b> should be used for all temp files used within the project instead of /tmp for security reasons.
  
<b>* users:</b>
+
<b>* users:</b> is really only used for websites as a place to store specific data on a per-user basic such as avatar pictures, uploads, etc.
 +
 
 +
<b>NOTE:</b> The images, layouts, and styling directories each contain a mandatory, fixed-name directory called "Default" that will house the the modules developer-default data.  This acts as a fallback in the event that a third party replacement doesn't support a particular module.  The modules directory also contains a mandatory, fixed-name directory called "Default" as well.  It contains the code for the "core" of the project.
 +
 
 +
<pre>
 +
Draft: 1.6
 +
Created: 2012/01/28 by Dave Henderson (dhenderson@cliquesoft.org)
 +
Updated: 2012/03/20 by Dave Henderson (dhenderson@cliquesoft.org)
 +
 
 +
 
 +
$PROJECT/ < projects root directory
 +
  index.php < a FIXED filename that bootstraps the loading of the project
 +
 
 +
  images/
 +
Current > ./$IMAGE_SET_NAME/ < a FIXED-name symlink pointing to the user selected image set to use
 +
 
 +
Default/ < the "fallback" directory where each module-developers' default graphics go
 +
  Default/ < a FIXED directory name for the graphics of the "core" of the project
 +
whatever.png
 +
... other graphics ...
 +
 
 +
languages/ < stores specific files relating to the language
 +
  $USERNAME < a FIXED-name symlink for each individual's preference
 +
  en/
 +
  es/
 +
  ... other languages (2 char) ...
 +
  $MODULE_NAME/ < a DYNAMIC directory name that houses the modules' developer-made image set
 +
whatever.png
 +
... other graphics ...
 +
 
 +
languages/
 +
  ... other $MODULE_NAME dirs .../
 +
$IMAGE_SET_NAME/ < a DYNAMIC directory name that houses the image sets' developer-made graphics
 +
  Default/
 +
  $MODULE_NAME/
 +
  ... other $MODULE_NAME dirs .../
 +
... other $IMAGE_SET_NAME dirs .../
 +
 
 +
  layouts/
 +
Current > ./$LAYOUT_NAME < a FIXED-name symlink pointing to the user selected layout to use
 +
 
 +
Default/ < the "fallback" directory where each module-developers' default layout goes
 +
  Default/ < a FIXED directory name for the layout of the "core" of the project
 +
whatever.tpl
 +
whatever.js
 +
... other module layout files ...
 +
 
 +
languages/ < stores specific files relating to the language
 +
  $USERNAME < a FIXED-name symlink for each individual's preference
 +
  en/
 +
  es/
 +
  ... other languages (2 char) ...
 +
  $MODULE_NAME/ < a DYNAMIC directory name that houses the modules' developer-made layout
 +
whatever.tpl
 +
whatever.js
 +
... other module layout files ...
 +
 
 +
languages/
 +
  ... other $MODULE_NAME dirs .../
 +
$LAYOUT_NAME/ < a DYNAMIC directory name that houses the image sets' developer-made layout
 +
  Default/
 +
  $MODULE_NAME/
 +
  ... other $MODULE_NAME dirs .../
 +
... other $LAYOUT_NAME dirs .../
 +
 
 +
  libraries/
 +
cache/
 +
js/
 +
  global.js < A FIXED filename containing globally accessible, repetitive-called functions
 +
  whatever.js
 +
  ... javascript files ...
 +
php/
 +
  global.php < A FIXED filename containing globally accessible, repetitive-called functions
 +
  whatever.php
 +
  ... php files ...
 +
perl
 +
  global.pl
 +
  whatever.pl
 +
  ... perl files ...
 +
jquery/
 +
  jquery.js
 +
  ... jquery files ...
 +
smarty/
 +
  ... smarty files ...
 +
markdown/
 +
  ... markdown files ...
 +
... other globally used libraries dirs ...
 +
 
 +
  modules/
 +
Default/ < a FIXED directory name that houses the "core" of the project
 +
  app.log < a FIXED filename that stores all logging for the "core" module
 +
  whatever.php
 +
  ... other module specific files ...
 +
 
 +
  images > ../../images/Current/Default < a FIXED-name symlink that points to the currently selected image set for the application; NOTE: since this is the "core" of the application, there's no need to worry about this NOT being supported in an image set
 +
  include/ < contains global included files like global.js, jquery.js, etc
 +
js/ < a FIXED directory name containing all module-specific javascript
 +
  whatever.js
 +
  ... other javascript files ...
 +
php/ < a FIXED directory name containing all module-specific php files
 +
  whatever.php
 +
  ... other php files ...
 +
perl/
 +
  whatever.pl
 +
  ... other perl files ...
 +
 
 +
  layouts > ../../layouts/Current/Calendar < a FIXED symlink that points to the current layout for the module
 +
  styling > ../../styling/Current/Calendar < a FIXED symlink that points to the current styling for the module
 +
$MODULE_NAME/ < a DYNAMIC directory name that houses the modules' developer-made layout
 +
  module.log < a FIXED filename that stores all logging for the module
 +
  whatever.php
 +
  ... other module specific files ...
 +
 
 +
  images > ../../images/Current/$MODULE_NAME < a FIXED-name symlink that points to the currently selected image set for the application; NOTE: if the module isn't supported in the image set, this symlink will point to "../../images/Default/$MODULE_NAME" so that the module can work with the developer-made modules images
 +
  include/
 +
  layouts > ../../layouts/Current/Calendar
 +
  styling > ../../styling/Current/Calendar
 +
... other $MODULE_NAME dirs .../
 +
 
 +
  styling/
 +
Current > ./$STYLE_NAME/ < a FIXED-name symlink pointing to the user selected style to use
 +
 
 +
Default/ < the "fallback" directory where each module-developers' default styling goes
 +
  global.css < a FIXED filename containing all the global styling
 +
 
 +
  Default/ < a FIXED directory name for the styling of the "core" of the project
 +
small.css < a FIXED filename representing the style for small screened devices
 +
mobile.css < a FIXED filename representing the style for mini's and tablets
 +
large.css < a FIXED filename representing the style for large screened devices
 +
... other module styling files ...
 +
  $MODULE_NAME/ < a DYNAMIC directory name that houses the modules' developer-made styling
 +
small.css
 +
mobile.css
 +
large.css
 +
... other module styling files ...
 +
  ... other $MODULE_NAME dirs .../
 +
$STYLE_NAME/ < a DYNAMIC directory name that houses the styles' developer-made layout files
 +
  Default/
 +
  $MODULE_NAME/
 +
  ... other $MODULE_NAME dirs .../
 +
... other styling dirs .../
 +
 
 +
  temp/
 +
  [users/]
 +
verify/ < e.g. email verfication processing scripts
 +
avatars/ < e.g. directory containing avatar pictures
 +
drivers/
 +
ads/
 +
... other user data dirs .../
 +
</pre>
  
  

Revision as of 18:00, 25 March 2012

Below we cover several uniform design aspects of our software to make it easy to work on, even if you're not the original author(s)! This can be considered our version of "software industrialization" so parts can be swapped out for other manufacturers replacements.


Version Numbers

Similar to our XiniX distribution of Linux, our version numbers do not adhere to any standards that may be established. Instead we have broken this information down into four groups - (M)ajor.(m)inor.(f)ix.(s)tate. And for those who don't care for indepth knowledge of this topic, the one thing you should commit to memory is the (s)tate "octet". This will ALWAYS be either a zero (0) or a one (1) indicating a beta or stable version respectively.

Now for those who are interested in the indepth explaination of the other preceeding "octets", here we go...


* (M)ajor: is incremented when serious changes to the codebase occur. This number reflects the long-term-ness of the software version and should be incremented rarely by combining at one time as many changes as possible that fall under the below criteria. Using this method should attract developers since there's no need to constantly update their projects that rely on ours as well as to establish solid, reliable functionality of our own products. Our criteria that falls under this "octet" are:

* The files' contained API parameters change
* The code base is re-written for any reason in any language

* (m)inor: is anticipated to have single to lower two-digit numbers as well, especially in modular based projects. By restricting the changing of this number to the below criteria, we've also provided developers with increased longevity of their efforts due to all referenced API's in their code not changing - mostly. The case where code would not work would be the deletion or migration of a used API, however, we're hoping for mostly addition and not deletion. Also, it shouldn't be that complex for developers to find the alternative to their prior API call and provide a small patch to work with the updated codebase. Our criteria for numeric increases in this "octet" are:

* New API's are added to the file
* Existing API's within a file are deleted or merged (to provide an alternative to prior (relavent) functionality)

* (f)ix: will definitely be the "highest mileage" digit of the version number. This is basically the "whatever's left" changes increase this "octet". Below are just a few of the criteria, but in the real world, there's most like more:

* Bug fixes
* I/O modification
* Modification to the internal code of a function - NOT API
* Modification of "root-level" code within the file

* (s)tate: changes when the beta or stable state of the code has changed and will ALWAYS be a zero (0) or one (1) respectively.



Directory Structure

Obviously every developer is going to have their own naming conventions, directory layouts, and other unique traits within their projects. While there's nothing wrong with this as every person is a unique individual, it can pose problems when developers have to work on a codebase that's not their original work. As a result, we've put together a directory structure so that any developer can easily work on our projects. Currently we're on verion 1.6 of this layout, but further updates may occur based on unforseen/unencountered circumstances that take place. Below we'll give an explaination of the top-level directories so that everyone can have a general idea as to where files should be located.

* images: contains the various image sets installed by the user(s) of the project. This directory is responsible for one-third (1/3) of the individual GUI aspects that can be customized by artists, businesses, and other individuals. Image sets are specific to a particular layout due to the naming conventions used by that developer. Each installed image set has it's own sub-directory containing its graphics with a fixed-name symlink (Current) pointing to it that identifies which image set is currently selected for use by the user. In the event that the project must handle multiple users, instead of the single fixed-name symlink (Current), a dynamically-named symlink (members' username) will be used to accomplish this goal on a per-user basis.

* layouts: also contains one-third (1/3) of the individual customizable GUI aspects. Contained within this directory will be the .tpl (or similar format for non-php languages) files responsible for the physical placement of the form objects on the page. Please note that this parent directory contains sub-folders that include all languages used within this software. Just like the image sets mentioned above, each layout will have it's own sub-directory and uses the same symlink naming conventions to mark which one is currently selected by the user.

* libraries: is used to store the various toolsets, frameworks, and other software to increase functionality. Examples of sub-directories would be smarty, markdown, jquery, and more. It's also important to note that each used language of the project will have its own sub-directory as well - php, perl, js, etc. Those directories will contain envars (discussed below) and global (discussed below) files containing environment various and globally accessed functions for the project.

* modules: will be used to house each installed module for the project or website. An example of a module for a project would be notes, journal, email, etc for Threads. Examples of modules for websites might be "contact us", "road map", "products", "terms and conditions", etc. This is a way to isolate code for specific tasks that can be easily migrated between projects. Each module should have it's own sub-directory just like in the images and layouts directories above.

* styling: contains the styling of the form objects and will most likely consist of css files. Just like the images and layouts directory, each installed style will have it's own sub-directory while also using the same symlinking system to mark the currently selected style by the user(s). These are also layout specific due to developer-specific naming conventions.

* temp: should be used for all temp files used within the project instead of /tmp for security reasons.

* users: is really only used for websites as a place to store specific data on a per-user basic such as avatar pictures, uploads, etc.

NOTE: The images, layouts, and styling directories each contain a mandatory, fixed-name directory called "Default" that will house the the modules developer-default data. This acts as a fallback in the event that a third party replacement doesn't support a particular module. The modules directory also contains a mandatory, fixed-name directory called "Default" as well. It contains the code for the "core" of the project.

Draft:		1.6
Created:	2012/01/28 by Dave Henderson (dhenderson@cliquesoft.org)
Updated:	2012/03/20 by Dave Henderson (dhenderson@cliquesoft.org)


$PROJECT/						< projects root directory
   index.php						< a FIXED filename that bootstraps the loading of the project

   images/
	Current > ./$IMAGE_SET_NAME/			< a FIXED-name symlink pointing to the user selected image set to use

	Default/					< the "fallback" directory where each module-developers' default graphics go
	   Default/					< a FIXED directory name for the graphics of the "core" of the project
		whatever.png
		... other graphics ...

		languages/				< stores specific files relating to the language
		   $USERNAME				< a FIXED-name symlink for each individual's preference
		   en/
		   es/
		   ... other languages (2 char) ...
	   $MODULE_NAME/				< a DYNAMIC directory name that houses the modules' developer-made image set
		whatever.png
		... other graphics ...

		languages/
	   ... other $MODULE_NAME dirs .../
	$IMAGE_SET_NAME/				< a DYNAMIC directory name that houses the image sets' developer-made graphics
	   Default/
	   $MODULE_NAME/
	   ... other $MODULE_NAME dirs .../
	... other $IMAGE_SET_NAME dirs .../

   layouts/
	Current > ./$LAYOUT_NAME			< a FIXED-name symlink pointing to the user selected layout to use

	Default/					< the "fallback" directory where each module-developers' default layout goes
	   Default/					< a FIXED directory name for the layout of the "core" of the project
		whatever.tpl
		whatever.js
		... other module layout files ...

		languages/				< stores specific files relating to the language
		   $USERNAME				< a FIXED-name symlink for each individual's preference
		   en/
		   es/
		   ... other languages (2 char) ...
	   $MODULE_NAME/				< a DYNAMIC directory name that houses the modules' developer-made layout
		whatever.tpl
		whatever.js
		... other module layout files ...

		languages/
	   ... other $MODULE_NAME dirs .../
	$LAYOUT_NAME/					< a DYNAMIC directory name that houses the image sets' developer-made layout
	   Default/
	   $MODULE_NAME/
	   ... other $MODULE_NAME dirs .../
	... other $LAYOUT_NAME dirs .../

   libraries/
	cache/
	js/
	   global.js					< A FIXED filename containing globally accessible, repetitive-called functions
	   whatever.js
	   ... javascript files ...
	php/
	   global.php					< A FIXED filename containing globally accessible, repetitive-called functions
	   whatever.php
	   ... php files ...
	perl
	   global.pl
	   whatever.pl
	   ... perl files ...
	jquery/
	   jquery.js
	   ... jquery files ...
	smarty/
	   ... smarty files ...
	markdown/
	   ... markdown files ...
	... other globally used libraries dirs ...

   modules/
	Default/					< a FIXED directory name that houses the "core" of the project
	   app.log					< a FIXED filename that stores all logging for the "core" module
	   whatever.php
	   ... other module specific files ...

	   images > ../../images/Current/Default	< a FIXED-name symlink that points to the currently selected image set for the application; NOTE: since this is the "core" of the application, there's no need to worry about this NOT being supported in an image set
	   include/					< contains global included files like global.js, jquery.js, etc
		js/					< a FIXED directory name containing all module-specific javascript
		   whatever.js
		   ... other javascript files ...
		php/					< a FIXED directory name containing all module-specific php files
		   whatever.php
		   ... other php files ...
		perl/
		   whatever.pl
		   ... other perl files ...

	   layouts > ../../layouts/Current/Calendar	< a FIXED symlink that points to the current layout for the module
	   styling > ../../styling/Current/Calendar	< a FIXED symlink that points to the current styling for the module
	$MODULE_NAME/					< a DYNAMIC directory name that houses the modules' developer-made layout
	   module.log					< a FIXED filename that stores all logging for the module
	   whatever.php
	   ... other module specific files ...

	   images > ../../images/Current/$MODULE_NAME	< a FIXED-name symlink that points to the currently selected image set for the application; NOTE: if the module isn't supported in the image set, this symlink will point to "../../images/Default/$MODULE_NAME" so that the module can work with the developer-made modules images
	   include/
	   layouts > ../../layouts/Current/Calendar
	   styling > ../../styling/Current/Calendar
	... other $MODULE_NAME dirs .../

   styling/
	Current > ./$STYLE_NAME/			< a FIXED-name symlink pointing to the user selected style to use

	Default/					< the "fallback" directory where each module-developers' default styling goes
	   global.css					< a FIXED filename containing all the global styling

	   Default/					< a FIXED directory name for the styling of the "core" of the project
		small.css				< a FIXED filename representing the style for small screened devices
		mobile.css				< a FIXED filename representing the style for mini's and tablets
		large.css				< a FIXED filename representing the style for large screened devices
		... other module styling files ...
	   $MODULE_NAME/				< a DYNAMIC directory name that houses the modules' developer-made styling
		small.css
		mobile.css
		large.css
		... other module styling files ...
	   ... other $MODULE_NAME dirs .../
	$STYLE_NAME/					< a DYNAMIC directory name that houses the styles' developer-made layout files
	   Default/
	   $MODULE_NAME/
	   ... other $MODULE_NAME dirs .../
	... other styling dirs .../

   temp/
   [users/]
	verify/						< e.g. email verfication processing scripts
	avatars/					< e.g. directory containing avatar pictures
	drivers/
	ads/
	... other user data dirs .../



ENVARS

Explain what goes in these files


Examples

Provide examples of these files


GLOBALS

Explain what goes in these files


Examples

Provide examples of these files