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

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

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

WebStencils Demos Updated: C++Builder, Shared Templates and More

Sascha Оффлайн

Sascha

Заместитель Администратора
Команда форума
Администратор
Регистрация
9 Май 2015
Сообщения
1,486
Баллы
155


We’ve just pushed some exciting updates to the official

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

. If you’ve been using WebStencils or are curious about integrating HTML templating into your Delphi or C++Builder applications, now’s a great time to take a look.


Table of Contents

C++Builder Joins the Party!


The biggest news is the addition of full C++Builder versions for our demos. Alongside the existing Delphi examples for WebBroker and RAD Server, you’ll now find parallel projects built entirely with C++Builder. These aren’t simplified versions; they offer the same functionality and show how WebStencils fits into C++ workflows, whether you’re building a classic WebBroker application or a modern RAD Server service.

One Set of Templates to Rule Them All


One of the main ideas behind WebStencils is flexibility. To really demonstrate this, we’ve refactored the WebBroker and RAD Server demos (both Delphi and C++Builder) to use a single, shared set of HTML templates. All four web projects now pull their templates from the common resources/HTML directory. This clearly demonstrates that your WebStencils templates are independent of your backend technology or programming language. Write them once, use them across your projects.

Mix and Match Backends & Databases


Speaking of independence, the demos now better illustrate how WebStencils works with different data sources and backends:

  • The WebBroker projects (Delphi & C++) use an in-memory list for the Tasks demo and an SQLite database for the Customers demo.
  • The RAD Server projects (Delphi & C++) connect to an Interbase database for both tasks and customers.

Despite these different setups, they all render the exact same front-end website using those shared templates. It really highlights that WebStencils focuses on merging your data with your HTML, regardless of where that data comes from or which framework serves it.

New Feature: Customer Pagination


We’ve added a practical new feature to the Customers section in the WebBroker and RAD Server demos: server-side pagination. This is a common requirement for handling larger datasets. You can see an example of fetching and displaying customer data page by page. Check out the Controllers.Customers unit (or the C++ equivalent like ControllerCustomers.h/.cpp) and the corresponding templates in partials/customers to see how it works.

The pagination template and class have been created in a way that can be easily reused in any project. Using class helpers, the integration with

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

is very simple and matches the requirements for a web-based pagination system.

Enhanced HTMX Tasks Demo: Completion Progress


We’ve also improved the HTMX Tasks demo. At the top of the task list, you’ll now find a handy completion status section. It automatically shows how many tasks are in total and how many are marked as complete, along with a visual progress bar. The cool part? This updates automatically whenever you add, complete, or delete a task, using the power of HTMX to refresh the content and some CSS for the progress bar display: no full page reloads needed.

Take a look


Ready to explore? Head over to the

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

to grab the latest code, run the demos (WebBroker, RAD Server, or the FMX Showcase), and see how WebStencils can simplify generating HTML in your own Delphi and C++Builder projects.

We hope these updates make it even easier to get started with WebStencils and see its potential. If you are interested in learning more about WebStencils, don’t forget to download our

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

. Happy coding!

Источник:

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

 
Вверх Снизу