Mustafa-Online Posted October 31, 2017 Share Posted October 31, 2017 Hi Everyone, all around the Internet i see developers advice to not depend on jQuery anymore, (Frameworks & CMS's ) for example: Bootstrap Bootstrap 4 Without jQuery UiKit Uikit 3 Beta-31-released Silverstripe CMS - Silverstripe and many more .. I wanna know what is the situation gonna be with (ProcessWire + jQuery)? Any RoadMaps related to it? The current included version in "wire" directory is jQuery v1.11.1 .. is it possible to use PW with Vuejs or React (I'm Talking about the core not the frond-end development) 6 Link to comment Share on other sites More sharing options...
Mike Rockett Posted October 31, 2017 Share Posted October 31, 2017 Interesting you bring this up -- was thinking about it the other day. Would love to see this happen, especially in Vue. 2 Link to comment Share on other sites More sharing options...
Mats Posted October 31, 2017 Share Posted October 31, 2017 If Jquery is removed i'd like to see plain vanilla js and no framework in between. Just like like there is no PHP framework in PW. 11 Link to comment Share on other sites More sharing options...
Mike Rockett Posted October 31, 2017 Share Posted October 31, 2017 15 minutes ago, Mats said: If Jquery is removed i'd like to see plain vanilla js and no framework in between. Just like like there is no PHP framework in PW. My belief has always been this: if there's a tool available, use it. PW would greatly benefit from a reactive / flux-based (Vuex) way of doing things. If the backend were a complete SPA, that would be absolutely magical! Link to comment Share on other sites More sharing options...
clsource Posted October 31, 2017 Share Posted October 31, 2017 Technically PW Admin uses the API available. It's just a front end. So if someone wants to create a totally new admin front end that uses some js libs like https://vuejs.org/ https://mithril.js.org/ https://preactjs.com/ http://www.celljs.org/ It's totally possible. But keep in mind that many third party modules depends on jQuery. So if this is implemented in the core it should be ProcessWire 4 or something indicating a huge change. 7 Link to comment Share on other sites More sharing options...
Mike Rockett Posted October 31, 2017 Share Posted October 31, 2017 Just now, clsource said: Technically PW Admin uses the API available. It's just a front end. So if someone wants to create a totally new admin front end that uses some js libs Absolutely -- totally possible, and that's just what I was thinking about the other day. 1 minute ago, clsource said: So if this is implemented in the core it should be ProcessWire 4 or something indicating a huge change. Definitely. Link to comment Share on other sites More sharing options...
Pixrael Posted October 31, 2017 Share Posted October 31, 2017 So, we should build the next PW admin without uikit framework too? Because we will no longer depend on jQuery but will depend on UIKit or any other library that we need to function properly. Really I don't understand which is the trending goal of eliminating jQuery like a disease? 5 Link to comment Share on other sites More sharing options...
benbyf Posted October 31, 2017 Share Posted October 31, 2017 Vanilllllllllla js for the win. Although for me its the right tool for the job. Jquery is mostly a sugar to make browsers play nice, and a toolkit of repeatable actions (fade, move, etc). Vue and React are MV* for two way data binding... so basically doing mostly a different job (altough like angular your find front end animation helpers too). Soooo, frameworks go out of fashion (remember when everyone was using Backbone?!), but vanilla won't and right tool for the job. 4 Link to comment Share on other sites More sharing options...
Pixrael Posted October 31, 2017 Share Posted October 31, 2017 For me, the reality is that when I use "vanilla" scripts, each one coming from different developers with its own code for dom traversal and manipulation, yes they are in plain js without dependencies ... but with a tons of redundant code for the same tasks ... so when I finally managed to finish a complex website with sliders, accordions, calendar, date selectors, drop-down menus, parallax, forms and looong, etc. each has its own code to select nodes, add/remove classes and looong, etc. I have a lot of repetitive code, for what? For a trend? yes it's true jQuery 1x is obsolete and fat due to the support of old browsers, but jQuery 3x is as slim as you need. The reality is that we need a library for common tasks (give it the name you want). For today jQuery allows me to do simple tasks on a regular website without additional efforts (ie a website like processwire.com, not a web application, or a project for Córdoba).. well.. if someone create that library, pleeeease use an API similar to PW/JQUERY.. it's so easy to use and learn for us, the non pro developers!! 18 Link to comment Share on other sites More sharing options...
Mustafa-Online Posted October 31, 2017 Author Share Posted October 31, 2017 Personally I got nothing against jQuery, but I was wondering about the future of our beloved ProcessWire ?.. Thanks guys for your thoughts. Link to comment Share on other sites More sharing options...
teppo Posted October 31, 2017 Share Posted October 31, 2017 I'm not strictly against ditching jQuery in favour of Vue / React / whatever it is that all the hip developers use right now, but it's true that this would be a major change, and I'm not sure how much sense it would really make. "That's what others are doing" is not a very good reason in itself, but if it would enable us to do something that we currently can't, I'm all ears (Note: in the end this decision is obviously up to Ryan, and as far as I know there are currently no plans for ditching jQuery / jQuery UI.) Personally I'm still somewhat fond of jQuery. It simplifies a lot of stuff, deals with browser incompatibilities, and provides polyfills for some missing features. It's not the best tool for massive JavaScript applications, but that's not what the admin is all about either. Also, minified and gzipped jQuery 3.x is 32Kb, so anyone calling it "huge" could use a reality check. Sure, it is huge if you're only using it to implement a simple slider or menu or something along those lines, but that's a rather limited use case. That being said, it is true that the core is currently using a relatively old version of jQuery, so going up a couple of major versions could be a good first step? --- On a related note: at least a couple of third party modules already use Angular, and back in the day Antti even released a module that automatically loads it. For third party stuff it could make sense to build a set of modules for loading common frameworks and then require those as needed. That won't solve the problem of having to load jQuery and it won't make the entire admin a Vue/React/whatever app, of course. 11 Link to comment Share on other sites More sharing options...
Mike Rockett Posted October 31, 2017 Share Posted October 31, 2017 @teppo I do have to agree - one would need to determine what what purpose it would have and, yes, how much sense it would make. In my view, I think front-end frameworks bring a lot to the table, and that they could indeed enhance the experience. Having known jQuery for a long time, I'd be inclined to make this a slow process, if it were up to me. For my own projects, I'm no longer using jQuery for a multitude of reasons, one of which is its age (and not necessarily because all the cool kids are doing it). Given that the PW admin has multiple aspects to it, and that it could well be considered an 'app' from that perspective, I think a front end framework could fit in well. Sure, there are a whole bunch of other things to consider, like modules needing jQuery, but there's nothing wrong with that, and PW could just load it in when the first module in the queue asks for it. I would really like to see the PW admin become a single page app. 1 Link to comment Share on other sites More sharing options...
titanium Posted October 31, 2017 Share Posted October 31, 2017 34 minutes ago, Mike Rockett said: I'm no longer using jQuery for a multitude of reasons, one of which is its age I'm very interested why foremost it's age is a good reason to turn away from jQuery. It's no new cool kid on the block, but it is matured, very well documented and wide spread. It was no "dead end" like some of the other "cool" JS frameworks have been. It feels like a good ol' companion. It's not the right tool for every job nor a holy grail, but in pretty much use cases it works well and affordable in a sense that there is no steep learning curve. 8 Link to comment Share on other sites More sharing options...
szabesz Posted October 31, 2017 Share Posted October 31, 2017 1 minute ago, titanium said: It was no "dead end" like some of the other "cool" JS frameworks have been. Cool JS frameworks will become history just because sooner than later someone releases just another even cooler JS framework rendering the previous ones obsolete. BTW, the WordPress guys have been debating for months or maybe for more than a year which one to pick... On the other hand, jQuery is still going strong as others have also pointed it out above. 4 Link to comment Share on other sites More sharing options...
BitPoet Posted October 31, 2017 Share Posted October 31, 2017 Good to see I'm not the only one scratching my head over the current jQuery-is-bad movement. To me, wiring in a full-fledged MVsomething framework only makes sense if the complete data exchange is abstracted away, otherwise backend code and frontend (speak backend UI) logic will get even tighter bundled (or bungled?). This would mean that all backend calls would need to be some kind of RESTful using JSON, XML or something along these lines, and plainly, PW isn't at that point right now and getting there would need quite a bit of work. I'm not a real wiz when it comes to MVC/MVVM frameworks, but I do have some experience building complex RIAs, starting by building everything on top of ExtJS (2 and 3) in the good old days and later rolling my own two-way bindings for nested data structures. I've recently delved a bit into the currently trending frameworks, and I was utterly appalled by the unnecessary complexity, semantic mumbojumbo and lack of essential features each of those exhibited in varying degrees. Don't get me started on the massive breaking changes introduced in major frameworks I see every year. I've got one really complex app that needs a larger overhaul next year (warranted after 8 years, I feel), and I've come to the conclusion that it will be simpler, faster and more concise to build everything without any framework besides a lean CSS library and perhaps jQuery, especially if I want it to run the following 5+ years without finding myself using an orphaned framework. If the PW backend could be completely JSONified, I'd be all for that, but even then, I'd currently prefer a framework-less default interface. Any MV* solution could then be an alternative, just like current admin themes. 9 Link to comment Share on other sites More sharing options...
Pixrael Posted October 31, 2017 Share Posted October 31, 2017 I'm in the web design since 1998, and I remember when the war against inline styles began, you put a little style="margin-bottom:10px" in a unique element in the project and you are a renegade man from the old days, you need to create a new css class for it ... after decades learning to avoid them at all cost.. now in 2017 the new trend that coder influencers propose as good modern practices (because of React, etc) is using it! you get this and is OK.. Whaaat? !! ..hahaha.. the previous was a joke.. but seriously.. the best practice is to be practical, logic and simple always as @BitPoet said 4 Link to comment Share on other sites More sharing options...
Mike Rockett Posted October 31, 2017 Share Posted October 31, 2017 I see the points being made here. @BitPoet, you're quite right -- didn't think about the jsonification of things. That could surely be implemented, but it brings us back to the question of purpose etc. Truthfully, doing this would be quite a mammoth task, considering all the aspects involved. @titanium Well, I think age may have been a bad choice of word... I look at the updates, and it's been seemingly quiet (except for master branch, which has activity). @szabesz Sure, understandable, though my thinking is more about what the newer frameworks are capable of, and less about their cool-kid-on-the-block status, which has never been something I think much about. Sure, it pops into the mind, "that's really cool" -- but jQuery was the same when it launched, and then sky-rocketed. I can agree with a jQuery version bump at the very least... Someday, PW's default interface and experience could well be powered by a fully fledged MV* framework, and I'm convinced that it's quite fitting, considering that it's not a simple app at all. 1 Link to comment Share on other sites More sharing options...
Mike Rockett Posted October 31, 2017 Share Posted October 31, 2017 @Pixrael I hear ya, though inline styles is not something one should implement in their own HTML, but allow the framework to handle it for you. Link to comment Share on other sites More sharing options...
benbyf Posted November 1, 2017 Share Posted November 1, 2017 Pithy comment alert: If its not broke. Give it ago a report back (this harps back to simply making your own admin using the API). and Age over beauty (there's probably more where those come from 1 Link to comment Share on other sites More sharing options...
adrian Posted November 2, 2017 Share Posted November 2, 2017 Just Not suggesting we should go the VueJS route at all, but here's an interesting "admin" panel built with Vue: https://github.com/iview/iview-admin Check out the demo - SPA admin panel. 1 Link to comment Share on other sites More sharing options...
kongondo Posted November 2, 2017 Share Posted November 2, 2017 1 minute ago, adrian said: Just suggesting we should go the VueJS route at all, Typo? 2 Link to comment Share on other sites More sharing options...
AndZyk Posted November 2, 2017 Share Posted November 2, 2017 Just my opinion, but I don't quite understand whats the benefit to get rid of one dependency to immediately replace it with another dependency. I have no experience with VueJS or Angular yet, but as far as I can see, you would be completely dependent on one of those frameworks. In this case I'm maybe a little bit old school, but I like jQuery and also don't understand, why everybody wants to get rid of it as fast as possible. Also the comparison of ProcessWires API with jQuery was on of the first things, that got me interested. Luckily it is not our decision to decide. 10 Link to comment Share on other sites More sharing options...
ottogal Posted November 2, 2017 Share Posted November 2, 2017 @AndZyk I completely second what you're saying. What's most appealing with ProcessWire is (was?) its independency of third party assets... 2 Link to comment Share on other sites More sharing options...
tpr Posted November 3, 2017 Share Posted November 3, 2017 JQuery simplifies things for JS, just like PW does for PHP cms. You could use vanilla JS or another framework that would make things harder for devs. Would you use PW if it were more complicated to use or so basic like pure PHP? I think jQuery is still the right tool for PW admin, or at least I don't see any real advantages using another (or using none). 7 Link to comment Share on other sites More sharing options...
szabesz Posted November 3, 2017 Share Posted November 3, 2017 On 10/31/2017 at 3:06 PM, Pixrael said: So, we should build the next PW admin without uikit framework too? Because we will no longer depend on jQuery but will depend on UIKit I do not see how UIkit is a dependency here. Ryan has just shown us that he could replace the old skin with a new one in a relatively short period of time. UIkit 3 is currently a modern, easy to personalize "framework" on which experienced developers have been working for months if not years. How could the ProcessWire community build something better than that? Without some sort of framework there is no documented/conventional way to implement things which makes it hard (if not impossible) to adhere to some sort of "standards". 1 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now