Login | Register


All times are UTC + 1 hour


It is currently Fri Feb 23, 2018 11:47 am




Post new topic Reply to topic  [ 5 posts ] 
Author Message
 Post subject: javascript project structure
PostPosted: Thu Mar 24, 2011 8:17 pm 
Team Member

Joined: Sun Aug 29, 2010 11:13 pm
Posts: 17
OK so our other smaller projects are javascript based.
We need to define a project structure that can fit technical needs for such projects, very different from C++ based projects.

Requirements :
- be debug-able without any "build" step. just like most web applications. The best tool and properly maintained for debugging js is probably firebug.
- be able to build for multiple platforms ( Elixir for Freebox, webbrowsers, node.js, more to come... )
- hold data ( images and sounds mostly ) thinking that each data type can be handled in a different way ( elixir handle images and sounds very differently ).
- be modular ( made from a lot of different smaller components ) yet able to combine all that in only one small set of files easy to deploy.
- build & deployment can be automated ( using a DCVS and maybe some simple shell scripts )
- work can be done on any decent OS ( Linux, MacOSX, Win7, etc. )
- as simple as possible to make maintenance easy. But not simpler.
- able to generate doc automatically.
- able to run basic use tests and unit tests automatically.

A Few points where we already have solutions :
- DCVS : we are using bazaar because it s the one that if best for us at the moment.
However a few others could also be reconsidered in the future : git, mercurial, darcs.
- build system : make based ( but needs to be simplified.)
However a few others could also be considered : Waf ( node build system, python based ), basic scripts, dojo build system (java-based), and maybe others ?

Do you see any other requirements that we need to satisfy, or any other possibility to satisfy them ?


Top
 Offline Profile  
Reply with quote  
 Post subject: Re: javascript project structure
PostPosted: Fri Mar 25, 2011 2:22 pm 
Team Member

Joined: Sun Aug 29, 2010 11:06 pm
Posts: 78
Requirements:
- we need to be able to be sure that our multiple platforms work exactly has the debugged one (web). Unity testing will be necessary
- auto check (JSLint) and auto compact (JSmin) code on rlz build
- our project structure should let our infographists put their stuff online very easily but wo breaking dev work
- bug tracking should be better handled w dev bug tracking and alpha/beta bug tracking.

Solutions:
- Visual Studio seems pretty good at debugging js code, don't forget Eclipse though
- i think we should have three branches : one demo, one current, one graphists based on current. The actual publish routine based on crons is enough for the job.
- If we decided to have many small projects we should based our bug track on redmine coz its really easy to create a new one and maintain it.

I know it doesn't all impact project structure but i wanted to write it somewhere ;)
Thats all for now.


Top
 Offline Profile  
Reply with quote  
 Post subject: Re: javascript project structure
PostPosted: Sun Mar 27, 2011 10:41 pm 
Team Member

Joined: Sun Aug 29, 2010 11:06 pm
Posts: 78
I think the folder structure should be something like that :

Code:
/
|- materials
|- branches
|- tags
|- trunk
`|- scripts (js scripts and index.html only in order to be allow direct debugging from this folder but nothing else)
  |- docs (graph; specs; ...)
  |- jsdocs (auto gen)
  |- depends
  `|- FDGE
   |- web
   |- elixir
   |- build type X
   |- build type Y
  |- data (content: all files needed to describe data like .edc files for edje/elixir)
  `|- images
   |- fonts
   |- videos
   |- musics
   |- sounds
  |- build (stuff put when the build routine is used)
  `|- web (content directly publishable on platform even if it means duplicating files (no symlink on windows !))
   |- elixir
   |- build type X
   |- build type Y
|- root content (LICENCE.TXT; project files; build script; how to; ...)



It has both advantages of being near what we know for C++ projects and our actual structure. What do u think ?


For the build tool i agree that waf seems pretty cool. I just dont know about the actual code to use it but the makefile code is not, at least in my opinion, very user friendly.


Top
 Offline Profile  
Reply with quote  
 Post subject: Re: javascript project structure
PostPosted: Tue Apr 12, 2011 11:39 am 
Team Member

Joined: Sun Aug 29, 2010 11:13 pm
Posts: 17
So, i posted something, but somehow my login was lots and my post as well..

so i ll say it quickly : no point to put branches / trunk / tags into a branch itself.
whats materials, and why is it not in the main structure
and make the tree display clearer :

Code:

/
|-- folder
|    |-- subfolder
|    `-- subfolder
|-- file
`-- file


and :
- jsdocs inside docs
- needs the exact list of files that have to be in the root. you can get inspiration fro hte GNU project structure or autotols
http://sources.redhat.com/autobook/auto ... html#SEC46
http://www.freesoftwaremagazine.com/boo ... _autotools


Top
 Offline Profile  
Reply with quote  
 Post subject: Re: javascript project structure
PostPosted: Tue Apr 12, 2011 1:43 pm 
Team Member

Joined: Sun Aug 29, 2010 11:06 pm
Posts: 78
Quote:
no point to put branches / trunk / tags into a branch itself.

Sure there is a point, thats always how we did it previously and how other projects keep doing it even when using DCVS (like the redmine project for example). I don't really understand your complaint here ?
EDIT: the bazaar tag seems to work completely different as i was expecting, so my bad here, there is no point.

Quote:
whats materials, and why is it not in the main structure

materials are where artists put their psd files or max files coz it doesnt have to go inside the deployment sources

Quote:
make the tree display clearer

i'm sorry im missing a dash and some space to please u :p

Quote:
jsdocs inside docs

no, one is autogen, the other is not. Plus we sometime want to put the jsdoc online but not others docs. You can always do a main doc folder and two subfolder but wtp ?

Quote:
needs the exact list of files that have to be in the root. you can get inspiration fro hte GNU project structure or autotols

like i said earlier LICENCE.TXT; project files; build script; how to; ...
We can obviously inspire ourselves from other open source project like we always does. I'm just to lazy to do it right now and u know the content as good as me ;)


Top
 Offline Profile  
Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 5 posts ] 

All times are UTC + 1 hour


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron