4 ms·
Been a huge React/SPA fan for many years, until the realization began to creep on me that building them was actually harder than building C++ MFC desktop applic
by hliyan 1y ago
Been a huge React/SPA fan for many years, until the realization began to creep on me that building them was actually harder than building C++ MFC desktop applications (which I did back in the 2000's). Declarative markup was supposed to reduce cognitive load, but it now feels like the interplay between the declarative part of UI development (component markup) and the procedural part (event handling and state) has slowly morphed into something more complex than simplly developing the UI procedurally.
Back in the day (I was a junior dev) this was easier than grappling with React hooks today:
BOOL CMainDialog::OnInitDialog()
{
CDialogEx::OnInitDialog();
m_pPropertySheet = new CMyPropertySheet(_T("My Tabbed Dialog"), this);
m_pPropertySheet->Create(this, WS_CHILD | WS_VISIBLE, WS_EX_CONTROLPARENT);
CRect rectMainDialog;
GetClientRect(&rectMainDialog);
CRect rectPropertySheet(10, 10, rectMainDialog.Width() - 20, rectMainDialog.Height() - 20);
m_pPropertySheet->MoveWindow(rectPropertySheet);
return TRUE;
}
- winrid 1y agoLast couple years I built a largish javafx app and this was the entire way I structured it. A little tedious, but if I have a state management issue it's just logic on my side and not ten layers of abstraction.
- hliyan 1y agoThat's a good way to put it. A bit tedious, but the mental model is relatively simple. Reading and writing code feels a little closer to riding a bicycle than operating a Rube-Goldberg device.
- NooneAtAll3 1y agowhat does MFC mean?
- hliyan 1y agoThe Microsoft Foundation Class library: https://learn.microsoft.com/en-us/cpp/mfc/reference/creating-an-mfc-application?view=msvc-170 https://learn.microsoft.com/en-us/cpp/mfc/reference/creating...