views:

174

answers:

5

Hi guys, 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 computers 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.

Cheers Ian

A: 

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
this. __curious_geek
Hi, why not WPF, is it because it's a performance hit? or because the learning curve is too hard?
Rillanon
learning curve.
this. __curious_geek
@this feh, learning curve. I think people oversell it. If you've got some HTML experience you've got 90% of that curve down (all you gotta do is figure out databinding). Not to start a religious war or anything...
Will
if you're new to winforms and wpf, might as well go wpf
David
imho - it does matter. resources for windows forms are available far more than what we have for wpf till date. for new-bie it does matter.
this. __curious_geek
A: 

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.

ho1
A: 

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

Sorin Comanescu
+4  A: 

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.

Will
+1 except that I'd go for NHibernate and SQLite instead of SQL Server 2008 and Linq2Sql
cwap
@cwap I'd do Subsonic in a pinch. Haven't NHibernated yet so can't say. Can you say its just as easy to develop against SQLite in VS Express as it is to develop against Sql Server?
Will
EF4 is replacing L2S. Yes I like L2S better too, but google it, EF is the future.
David
@David yeah, I suppose. But EF4 kinda sucks compared to L2S. From my experience there's lots of bullshit you have to deal with that doesn't exist in L2S (can't 'new' up a type in a Select, no enums, etc etc on and on I'm so depressed).
Will
@Will, after you've found out how to interface with SQLite using SQLite.Net, there's no difference whatsoever as long as you don't do smarty-pants stuff like sharding :)
cwap
@cwap I try not to shart. Last time I sharted I was halfway through a run and about a mile away from a shower and a change of clothes. Wasn't a pleasant walk.
Will
A: 

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.

Andrew McGregor