Skip to content

Level0r0s/JRIAppTS

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

43 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

jRIAppTS framework

a RIA framework for building Line of Buisiness (LOB) applications working in HTML5
This is a typescript (TypeScript) version of the previous (long abandoned) jRIApp framework You can watch video of the demo on YouTube SPA Demo | YouTube Views Transitions Animations Demo | YouTube Folder Browser Demo | YouTube DataGrid column headers tooltips | YouTube Undoing pending changes

jRIAppTS – is an application framework for developing rich internet applications - RIA’s. It consists of two parts – the client and the server parts. The client part was written in typescript language. The server part was written in C# and the demo application was implemented in ASP.NET MVC (it can also be written in other languages, for example Ruby or Java, but you have to roll up your sleeves and prepare to write them). The Server part resembles Microsoft WCF RIA services, featuring data services which is consumed by the clients. The Client part resembles Microsoft Silverlight client development, only it is based on HTML (not XAML), and uses typescript language for coding. The framework was designed primarily for creating data centric Line of Business (LOB) applications which will work natively in browsers without the need for plugins . The framework supports a wide range of essential features for creating LOB applications, such as, declarative use of databindings, integration with a server side dataservice, datatemplates, client side and server side data validation, localization, authorization, and a set of UI controls, like the datagrid, the stackpanel , the dataform and a lot of utility code.

NOT every application meant to work in the browser is a web site. Some of them meant as a replacement for ordinal desktop applications. Those LOB applications have a set of unique requirements which can not be fulfilled without using a strongly typed language. Besides, those applications are mostly data centric and the databases can have a lot of data tables and stored procedures.

The framework is distinguished from other frameworks available on the market by the full stack implementation of the features required for developing real world LOB applications in HTML5 without any need for pluggins. It uses typescript language from the ground up, and because of this it benefits from typescript advantages over plain javascript: Maintainability, Modularity, Less Errors (with compiler check), Reduced development time and Readability. Typescript also aligns with with future version of ECMAScript. So there won't be any need to port all the code, just recompile and that's it. Unlike many other existing frameworks, which use MVC design pattern, the framework uses Model View View Model (MVVM) design pattern for creating applications.

The main project here is the jriappTS. It is written in typescript language. On compilation the project produces jriapp.js javascript file - which is the main file of the framework.
P.S.- some of the modules in the framework are optional and you can compile the project without them if you decide that they are not needed or you want to replace them with your own ones. Read the UserGuide.pdf for the details.
The RIAppDemo is the demo project which uses this framework and it also includes server side components of this framework - The Data Service.
The NancySelfHost is another demo project which shows how to use the jriappTS framework with NancyFX framework (http://nancyfx.org/) in self hosting environment.
The demoTS and spaAMD are two typescript projects which contain code for client side part of the demo projects (the RIAppDemo and the NancySelfHost).
On compilation those project produce a set of javascript files which are referenced in the demo projects HTML pages
The WebsocketServer is a demo implementation of websocket service which supplies quotes of the day. It is used in the GridDemo example. It is created using websocket-sharp implementation.

Using the data service you can generate strongly typed client side domain model in typescript language. See the demoTS project for the example. (the DEMODB.ts file contains the generated code.) The documentation explains how you can use the framework in more details.

The minified jriapp.js file has the size of about 325 KB. and when it is gzipped, it is about 70 KB.

Disclaimer: Don't judge too much the inline use of css styles in the Demo html pages. They are not relevant for the framework's workings. You can use bad pattern or good pattern and the framework does not care about it, because it is separate from the HTML on the page. I used them in the demos as a quick and ready way of the HTML markup for testing purposes.
I use this framework at my work and it works perfectly for LOB applications. But if you use it, then use it at your own risk.


TIP: You can even work with local devices. For example, to avail of a barcode scanner connected to your computer you can create a selfhosted application as a windows service, and in your portal's web page hosted on dedicated server you can use CORS to get the data from your local service. For automatic push of the data to your application you can use Websokets or SignalR. Then your application can submit the data to the server backend.
For processing time consuming tasks your web application can submit requests to a server side queue and get a feedback on their processing using SignalR. At my work i use a dedicated windows service which uses Microsoft SQL Server Service Broker to get messages and process them as batch jobs. My web application updates UI interface when each item in the batch is processed.
Also it is easy to embed reports in your portal. At my work i use Sql Server reporting services to generate PDF and Excel files and display reports on web pages.

So, you can totally get rid of ordinal desktop applications and have a web interface to get all your previous desktop apps functionality!


Latest changes:

2016-01-26 StackPanel element view was upgraded. Now it supports

    and
      tags to attach a data source to them. The CollectionsDemo was updated to show how it works in practice

      2015-12-07 Repository structure updated.

      2015-10-01 Bug fix in DialogVM. In destructor of the class was a bug.

      2015-09-30 Code refactory - to improve the Command class. generic TCommand and BaseComand classes was introduced

      2015-09-28 Code refactory - for better testability. Class MOD.mvvm.BaseViewModel renamed and changed to generic MOD.mvvm.ViewModel class. Also its _app property that was protected became private. Also added new interfaces like IApplication, IErrorHandler and IDisposable.
      So i need to update the docs in the near future, to align it with the current state of the framework.

      2015-09-26 Code refactory - to diminish code dependency between core modules.

      2015-09-24 Better calculated fields definitions. Functions for calculated fields now have a strongly typed entity item. Previously access to the current item was using untyped 'this' variable. Server side data service was also updated. Previously written code works without changes. But the new features provide better type safety.
      example of previous usage of defining a calculated field for a dbSet:

      	dbSets.TMessageAttachment.defineFileNameField(function () {
      			return this.IsBodyPart? this.BodyText:this.FileName;
      		});
      

      and current usage:
      	dbSets.TMessageAttachment.defineFileNameField(function (item) {
      			return item.IsBodyPart? item.BodyText:item.FileName;
      		});
      

      -- Maxim V. Tsapov
      I'm on Google+

About

Typescript version of jRIApp HTML5 framework. Makes creation of maintainable Single Page Applications and LOB applications possible in HTML5 world.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • JavaScript 56.2%
  • TypeScript 22.3%
  • C# 15.2%
  • HTML 3.1%
  • PowerShell 1.9%
  • CSS 1.3%