- •Suleyman Demirel University
- •Task To complete Diploma thesis
- •Project consultation pointing to relevant chapters
- •Thesis prepaRation schedule
- •Annotation
- •Аннотация
- •Background
- •1.2.1 Twig (template engine)
- •1.2.2 Web template system
- •1. Introduction
- •ProjectDescription
- •1.1.1 About
- •2. Used technologies
- •2.1 October cms
- •Composer
- •Configuration
- •Migrations
- •Figure 3 Database Seeder
- •2.2 Html & html5
- •2.5 MySql
- •3. Project Development
- •3.1 Use case
- •3.2 Database architechture
- •3.3 User interface
- •4. Conclusion
- •References
2. Used technologies
In this chapter used technologies, algorithms, methods, programs in project will be described. Such as: MySQL database, Composer, October CMS, JavaScript, CSS, HTML and PHP.
2.1 October cms
October is a free, open source and self-hosted content management system (CMS) based on the PHP programming language andLaravel web application framework. It currently supports MySQL, SQLite and PostgreSQL for the database backend and uses a flat file database for the front end structure.
October is marketed as a "back to basics" web platform that makes website creation, design, and editing faster and more intuitive. The October CMS covers an extensive range of capabilities such as users, permissions, and plugins; it can be utilized to build everything from simple promotional sites to powerful web applications. Like WordPress, October relies on themes.
The platform is criticised for not being client friendly and is generally favoured among developers for having a small learning curve and its unique template system that is easily manageable with version control systems. It is currently the most starred PHP CMS repository hosted on GitHub.
Composer
Composer is a tool for dependency management in PHP. It allows you to declare the dependent libraries your project needs and it will install them in your project for you. Let's say you are creating a project, and you need a library that does logging. You decide to use monolog. In order to add it to your project, all you need to do is create a composer.json file which describes the project's dependencies.
The problem that Composer solves is this:
You have a project that depends on a number of libraries.
Some of those libraries depend on other libraries.
You declare the things you depend on.
Composer finds out which versions of which packages need to be installed, and installs them (meaning it downloads them into your project).
MVC
Model–view–controller (MVC) is a software architectural pattern for implementing user interfaces. It divides a given software application into three interconnected parts, so as to separate internal representations of information from the ways that information is presented to or accepted from the user. MVC offers architectural benefits over standard JavaScript — it helps you write better organized, and therefore more maintainable code. This pattern has been used and extensively tested over multiple languages and generations of programmers. [7].
Model
To create a migration, you may use the "migration:make” command on CMD. The migration will be placed in your app/database/migrations folder, and will contain a timestamp which allows the framework to determine the order of the migrations. If needed, you may also specify a “--path” option when creating the migration. The path should be relative to the root directory of your installation.
View
View is what's presented to the users and how users interact with the app. The view is made with HTML, CSS, JavaScript and often templates. This part of your Chrome App has access to the DOM.
For example, in the above todo list web app, you can create a view that nicely presents the list of todo items to your users. Users can also enter a new todo item through some input format; however, the view doesn’t know how to update the model because that’s the controller’s job.
Controller
The controller is the decision maker and the glue between the model and view. The controller updates the view when the model changes. It also adds event listeners to the view and updates the model when the user manipulates the view.
In the todo list web app, when the user checks an item as completed, the click is forwarded to the controller. The controller modifies the model to mark item as completed. If the data needs to be persistent, it also makes an async save to the server. In rich client-side web app development such as Chrome Apps, keeping the data persistent in local storage is also crucial. In this case, the controller also handles saving the data to the client-side storage such as Filesystem API.
There are a few variations of the MVC design pattern such as MVP (Model–View–Presenter) and MVVP(Model–View–ViewModel). Even with the so called MVC design pattern itself, there is some variation between the traditional MVC pattern vs the modern interpretation in various programming languages. For example, some MVC–based frameworks will have the view observe the changes in the models while others will let the controller handle the view update. This article is not focused on the comparison of various implementations but rather on the separation–of–concerns and it's importance in writing modern web apps.
To summarize, the MVC pattern brings modularity to application developers and it enables:
Reusable and extendable code.
Separation of view logic from business logic.
Allow simultaneous work between developers who are responsible for different components (such as UI layer and core logic).
Easier to maintain.
