File and Folder Structures



ZN Framework has a simple and understandable directory structure. This structure also allows you to categorize your project files more regularly. So you can get rid of the file complexity and you will not be able to detect which file

 

# Root Files and Directories


When you install ZN Framework, you will see the following files and directories in the root directory.

# Projects / .
# External /
# Internal /
# Settings /
# htaccess
# composer.json
# robots.txt
# zeroneed.php
# zerocore.php
# zerocore

Now let us know what the above files and directories do and what they do.

 

# Projects /


There are applications in this directory that you will develop your progeny. Inside it are the Frontend / and Backend directories by default . Such a directory structure is designed by considering more than one application in the project.

Subdirectories and Files

# Frontend /
# Backend /
# htaccess

Frontend / pre-defined directory where your application will reside. There are directories in which the necessary files for application development can be stored.

# Frontend / and Backend /

# Config /
# Controllers /
# Databases / ( Zn> = 4.3.0 )
# Languages /
# Libraries /
# Models /
# Resources /
# Routes / ( Zn> = 4.5.0 )
# Starting /
# Storage /
# Views /

# config /

In this directory you will find the configuration settings files for your application. Settings like Database, Route are made under this directory.

# Controllers /

This directory contains files that will contain PHP code. This section is where the HTML content will run. Controllers for URIs written in the address bar are included in this section. That is, the part where codes are to be run , controlled and routed .

home.php : The controller file created for example use. the view file home / main.wizard.php in the Views / directory is executed when the contents of the file are examined . Click for detailed use .

# Databases /

It is used to design the database and tables you want to create in this directory. Click for detailed use .

Subdirectories and Files

# Actives /  
# Archives /

# Actives / 

Active databases and tables to be used.

# Archives /

The databases and tables to be archived that will no longer be used. 

# Languages ​​/ 

This is the part of your dictionary where you will use words or phrases to translate according to languages ​​if you use multiple languages.

Subdirectories and Files

# English /
# English /
# ML /

# English /

English words are in this section.

# Turkish /

Turkish words are in this section.

# ML /

The directory where the language files created with the ML library are stored. Click for use of the ML library .

If you use a different one, you can add a new directory to hold the words of that language. Example: Spanish /

# Libraries /

This is the section where your personal classes you will develop for your application will be located. Besides the system libraries, you can use the classes you want to include personally or externally in this directory. Once you have placed your classes in this directory, you can make direct calls without making any adjustments.

# Models /

In this tutorial you will create more practical database usage classes using the database library. Usually this directory is for the use of your queries to the database of your application. Inquiries should be formed as classes. Click for detailed use .

Subdirectories and Files

# Migrations /
# Visions /

# Migrations /

A database of migratory files created by the Migration library. Click for detailed use .

# Visions /

Vision files are kept in the database. Click for detailed use .

# Resources /

In this directory, your application will contain files such as js , css , image . This directory consists of many sub-directories.

Subdirectories and Files

# Files /
# Plugins /
# Templates /
# Themes /
# Uploads /

# Files /

Other files such as Pictures, Icons are included in this directory. 

# Plugins /

Packets such as .js and .css are in this directory. Example: bootstrap /

# Templates /

Common template files that you will use on multiple pages are included.

# Themes /

js. and theme files such as .css are included in this directory. Example: bluetheme /

# Uploads /

The uploaded files are located in this directory.

Click for detailed usage of inclusion methods .

# Routes /

Used to write URL redirects to the route file or files in this directory. Click for detailed use .

# Starting / 

This directory contains the files to run at the beginning of your application. Generally, there are codes that are valid on all pages of the application. Specifying a constant and function, especially for all pages, can be useful for user login control. Click for detailed use .

Subdirectories and Files

# Autoload /
# Handload /

# Autoload /

The files you want to include automatically are included.

# Handload /

The files you want to include manually are included.

# Storage / 

This directory contains directories where files created by some libraries are kept. Database backups, files such as log records are stored.

Subdirectories and Files

# Cache /
# Crontab /
# DatabaseBackup /
# Logs /   

# Cache /

The files created by the Cache library's file driver are stored.

# Crontab /

The debug.log file created by the Crontab library is stored.

# DatabaseBackup /

The files created by the DBTool :: backup () method are stored.

# Logs /          

Log records are stored in this directory.

# Views / 

In this list is the part where your application will include the HTML-based views. So the view of your web pages is in the files created in this directory. These view pages are controlled by the controllers in the Controllers / directory. Click for detailed use .

# .htaccess 

This file is used to block access to the Projects / directory and its subdirectories.

 

# External /


This directory contains common files that apply to all your applications. This directory allows you to take full advantage of common applications.

Subdirectories and Files

The use of subdirectories and files is identical to the ones under Projects / directory. However, the files contained here apply to all systems. If 2 is included in the same application and in this application, then the file in the application takes precedence.

# Commands /
# Languages ​​/
# Libraries /
# Models /
# Resources /
# Routes /
# Starting /

 

# Internal /


This directory contains common files that apply to the system and applications. It is not the directory that users need to intervene because it is more concerned with the basic structure of the system .

Subdirectories and Files

There are libraries belonging to the system.

 

# Settings / ( ZN> = 5.1.0 )


The basic settings in the Internal / Config / directory will now be made in this directory.

Subdirectories and Files

You  can access the configuration of this directory from this link .

 

# .htaccess


Contains the configuration settings required for the Framework. If you wish, you can add new settings by taking advantage of the Settings / Htaccess.php configuration file. Click to see in the tutorial .

 

# composer.json


With this file you can install ZN Framework with composer.

 

# robots.txt


This file contains information about directories and files that can not be indexed by search engines. You can change the settings using the Settings / Robots.php setting file. Click to see in the tutorial .

 

# zeroneed.php


The system is the landing page.

 

# zerocore


Created to run commands from the console. With this file you can run controller, model, class and function from the console.