• #41

    CodeBehind 4.4 Released

    category news

    After approximately three months of continuous, around-the-clock development, we have added new features to the CodeBehind framework and released version 4.4, built on .NET 7. With the upgrade to WebForms Core version 2, this release transforms CodeBehind into a complete full-stack system—an evolution that can fundamentally change the way you approach web development.

    Features of Version 4.4

    WebForms Core Technology Upgraded to Version 2

    WebForms Core version 2 represents one of the most significant updates in the history of software development—larger than the iOS 7 update, Android 5.0 (Lollipop), and even major Windows releases.
    This version is not about simply “adding features”; it changes the abstraction level of the framework itself. The update shifts WebForms Core from being just a framework toward something closer to a Web Operating System.

    Note: A comprehensive article about WebForms Core technology version 2 will be published soon.

    Section Renamed to Segment

    To better align CodeBehind with web standards, the Section feature has been renamed to Segment. All related method names and references have been updated accordingly.
    “Segment” is a standardized term commonly used in modern web architectures, making this change both semantic and structural.

    Added AddCodeBehind Service

    The AddCodeBehind service has been introduced to better integrate with the standard .NET configuration model.
    With this addition, configuring CodeBehind in ASP.NET Core is now fully aligned with the built-in service registration pattern and can be completed with minimal setup.

    Ignore Layout for Secondary WebForms Core Requests

    A new configuration option allows Layout rendering to be ignored for secondary WebForms Core requests originating from the server.
    This option is disabled by default and can be enabled through the configuration file when needed.

    Support for SSE and Advanced Broadcast Methods

    Version 4.4 introduces full support for Server-Sent Events (SSE). While SSE is conceptually similar to WebSockets, it operates as a one-way connection, where only the server sends data to the client.

    New configuration options have been added to control broadcast intervals and to limit the number of concurrent SSE connections per client, preventing excessive resource consumption.

    The framework now provides advanced broadcast capabilities that allow SSE messages to be sent:

    • - to all connected clients

    • - to specific roles

    • - to specific SSE sessions

    • - or to individual clients

    This enables fine-grained, scalable, real-time communication without relying on client-side polling or complex JavaScript logic.

    Command-Driven SSE Architecture

    The SSE implementation in CodeBehind follows a command-driven, not data-driven, approach.

    This means:

    • - No HTML re-rendering

    • - No JSON diffing

    • - No virtual DOM

    • - No client-side rendering logic

    Instead, the server sends explicit DOM manipulation commands that are applied directly on the client.
    The result is:

    • - Lower server CPU usage

    • - Predictable performance

    • - High scalability

    - Minimal client-side complexity

    Ability to Specify Arbitrary Segments in UseCodeBehindRoute

    In previous versions, only the first URL segment could be used to determine the controller name. In version 4.4, this limitation has been removed, allowing different segments of the route to be targeted when resolving controllers.
    That said, the Elanat team still recommends using the dedicated default CodeBehind configuration for most applications.

    Gzip Middleware

    WebForms Core version 2 introduced client-side Gzip compression to reduce the size of data sent from the browser to the server.
    To fully support this capability on the server side, CodeBehind now includes new middleware components that transparently handle decompression. These middleware components are fully compatible with the compression features of WebForms Core.

    Gzip File Upload Compression

    Files uploaded from the browser can now be compressed before transmission. On the server, the Gzip file decompression middleware automatically restores supported files before they reach the controller logic.
    This middleware supports file-type filtering and maximum file size limits, all without requiring changes to application code.

    Gzip Form Data Compression

    In addition to file uploads, textual form data can also be sent in compressed form. The Gzip data decompression middleware automatically detects and decompresses request bodies, making the data transparently available to controllers as if it were uncompressed.

    Advanced Structure for Receiving Form Data via WebSocket

    A small but critical enhancement in WebForms Core version 2 introduces a name-value structure for form submissions sent through WebSocket connections.
    This structure enables the middleware to automatically detect whether incoming WebSocket data represents a form submission, improving consistency and reliability.

    Support for Comment Mode Structure

    With the new ability in WebForms Core to output responses in comment mode, CodeBehind now uses this structure when combining initial View responses with WebForms output.
    Comment mode ensures:

    • - Valid, standards-compliant HTML

    • - Fewer browser parsing issues

    • - Cleaner and more maintainable integration of Action Controls

    A new configuration option allows developers to control whether combined secondary responses should use comment mode or be applied through Action Controls.

    Fixed Issue with the Write Method in View

    A minor issue existed in previous versions where values written during View generation were not included in the final response. This issue has been fully resolved in version 4.4.

    Other Minor Improvements

    This release also includes several additional minor enhancements that collectively improve overall system performance and stability.

    Next Release

    Our plan for version 4.5 is to introduce advanced asynchronous features.
    CodeBehind 4.5 will be the final release based on .NET 7, after which version 4.6 will be fully and rapidly migrated to .NET 10.

    Related link

    CodeBehind on GitHub:
    https://github.com/elanatframework/Code_behind

    Get CodeBehind from NuGet:
    https://www.nuget.org/packages/CodeBehind/

    CodeBehind page:
    https://elanat.net/page_content/code_behind


    comment
    last comment
    add comment in this content is inactive