0

I am going to develop a simple Point of Sales system. Mainly all the data will be stored in a central db (mysql server). All the application are going to be winforms. Together each local client will have its db copy stored locally and all the operation will be based on the local db except for one operation that the transfer of stock between outlet. So at certain interval there will be updates from the local db into the central db.

The reason to have the local copy of the db in each client desktop in case there is problem with connectivity with the central server so that business can go on as usual and update once it is online. I need help in deciding the right path to move to solve this solution is my design acceptable or being flaw ?

closed as too broad by GlenH7, Dan Pichelman, JeffO, user40980, Bart van Ingen Schenau Mar 1 '14 at 10:26

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 1
    Unclear what help you need. Please clarify your specific problem or provide additional details to highlight exactly what you need. As it's currently written, it’s hard to tell what problem you are trying to solve or what aspect of your approach needs to be corrected or explained. See the How to Ask page for help clarifying this question. – gnat Feb 28 '14 at 16:44
  • Gnat sorry I have edited my question is it better now – biz14 Feb 28 '14 at 16:47
  • 2
    If you want to have it work when the network is off line, a web based approach is wrong. That said, whats that C# doing in the tags? – user40980 Feb 28 '14 at 16:56
  • 1
    @MichealT - not sure what the pure definition of web based is, but at least in the iphone/ipad area, all of the files and database (synch later) can be installed locally using html, javascript,jquerymobile etc. Those devices can be used in point of sale as well. – JeffO Feb 28 '14 at 17:40
  • 1
    @JeffO I am not aware of any html / js based POS system for the iphone/ipad. All the POS solutions for those tend to be entirely self contained, working as terminals for another server that is the actual system on the lan. Unposted transactions on a local storage system without sufficient attention to detail has significant "you can't do this" in the PCI DSS (storing unposted transactions is no longer "in transit"). – user40980 Feb 28 '14 at 17:48
3

If you go about developing it as a website first and then try to add an offline client, you're just doubling the amount of work you have to do. You're better off building a C# application as your front-end from the beginning, with a local database (google for SQL Server Compact Edition). Then synchronize the transactions to the server over web services when available.

You can write the web service (back-end) side in whatever you want (PHP or C#) with a fully-fledged database backend. I would say you want to use C# just so you can live in the same language all the time.

Take a look at Microsoft Synchronization Services on how to synchronize local and remote databases nicely (don't use that framework, but use it to learn how to do it). It's a bit of work, but you can make it a lot easier if you make some good choices ahead of time, like using GUID or UUID values for your database keys.

Of course you have to give some thought to security. Those web services need to authenticate every function call to make sure the client is trustworthy (user and password, and possibly two-factor with some kind of secret file that lives on the client).

I think that's enough to point you in the general direction. Don't discount how much effort you're talking about.

  • 1
    can I like package the whole of the C# application together with mysql installer and package into one installer where user can just take it and install both the C# application and mysql db. – biz14 Feb 28 '14 at 20:44
  • @biz14 - from a technical perspective, yes, I think so. From a legal perspective, I just don't know. (My guess would be yes, but I can't say that for certain.) – Scott Whitlock Mar 2 '14 at 22:45
  • any sample how to package both C# application and mysql installer together? – biz14 Mar 3 '14 at 7:10
  • @biz14 - Please ask that as a new question, so people will see it and try to answer it for you. – Scott Whitlock Mar 3 '14 at 15:32
  • @biz14 take a look at the first chapter of "Head First C#" book. It talks about how to connect to a compact SQL Server and creating an .exe installer... – bonCodigo Jun 10 '14 at 16:01

Not the answer you're looking for? Browse other questions tagged or ask your own question.