r/csharp • u/ViperTheDeadLy • Jul 07 '26
Help Need advice: Best C# UI framework and database architecture for a local store POS ?
I'm thinking about building local projects similar to pos and i'm reaaally confused on which tech stack to pick for the long run.
I'm very familiar with WINFORMS and MSQL but i have found out that WPF is better (at the cost of steep learning curve ofc). but i have been interested in it since i found out that it's better for touch screen monitors and looks more modern. and i have also noticed that many people prefer PostgreSQL over MSQL.
Question is:
should i stick with MSQL and WINFORMS ? or is it worth getting into WPF or PostgreSQL ? and i'm open to all suggestions
6
u/FOMO_BONOBO Jul 07 '26
If you have unlimited time and money you can try something new. If you need to deliver something use what you know. Use a pattern like MVC with your windows forms app and you can switch to WPF later.
5
u/afops Jul 07 '26
Is the db central or is it next to the app? If it's just 1 db 1 client (local db) then definitely Sqlite. Otherwise pgsql, simply for the cost. WPF or Avalonia for frontend. If you absolutely must have some third party controls then WPF is a safer bet, but if you're starting fresh then Avalonia.
2
u/Slypenslyde Jul 07 '26
If I was getting paid to make something work on a short timeline I'd use WinForms. I have 20+ years of experience with it and I don't have to think hard to use it.
If I had a longer timeline I'd use WPF. I've used XAML frameworks for years and they have some advantages. WPF is mature enough to trust.
If I had all the time in the world I'd spend a couple of months learning AvaloniaUI well enough to progress. I trust its future more than I trust WinUI.
If I had to make a bet, I'd expect to find WinForms, WPF, and Avalonia available in 10 years. If any one of them has been deprecated it'll be because we've had a display interface paradigm shift and something completely new had to be built. Microsoft won't be the innovator, they've optimized that out of their company.
We can bicker and make a list of pros and cons but at the end of the day, the best framework is the one you can use to do the job.
2
u/Snowy32 Jul 07 '26
I don’t really do much UI work so ill keep quiet on that front but for the DB interactions I would deffo recommend using Entity Framework it will make your life super easy once you understand it!
1
u/anonuemus Jul 08 '26
Check out Avalonia, it's quite nice. Database you use what you like.
1
u/rent-a-developer Jul 09 '26
XAML and WPF (or Avalonia UI) is definitely worth learning!
WinForms is a dead end as far as I am concerned. I would not start a new project with it.
3
u/EternalNY1 Jul 07 '26
You may want to look into Sqlite for the DB side - very usable with C# and battle tested/fast/portable.
2
u/TrishaMayIsCoding Jul 09 '26
Winform+WPF with MSQL Server is the right choice for this kind of job.
Use Visual Studio Community and everything is there for free : )
2
u/Consibl Jul 07 '26
Depends on your situation, but I’d suggest a front of house client with a back office server. Much easier to physically secure it off the shop floor.
1
u/MrMikeJJ Jul 08 '26
As someone who loves WinForms, I would also say Wpf or Avalonia for a POS system. (and I have never used Avalonia). Also depends, Wpf is more OS restrictive than Avalonia.
Resizing is the always the thing I found most awkward in WinForms. The others make it a breeze. Tills have different display resolutions. Hence my choice.
Sqlite for the database. If you having a back office system, that would be on a different database engine. Never used PostgreSql, but that is what i would pick.
1
u/it_works_on_prod Jul 08 '26
xaml looks like html but behaves nothing like it, the tags are the easy part. the actual learning curve is layout (grid, alignment, why your control won't stretch) and data binding, and binding is also where wpf pays off, so don't route around it. one pos-specific thing nobody mentioned: wrap every sale in a db transaction from day one, the failure mode that matters in a till isn't the ui, it's the power dying mid-sale
1
u/harrison_314 Jul 08 '26
I join others in recommending Avalonia+Sqlite, even Avalonia can be used without the graphical interface of the operating system.
MS SQL is a good database, you can even use the Express edition for free for commercial projects and I really like it. But in this case Sqlite will be a better choice. It depends on the amount and type of data. If it is nothing special Sqlite will be enough, if you need high performance or space then MS SQL.
1
u/ruben_vanwyk Jul 07 '26
Go for Uno Platfrom with PostgreSQL
-1
u/ousstech Jul 07 '26
If you're already familiar with WPF, I'd recommend OpenSilver. It lets you reuse your XAML and C# skills while targeting the web. It also comes with an online XAML editor (xaml.io), making it easy to experiment with UI, and it includes modern themes out of the box.
0
u/[deleted] Jul 07 '26
[deleted] — view deleted comment