integrativesoft / lara Goto Github PK
View Code? Open in Web Editor NEWLara Web Engine is a lightweight C# framework for web user interface development.
License: Apache License 2.0
Lara Web Engine is a lightweight C# framework for web user interface development.
License: Apache License 2.0
Publish webservices and pages by adding class attributes, instead of having to call LaraUI.Publish.
Installing the NuGet package for Lara copies the LaraUI.js file. This should be avoided, the JS is embedded inside the DLL and should be not copied over as a separate file, which adds clutter to the folders.
When an element triggers more than one event from a unique action, the client may receive and apply the responses from the server in the wrong order. When the two actions need to be applied in the same order on the client than on the server, the client document goes out of sync.
We could improve this by making sure the client applies all responses in the same order as the server generates them. One option could be to generate sequential numbers and have the client hold responses that are out of order.
When adding text nodes in events, the text is always encoded, regardless of the 'encode' property.
add an OnUnload event so that it's possible to execute code whenever a document is disposed
In order to develop web services, Lara needs to be included into an existing ASP.NET Core application with its own web services. It would be interesting to develop web services with Lara directly.
Attributes that have double-quotes inside their value are not properly escaped, and break the HTML document when printing.
Create command to easily navigate to a new form. Right now the only way to navigate from the server is to clear the document and repopulate it with different content.
add missing documentation for server-side events
When the user checks a checkbox, the 'checked' property isn't reported back to the server.
Lara loads the following two client-side libraries:
https://ajax.aspnetcdn.com/ajax/jQuery/jquery-3.4.1.min.js
https://cdnjs.cloudflare.com/ajax/libs/jquery.blockUI/2.70/jquery.blockUI.min.js
Developers should be able to specify a different URL to load these from. In the case of developing desktop applications, it's important to host all files so that no internet connection is required, to allow for offline usage (e.g. working on an airplane).
Add built-in support for modal forms.
Create methods to allow for events triggered from the server.
when both a child and parent element are registered with a click event, both events can fire simultaneously, with the resulting changes not applied correctly to the client DOM
We could create a way to bind properties to values, simplifying code.
Create a /Error page that ships by default
The web services documentation wiki can be simplified by using the new methods available since a couple of versions ago.
Sometimes we need to execute server events that take longer to complete and show a progress bar or some other information about progress.
Flag attributes (disabled, hidden, ...) when modified, the changes in value aren't sent to the browser.
InvalidOperationException: Operations that change non-concurrent collections must have exclusive access. A concurrent update was performed on this collection and corrupted its state. The collection's state is no longer correct.
In the following scenario:
Provide an easy way to create custom components, so that they can be added to the document as if they were elements.
When the client "loses" its session on the server, due to server reboot, or the user reopening a previously closed tab -- the buttons and events simply don't work and the page seems broken. In these cases we should reload the page from the server.
When end users select option
tags within a select
element, the selected
property of the options isn't sent to the server. Only the value
property of the parent select
element is sent. This prevents using multiple-option select
elements.
Develop methods to store and retrieve values associated with the current session Id.
The wiki page should have a quick start guide, tutorials, documentation and API reference.
The element factory is instantiating always GenericElement instead of the available derived types (e.g Input, Select, ...)
Adding built-in support for desktop app development would remove the need to use electron.js
For the elements that receive user input (input, textarea, select, button, option), we need a way to bind the input value and model such that the input value flows into the model.
Currently, the way to update a model with input values is to subscribe to the events that modify input values and code to update the model's properties.
There are some events that can trigger too often, such as the "input" event. These events can generate too many messages with the server when subscribing to them. Ideally we should be able to subscribe to a "debounced" version of the event, where the developer specifies the debouncing interval in milliseconds.
In the case where the following conditions meet, event execution will fail:
The reason has to do with the fact that the element to block the UI interferes with the engine's ability to generate IDs.
The method LaraUI.message
allows triggering custom server-side events from the client. The LaraUI class does not currently export types for writing TypeScript code that calls into it.
One workaround is to add the following code to client code:
namespace LaraUI {
export interface MessageOptions {
key: string; // string that identifies the event
data?: string; // optional data string
block?: boolean; // optional: block the UI while sending?
blockElementId?: string; // optional: when blocking, block only a specific element
blockHtml?: string; // optional: override HTML shown when blocking
}
export declare var sendMessage: (options: MessageOptions) => void;
}
We could create a repository that runs a 'hello world' desktop app with an embedded browser, to have it as a starting point for developing desktop web apps.
Allow external JavaScript to trigger server events
LaraUI.sendMessage works only with lowercase message keys
The public methods available in Lara could have tooltip information built-in.
The SessionLocal<T>
class would be a class similar to AsyncLocal<T>
, where its context is the current user's session instead of the async flow.
The event Session.OnClose that signals when all tabs are closed, only happens when the inactive session collector executes, and this can take a long time. Sometimes we need to release resources much sooner.
The FlushPartialChanges
method fails when there are no changes to flush.
The method EnsureElementId requires elements to be inside a document. We could lift this restriction.
TextNode constructor not encoding by default
If there is interest, we can change the license to MIT
A ClearChildren method could be useful in cases where we create bootstrap alerts that are dismissed (i.e. deleted) by the client directly. Removing individual nodes is an issue in those cases because the server and client get out of sync due to local javascript changes. A ClearChildren method could help address this issue.
Add support for easily locking the UI on events. This is to prevent duplicate calls (e.g. user double-clicking buttons) and to prevent changes in input data while the data is being processed.
web components added in runtime not always rendered
values for elements of type 'option' not always sent to server
Issue #14 adds new functionality for locking the UI. We should update the wiki and sample app to present this functionality.
SVG tags created during events aren't rendered. The reason is that the client is using the regular createElement and setAttribute instead of the methods required for SVG:
StackOverflow related question here
The JSON messages sent from the server to the client include class names. These are not needed and can be removed to reduce traffic.
We could create a demo app that's a dashboard, maybe based on open source themes like SB Admin 2, then add a link to it in the main page.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.