All Projects → integrativesoft → lara

integrativesoft / lara

Licence: Apache-2.0 license
Lara Web Engine is a lightweight C# framework for web user interface development.

Programming Languages

C#
18002 projects
typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to lara

.github
Vanilla Web Components. A place for framework-free, transpiler-free, scaffolding-free web components.
Stars: ✭ 224 (+85.12%)
Mutual labels:  web-components
nuxeo-ui-elements
Library of UI web components
Stars: ✭ 20 (-83.47%)
Mutual labels:  web-components
CodeINN
CodeINN is an instant code editor 📃, that makes programming and development easier. Practice quickly and directly from your web browser, without any setup needed. CodeINN gives the perfect environment to developers technologists, coders computers, and geeks 🤓 to do more with their tech.
Stars: ✭ 39 (-67.77%)
Mutual labels:  web-development
modulor-html
Missing template engine for Web Components
Stars: ✭ 36 (-70.25%)
Mutual labels:  web-components
wc-monaco-editor
A vanilla Monaco Editor web component
Stars: ✭ 93 (-23.14%)
Mutual labels:  web-components
range-slider-element
🍬 <range-slider> custom element
Stars: ✭ 45 (-62.81%)
Mutual labels:  web-components
DevHelpBox
we are creating this community so that other developers can get benefits of it.
Stars: ✭ 35 (-71.07%)
Mutual labels:  web-development
fireworks-js
🎆 A simple fireworks library! Ready to use components available for React, Vue 3, Svelte, Angular, Preact, Solid, and Web Components.
Stars: ✭ 550 (+354.55%)
Mutual labels:  web-components
stencil-shimmer
StencilJS component for adding shimmer UI effect to your applications.
Stars: ✭ 14 (-88.43%)
Mutual labels:  web-components
beginner-friendly-haskell-for-web-development
A book about real world web development in beginner friendly Haskell
Stars: ✭ 76 (-37.19%)
Mutual labels:  web-development
Willow
The Web Interaction Library that eases the burden of creating AJAX-based web applications
Stars: ✭ 41 (-66.12%)
Mutual labels:  web-components
cookbook
VueJS + NodeJS Evergreen Cookbook
Stars: ✭ 440 (+263.64%)
Mutual labels:  web-components
file-attachment-element
Attach files via drag and drop or file input.
Stars: ✭ 97 (-19.83%)
Mutual labels:  web-components
Front-End-Checklist
🗂 Modern sitelerin titiz geliştiricileri için Front-End Checklist
Stars: ✭ 251 (+107.44%)
Mutual labels:  web-development
x-play
🎼 🎶 🎵 🎹 🎻 🎷 🎺 🎸
Stars: ✭ 23 (-80.99%)
Mutual labels:  web-components
eslint-plugin-lit
lit-html support for ESLint
Stars: ✭ 90 (-25.62%)
Mutual labels:  web-components
components
Example Components (Built with Tonic)
Stars: ✭ 62 (-48.76%)
Mutual labels:  web-components
element
Fast and simple custom elements.
Stars: ✭ 65 (-46.28%)
Mutual labels:  web-components
html5-geolocation-tool-js
Mobile ArcGIS API for JavaScript samples for testing various geolocation configurations.
Stars: ✭ 91 (-24.79%)
Mutual labels:  web-development
moment-element
Web Component (with Polymer) wrapper for the moment library
Stars: ✭ 15 (-87.6%)
Mutual labels:  web-components

Lara Web Engine

License: Apache 2.0 NuGet version Download count Build Status Coverage Status

Lara is a server-side rendering framework for developing web user interfaces using C#.

"It is similar to server-side Blazor, but is much more lightweight and easier to install. For example, while any type of Blazor requires a whole SDK, Lara is just a NuGet package." ScientificProgrammer.net

Sample application

using Integrative.Lara;
using System;
using System.Threading.Tasks;

namespace SampleApp
{
    public static class Program
    {
        public static async Task Main()
        {
            // create and start application
            const int port = 8182;
            using var app = new Application();
            app.PublishPage("/", () => new MyCounterComponent { Value = 5 });
            await app.Start(new StartServerOptions { Port = port });

            // print address on console
            var address = $"http://localhost:{port}";
            Console.WriteLine($"Listening on {address}/");

            // helper function to launch browser (comment out as needed)
            LaraUI.LaunchBrowser(address);

            // wait for ASP.NET Core shutdown
            await app.WaitForShutdown();
        }
    }

    internal class MyCounterComponent : WebComponent
    {
        private int _value; // triggers PropertyChanged event
        public int Value { get => _value; set => SetProperty(ref _value, value); }

        public MyCounterComponent()
        {
            ShadowRoot.Children = new Node[]
            {
                new HtmlDivElement() // on PropertyChanged, assigns InnerText
                    .Bind(this, x => x.InnerText = Value.ToString()),
                new HtmlButtonElement
                    { InnerText = "Increase" }
                    .Event("click", () => Value++)
            };
        }
    }
}

Adding Lara to an existing web server application

To add Lara to an existing ASP.NET Core server, add to the Startup class or equivalent:

private readonly Application _laraApp = new Application();

public void Configure(IApplicationBuilder app)  
{  
    app.UseLara(_laraApp, new LaraOptions
    {
        // configuration options
    });
} 

Creating Desktop applications

To create a desktop container for your web app, here's a few options:

Getting started

There's no need to download this repository to use Lara, instead, there's a NuGet package.

Check out the wiki documentation

How does Lara work?

Whenever the browser triggers a registered event (e.g. click on a button), it sends to the server a message saying that the button was clicked. The server executes the code associated with the event, manipulating the server's copy of the page, and replies a JSON message with the delta between server and client.

How to contribute

Please send feedback! Issues, questions, suggestions, requests for features, and success stories. Please let me know by either opening an issue. Thank you!

If you like Lara, please give it a star - it helps!

Credits

Thanks to JetBrains for the licenses of Rider and DotCover.

JetBrains

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].