|
I have some article ideas (web stuff) and I've learned enough about React to be dangerously dumb about writing React code, and learning that I sort of hate React.
But React seems to be all the rage, and given one of my article ideas is implementing a sidebar menu (which I know has been done but all the example I've found are crappy) but I don't want to create another crappy article on sidebars, I want to show how to do it right, and I'm doubting whether I know enough to accomplish that.
I don't know if I know enough. And I've been using the older "class" way of creating React front-end stuff, not the newfangled "hooks" way, which honestly defies for the most part my understanding, no matter how many YouTube videos I watch. So it seems I would first have to understand hooks to appease the modern React coder.
And then, I'm pretty much loathing how React does things with state management.
And then I watch videos on what is coming down the pike with React (among other things, some major handwaving about async stuff that only a React geek would comprehend, maybe) and I get the sense that React, and its evolution over time, has been and continues to be quilt patches applied on top of fraying quilt patches, which leaves me wondering, how solid is their core architecture to begin with?
So I'm stuck - I want to write some web articles but I'm not convinced that React is where I want to continue my learning, and all of this has made me gunshy of other frameworks. No wonder I roll my own, but that's besides the point.
Suggestions?
|
|
|
|
|
I feel that same way about React specifically.
I wrote an article here that I would really appreciate you taking a look at: LibreGrid: Drop Into Your App, In 5 Minutes CRUD Your Custom JSON Data[^]
I built this thing that is custom and allows you to retrieve, display and edit data from any webapi but then I just froze on it.
The things I like about React:
1. You can add React into any current web app easily -- just replace a section with a component.
The things I don't like about React:
1. it changes a lot - one thing is I like JS classes to wrap stuff and now they have moved toward function-based stuff (I know JS functions are like classes but still different).
2. State stuff and all those add-ons Redux etc. I want basic stuff not all that other stuff
3. It is confusing to me how to create a stand-alone component even though supposedly that is what React is supposed to let you do -- I mean a component I can just "drop-in" on a web site.
I hope you'll check out my article and let me know what you think.
|
|
|
|
|
I'll definitely take a look, and I definitely have concerns about the how often it changes and the state stuff.
And weird stuff, like I've been researching how to create components dynamically (like, lets say I have metadata that says I need a datetime control, a dropdown, whatever) and stumbled across this bizarre statement that a tag in the render, if it starts with a capital letter, is what makes React "know" that it's a component, not say, I guess, an HTML element. And then there's something about the component referencing the actual component you want, and magic rendering happens.
That capital first letter thing just seems so kludgy.
|
|
|
|
|
You don't need redux at all. We use reacts in built context and it's simplified the code hugely without needing the extra weight of redux.
Functional components are the way to go, but learn the state model as it is different to classes.
As for the stand alone? The theory is you package it and the install pulls in the required react bits.
veni bibi saltavi
|
|
|
|
|
I have worked with React and have something of a love-hate relationship with it. While it has some interesting ideas, and I do like the functional-first approach to the design of React, my big problem with it is the "throwing the baby out with the bathwater" approach they take to new releases. With React, there is always a latest-and-greatest way of doing things which is the marketing equivalent of "new and improved" features which are incompatible with what was there before. Granted, this is all opt-in, but it does leave you with the impression that you're doing things the wrong way, even when this was the right way 6 months ago.
|
|
|
|
|
The struggle is real!
I don't understand most of the web frameworks these days. With their hooks and everything is promises, and the flow isn't immediately understandable.
I guess I'm kind of glad I'm not the only one - I thought maybe I was just getting less intellectually agile with time, but then I feel a bit guilty for being glad at your expense.
Check out my IoT graphics library here:
https://honeythecodewitch.com/gfx
And my IoT UI/User Experience library here:
https://honeythecodewitch.com/uix
|
|
|
|
|
Here! Here!
My firm conviction is that all web coding is just black (box) magic. You add some toe of frog and a sprinkle of rose petals (sourced from hopefully a reputable vendor) to a cauldron and pray that a useful potion is brewed without any side-effects. Oh, and if that toe of frog has nail fungus, then that potion is going to give you quite the headache in a few days/months/years down the line.
Bond
Keep all things as simple as possible, but no simpler. -said someone, somewhere
|
|
|
|
|
I just started a new job where they use React and whew. It has been a learning curve. I feel your pain. I haven't gotten to a point yet where I can see that it's worth it, but I keep thinking I will eventually. I mean, if you work with any language long enough you'll grow to like it. right? RIGHT?!?!
|
|
|
|
|
Spent most of my week so far getting an old Visual Basic 6 environment up and running on my Windows 11 laptop.
I've got it running in a VM now (which I got from the original programmer), but that VM has lots of noise and issues and doesn't work very well (it's the result of 20 years of development by someone who still prefers and uses VB6 and DBF), plus switching between VM and laptop is a pain.
The entire project spans some 40 applications, that use about as much components.
We need to replace all these applications one by one, making sure the output stays the same, so being able to easily run and debug them kind of comes in handy.
With a bit of "luck" we'll get another project which has even more applications (but running them will be a breeze now *ahem*).
So, I got VB6 running, which was only the first step (and surprisingly painless, followed How to install Visual Basic 6.0 on Windows 11 - YouTube[^]).
Then I had to restore all kinds of folders and files in specific places (like C:\Company\Files) and relative to various projects (like ..\..\Components\Component A, etc.).
Not to mention change all kinds of configurations (ini files) because they point to T:\ or specific databases.
Obviously, these files, folders and configurations are all over the place.
I've put all of it in Git, including bin and obj folders, because I can't rebuild most of this stuff and just opening a project in VB6 changes it (it mostly sets references from System32 to SysWOW64, etc.).
Even complete database files (mostly DBF files, but maybe some SQL backups too) got included in Git, because that's how the original programmer works.
I've got Git repositories larger than 1.5 GB now, but it!
I'm currently trying to figure out which OCX files have to be registered and (from) where.
A few (most?) are working, but I'm currently having some trouble with some TLB file... Can't register it, but it's referenced in the project, but I keep getting "Class is not registered" (can't find it registered on the VM either though)
I'm too old young for this sh*t.
|
|
|
|
|
That sounds so painful.
We are still using VStudio 2013 at work and that is painful enough.
But trying to get VB6 stuff going...
Sander Rossel wrote: The entire project spans some 40 applications, that use about as much components.
!!!! π΅π΅
This feels kind of like the kind of work I've done in SQL to transform data from old schema to new.
What I mean is that you can start getting into it and writing some really great stuff and learning esoteric details.
Then you transform and transfer the data to the new schema and all that lovely SQL no longer has a purpose.
It's the pinnacle of glory when you get it done. You stand at the mountain top basking in the sun and looking down. But then one week later its just some mountain you climbed in the past.
Hopefully the company will just have you re-write the stuff to a modern dev platform. Good luck.
modified 15-May-24 10:16am.
|
|
|
|
|
raddevus wrote: It's the pinnacle of glory when you get it done. You stand at the mountain top basking in the sun and looking down. But then one week later its just some mountain you climbed in the past. Yeah, this feels pretty familiar
raddevus wrote: Hopefully the company will just have you re-write the stuff to a modern dev platform. Good luck. It's our job to rewrite it to something modern and since I'm the final boss we're using the latest greatest: .NET 8 with .NET MAUI (a bit of a gamble to be honest) and ASP.NET Core
|
|
|
|
|
Yeah, this is why I laugh at everyone who shouts in my face "VB6 STILL WORKS AND IS STILL A GOOD PLATFORM!"
Sure, it works. If you like propping the damn projects and COM controls up with 2x4s, chicken wire, and duct tape.
|
|
|
|
|
Yeah, it's not good and it only works after a lot of blood, sweat and tears and then you'll just have to pray it keeps working
That said, it still works
|
|
|
|
|
I had a similar journey getting my VC6 IDE running on a Windows 7 machine (no VM). Took days of porting certain files over from XP, but finally managed to get it all going. The guys in the IT department can't understand why I don't want them touching that machine.
"One man's wage rise is another man's price increase." - Harold Wilson
"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons
"You can easily judge the character of a man by how he treats those who can do nothing for him." - James D. Miles
|
|
|
|
|
Aren't TLB files generated from DLL files?
It might be easier to find to original DLL and generate a new TLB file.
Best of luck in your VB6 'adventure'
|
|
|
|
|
Yeah, found that out along the way.
Never heard of TLB files before, but I did it!
|
|
|
|
|
TLB files are useful if you work with COM objects. We do so that our unmanaged Delphi code can talk to our .NET Framework code. Even though COM is old, it still is the best when you need something like this. We can even embed .NET UI components into our Delphi UI via OLE, which is also using COM/TLB at some level.
Bond
Keep all things as simple as possible, but no simpler. -said someone, somewhere
|
|
|
|
|
40 applications - that is the next year allocated for you. Presumably the client has a working environment, I would be asking for a desk on site that can be used. The ultimate "break it down to small pieces". Good luck and let the fees add up!
Never underestimate the power of human stupidity -
RAH
I'm old. I know stuff - JSOP
|
|
|
|
|
Mycroft Holmes wrote: 40 applications - that is the next year allocated for you. And not just for me, I hired someone specifically for this job (and another one)
Mycroft Holmes wrote: Good luck and let the fees add up! Thanks, and they are!
|
|
|
|
|
Sander Rossel wrote: plus switching between VM and laptop is a pain. Windows Mode and maximized, then you have two task bars visible at once when you are in the VM
or
(No matter if window mode or full screen)
CTRL+TAB to change to host and ALT+TAB to switch to the last program used in the host
ALT+TAB to go back to the VM
I personally like version 1
M.D.V.
If something has a solution... Why do we have to worry about?. If it has no solution... For what reason do we have to worry about?
Help me to understand what I'm saying, and I'll explain it better to you
Rating helpful answers is nice, but saying thanks can be even nicer.
|
|
|
|
|
One thing that may make life easier is putting some sort of VNC/RDP on the VM so that you don't actually have to switch to the VM, but remote desktop into it.
It's marginal, but it's definitely been better on a Pi to do that. They do something to them to make them not poll the mouse so often by default so it is like pushing the cursor through molasses. RDP though, mouse moves client side, so it doesn't really matter.
|
|
|
|
|
Our tester had a nice error in our .NET 8 application, it was trying to find "kernel32.dll" in the "Program Files\dotnet" directory
It is a 64 bits application but luckily there is a 64 bits version named "kernel32.dll" in the System directory
|
|
|
|
|
I love kernel32, it's so much better than kernel31.
|
|
|
|
|
... they have a foot fetish?
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
oh oh.... so bad. lol.
Charlie Gilley
βThey who can give up essential liberty to obtain a little temporary safety deserve neither liberty nor safety.β BF, 1759
Has never been more appropriate.
|
|
|
|