10
\$\begingroup\$

This is mostly related to the following two questions:

  1. Web application structure review

    I'd like to have suggestions about the structure of my web application.

    What the app does: My app receives files from about 800 scanners around my country and the users see the scanned pages into this web application, then they can organize the pages in groups, choose which one keep and which one discard, and insert some additional information to each group. After this, another kind of user check what the first type of user has did and approve or discard each group of pages.
    After that, a procedure on another server transforms each group in PDF and TIFF multi page.

    After this little background to have an idea of what my web app does, this is how the files tree looks:

    ajax
    |- ajaxaction1.php
    |- ajaxactionx.php
    
    cache
    |- xxx_xxxxxxxxxxxx.gif
    
    css
    |- style.min.css
    |- font-awesome.min.css
    
    fonts
    | here there are the fonts needed by font-awesome.min.css
    
    js
    |-functions.min.js
    |-main.min.js
    |-jquery.x.x.x.min.js
    |-jquery.x.x.x.min.map
    |-jquery.lib1.min.js
    |-jquery.libx.min.js
    
    views
    |-features.php
    |-features.tpl
    
    config.ini // DB configuration file
    index.php // the page that is used by the application
    init.php // read description below
    web.config // used to restrict access to only the right files
    

    ajax: Folder where there are PHP scripts that are called by Ajax to perform INSERT and UPDATE queries to database.

    cache: Folder where there are temporary .gif files extracted from the scanned pages sent from the scanners to my server. These images stay here just the time needed to process them, then them are deleted.

    […]



    I'd like to have reviews about how I've organized the files and folders of my application.

  2. Shaky on QUnit folder structure

    I want to write something serious in JavaScript for the first time in my life. Knowing this, I want to do TDD and write unit tests. I have experience in JUnit, but yet, how to structure my project with QUnit (my choice of framework) remains a mystery to me.

    I'm thinking something like this:

    my-script
    - css
      - my-script.css
    - js
      - lib
        - jquery.min.js
    - src
      - my-script.js
    - test
      - qunit
        - qunit.css
        - qunit.js
      - unit
        - unit-a.js
        - unit-b.js
      - index.html
    - index.html
    

    Is this bad design?

    First of all, my JavaScript will be dependent on jQuery (js/lib/jquery.min.js) and needs a CSS file (css/my-script.css) of my own design. Unit tests will be run from test/index.html and included from unit. Other files needed for the tests will have to be included from ../css, ../js and, of course, ../src.

    Or should the test directory have its own separate libraries? Should the tests try several versions of jQuery? What if I want to test some "positional" property which requires my CSS?

    The root directory index.html would give me the opportunity to do some manual, functional tests, to see that the CSS renders correctly. A demo page, more or less.

    And yes, guidelines on how to structure my JS when writing TDD? Until now, I've been hacking along, but I feel I need som structure.

Question 1 was upvoted and answered, question 2 was closed. The difference is that question 1 is about reviewing an existing project structure while question 2 is about helping to find a project structure.

I agree that question 2 should be closed (I added my close vote) but should question 1 also be closed as it's technically not a code review?

\$\endgroup\$

2 Answers 2

6
\$\begingroup\$

I believe that first question should be on Programmers. We should flag it and see how well our new moderator handles it.

\$\endgroup\$
2
  • 2
    \$\begingroup\$ They both should be migrated to programmers imho. \$\endgroup\$ Commented Nov 19, 2013 at 19:42
  • 6
    \$\begingroup\$ @retailcoder, don't migrate Jamal, just the question \$\endgroup\$
    – Malachi
    Commented Nov 21, 2013 at 18:16
-3
\$\begingroup\$

I really think that project or class structure should be on topic - these two things blend together and class structure is already some code.

\$\endgroup\$

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .