WordPress VS Elanat
Tags: wordpress, beginners, php, architecture
Published: 2023-08-01 16:51:21

## Comparison of [WordPress](https://wordpress.org) with [Elanat](https://elanat.net)
**Hook against Reference**
(filter hook and action hook against before reference, after reference and event reference)

It seems that at first glance, due to the difference in the scale of these two systems, the comparison between [WordPress](https://core.trac.wordpress.org/browser) and [Elanat](https://github.com/elanatframework/Elanat) is not correct. Maybe comparing Elanat with systems like Drupal, Microsoft SharePoint and Alfresco is a more balanced comparison; But the wonderful structure and architecture of WordPress goes beyond a simple content management system and empowers you to implement a powerful portal.
In this article, we try to discuss the architecture and structure of these two systems, and we avoid talking about the stereotypes that are usually discussed in the comparison between the two systems.

## Introduction

**About WordPress:**
WordPress is the most popular content management system that is written in PHP language and its management is simple and it is optimized in terms of SEO structure. WordPress has taken over 60% of the total market of content management systems and is open source and very reliable. WordPress has many sources of free plugins. WordPress is based on an interpreted programming language, and to use more features, you must be familiar with the PHP programming language.


**About Elanat:**
Elanat is a new system implemented with ASP.NET technology. Elanat is a system that is implemented based on a compiled framework, and to use more features, you must have the ability to code .net and also be familiar with things like html, http, urls, and regex.

Along with the introduction of Elanat, several new technologies and structures were introduced to the web world.
Concepts like:

- Server-side independence
- Add-on-oriented
- Socket-connector
- Library switcher

Several high-level technologies are used in the core of Elanat
As:

- Structure box and list item
- The separation of the template from the style
- Name Value content
- Variables in the content template

Elanat presents the concept of Code-Behind along with MVC for the first time, and in the core of Elanat there is no server-side code in the View part, and there is also no hypertext tag in the server-side code (up to 99.9% of cases!)

**WordPress add-on:**
WordPress has 4 add-on models, one of which is a template. Add-ons may not be compatible with different versions of WordPress and need to be updated (if there is an update!)

**Elanat add-on:**
If we count the format and language as add-ons, Elanat has 13 different types of add-ons and without them, it has 8 different types of add-ons.
Note: There are more types such as item and content types, etc., and more than 13 can be named
Elanat add-ons are usually compatible with all versions and usually do not interfere with kernel updates.

## WordPress Architecture
One of the most important indicators of WordPress is hook architecture. Hooks in WordPress are repeated in most methods. Hooks are a modern architecture in WordPress and WordPress developers must be familiar with them.

**Filter hook:** The filter hook is used to change and apply the required changes before executing a request (before) or after executing a request (after). Using the filter hook, you can perform checks and, if necessary, stop the execution of the request or make changes to the result of the request. A filter hook can be considered as a middleware that enters before the request is executed and exits after the request is completed. Filter hooks are used to customize and filter WordPress content and give users an opportunity to make changes to the core WordPress code without causing downtime and possible damage to the system.

**Action hook:** Action hook is used to execute continuous operations or specific code in a specific part of the application. By using action hook, you can call a desired function at certain moments of the program. The action hook is called at a certain time in the program. Action hooks allow you to easily execute and customize your code at different times such as page load, after performing certain operations, and at different places in the template.

In short, the filter hook is used to change and apply commands before and after the request is executed, while the action hook is used to call functions and execute code at specific times in the application.


## Elanat Architecture
Elanat offers different structures and has a more complex and powerful architecture than WordPress. In this comparison, only three reference models are examined and the complex aspects of Elanat architecture are not discussed.

The reference_lists in Elanat include three items: event, before, and after, and they are somewhat similar to filter hooks and action hooks.
event_reference_list in Elanat is mostly added at the end of methods located in model classes and applies the success values that occurred at the end of the request
before_load_path_reference_list checks any selected url before execution and can prevent it from being executed and display the appropriate values in the output
after_load_path_reference_list can execute functions and pages after executing any url that is selected.

**Conclusion:**
Reference in Elanat is very powerful for applying management before and after the request, however, the WordPress hook has a high power in displaying the output and references in Elanat have complete control over HTTP requests.

**Similarities between WordPress and Elanat:**
Both systems are integrated and can cover parallelism; but to deploy a very large non-integrated system, they need advanced software.
Both install the add-ons with one click.
Both control the request from above.

**Differences between WordPress and Elanat:**
If you use too many add-ons, WordPress will slow down due to the lower scale, but Elanat will maintain a lot of agility.
Installation of both systems is simple. But due to the newness of Elanat, the possibility of Auto Installer is not available on hosts for Elanat, and WordPress will be installed with just one click.
Elanat is a multilingual system and if you want to create a Chinese or Arabic website, all words and sentences will be displayed in the new language; Elanat also has full support for right-to-left languages. But WordPress creates great challenges for right-to-left languages due to its weak architecture (only about language); Sometimes people spend days trying to make a add-on fit right-to-left languages, and it's interesting that all the time spent on right-aligning is only applied to the current version of the add-on.
WordPress allows you to manage content directly from the site, while Elanat only allows you to do this in the admin panel.
With each update, WordPress deletes all core related items and loads the new core from the beginning; but the update in Elanat is specific to changes and is done step by step, and the changed items related to the core are edited or replaced.

## Quick comparison

Scale
**Elanat** high
**WordPress** medium

Flexibility
**Elanat** very high
**WordPress** high

Architecture
**Elanat** wonderful
**WordPress** good

Simplicity and ease of use
**Elanat** good 
**WordPress** awesome 

Content management tools
**Elanat** very good
**WordPress** medium 

Permissions
**Elanat** wonderful
**WordPress** medium

Response time
**Elanat** very good 
**WordPress** medium 

Support and community
**Elanat** weak
**WordPress** awesome

Number of free plugins
**Elanat** weak
**WordPress** wonderful

Create add-on
**Elanat** wonderful
**WordPress** weak