jQuery-File-Upload icon indicating copy to clipboard operation
jQuery-File-Upload copied to clipboard

jQuery Templates discontinued

Open c2h5oh opened this issue 15 years ago • 5 comments

jQuery Templates plugin has been officially discontinued. It will remain at beta stage, there will be no new fixes or development https://github.com/jquery/jquery-tmpl#readme

There will be a templates replacement as a part of one of the future jQuery UI releases but it's more than sure it will not make it to 1.9 - we should expect at least 1 year wait before it's released. It will be most likely based on https://github.com/BorisMoore/jsrender (soon to be beta) .

I think it's time to remove templates dependency, even as an option.

c2h5oh avatar Nov 10 '11 23:11 c2h5oh

I'm aware of this issue and I'm watching the progress of JSRender.

I also looked at Mustache, Handlebars, Jresig's Microtemplates and a couple of other solutions, but JSRender seems to be the most promising candidate for a replacement, also given the possibility that it might become the official jQuery UI template renderer. However I'm waiting for a more stable version (at least a beta version).

The basic jQuery File Upload plugin doesn't have any templates dependency, but it's not feasible to remove it for the UI version.

blueimp avatar Nov 11 '11 06:11 blueimp

I've decided to replace jQuery Templates with my own JavaScript Templates implementation: https://github.com/blueimp/JavaScript-Templates

It's a < 1KB lightweight, fast & powerful JavaScript templating engine with zero dependencies. Compatible with server-side environments like node.js, module loaders like RequireJS and all web browsers.

It's the second fastest templating engine (after doT.js / doU.js) in the "JavaScript template language shootoff" test case: http://jsperf.com/dom-vs-innerhtml-based-templating/285 And it even beats doT.js on the same test case when taking parsing of the template definition into account: http://jsperf.com/template-engines-comparison-parsing-rendering/2

blueimp avatar Dec 10 '11 23:12 blueimp

The newly introduced Template is much, much, much, much, slower compare to the jquery template. Can we get the current file upload version with jquery template functionality? I tried replacing the uploadTemplate, DownloadTemplate with jquery template, but at many places there is call to "renderPreviews" etc method, which doesn't understand the jqueryTemplate.

Also the template of the index.html has different setting for showing progressbar. we would like to have the original index.html with latest jquery file upload with jquery template.

Can you please help me.

I have already read this wiki https://github.com/blueimp/jQuery-File-Upload/wiki/Template-Engine.

vijendrapatil avatar Nov 21 '12 07:11 vijendrapatil

On the contrary, the blueimp JavaScript Templates are much faster than the original jQuery Templates used one year ago. Just check out the benchmark I posted above, where the blueimp JavaScript Templates actually turn out the second fastest and jQuery Templates the slowest.

It might be that you're confusing the Templating performance with the client-side resizing and preview generation features, which do require most processing power, since complete images have to be read into memory.

Anyway, if you have trouble following the Wiki guides, please post on the support forum. And please read the issue guidelines before posting: https://github.com/blueimp/jQuery-File-Upload/blob/master/CONTRIBUTING.md

blueimp avatar Nov 21 '12 08:11 blueimp

Nope, its slow for the following template. I tried on Chrome, FF, IE10, its much slower compare to Jquery Template. My browser IE10 was hanged for a while. Please help me.

================Start=================

<script id="tmplPermDownload" type="text/html">

</script>

=======================End=================

Sample Data

var files= [{ FileName : "filename", FileSize : 123456, FullFilePath : "testval", OwnerFullName : "testval", IsPublic : false, IsMarkedForDelete : false, BugID : 1234, DateAdded : "testval", AttachmentGUID : "testval", CommentGUID : "testval", WebBasePathExtranet : "", FileGUID : "testval", ItemToCopy : false, Error : "" }, { FileName : "filename", FileSize : 123456, FullFilePath : "testval", OwnerFullName : "testval", IsPublic : false, IsMarkedForDelete : false, BugID : 1234, DateAdded : "testval", AttachmentGUID : "testval", CommentGUID : "testval", WebBasePathExtranet : "", FileGUID : "testval", ItemToCopy: false, Error: "" }, { FileName : "filename", FileSize : 123456, FullFilePath : "testval", OwnerFullName : "testval", IsPublic : false, IsMarkedForDelete : false, BugID : 1234, DateAdded : "testval", AttachmentGUID : "testval", CommentGUID : "testval", WebBasePathExtranet : "", FileGUID : "testval", ItemToCopy: false, Error: "" }, { FileName : "filename", FileSize : 123456, FullFilePath : "testval", OwnerFullName : "testval", IsPublic : false, IsMarkedForDelete : false, BugID : 1234, DateAdded : "testval", AttachmentGUID : "testval", CommentGUID : "testval", WebBasePathExtranet : "", FileGUID : "testval", ItemToCopy: false, Error: "" }, { FileName : "filename", FileSize : 123456, FullFilePath : "testval", OwnerFullName : "testval", IsPublic : false, IsMarkedForDelete : false, BugID : 1234, DateAdded : "testval", AttachmentGUID : "testval", CommentGUID : "testval", WebBasePathExtranet : "", FileGUID : "testval", ItemToCopy: false, Error: "" } ];

Also the progress image is not appearing for following download template. Also, once the download is complte, its not replacing the download template with the actual file uploaded. It just remove the download template row but doesn't replace it with the new upload template row.

<script id="tmplPermDownload" type="text/html">
    

</script>

vijendrapatil avatar Nov 21 '12 12:11 vijendrapatil