by magicalhippo · 4y ago · 0 comments
No, I'm no web expert. We've not found a way so far, and I've not seen something like this on the web, but I'd be happy to be proven wrong.
edit: to clarify, I don't doubt one can get 150 fields in a view on the web. But can one dev do it in one day and have it look great?
And I've seen Delphi apps; I recently worked on one. In my experience they don't look great. Maybe you've done a lot of work to theme the controls; if so, wonderful. But what I'm familiar with just brought up Windows dialogs, and ... well, that's functional but I wouldn't say it looks great.
But here are a few examples of ways you could create 150 fields in a day on a web app and have them look great:
Arrays of control types: https://formik.org/docs/examples/field-arrays for simplicity of creating the controls plus something like https://chakra-ui.com/docs/components/input to make them pretty.
Spreadsheet look (with spreadsheet functionality!) in one control: https://www.npmjs.com/package/react-spreadsheet
Want to build the form by hand and customize it? https://www.form.io/
Form should follow a database schema and automatically display database records? https://marmelab.com/react-admin/ (I used this approach to bring up an admin panel for more than 150 fields, though spread over a couple dozen pages, because of course that looks better than trying to bring up 150 fields on one page.)
The standard way to create a large form (or any data table on a page) today is to iterate over the fields you want and add them to a page. There are frameworks like Chakra that can help you make everything look attractive--and you can theme the result in whatever color scheme or styles you like.
I really don't want to have to touch Delphi ever again; it felt like I'd fallen back into the 1990s in code development terms, and I missed all of the modern features I'd grown accustomed to. If it's what you like, and it pays the bills, then enjoy. But know that people who have used more recent tools like myself consider it to be anachronistic.
But that doesn't mean I want to work on it.
Simple is beautiful.
> And it's a utility that really doesn't need to look fancy, so it's fine for what it is.
"Fancy" sucks.
> It doesn't seem to have a dark theme, which is a bummer, but otherwise it does the job.
"Dark theme" is moronic: Having your app use only standard Windows controls meant it automatically used whatever "theme" the user had set Windows-wide, so it always adapted to their preferences. No per-application "dark theme" or "purple theme" needed.
Until Microsoft themselves sabotaged all that, starting late in the lifespan of Windows 7. Assholes.
Delphi has almost none, while most tech I have seen on web has a lot of it.
Edit: However, my challenge is on wether it can be done or not. Delphi is cool, and tbh any tool you are an expert in will let you do something quicker than a tool thats new for you. It will probably take me a while to achieve the same goal in delphi.
I think you are doing your customers a great disservice by not learning about web development.
Win32 is bedrock, the web is quicksand. Look at "HTTPS everywhere" and "you don't need FTP any more", which did little in terms of actual security, but broke almost everything in some small way.
The web doesn't value legacy. It's a petulant 22 year old, that thinks it knows everything, and does stuff deliberately against the advice of those with more experience.
Is the web as stable as Win32? No, of course it's not. But a page with 150 inputs isn't anything that requires cutting-edge web technologies. It'll work just as well today as it'll work in 5 years.
Sticking a bunch of inputs in a HTML page is indeed not complex, but it has to look decent (labels and corresponding inputs line up vertically etc) and be functional (ie with sensible tab order etc).
To get a sense of what we've got in Delphi, here's a demo video[1] illustrating making a simple input box. This is a "entry level" demo, but it's representative (though we don't use the runtime customization).
I'd really appreciate input on something which could allow us similar decent looking UI with similar effort on the web.
Like, note how "Last Name" lines up with "Product ID" below, even though they're in different groups. Things like that.
How do you handle the transition at 2:04 where "Last Name" is moved from its own row to sharing a row with "First Name"? Keep in mind I might want to add a third element in that row afterwards.
IIRC with tables you'd have to modify the column spans of all the other rows which is way too much effort. How does it work with the CSS grid layout?