Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
Voxera113887yJquery is a good but a bit dated library.
And you can do the same things but Jquery can require a bit more of your own coding.
Personally I am learning react but that is probably more if a taste than any significant difference.
But switching, not if you have already built a lot. You are more productive with a tool you know so before switching, make sure you learn the next one so that you can explain the benefits. -
I've done several components/Ajax UI's in react for a automated ETL project for an ecommerce site. extremely handy for displaying real time changes to db tables and Cronjobs using the state concept.
With that said, I'm doing my next project, an order entry system for sales reps, in jquery. This is because there is a more expanding scope and a need to rapidly prototype and change. I'm using autocompete with some custom extend methods, underscore.observe for tracking the state of arrays of objects, and I'm getting by with mainly just that plus carefully constructed AJAX.
this is being done in tandem with a refactor of a 2003 OSCommerce mutant Frankenstein hellbeast, turning half-spaggetti code/half PHP 4 style Classes into proper Symfony2 style "bundles" (I leverage Symfony bundles such as Console Commands
, and also Doctrine and PHPUnit.)
jQuery is the perfect tool for my needs; React would soak up too much time which I need to allocate to the backend -
All of that text to say: jQuery isn't bad on it's own; just like PHP, lots of poor-quailty devs and con artist contractors have given it a bad name by undercutting real devs and leaving small businesses with mountains of technical debt.
Take a crash course in React. Figure out what's great about it. Do some side projects.
It isn't ubiquitous, it is the flavor of the month but that doesn't mean it is overrated.
If you have a strong background in JS and lots of experience with jquery, you can create UI/UX that is just as good as React, faster, because react has its own learning curve (for good reason)
Here's a few principals:
* Beware Async. Many bugs are born of writing code that should be triggered within your Ajax success method, but is instead at document read, meaning the data the method need isn't there until after the request is returned.
* Never append list items in a loop. Concatenate all of them, then add the one string to the UI at once. UI freeze is real. -
* Document, organize, refactor often. it's way too easy for a jquery document to spiral out of control.
* Apply DRY. When you find yourself doing the same thing twice, thing about how to make it reusable. $.extend comes in handy, so does a good knowledge of closures.
* At some point, if a program becomes too complex, you'll know it's time for something like React/Angular/Node. jQuery, written wisely, is not a bad tool for prototyping and later returning
I'm sure as a seasoned jQuery dev that some or all of this is not all that new to you. jQuery isn't a flawed tool, no language/tool is perfect for every need. The ammount of experience you have, time & resources available; they're all big factors to consider. -
lotd77757y@Voxera yeah, taking your time to actually learn it and not just scratching the surface and diving head on
- like, I like to do.. Bold nature..
Is really good advice, for production environments.
I found out the hard way, that nobody likes if you get stuff done one way but then finds a better, and goes back to 'update it'...
Albeit it'll be beneficial in the long run, it's an expense on the short.
- even if you do it, in your own free time. -
lotd77757y@unfuckers-inc didn't know those, yet I do apply most of those :D
Except for time estimation, that bastard i always multiply by π.
Though I'm too direct about what I can and cannot do.
If I can't envision a solution at meeting time, then I'm often going to say it like it is.
- cannot see how I would get that done, but am open for suggestions and brainstorming.
For girls being evil, that's not always the case.
It highly depends on the individual person in question. -
I only noticed that Einstein meme in the blog afterwards; it's quite a generalization to make for half of the entire fucking population.
-
MacVince477yNode and express are ok for the backend.
jQuery is not fun anymore. Switching to angular react or vue makes sense.
In this case don t ever use jQuery anymore.
But btw if you are alone and have to learn everything on your own you are going to suffer and your first app will be crap.
And why Angular 2? You want to sweat more? TypeScript is imposed so you ll have more to learn.
I would have the choice and a bit more experience I would use Vue. Otherwise React because it is mature so there is no risk. -
@Voxera I'll agree on the jquery being dated statement. It does feel a bit old now,
That being said. It is just so comfortable... Though one has to break out of their comfort zone to learn 😅
Will also read up on react... Seems interesting -
@unfuckers-inc jQuery *does* spiral out of control. Bloody annoying at times.
And thank you for your in detail opinion, cleared my mind a lot!
Will be learning multiple tools now, so I can clearly identify which framework to use when... It's time to break out of just jQuery -
Voxera113887y@MagnumPanda Yes, Jquery still works and if you already built it with Jquery stay with it. Starting over should be a very thought through decision.
But start building hobby apps with other frameworks to be ready. -
robbt447yYou should probably just roll your own JavaScript framework from scratch so everyone knows how cool you are. Just kidding. If you are able to get it done with jQuery use it. Forget about the latest newest framework unless it is needed. If you want to learn Angular 2 do it on the side and then switch to it. Otherwise learning on the job will slow progress and it sounds like you are the only coder. There are pros and cons to that situation.
Related Rants
!rant
Was too much into jquery, and so when I started my job I made everyone think jquery is the boss and stuff (my team is full of data engineers and business analysts.. No one understands code)
But now, based on my previous rant, I feel I should switch the entire project from a node/express structure with jquery to one with angular2
Does it make sense? Please advice... I am nervous of losing my job coz of this
(even now I hate typescript but I see why angular2 is better than jquery.. So I'll learn it all)
undefined
jquery
angular2
node
express
so bloody complicated