|
Jeremy Falcon wrote: Or any JS "CSS" framework that does more harm than good
I'll agree on you about avoiding things that do more harm than good. That's a fairly benign statement.
Jeremy Falcon wrote: devs will do anything to avoid learning CSS.
Do they, though?
I'm a strong proponent for using 'standard' frameworks, where 'standard' means 'what everyone else is using'. It's not because it's the best or fastest or most efficient, but because there's a huge amount of help for you and your junior dev, constant improvements and lots of eyeballs to spot issues (and hopefully a lot of pressure to get those issues addressed).
I use Bootstrap where I can. I don't particularly like it, but it's solid, stable, forces me to not overcomplicate things, and I know any dev can come along and muck around with it if they needed. Even so, I really, really need to understand CSS if I'm going to work with it safely and I'm still to this day learning stuff about CSS that I never imagined.
cheers
Chris Maunder
|
|
|
|
|
Chris Maunder wrote: Do they, though? That's been my experience. A FE dev will claim to know CSS because they learned what a selector is, but then say specificity is complicated or JS CSS is better because it can be modularized (so can vanilla CSS, SCSS, etc.). They don't know when to use em vs rem, etc. Couldn't do a basic responsive layout. And sooooo many pixel values everywhere.
Chris Maunder wrote: I use Bootstrap where I can. I don't particularly like it, but it's solid, stable, forces me to not overcomplicate things, and I know any dev can come along and muck around with it if they needed. Even so, I really, really need to understand CSS if I'm going to work with it safely and I'm still to this day learning stuff about CSS that I never imagined. I'm actually a fan of Bootstrap, as far as frameworks go. I'm a purest at heart, so in a perfect world I think cluttering up the DOM with declarative type class names everywhere is pure chaos, but IMO frameworks like Bootstrap are 1,000 times better than ones like Material. Bootstrap actually uses CSS where Material and the like have a JS execution layer that's inherently slower to render. It wants to turn CSS into JS... for zero gain.
And I totally agree there's a time and place for things, not reinvent the wheel, etc. Like with Bootstrap. I've used on projects and in some cases would recommend it. But, I do think a dev should know how to do things without a framework at all, for the enterprise. Because when something goes wrong and everyone's watching, home dude or dudette needs to debug.
Jeremy Falcon
|
|
|
|
|
Hah, thank you for the great response! I'm learning and given that SO is pretty much my only source for "why isn't this working", I'm bound to get bad information. I should probably take a course in React.
So again, thank you for pushing me to learn more!
|
|
|
|
|
Marc Clifton wrote: I'm bound to get bad information. As much as I defend JS on CP, I gotta agree with you there. There's so much garbage info online. Way too much. Everybody and their grandmother uses JavaScript and claims to "experts". I'd probably feel the same way if starting fresh.
And don't get me wrong, React isn't perfect. For one, the library is large to include. For two, it does seem like crap changes every other release. And it's been proven there are quicker ways to render than the virtual DOM. But, it's still super-fast compared to most frameworks. And as far as frameworks goes, it's way more modular than Angular for instance, so you only have to use it for what you intend to... rendering. You don't to use the router for instance, if you don't like it. But, it's not perfect.
It will force you into thinking about breaking down everything into components though... moreso than a framework like Angular (I've only used old Angular though, maybe that's different now). Given native web components are a thing now though, that's not inherently bad.
Jeremy Falcon
|
|
|
|
|
Marc Clifton wrote: , but half the time I have to extend the "props" with React.PropsWithChildren, like WTF, why??? And communication between dissociated components requires a pubsub (so I've read and implemented), or between parent-child components which I still haven't figured out Also, you don't have to do property chaining for everything. But, you should use props, as components are meant to be modular. Props shouldn't have to chain often though. That being said, there is a time and place to use shared data that's not global. For instance, Sharing State Between Components – React, but that's not a chain in the traditional sense.
And if by pubsub, you mean the older context api, I can agree that's a bit wonky, but nothing is stopping you from not using contexts or the useContexts hook. Or just roll your own global state object, it's not that hard. Keep in mind though, relying on this too much is not much better than global variables.
So, do better Marc.
Jeremy Falcon
|
|
|
|
|
And once last thing, HOCs is a concept borrowed from HOFs. I'll let you Google what HOFs are, but again this is a conversation of functional vs OOP paradigms. Can go into detail of the pros and cons if you can concede a blanket "OMG functional sucks because I'm not used to it" conversation is beneath us.
Jeremy Falcon
|
|
|
|
|
Did you miss the opening part of Mark's post where he specifically stated
Quote: Disclaimer: Rants of noob working with React and Material UI.
Hogan
|
|
|
|
|
Fair enough, but ya know...
Jeremy Falcon
|
|
|
|
|
I hate Web programming - the Web is a total mess
In a closed society where everybody's guilty, the only crime is getting caught. In a world of thieves, the only final sin is stupidity. - Hunter S Thompson - RIP
|
|
|
|
|
ditto
"A little time, a little trouble, your better day"
Badfinger
|
|
|
|
|
But according to our management (and I assume not only to ours) and the users the only way.
|
|
|
|
|
Have you considered looking into Redux for state management?
We use it at work and I tend to make use of it on personal projects where I need to do anything complex between components so that I can maintain that complexity within state.
The downside is that it is another steepish "learning curve", the tutorials are good though - I found once I had everything wired up with Redux a lot of other complexities were solved for me although I am aware it's yet another thing to add and learn(I won't get started on Thunks which I have so far avoided on personal projects).
Also, another thing , TypeScript sits very nicely with React.
“That which can be asserted without evidence, can be dismissed without evidence.”
― Christopher Hitchens
|
|
|
|
|
I'm of the mind that beating up on web UI frameworks doesn't really need further justification, the term itself is a slur.
|
|
|
|
|
It makes me feel like a crotchety old English teacher.
def receive_message(self, client, client_address)
Yields "'function' object has no attribute 'receive_message'
And my first thought does not go to the code, but to the inanity of the error message.
1. Attributes are metadata. A function doesn't have attributes unless it's marked up. it has a signature, access modifies and storage class indicators.
2. Functions are not "objects". Functions are functions. A function as an object is called a "functor"
3. Am I really fisking a python error message right now?
And by then I've completely given up on the issue.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
Hmmmmmmmmmmmmm.
Are you sure the message actually pointed to that line of code?
"In testa che avete, Signor di Ceprano?"
-- Rigoletto
|
|
|
|
|
Which release of python are you using? Do you have a choice of different implementations?
The difficult we do right away...
...the impossible takes slightly longer.
|
|
|
|
|
Dunno which release, and yes I have a choice of alternatives. I choose C#.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
Great - now I've got Bob Geldof singing in my head!
🎵 Tell me why 🎵
🎵 I don't use Py-thon 🎵
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
It's nice that he does personal visits now. Has he fallen on hard times?
|
|
|
|
|
If he had, I'm sure he wouldn't be shy about asking people to give him their ing money.
"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer
|
|
|
|
|
Yeah, naming is hard especially when you're trying to be consistent.
In Python everything is an object, a "thing", and those things have "attributes".
- An attribute that holds a value is a variable.
- An attribute that is a function is called a method.
- An attribute that represents a value accessed by getters/setters is call a property.
So a function is an object and a parameter to the function object is, at its core, an attribute. But a class is also an object. And an instance of the class is an object. And operators are objects.
Naming is hard.
cheers
Chris Maunder
|
|
|
|
|
What a mess
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
honey the codewitch wrote: What a mess Have you ever tried SmallTalk? And really Python is not that difficult once you get used to its rules; it's just a bit different than some other languages.
|
|
|
|
|
I've seen SmallTalk - i think maybe in the late 80s early 90s? Been so long i don't even remember. Never tried it myself.
I'm biased against languages that pretend to be something they're not. I know it's silly of me, but JS and Python with their ersatz OOP (that's not OOP) just leave me with a bad taste in my mouth. I dislike it I think for the same reasons I dislike Turkey-Bacon. Turkey is fine. Bacon is fine. Everything would be fine if they'd just stay in their lane. Objects are fine. Associative arrays are fine. Associative arrays are not objects no matter how many functors you put into them.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
This sounds like me ranting that 'invite' is a verb not a noun, and 'alternate' means to switch from one option to another, and is not an alterative.
Damn kids these days...
cheers
Chris Maunder
|
|
|
|