|
Just to add one point to Tom's reply, Tom and I worked together back in the day on a very large WPF Point of Sale application for Grainger. Given that it was a very dynamic UI with no specific fixed "form", WPF was (and is) the logical choice for this LoB application.
That being said, when I worked at Citibank back in the very early 90's, we needed a very similar (in idea) type of dynamic UI presentation, and Win32 was the only game in town (MFC was only in alpha at the point). If anyone from that era remembers, dialog boxes and its ilk were created in the Dialog Editor, produced .RC files, and had to run through a Resource Compiler.
We made that application sing, and it would rival any WinForms or WPF LoB application today. It was, in a word, a thing of beauty, all written entirely in C.
When you're a software developer, you have to mix in a little magic into the mix!
|
|
|
|
|
For an app with a complex UI, I prefer Qt. For quick UI utilities, for me nothing beats MFC.
About ten years ago, I was tasked to write a GUI utility to support a feature on the embedded system I worked on. The app to configure the back end was a WinForms/C# app. IF they eventually wanted to integrate my utility, we felt it best if I wrote it in C#/WinForms.
I ported our base C++ code to C#, which was a giant pain due to so much p/invoke and having to write a layer of COM code (in C++, we could could use IOCTL since we didn't need as much functionality.) After spending about 30 hours on the WinForms UI, I got frustrated implementing a feature and spent a weekend writing an MFC version. It took me less than 15 hours. It did clear my mind, though it took another three or so days to finish the WinForms version.
So, 15 hours for MFC vs 45 for WinForms though, to be fair, the WinForms version was fully resizable; the MFC version was not.
|
|
|
|
|
Stacy Dudovitz wrote: Bonus Question: What's also noticeably absent is VB6 and VB.NET. Have those platforms truly bitten the dust (for good)?
I've only had a quick look at some of the responses, but...was there a single one that brought this up?
I don't know about VB.NET, but I believe MS, after decades of inactivity, has finally said VB6 was very much over. And not a moment too soon.
I mean, knowing MS's backwards compatibility history, I'm sure the runtime still works on newer versions of Windows (the runtime is 32-bit, so that's not about to get killed even though 64-bit OSes have pretty much fully taken over), and VB6 itself might still install (and if not, use a VM with an older OS), so I suppose there's little that prevents some poor, sadistic soul from writing new code with it today...but that person would deserve a beating.
|
|
|
|
|
We have a number of older products built using C++ and MFC, along with an inhouse tool started in 2000 and under active maintenance today. Our newer products use C# and WPF for the UI.
For complex UI or UI constructed dynamically in code WPF is the way to go. Doing the same thing in MFC is tedious, requires a lot more plumbing, and sometimes simply isn't feasible. For what it's worth, I find WPF to have a simpler mental model for constructing user interfaces. I've found the key to using it effectively is to ignore the "declarative" purists and build what works.
On the other hand if you're doing something with a lot of Windows API calls ("system programming" back in the day), C/C++ is a better approach. While it's true you can call most of the API using Platform/Invoke, some things are just a pain to translate (access control lists for example).
As always, it's a matter of choosing the proper tool for the job.
Software Zen: delete this;
|
|
|
|
|
For those that require many calls to the OS, I found that writing COM objects in C++ to access the OS is far easier than PInvoke calls. You access the COM objects through .Net RCWs.
Just watch out to correctly implement IDisposable on classes that host your COM/RCW objects, especially if you are managing unmanaged resources.
|
|
|
|
|
You're not wrong about the learning curve part. WPF's learning curve isn't horrific, but it's more work than not using it.
But the biggest reason IMO is how long it takes to do things in WPF. What is your app for? Will a shiny WPF interface make it work better or more productive? I'm gonna go out on a limb and say that the majority of the time the answer is no.
Yoda knew the answer: Winforms is "quicker, easier, more seductive."
|
|
|
|
|
That's actually context dependent which is more difficult. Even the most basic Forms and Custom Controls, which can be a requirement in even the simplest data entry/LOB applications, are far more difficult to write and implement in WinForms than in WPF.
One of the very core strengths, which is also its weakness vis-à-vis learning curve, is the emphasis on reusability. Control templates, data templates, triggers, etc. are very powerful paradigms that are very difficult to implement in WinForms, and lead to overly complicated code.
|
|
|
|
|
Message Closed
modified 27-Feb-24 11:59am.
|
|
|
|
|
Yes, well ... very witty.
(Remind me people, why don't we have a "Sarcasm" emoji?)
"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!
|
|
|
|
|
|
Recently, a very public comments section let me use "p*ssed (off)" (with the *) in a sentence. Surprised me too. It still maintains a cerain standard (IMO).
"Before entering on an understanding, I have meditated for a long time, and have foreseen what might happen. It is not genius which reveals to me suddenly, secretly, what I have to say or to do in a circumstance unexpected by other people; it is reflection, it is meditation." - Napoleon I
|
|
|
|
|
Eh ?
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
|
|
|
|
|
It's a response to a deleted thread starter message: a pictogram of a stickman with a turd emoji for a head ...
If you check the "parent" indicator on the left when you hover you'll see it goes into the abyss.
"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!
|
|
|
|
|
I don't see the parent indicator on the original post
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
|
|
|
|
|
Hover your mouse over the message I wrote, and the "parent" indicator appears: a thin vertical line. If you follow it up, it points above all messages which indicates the thread started has been deleted. Normally it stops at the parent message.
"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!
|
|
|
|
|
The other thing you can do is "View Thread" which displays a Message Closed message at the root.
|
|
|
|
|
So, what's your SQL resources for beginners and related to JOINs ?
I'm kind of stuck on request that should use JOIN and can't figure out how to make it work.
I somewhat understand how it works, but there's something missing in my understanding of the universe.
Thanks.
CI/CD = Continuous Impediment/Continuous Despair
|
|
|
|
|
|
If SQL Server... For simple things, you could try using SSMS' visual designer for creating a view.
|
|
|
|
|
Fresh from Eric Darling[^]. It talks about Joins.
Jack of all trades, master of none, though often times better than master of one.
|
|
|
|
|
I’m not going to talk about right outer joins, because that’s the foolish domain of characterless buffoons who use Venn diagrams to explain join results.
/ravi
|
|
|
|
|
I generally start with W3Schools SQL Tutorial[^] - they explain the basics, and provide DB samples and sandboxes so you can try it yourself without installing the heavyweight monster that is Sql Server.
Basically, SQL is a relational DB - it works with multiple tables to relate data to other data, unlike for example CSV which is a flat self contained file where all related data in combined into a single row.
So you can have an Invoices table (which holds the invoice date, customer, delivery address, and taxes / total owed) and a InvoiceLines table (which holds the items that were purchased: product, unit price, quantity, discount, Item total, InvoiceID).
To look at a whole invoice, you use a JOIN:
SELECT i.InvoiceDate, i.Total, i.PaidStatus, l.Product, l.UP, l.QTY, l.Disc, l.itemTotal
FROM Invoices i
JOIN InvoiceLines l ON l.InvoiceID = i.ID
WHERE i.ID = 123456 The InvoiceID relates the two bits of information and returns only the relevant data.
"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!
|
|
|
|
|
I would second W3Schools! It has very helpful learning tools that I still rely on at times when I am trying to remember how to do something...
Steve Naidamast
Sr. Software Engineer
Black Falcon Software, Inc.
blackfalconsoftware@outlook.com
|
|
|
|
|
|
I was trying to work up the courage to suggest MS Access - fearing that same heck.
Bring your data, or let it build a template application for you.
Visually design your query, then change to the SQL view and figure out what it is doing.
You can write SQL that the visual designer cannot present (eg. sub-select).
You cannot write all SQL (eg. cartesian join).
Whilst you may not want to deploy it as an application (I have), it works to model or proof-of-concept for a business app.
b
|
|
|
|
|