Giter Site home page Giter Site logo

noder-js's Introduction

Aria Templates - JavaScript Framework

ci codecov Dependencies devDependencies

npm

Aria Templates (aka AT) is an application framework written in JavaScript for building rich and large-scaled enterprise web applications. Developed since 2009 by Amadeus for its professional products, it has been designed to build web apps used intensively that need to display and process a high amount of data with a minimum of bandwidth consumption.

Some details

Aria Templates in a nutshell:

  • MVC based framework
  • powerful templating engine
  • data binding and automatic refresh
  • widgets libraries
  • lots of utilities libraries

The MVC's terminology in AT:

  • model -> JSON-based data model stored in DOM nodes corresponding to templates
  • view -> template (.tpl file)
  • controller -> module controllers and template scripts (.js files)

Templates can either be evaluated client-side or precompiled at build time.

Getting started

To get started with Aria Templates, you have several options:

  • you can clone our Git repository / download a ZIP from GitHub and then include bootstrap.js file in your HTML page, to run the original, development source code,
  • after obtaining our source code, you may run Grunt build and then include a packaged, minified (much faster) version of the framework in your page,
  • or to use the framework in your NodeJS application, issue npm install ariatemplates in the command line, then call require('ariatemplates') from your code to load the framework.

Head to README.md files in src and build folders to read more.

License

Apache License 2.0

Browser support

  • Firefox latest
  • Chrome latest
  • Edge latest

For accessibility, we support the combination of Edge (latest) with Jaws 2021.

Dependencies

The framework itself doesn't have any external dependencies.

We use Grunt, JSHint, UglifyJS, attester and a couple of other tools for building and testing.

Tools & apps

Syntax highlighters:

Other tools:

Feel invited to contribute highlighters for editor of your choice, or other useful tools!

Testing

  • Attester is the tool we use for running Aria Templates tests. You may also use it for running tests of your project.
  • Aria Templates TDD guide can help you writing tests for AT widgets and templates

Releases & backward compatibility

We release a new minor version (1.3.5, 1.3.6, ...) every 3 weeks, containing new features and bugfixes. Each version is thoroughly tested before the release. These releases are backward compatible. Occasionally we also backport important fixes to some of the older releases (1.3.1A, 1.3.1B etc.) - see tags.

Twice or three times a year, we issue a non-backward-compatible release, bump the the second digit (e.g. 1.3.x -> 1.4.1) and provide migration guide.

Before removal, items are marked as deprecated for at least 9 weeks (usually much more). We inform about deprecation in the docs, release notes and by flooding your console -- you won't overlook it.

Support & contributing

If you spotted some code problems in the framework, please open an AT issue or ideally, a pull request with the fix and a test.

See more in CONTRIBUTING.md and TDD guide for Aria Templates.

noder-js's People

Contributors

divdavem avatar fab-b avatar flongo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

noder-js's Issues

Trolling :) How about JSPM

Hi guys, this looks like a troll issue, but I was wondering if you had a look at jspm.
It's very similar to what you intend to do.
It supports CJS, AMD and ES6 modules.
It has packaging and it's getting quite popular.

http://jspm.io/

Request module wrongly manage response status code

The request module embedded in noder is a bit too restrictive with status code detection when the response get back from the server.

// line 35, in `browser_modules/request.js`
var error = (xhr.status != 200);

I think we should definitely change that code as it is not true at all.
We should do it the other way around, and really list only the status that are considered as errors.

I was playing with a PUT call to the server to create an object in DB, that would usually respond with a status code 201 CREATED. It then goes into the error which is totally wrong

loader plugin execution without method arguments

When I use a loader plugin method without providing any (static literal) value

require("./$myLoaderPlugin").someMethod();

Then the code inside $myLoaderPlugin.js (as well as someMethod.$preload, if any) is not executed before the require.

The behaviour is hence different according to the presence of literal arguments, as in

require("./$myLoaderPlugin").someMethod("param");

Noder should preserve stack traces when re-throwing exceptions from loaded scripts

As of today noder-js will catch and re-throw exceptions originating from loaded scripts. But when re-throwing in exception we are loosing the original stack trace which contains information paramount to the effective application debugging.

Consider this simple example:

which simply throws:

Uncaught TypeError: Cannot read property '+1:oid' of null

without giving me the line number / file name (at least in Chrome, it might be browser dependent). With a message as the only info it is really hard to debug effectively, especially bigger applications.

While what I would expect is this:

"TypeError: Cannot read property '+1:oid' of null
at Object.klass.createObjectObserver (http://hashspace.ariatemplates.com/dist/0.0.5-SNAPSHOT/hashspace-noder.js:3617:30)
at Object.klass.createExpressionObservers (http://hashspace.ariatemplates.com/dist/0.0.5-SNAPSHOT/hashspace-noder.js:3605:34)
at Object.klass.createNodeInstance (http://hashspace.ariatemplates.com/dist/0.0.5-SNAPSHOT/hashspace-noder.js:2074:25)
at Object.klass.createNodeInstance (http://hashspace.ariatemplates.com/dist/0.0.5-SNAPSHOT/hashspace-noder.js:2086:65)
at Object.klass.init (http://hashspace.ariatemplates.com/dist/0.0.5-SNAPSHOT/hashspace-noder.js:3559:45)
at Object.klass.$constructor (http://hashspace.ariatemplates.com/dist/0.0.5-SNAPSHOT/hashspace-noder.js:3524:26)
at Object.klass.process (http://hashspace.ariatemplates.com/dist/0.0.5-SNAPSHOT/hashspace-noder.js:5938:28)
at Object.exports.template.f as template
at Object.arguments.(anonymous function).res (eval at (http://noder-js.ariatemplates.com/dist/v1.6.0/noder.dev.js:1313:19), :12:16)
at Object.contextProto.moduleExecuteSync (http://noder-js.ariatemplates.com/dist/v1.6.0/noder.dev.js:1185:70)"

I'm painfully aware of the fact that exceptions / stack traces are in a lamentable state in JavaScript but IMO we need to improve the situation here as people might loose way to much time on debugging.

Allow <script type="application/x-noder" src="foo.js">

Right now we can do

<script type="application/x-noder">
  // code here
</script>

but can't

 <script type="application/x-noder" src="foo.js"></script>

As much as trivial it is (and taking into account that usually the scripts we write to start the app will be super small), perhaps it would make sense to add the latter option to satisfy the purists.

Absolute paths

noder can only load relative modules, it should be able to handle absolute paths as well

var myModule = require("/somewhere/there.js");

Should load /somewhere/there.js and not packages.baseUrl + "/somewhere/there.js"

It should be noted that noder doesn't let you use ../ to get past this limitation

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.