URL Generation
In Jalno, there are three methods for generating URLs that can be accessed in a browser. Each method is used to access different types of files, as described below:
Routing
HTTP routing done by handing over a request from a browser to a controller after receiving it to open a specific address.
Translator
With the packages\base\Translator class — whose methods are written as static for convenient use without repeating code — you can make the text throughout your website multilingual. To do this, the site's text is stored in separate json files. Using the Translator class, you can reuse the stored phrases across your code as many times as you need. When a language code or country code appears in the URL (either as part of the path or as a URL parameter), the framework automatically loads the language file corresponding to that language or country. In addition, when generating URLs, if you use the base\url method, it automatically includes the default language in the URLs.
Controller
The controller is called by the router. It serves as an interface between the model and the view.
View
The view is the interface between the controller and the template.
Responses
When the router hands an HTTP request to a controller and invokes it, it expects the controller, after performing the necessary processing, to ultimately return an object of the packages\base\Response class.
Validation
Data sent from the user side must be validated before any operation. Checking the received strings to ensure there is no malicious code or malicious programming code is one of the most important things that must be controlled in this section.
Forms
Forms are an important part of a website. Through forms, the user submits the required information to you. Among the situations you encounter when working with forms are sending the validation errors produced in the controller to the view, and setting the initial values of fields when the forms are opened.
Session
Sessions are used to track and follow a user, as well as to store information for a single user across different and separate requests. By providing a comprehensive structure and supporting well-known session stores such as Memcached, Jalno makes accessing the user and their information easy.
HTTP Requests
In Jalno, the packages\base\http\Client class has been created for making HTTP requests. Using other libraries, this class can create a POST or GET HTTP request.
Images
Jalno provides the packages\base\Image class to developers for managing images. Some of this class's methods are defined as abstract, so the programmer cannot call them directly from this class. Currently, the packages\base\Image\GD class is derived from the Image class.
Events
In an application there are many events for which some operation needs to be performed in response. In practice, you define listeners for an event; these listeners wait until the event calls them so that the operation defined in the listener is carried out.
The Package Class
In Jalno, the packages\base\Package class is defined for managing and working with a project's packages. This class is used when working with files—to access a file within a package, get a file's path, and so on.
The Packages Registry
In Jalno, the packages\base\Packages class was created for the technical management of packages.