A question on architecture

Miles

Member
Joined
Jun 14, 2021
Messages
6
Location
Sydney, Australia
Programming Experience
3-5
Hello good people. New here. First post.

First up, I am by no means a "professional" developer. I have written quite a few desktop applications in Python Qt, VB.NET and C# WinForms, Java Swing (many years ago), and a whole bunch of code to automate host applications with VBA (Excel, Access, AutoCAD, Solidworks), but I have very limited experience creating browser based solutions. I write code as part of my job but it is not the entirety of my job. I am a self-taught developer.

So, I'm looking for some architectural advice for a solution I will be starting soon.

Basically, it is a job scheduling system for a small manufacturing environment. The current system we are using is a simple two-tier MS Access application built roughly 15 years ago that is constantly crashing. So, given that the system needs to be replaced we thought we would take the opportunity to add some new features to it, primarily, adding workstations around the workshop and using barcode scanners to log times.

One of the requirements is that it will need to be accessible from both Windows and Raspbian (if this is not feasible, then perhaps Windows IoT devices). It will also need to read data from an old IBM iSeries AS400 system, and a MySQL database I have running on a really old Windows Server. I also have another old Windows Server 2012 R2 machine available for IIS if required.

What I was orignally thinking was trying to get all the old data out of the Access database and putting it into a "proper" database like MSSQL or MySQL. Then creating three front-end interfaces for the following tasks :
  • Administration of the system (adding new user accounts, modifying drop down fields in the front-end, system clean-up, perhaps getting access to the database in a less restrictive manner). This will be used by myself and the line managers.
  • Entering new jobs into the system and getting the details on completed jobs. This will only be used by job co-ordinators and line managers. When a co-ordinator attempts to enter a new job into the schedule it will be validated against the AS400 data to ensure that a job exists and it will pull the data about that job from there and data about the item to be manufactured from the MySQL database. It will then go on to create a "Job Card" which is currently a physical printout of an Excel sheet that workers enter their names and times for different processes in the manufacturing of the item onto. It will also find the associated files for the job on a DFS and printing them all out (engineering drawings, test cards, inspection checklists, etc.)
  • The main application. For all users of the system (mostly manufacturing employees). This will have several working parts to it but for the sake of simplicity, it will display the current jobs that are in the system and filter the results based on different criteria. Users will have cards with barcodes which they scan with a barcode scanner at a Raspberry Pi "terminal" and based on an employee skills matrix, the next relevant job will be issued to them. Each workstation in the manufacturing area will have a sheet of barcodes that represent different processes in the manufacturing of an item and a worker will scan on to begin a process and scan off when it is completed. The times will be collected into a database to be used when the job is completed and for future analysis.
If I was only dealing with Windows machines I would create 3 separate WPF applications for the front end and a data access layer in the back to communicate with the AS400, existing MySQL data, existing job database (which is required for history) and new database for future job data. However, because I need to work with Raspberry Pi's I am guessing I am going to need something in the browser instead.

So... How would folks here go about something along these lines? For simplicities sake I have left out details on much of the other functionality the main application will need to perform. If you need further clarification please ask. I think I have covered the most important aspects.

Seeing how only the main application needs to run cross-platform, should I create the other two as WPF and then use something like ASP.NET MVC for the main application? Should I create a Web API to handle all my business logic and then call into that from my front-ends? Any suggestions would be grateful here.

Cheers.
 
If I want to stick with C# and dot net whether it be framework or core, then what would you recommend Sheepings?

I don't need to use dnc I can just go with dot net framework 4.8 for now and switch over to .net 6 in the future if that happens to be less buggy, provided the port isn't too difficult.

Avalonia looks like a solid option for what I want, I could avoid having to build an MVC application and just do everything using Avalonia for my UI needs, however, I would really prefer it if I could avoid dependencies on third party frameworks. I've been burned this way before when using libraries and frameworks that have suddenly ceased all further development and support. So I don't know about that. Plus, I would have to use dnc in that case, so I could run it on the RPis and given everything I've just read from Sheepings I don't know if I should go that route.

I'm not sure if there are plans to have dot net maui running on RPi(Linux) yet but from what I have read it doesn't seem like MS are going that route. I wish there was a mature cross platform UI framework I could use so that I could build everything as desktop applications and avoid running anything in the browser.
 
If I want to stick with C# and dot net whether it be framework or core, then what would you recommend Sheepings?
Avoid dnc. Strick with the older stuff, it works better in my opinion. And apparently Skydiver's too.
I can just go with dot net framework 4.8 for now and switch over to .net 6 in the future if that happens to be less buggy, provided the port isn't too difficult.
Porting to dnc at a later stage is easy enough, and they have tools for this, but they are not perfect, yet they can get the job done : Port from .NET Framework to .NET 5 - .NET Core
I will leave your questions on Avalonia for one of the others to answer. But I am Ok with using WPF for desktop applications. It's probably about the only thing Microsoft did well with while making. So I do commend them with WPF. It's such a shame they don't put near enough work into their web API's.

Regarding the PI board. You will need to refresh my memory as I don't have time to re-read your needs above, as I am rushing out. Do you want your desktop app to also run on PI?
 
The reason why WPF worked out well for MS is because is was over to 7 years in development even before it was first unveiled for it's first alpha. For the people on it, it was a labor of love to see their project get kicked from one group to another group until it found a home.
 
My advice is skip the multiple UIs. Make it a web app, using ASP.NET MVC... It will work on anything that has a web browser, cell phones and tablets included. Of course that means you need to learn ASP.NET... :)
 
The reason why WPF worked out well for MS is because is was over to 7 years in development even before it was first unveiled for it's first alpha.
Yes, there was good effort put into it.

The reason I started using wpf was because I had seen its potential, and the performance overhaul in comparison to winforms and it gave me goosebumps. I know a good platform when I see one and wpf is a great platform for desktop app development.

Disappointing to see many of the diehard win forms users still haven't made the transition yet thought.

My advice is skip the multiple UIs. Make it a web app, using ASP.NET MVC.
That's actually what the people at Discord Inc did. Their desktop app is actually only a C++ wrapper around their web app.

If this was the route Miles will take, then they would be best using one of the older MVC versions in dnf and not dnc or you can use razor pages. While the older projects do have limited build options, they will run fine on a Windows server.

Also, @Miles, If you happen to consider Blazer somewhere down the road. Just be sure not to use it with Bootstrap, as it's not properly compatible, and this is a known issue. But on the upside, I heard they are working on that reported issue, and a fix is planned for release! :cool: Read up on google. Sadly, when microsoft patch things, they often break something else in its place.
 
Back
Top Bottom