You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 20, 2018. It is now read-only.
Repository navigation
This repository was archived by the owner on Nov 20, 2018. It is now read-only.
Discussion: pure-js (2.x) vs. jquery-js (3.x) #326
I make this topic to discuss about the pure-js ans jquery-js version of library.
Supposedly will exists two versions of Fine Uploader:
2.x will be pure-js
3.x will be jquery-compatible
My opnion is not do that. Will be maintenance be extremally hard and could create inconsistencies between versions. My suggestion is create a pure-js API and a wrapper in jQuery (all will be 3.x version).
For instance:
var up = qq.FileUpload(x);
var up = jQuery.FileUpload(x); // -> call qq.FileUpload(x)
Events, methods and vars need be the same to both.
Files can be:
fileuploader.js
jquery-fileuploader.js (requires fileuploader.js)
prototype-fileuploader.js (requires fileuploader.js) -- for instance
The desvantages will be couldn't use jQuery helpers. But can be create an advanced solution for that in files. For instance:
fileuploader.js (full version, core + helpers)
fileuploader-helpers.js (helpers only file, if you don't uses jQuery)
To be honest, this sounds like more of a maintenance nightmare than my initial proposal, and it doesn't solve any of the problems that would be solved by moving entirely to jQuery. My plan is to eventually phase out the "native js" Fine Uploader. Why? Because it is much easier and faster to evolve the product using a library like jQuery, along with all of the available plug-ins (including jQuery-UI). The existing "native js" Fine Uploader will remain, but will not evolve after a point in the near future. I will continue to fix critical bugs in this version, but new feature development will eventually happen in the jQuery version. I realize that not everyone will be happy with this, but I expect most users will appreciate the move to jQuery. I know I will. If someone, for whatever reason, does not want to depend on jQuery, they will be able to use the non-jQuery version. It's not going away, it just won't evolve.
I noticed you referenced Prototype. I have used Prototype in the past, and have no plans to write anything using Prototype by choice in the future. Prototype's decision to extend the DOM was a poor one. jQuery's choice to wrap the DOM, instead, was a good one. Putting that aside, jQuery has a huge amount of plug-ins, and many more users by comparison.
I agree totally with you. But I had understood that will have two versions (pure and jQuery). If you will develop only jQuery, I think that is better! I'm a jQuery user too and I think too great you develop for it.
There are some pure-js upload libraries on internet, so users will have two option: use it or use 2.x version (with fewer features).
Well, there will be two versions. However, the 2.x version will be considered a "legacy" version of Fine Uploader. I'll maintain it, at least for a while, by patching it with critical bugfixes. The 3.x version will be the jQuery re-write version, and will be considered the main version where new features will be added. It's going to take a little while to get the 3.x (jQuery) version into a usable state since I haven't started on it yet and I will be doing this in my free time. Initially, 3.x will be in a beta phase until all major issues have been worked out. Once it is "released", the 2.x version will go into a legacy-sustaining mode, and new feature development/evolution will only occur in 3.x.
Once 3.x is out of beta, users can continue to choose the 2.x version, but feature requests will not be honored. At some point, the 2.x version may be EOLed altogether.
I would expect most users to be more concerned with features, support,
reliability, and ease-of-use over the uniqueness of the codebase.
On Sep 19, 2012 5:18 AM, "Emmanuel" notifications@github.com wrote:
there are numerous jQuery uploaderes available
while...
your pure-cs is the only one! Keep the good work and uniqueness of your
solution!!!
—
Reply to this email directly or view it on GitHubhttps://github.com/valums/file-uploader/issues/326#issuecomment-8686593.
@rnicholus Agreed...and while there are lots of jQuery uploaders available, this one really is the best I have come across.
Honestly, the only reason I could see you moving to a jQuery plugin version is to increase it's popularity. I think there are lots of developers who will be searching for a jQuery uploader—even though this uploader (in it's current state) works perfectly fine. They know jQuery, and they know how jQuery plugins work. I think it's all a little ridiculous...but that's the way it is.
Moreover, my two cents on version three. Whatever new features you add, please keep FileUploaderBasic in its current state more-or-less. FileUploaderBasic is really what attracted me to this file uploader. I personally want control over the UI. Give me callbacks to work with. Too many other uploaders create big, complex interfaces, which can be really difficult to implement into your unique software application.
@reinink I'm not sure FileUploaderBasic will exist in 3.0 as you know it now. However, my goal is to make 3.0 as flexible as possible, so that users can use their own upload button, their own file list, their own css, or choose to omit one or more of these items and simply rely on callbacks. Please see the google doc referenced in the readme on master if you would like to specify features/considerations for me to take into account when developing 3.0.
@rnicholus I'm not opposed to one plugin, as long as we have the control available now. I get the need for some of this functionality to be built in—as long as it doesn't get too big or too complicated to remove all that stuff.
Put differently, I'd love version three to not require any assets (CSS, images)—just the JavaScript file.
@rnicholushttps://github.com/rnicholus I'm not opposed to one plugin,
as long as we have the control available now. I get the need for some of
this functionality to be built in—as long as it doesn't get too big or too
complicated to remove all that stuff.
Put differently, I'd love version three to not require any assets (CSS,
images)—just the JavaScript file.
—
Reply to this email directly or view it on GitHubhttps://github.com/valums/file-uploader/issues/326#issuecomment-8700698.
I would say that if you are going to make jQuery a dependency, you might as well make it a plugin for jQuery. Unless of course you could not meet your personal design goals while implementing Fine Uploader as a plugin.
Another option I thought of, to stop having to maintain all those nice utils, would be to try to roll in Sizzle.js and Underscore.js (I think this would cover all the other needs you listed). In my mind rolling sizzle and underscore into your code base could be a real pain in the ass, over time.
To me, this decision comes down to respecting your time and availability. And if you are going to be the only maintainer then I would go with it as a jQuery plugin. Those of us who dislike having external dependencies can always fork this project (which I have already done) to make sure they have what they like.
Another option would be to start allowing more devs to get involved to ease the work load, taking more of code reviewer role. But this is based on my perception, not fact, that you are not accepting a whole lot of pull requests. So feel free to correct me on this point.
I certainly could allow more devs to get involved. Unfortunately, I don't have admin access to this repo yet. I'd have to talk to Andrew about that.
Why do you think I'm not accepting a lot of pull requests? I have closed a bunch of really old pull requests, but I personally went through all 130 or so issues/PRs over the last month and marked the ones I see as interesting/potentially useful. The rest I closed. As far as new PRs, if the PRs are javascript-related, I tend to be a bit picky, no argument there. If I see a PR with a concept that seems truly useful, I will "massage" it a bit before merging it into master. "Massaging" the PR code is prudent if I see something has been left out, if it does not pass some quick tests I run, or if the design of the new code goes against some existing architectural decisions already in place in Fine Uploader. One example of this would be including an option and/or code for a feature in FileUploaderBasic when it only applies to FileUploader. I've also massaged or outright rejected PRs with code that seems redundant to me or, in my opinion, adds "noise" to the codebase when there are other, existing methods to achieve the same goal. I'm also hesitant to add adjustments for really old browsers (although I don't recall seeing any such PRs recently). I don't plan on supporting IE6 or older, for example.
...I would like to add that my suggestion to write the code code in jQuery and create a jQuery plug-in wrapper as an optional add-on would only be a useful avenue to pursue if those who voted "nay" on the jQuery proposal have a problem with cluttering up their code base by writing the own jQuery to interface with the plug-in. Perhaps these people have an otherwise jQuery-free project (speaking of their own handwritten code) or are using some other library such as Prototype or some other similar library. If the naysayers simply object to including jQuery as a dependency, this idea is not a useful one, though.
I would like to know, specifically, why some object to simply including jQuery as a dependency. If this is your specific objection, perhaps you could elaborate.
So far as the management goes, those are your choices, it was not ment as a criticism. It was just my impression of your stance on the management, I am sorry I offended you. As I seem to have made a total jack ass of myself on this thread I will drop all other points, and respond to your very last statement:
For my work, I actually use jQuery, so it's not so much that I would have to include jQuery in my projects to continue using your uploader. It's that if I ever decided to move on from jQuery, for whatever reason in the future, I would have to drop your codebase and find another, with comparable features. It just gives me more flexibility in future projects, and I think it gives you a broader audience base in the long run.
I didnt really take your assertion as a criticism. I'm happy to hear
constructive criticism or suggestions for improvement, along with ideas.
So, don't feel that you need to back down.
I'll need to give some more thought to 3.0 over the next few days or so.
I'll post my conclusion when i reach one.
I'll probably close the poll in the next hour or so.
For those who voted for jquery, care to share what you would think/do if
the decision did not go in your favor? That is, what if i decided not to
rewrite in jquery? What if i consider the suggestion to write an (optional)
jquery plugin wrapper? This may result in slower progress as far as
features and bugfixes are concerned, and may rule out some planned
features. I guess I'm trying to figure out if anyone is as pro-jquery
plug-in as some of the commenters that are anti-jquery plug-in.
To put it even simpler: Some people are clearly pissed off with my plan to re-write Fine Uploader using jQuery. Would anyone be pissed off if I decided to keep the core library in plain 'ole naked js? Again, I might write an optional jQuery plug-in wrapper if I went this route. Note that, if I went this route, there may be some notable refactoring of the existing code.
On Sep 23, 2012 7:14 PM, "Jacob Lee" notifications@github.com wrote:
So far as the management goes, those are your choices, it was not ment as
a criticism. It was just my impression of your stance on the management, I
am sorry I offended you. As I seem to have made a total jack ass of myself
on this thread I will drop all other points, and respond to your very last
statement:
For my work, I actually use jQuery, so it's not so much that I would have
to include jQuery in my projects to continue using your uploader. It's that
if I ever decided to move on from jQuery, for whatever reason in the
future, I would have to drop your codebase and find another, with
comparable features. It just gives me more flexibility in future projects,
and I think it gives you a broader audience base in the long run.
—
Reply to this email directly or view it on GitHubhttps://github.com/valums/file-uploader/issues/326#issuecomment-8804529.
I voted against, because we use FineUploader with GWT.
It took some work to get it integrated into GWT, and I don't think I would be in a position to do that again with a jQuery-ised version.
If 3.0 becomes tied to jQuery, then we'll need to stick with 2.x or fork it.
I think I've made my point, but I want to refine one bit of it: visit MicroJS.com to see a growing number of specialized JS libraries that don't rely on any monolithic framework. By cherry-picking individual bits, you can build up just the behavior you need for your application -- often with a smaller total footprint than just jQuery itself. This is incredibly important for mobile devices with limited memory.
It is so unique and rare to see a refined uploader like yours that doesn't rely on a framework. This makes it work for everyone, not just those who pick the same library as you.
I've had to include both jQuery and another framework into the same application, and I only did so because it was in the admin console, and I could guarantee nobody was going to use a phone to edit the intranet documents. I would never want to be forced into choosing a framework -- often that choice has already been made before I get the project.
Walter
On Sep 24, 2012, at 2:26 AM, tvernum wrote:
I voted against, because we use FineUploader with GWT.
It took some work to get it integrated into GWT, and I don't think I would be in a position to do that again with a jQuery-ised version.
If 3.0 becomes tied to jQuery, then we'll need to stick with 2.x or fork it.
—
Reply to this email directly or view it on GitHub.
Headjs is interesting, but I envisioned using a tool to combine all
3rd--party js files into one file for each release. In the master branch,
they would be split out into separate files, with instructions for those
who want to combine them. I also would consider splitting up
fileuploader.js into separate files to aid in future development and
bugfixes. Again, they would be combined in all releases.
While I don't necessarily agree with the arguments presented by the very vocal group of users against re-writing the library using jQuery, I respect their concerns. Perhaps I can make everyone happy here.
The plan:
I will not make jQuery a dependency.
There may, however, be a lot of refactoring in 3.0.
There will most definitely be some breaking changes as well. When this happens, I'll do my best to document the breaking changes to those upgrading can do so as painlessly as possible. (Off-topic note: Some of the 2.x releases may have minor breaking changes as well, but, again, they will be well documented for those upgrading.)
I will likely create an optional jQuery plug-in wrapper that will give jQuery users all of the benefits of a jQuery plug-in.
Not sure what 3rd party-libraries I will use in 3.0 or if I will use any 3rd-party code at all. MicroJS is something to consider. Please see this comment regarding use of 3rd-party libraries and code organization.
Please see the google doc in the readme if you want to add suggestions for 3.0 features.
Activity
walterdavis commentedon Sep 12, 2012
This is a very neat solution. I like it a lot!
rnicholus commentedon Sep 12, 2012
To be honest, this sounds like more of a maintenance nightmare than my initial proposal, and it doesn't solve any of the problems that would be solved by moving entirely to jQuery. My plan is to eventually phase out the "native js" Fine Uploader. Why? Because it is much easier and faster to evolve the product using a library like jQuery, along with all of the available plug-ins (including jQuery-UI). The existing "native js" Fine Uploader will remain, but will not evolve after a point in the near future. I will continue to fix critical bugs in this version, but new feature development will eventually happen in the jQuery version. I realize that not everyone will be happy with this, but I expect most users will appreciate the move to jQuery. I know I will. If someone, for whatever reason, does not want to depend on jQuery, they will be able to use the non-jQuery version. It's not going away, it just won't evolve.
I noticed you referenced Prototype. I have used Prototype in the past, and have no plans to write anything using Prototype by choice in the future. Prototype's decision to extend the DOM was a poor one. jQuery's choice to wrap the DOM, instead, was a good one. Putting that aside, jQuery has a huge amount of plug-ins, and many more users by comparison.
rentalhost commentedon Sep 12, 2012
I agree totally with you. But I had understood that will have two versions (pure and jQuery). If you will develop only jQuery, I think that is better! I'm a jQuery user too and I think too great you develop for it.
There are some pure-js upload libraries on internet, so users will have two option: use it or use 2.x version (with fewer features).
rnicholus commentedon Sep 12, 2012
Well, there will be two versions. However, the 2.x version will be considered a "legacy" version of Fine Uploader. I'll maintain it, at least for a while, by patching it with critical bugfixes. The 3.x version will be the jQuery re-write version, and will be considered the main version where new features will be added. It's going to take a little while to get the 3.x (jQuery) version into a usable state since I haven't started on it yet and I will be doing this in my free time. Initially, 3.x will be in a beta phase until all major issues have been worked out. Once it is "released", the 2.x version will go into a legacy-sustaining mode, and new feature development/evolution will only occur in 3.x.
Once 3.x is out of beta, users can continue to choose the 2.x version, but feature requests will not be honored. At some point, the 2.x version may be EOLed altogether.
Does this make sense?
rentalhost commentedon Sep 12, 2012
Perfectly!
emanwebdev commentedon Sep 19, 2012
there are numerous jQuery uploaders available
while...
your pure-js is the only one! Keep the good work and uniqueness of your solution!!!
rnicholus commentedon Sep 19, 2012
I would expect most users to be more concerned with features, support,
reliability, and ease-of-use over the uniqueness of the codebase.
On Sep 19, 2012 5:18 AM, "Emmanuel" notifications@github.com wrote:
reinink commentedon Sep 19, 2012
@rnicholus Agreed...and while there are lots of jQuery uploaders available, this one really is the best I have come across.
Honestly, the only reason I could see you moving to a jQuery plugin version is to increase it's popularity. I think there are lots of developers who will be searching for a jQuery uploader—even though this uploader (in it's current state) works perfectly fine. They know jQuery, and they know how jQuery plugins work. I think it's all a little ridiculous...but that's the way it is.
Moreover, my two cents on version three. Whatever new features you add, please keep FileUploaderBasic in its current state more-or-less. FileUploaderBasic is really what attracted me to this file uploader. I personally want control over the UI. Give me callbacks to work with. Too many other uploaders create big, complex interfaces, which can be really difficult to implement into your unique software application.
Keep up the good work!
rnicholus commentedon Sep 19, 2012
@reinink I'm not sure FileUploaderBasic will exist in 3.0 as you know it now. However, my goal is to make 3.0 as flexible as possible, so that users can use their own upload button, their own file list, their own css, or choose to omit one or more of these items and simply rely on callbacks. Please see the google doc referenced in the readme on master if you would like to specify features/considerations for me to take into account when developing 3.0.
reinink commentedon Sep 19, 2012
@rnicholus I'm not opposed to one plugin, as long as we have the control available now. I get the need for some of this functionality to be built in—as long as it doesn't get too big or too complicated to remove all that stuff.
Put differently, I'd love version three to not require any assets (CSS, images)—just the JavaScript file.
rnicholus commentedon Sep 19, 2012
I can certainly put that into my TODO list when developing 3.0 (which has
already started, though i haven't done much at all yet). Could you please
codify this request and any others in this spreadsheet, if possible?
https://docs.google.com/spreadsheet/ccc?key=0AnQh9-ZBDuh_dEJGZFY1dEl2SDlGUGZNLUVfanZKeXc#gid=0
On Wed, Sep 19, 2012 at 1:11 PM, reinink notifications@github.com wrote:
reinink commentedon Sep 19, 2012
@rnicholus Done. ;)
25 remaining items
cleer73 commentedon Sep 23, 2012
I would say that if you are going to make jQuery a dependency, you might as well make it a plugin for jQuery. Unless of course you could not meet your personal design goals while implementing Fine Uploader as a plugin.
Another option I thought of, to stop having to maintain all those nice utils, would be to try to roll in Sizzle.js and Underscore.js (I think this would cover all the other needs you listed). In my mind rolling sizzle and underscore into your code base could be a real pain in the ass, over time.
To me, this decision comes down to respecting your time and availability. And if you are going to be the only maintainer then I would go with it as a jQuery plugin. Those of us who dislike having external dependencies can always fork this project (which I have already done) to make sure they have what they like.
Another option would be to start allowing more devs to get involved to ease the work load, taking more of code reviewer role. But this is based on my perception, not fact, that you are not accepting a whole lot of pull requests. So feel free to correct me on this point.
rnicholus commentedon Sep 23, 2012
I certainly could allow more devs to get involved. Unfortunately, I don't have admin access to this repo yet. I'd have to talk to Andrew about that.
Why do you think I'm not accepting a lot of pull requests? I have closed a bunch of really old pull requests, but I personally went through all 130 or so issues/PRs over the last month and marked the ones I see as interesting/potentially useful. The rest I closed. As far as new PRs, if the PRs are javascript-related, I tend to be a bit picky, no argument there. If I see a PR with a concept that seems truly useful, I will "massage" it a bit before merging it into master. "Massaging" the PR code is prudent if I see something has been left out, if it does not pass some quick tests I run, or if the design of the new code goes against some existing architectural decisions already in place in Fine Uploader. One example of this would be including an option and/or code for a feature in FileUploaderBasic when it only applies to FileUploader. I've also massaged or outright rejected PRs with code that seems redundant to me or, in my opinion, adds "noise" to the codebase when there are other, existing methods to achieve the same goal. I'm also hesitant to add adjustments for really old browsers (although I don't recall seeing any such PRs recently). I don't plan on supporting IE6 or older, for example.
rnicholus commentedon Sep 23, 2012
...I would like to add that my suggestion to write the code code in jQuery and create a jQuery plug-in wrapper as an optional add-on would only be a useful avenue to pursue if those who voted "nay" on the jQuery proposal have a problem with cluttering up their code base by writing the own jQuery to interface with the plug-in. Perhaps these people have an otherwise jQuery-free project (speaking of their own handwritten code) or are using some other library such as Prototype or some other similar library. If the naysayers simply object to including jQuery as a dependency, this idea is not a useful one, though.
I would like to know, specifically, why some object to simply including jQuery as a dependency. If this is your specific objection, perhaps you could elaborate.
cleer73 commentedon Sep 24, 2012
So far as the management goes, those are your choices, it was not ment as a criticism. It was just my impression of your stance on the management, I am sorry I offended you. As I seem to have made a total jack ass of myself on this thread I will drop all other points, and respond to your very last statement:
For my work, I actually use jQuery, so it's not so much that I would have to include jQuery in my projects to continue using your uploader. It's that if I ever decided to move on from jQuery, for whatever reason in the future, I would have to drop your codebase and find another, with comparable features. It just gives me more flexibility in future projects, and I think it gives you a broader audience base in the long run.
rnicholus commentedon Sep 24, 2012
I didnt really take your assertion as a criticism. I'm happy to hear
constructive criticism or suggestions for improvement, along with ideas.
So, don't feel that you need to back down.
I'll need to give some more thought to 3.0 over the next few days or so.
I'll post my conclusion when i reach one.
I'll probably close the poll in the next hour or so.
For those who voted for jquery, care to share what you would think/do if
the decision did not go in your favor? That is, what if i decided not to
rewrite in jquery? What if i consider the suggestion to write an (optional)
jquery plugin wrapper? This may result in slower progress as far as
features and bugfixes are concerned, and may rule out some planned
features. I guess I'm trying to figure out if anyone is as pro-jquery
plug-in as some of the commenters that are anti-jquery plug-in.
To put it even simpler: Some people are clearly pissed off with my plan to re-write Fine Uploader using jQuery. Would anyone be pissed off if I decided to keep the core library in plain 'ole naked js? Again, I might write an optional jQuery plug-in wrapper if I went this route. Note that, if I went this route, there may be some notable refactoring of the existing code.
On Sep 23, 2012 7:14 PM, "Jacob Lee" notifications@github.com wrote:
rnicholus commentedon Sep 24, 2012
Final vote:
For jQuery: 40 (78%)
Against: 11 (22%)
I'd like to hear more discussion here from both sides. Please see my post above this one.
remove poll info - #326
tvernum commentedon Sep 24, 2012
I voted against, because we use FineUploader with GWT.
It took some work to get it integrated into GWT, and I don't think I would be in a position to do that again with a jQuery-ised version.
If 3.0 becomes tied to jQuery, then we'll need to stick with 2.x or fork it.
walterdavis commentedon Sep 24, 2012
I think I've made my point, but I want to refine one bit of it: visit MicroJS.com to see a growing number of specialized JS libraries that don't rely on any monolithic framework. By cherry-picking individual bits, you can build up just the behavior you need for your application -- often with a smaller total footprint than just jQuery itself. This is incredibly important for mobile devices with limited memory.
It is so unique and rare to see a refined uploader like yours that doesn't rely on a framework. This makes it work for everyone, not just those who pick the same library as you.
I've had to include both jQuery and another framework into the same application, and I only did so because it was in the admin console, and I could guarantee nobody was going to use a phone to edit the intranet documents. I would never want to be forced into choosing a framework -- often that choice has already been made before I get the project.
Walter
On Sep 24, 2012, at 2:26 AM, tvernum wrote:
emanwebdev commentedon Sep 24, 2012
+1
P.S.
Fantastic! THANKS!!!
++ see http://headjs.com/
rnicholus commentedon Sep 24, 2012
First I heard about MicroJS. Pretty cool indeed.
rnicholus commentedon Sep 24, 2012
Headjs is interesting, but I envisioned using a tool to combine all
3rd--party js files into one file for each release. In the master branch,
they would be split out into separate files, with instructions for those
who want to combine them. I also would consider splitting up
fileuploader.js into separate files to aid in future development and
bugfixes. Again, they would be combined in all releases.
On Mon, Sep 24, 2012 at 2:15 PM, Emmanuel notifications@github.com wrote:
rnicholus commentedon Sep 25, 2012
I've come to a conclusion.
While I don't necessarily agree with the arguments presented by the very vocal group of users against re-writing the library using jQuery, I respect their concerns. Perhaps I can make everyone happy here.
The plan:
rnicholus commentedon Sep 27, 2012
Check out the 3.0 branch from time to time if you are interested in my progress.