开发者

Architecture of .NET Desktop Application - Client Server C#, SQL

Recently I've being given a chance to develop a PMS (Practice Management System) software for a small physiotherapy clinic.

I'm a computer science student and my course is predominately told on Linux. However, my client runs all their comput开发者_Go百科ers on vista or Windows 7.

My ideas are to develop the client front end in Visual C# and access a central postgresql server.

I'm a beginner in Windows Programming so I'm after advice on best practice on implement user rights and access levels in C# (WPF or Windows FORM). I've had a look into Credential class in Visual C# and access control list but please share your thoughts.

Just to Elaborate:

My thoughts are to write the front end using window forms and disable or hide controls/tables/forms according to the access level the user is granted.

E.g. Only the owner of the clinic will be shown the finance reporting form while the secretary will only be shown the appointment diary form.

So I probably need a dialog asking the user to login to the system, should I store or map those login details in the database? What libraries or classes are best used to handle those tasks?

I'm probably way over my head on this but this is my first commercial project so I'm keen to test the waters.


Use these tools and technologies for your project.

  • Visual Studio 2010
  • .Net framework 4.0
  • WPF using MVVM
  • SQL Server 2008 Compact or Express
  • Linq to Sql

Some notes:

Screw Postgresql. You're developing on MS, baby. Would you LAMP with Sql Server (LASSP)? Hell no. Don't give yourself the heartache and bother of trying to get all the tools and code samples working with PGRE.

You can develop awesome software using VS 2010 Express and Sql Server 2008 Express. Commercial software. Without having to buy either. Yes, you lose out on some of the cooler tools in VS, and you're limited to 4gb of database in Sql Server (10gb in R2), but I don't think you'll miss it too much.

I'd definitely start in 4.0. No sense developing in 3.5 and 2008 at this point. You don't GAIN anything by developing in 3.5, so why do it? All 3.5 code samples and information still applies for 4.0, but the reverse isn't true.

Sql Server compact makes for a simple deployment on a single machine or machines that don't require a central database. Express is good for the rest of it. You'll need to buy for an enterprise type application. Don't think you'll have to worry about that.

I'd suggest Linq to Sql over EF4 at this point. I'm not happy with EF4. Seems like the pit of success is pretty goddamn small. More like a pothole of success. L2S is easier for the starting developer, methinks.


Use these tools and technologies for your project.

  • Visual Studio 2008
  • .Net framework 3.5
  • Windows Forms [No WPF for timebeing]
  • SQL Server 2005 or above
  • Linq2Sql for Data-access


I've never used Postgressql but in I assume it would be possible to just add users with passwords in there and give them access to different tables. And then the app asks for username/password at startup and use those details to login. Then you could have a username table and a permissions table and a username-permissions table to link them together.

Use previously entered username to lookup a record in this table and then retrieve it to your app and your app can use that record to decide what to show to the user.

Regarding technologies, I'd use VS2010, the express version should be fine I'd thought and whatever free database you know how to use (there's SQL Server express, but if you already know Progress I'd go with what you know.). There's plenty of questions here that discusses Winforms vs WPF.


This doesn't directly answer your question but I'm quite positive you'll get some answers inside and maybe even change your actual design decisions:

patterns & practices: Application Architecture Guide 2.0

EDIT:

And this, targeted at security:

patterns & practices: Security


I'd suggest a completely different approach: Write it as a web app, give them a single-site version of Firefox to provide the UI.

You could give them a Linux or OS X server running Apache, Django, and Postgres, which would work IF and ONLY if that server can be properly supported by whoever does their routine IT work (which should not be you). If they can't get maintenance, go with Windows on the server.

If you do require a Windows server, I'd be using VS2010 Express, C# 4.0, ASP.NET MVC with Fluent NHibernate, Gallio/MBUnit and your choice of database... but in that context, MS SQL is probably a better choice than Postgres on Windows because you can actually back it up properly.

You're probably capable of doing some nice jQuery or SmartGWT UI for them.

Whichever way you go, your business model code at least, and preferably everything, MUST be unit tested for this kind of application. Also you really should look up what your legal privacy and data retention requirements are for this application... medical records are often heavily regulated.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜