Skip to content

Reinerth/Application-Template-MVC-best-Practice

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

19 Commits
 
 
 
 
 
 

Repository files navigation

Application-Template-MVC-best-Practice 🏔️ 🧭 ⚓ ⚙️

This set of 6 files, represent a template with best practices for setting up a big JS-application from the scratch.
The given structure follow the MVC-pattern (Model-View-Controller) and the module-pattern.

Web-server needed. (Works in IIS too if method in MyApplicationsName.js line 37 is not set to POST)

PHP is NOT mandatory (is optional), and not part of the structure. (Only added an example for how could be used)
Could be easily removed if in SecondClass.js in line 82
the first parameter "myURLSomewhere" gets changed to "myURLToModel1" (from line 23).

The module-pattern alone, explained in a single file,
without the MVC-structure, you could find here:
https://github.com/Reinerth/JS_modulePattern_ClassExample_private_public

mvc

This is what it looks like:

tree

The VIEW (Starting page of the application):

MyApplicationsName-htm





The MODEL

The CENTRAL of the Model and the application - The entire content of the application will be routed through this file
MyApplicationsName-js

...and a simple JSON-file
model1-json





The CONTROLLER

A basic example of a simple class.
FirstClass-js

A complete example with a request to a Model/PHP-file (or JSON-file)
SecondClass-js

The basic example of the php-file from where database-content could be retrieved.
my-example-php-file-php











About

Browser-App: This set of 6 files, represent a template with best practices for setting up a big JS-application from the scratch. The structure follow the MVC-pattern (Model-View-Controller) and the module-pattern.

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors