All Projects → EngageSoftware → DNN-JavaScript-Libraries

EngageSoftware / DNN-JavaScript-Libraries

Licence: MIT license
Common JavaScript libraries packaged as DNN JavaScript Library extensions

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to DNN-JavaScript-Libraries

DNN.Reports
DNN Reports module provides a simple, flexible, view on your database, any table, any view and display results with plugin visualizers
Stars: ✭ 20 (-23.08%)
Mutual labels:  dnn, dnncms, dnnplatform
DNN.IFrame
DNN IFrame is a module used for embedding an internal/external URL on your DNN site.
Stars: ✭ 14 (-46.15%)
Mutual labels:  dnn, dnncms, dnnplatform
DNN.Templates
MVC and SPA (Single Page Application) module templates for DNN
Stars: ✭ 19 (-26.92%)
Mutual labels:  dnn, dnncms
OpenStore
OpenStore
Stars: ✭ 19 (-26.92%)
Mutual labels:  dnncms, dnnplatform
dnnextensions
One solution. Multiple extensions. No pain. A collection of DNN modules and other extensions.
Stars: ✭ 36 (+38.46%)
Mutual labels:  dnn, dnncms
DNN.Events
DNN Events manages display of upcoming events as a list in chronological order or in calendar format with additional information. This Github repo is used for source management and releases.
Stars: ✭ 26 (+0%)
Mutual labels:  dnn, dnnplatform
DNN.Faq
DNN FAQ is a basic module used for displaying frequently asked questions on your DNN site.
Stars: ✭ 16 (-38.46%)
Mutual labels:  dnn, dnncms
PowerShellModules
A collection of PowerShell modules
Stars: ✭ 24 (-7.69%)
Mutual labels:  dnn, dnncms
Gnes
GNES is Generic Neural Elastic Search, a cloud-native semantic search system based on deep neural network.
Stars: ✭ 1,178 (+4430.77%)
Mutual labels:  dnn
Monet
MONeT framework for reducing memory consumption of DNN training
Stars: ✭ 126 (+384.62%)
Mutual labels:  dnn
Mobilnet ssd opencv
MobilNet-SSD object detection in opencv 3.4.1
Stars: ✭ 64 (+146.15%)
Mutual labels:  dnn
Ps
自己实现的深度学习训练框架,纯java实现,没有过多的第三方依赖,可分布式训练
Stars: ✭ 86 (+230.77%)
Mutual labels:  dnn
Mylearn
machine learning algorithm
Stars: ✭ 125 (+380.77%)
Mutual labels:  dnn
Eyerissf
An Eyeriss Chip (researched by MIT, a CNN accelerator) simulator and New DNN framework "Hive"
Stars: ✭ 68 (+161.54%)
Mutual labels:  dnn
Keraspp
코딩셰프의 3분 딥러닝, 케라스맛
Stars: ✭ 178 (+584.62%)
Mutual labels:  dnn
Opencv Mtcnn
An implementation of MTCNN Face detector using OpenCV's DNN module
Stars: ✭ 59 (+126.92%)
Mutual labels:  dnn
Polydeploy
A Bulk Deployment tool for the DNN CMS. PolyDeploy is focussed on security, reliability and auditability.
Stars: ✭ 40 (+53.85%)
Mutual labels:  dnn
Lq Nets
LQ-Nets: Learned Quantization for Highly Accurate and Compact Deep Neural Networks
Stars: ✭ 195 (+650%)
Mutual labels:  dnn
Pytorch Kaldi
pytorch-kaldi is a project for developing state-of-the-art DNN/RNN hybrid speech recognition systems. The DNN part is managed by pytorch, while feature extraction, label computation, and decoding are performed with the kaldi toolkit.
Stars: ✭ 2,097 (+7965.38%)
Mutual labels:  dnn
Yolo mark
GUI for marking bounded boxes of objects in images for training neural network Yolo v3 and v2
Stars: ✭ 1,624 (+6146.15%)
Mutual labels:  dnn

DNN JavaScript Libraries

AppVeyor Build Status

Version 7.2 of the DNN Platform introduced the JavaScript Library extension type. This allows common JavaScript libraries to exist in a single place within a DNN site, instead of every module, skin, and piece of content that wants to include them using their own. DNN presently comes with libraries for jQuery, jQuery UI, jQuery Migrate, Knockout, and Knockout Mapping.

In addition to these built-in libraries, new libraries can be installed into DNN, and used by various components. DNN allows multiple versions of a JavaScript library to be used, so one module can request a particular version of a script, while another requests another. So long as they aren't on the same page, they will get what they requested; otherwise, DNN will use the higher version.

How to add a new library

You'll need to install the dependencies (yarn install) and then use the new script, which will prompt you for the various pieces of information

    yarn install
    yarn run new

After that, if you want to ship any other files with the library (e.g. CSS files), you'll want to add those into the dnn-library.json file. You can then commit your changes and submit a pull request on GitHub.

Packages

The installable packages are included within this GitHub repository as releases.

Goal

The main benefits in using JavaScript Libraries are realized when they are used by many separate components within a DNN site (i.e. when there is one common set of libraries and separate, unrelated DNN skins and modules use those libraries instead of packaging scripts directly into the extension). In order to aid in that goal, we are attempting to create a central repository of common JavaScript Libraries that can be used by many different DNN extension developers.

Usage

Skins

Starting in DNN 7.3, there is a skin object called JavaScriptLibraryInclude which can be used to request a JavaScript library (including jQuery, but also any 3rd party library) from a skin. To do that, you need to register the skin object at the top of your skin:

<%@ Register TagPrefix="dnn" TagName="JavaScriptLibraryInclude" Src="~/admin/Skins/JavaScriptLibraryInclude.ascx" %>

Then, in the body of the skin, use the skin object to request the library:

<dnn:JavaScriptLibraryInclude runat="server" Name="jQuery" />
<dnn:JavaScriptLibraryInclude runat="server" Name="jQuery-UI" Version="1.10.3" />
<dnn:JavaScriptLibraryInclude runat="server" Name="jQuery-Migrate" Version="1.2.1" SpecificVersion="LatestMajor" />

HTML Skins

The skin object mentioned above can also be used from HTML skins. It would look something like this:

<object codetype="dotnetnuke/server" codebase="JavaScriptLibraryInclude">
    <param name="Name" value="jQuery" />
    <param name="Version" value="1.9.1" />
</object>

Code

There is also an API to request JavaScript Libraries from code. This is needed in skins prior to DNN 7.3 and the introduction of the JavaScriptLibraryInclude skin object, as well as from extension code (though extensions can also make use of the skin object, if desired). The primary entry point for the API is the RequestRegistration method of the JavaScript static class in the DotNetNuke.Framework.JavaScriptLibraries namespace. There are three overloads to RequestRegistration:

JavaScript.RequestRegistration(String libraryName)
JavaScript.RequestRegistration(String libraryName, Version version)
JavaScript.RequestRegistration(String libraryName, Version version, SpecificVersion specificity)

The overload which doesn't specify a version will request the latest version of the library. In order to avoid your extensions breaking unexpectedly, it's probably best to always specify a version number. The second overload, which includes the version number will request that specific version of the library. If that version isn't installed, it will instead display an error. The third overload is probably the best to use for most scenarios. It allows you to pass a value indicating how specific the version is, as a value of the SpecificVersion enum. The possible values are Latest, LatestMajor, LatestMinor, and Exact. Latest is the behavior of the overload with one argument, Exact is the behavior of the overload with two arguments, while the other two values allow you to get behavior that is in between strict and loose.

JavaScript Library Features

When requesting that a JavaScript Library is registered, DNN ensures that both that library's JavaScript file and all of its dependencies' JavaScript files, get included on the page. The JavaScript library itself will define the properties that determine how the file is included on the page. Specifically, the library will indicate its preferred location (from page head, body top, and body bottom), and can provide a URL to the script on a CDN (along with a JavaScript expression to use to verify that the CDN loaded the script correctly, so that DNN can fallback to the local version if the CDN is down). The host administrator can configure whether to use the CDN or not (it is off by default).

The other main feature that JavaScript Libraries give you is de-duplication of scripts. This means that if your module and your skin both request the html5shiv library, it only gets included on the page once (rather than both components including their own version of the script). Likewise, if both components request different versions of the script, just the higher version will be included.

License

This code is released under the MIT license. However, the individual libraries are licensed by their respective owners.

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].