• Что бы вступить в ряды "Принятый кодер" Вам нужно:
    Написать 10 полезных сообщений или тем и Получить 10 симпатий.
    Для того кто не хочет терять время,может пожертвовать средства для поддержки сервеса, и вступить в ряды VIP на месяц, дополнительная информация в лс.

  • Пользаватели которые будут спамить, уходят в бан без предупреждения. Спам сообщения определяется администрацией и модератором.

  • Гость, Что бы Вы хотели увидеть на нашем Форуме? Изложить свои идеи и пожелания по улучшению форума Вы можете поделиться с нами здесь. ----> Перейдите сюда
  • Все пользователи не прошедшие проверку электронной почты будут заблокированы. Все вопросы с разблокировкой обращайтесь по адресу электронной почте : info@guardianelinks.com . Не пришло сообщение о проверке или о сбросе также сообщите нам.

You can replace popular frameworks using these methods! ?

Lomanu4 Оффлайн

Lomanu4

Команда форума
Администратор
Регистрация
1 Мар 2015
Сообщения
1,481
Баллы
155
TL;DR Of course, I realize that most major websites today are written in them, I'm just offering an alternative.

Hello everyone! Today, so many sites use frameworks like Next.js, Nuxt.js and others that you can't help but think that this is hopelessness, but it's not!

In this article, we will look at the main methods that you can use to create your web applications.

Let's get started!

? Web Components (Vanilla Custom Elements)


Yes, probably the most trivial solution that comes to mind is to create just components, but without frameworks. Although it is trivial, it is quite effective.


class MyComponent extends HTMLElement {
connectedCallback() {
this.innerHTML = `<button>Hello World</button>`;
}
}
customElements.define('my-component', MyComponent);

In native javascript, of course, there have long been solutions such as the CustomElementRegistry interface, which we can access in the example through the customElements property, or the good old template tag along with it.

This is quite a niche thing today, but nevertheless, it is an officially supported technology, so it will be relevant for a long time and will not depend on any module.

? Ajax and HTML


The second method, which is becoming increasingly popular today, is getting data from the server directly in the markup. We describe small settings for the request, and the module will receive the components.


<div>
{{#request src="/api/title"}}{{/request}}
<button data-action="increment" id="btn">Click!</button>
<div>
Clicks: {{#request src="/api/clicks" after="click:#btn"}}{{/request}}
</div>
</div>

The big advantage of this method is that we can take the components to the server and reuse them regardless of the domain. Also, such constructions are quite lightweight. In the example,

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

syntax was used.


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



?️ CMS


This is the most ancient method and today many developers no longer consider it, but its benefits for business are undeniable - this is a Content Management System.


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



No matter how far web development has advanced, people will still use

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

and other similar platforms even in 20 years, because it is convenient and provides many ready-made solutions for business.


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



? Static site generators


Also an ancient, but still relevant way of creating a website. Here, it is great for creating blogs or documentation, when we do not work with content from users, but only show static data.


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



As an example, of course, we can cite

Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

- this is probably the most popular tool for creating static blogs designed for web 1.0 design, but nevertheless, it is also a cool way to create a site. Example of code on Jekyll:


---
layout: default
title: Home
---

# Welcome!

This is the homepage of my Jekyll website.

## Latest Posts
<ul>
{% for post in site.posts %}
<li>
<a href="{{ post.url }}">{{ post.title }}</a>
({{ post.date | date: "%m/%d/%Y" }})
</li>
{% endfor %}
</ul>

Yes, most content is generated via Markdown, so this method is suitable for what I wrote earlier.


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.



✅ Conclusion


Yes, frameworks are not a panacea today. Website development is good because it allows you to choose a wide alternative between creation methods. If a tool supports compiling code into ready-made HTML, it is already suitable. And it does not matter what language it is written in, even Rust, or something else. Therefore, choosing a method specifically for a task is easier than ever today.

What do you use in your projects instead of a framework? It will be interesting to know in the comments ?!

Thank you for reading the article ❤!


Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.




Пожалуйста Авторизируйтесь или Зарегистрируйтесь для просмотра скрытого текста.

 
Вверх Снизу