4

I am developing an accounting system for a customer. This application has some special requirements. I leave the accounting system detail which are specific to accounts. I mention those points which are confusing me.

The application should work in Online and Offline environment. If user is working and suddenly Application goes offline User should be able to work offline. All offline work is stored in local database and sync next time to central database when Application connects to the internet.This application has many users and all will work at same time on same information.

For Example If a user enters an inventory item it is possible that another user also enter the same item at that time. Application should be able to validate correct information and prohibits user to duplication.

User local database must be updated all times either other users are working or not. If other users are working all updated information should be available in local database to ensure when user goes offline all information is updated.

The question is How to develop this kind of application? Is there any standard way to achieve this target? Is there any standard or non standard pattern to build this kind of software?

Please note I am using C# Dot Net and Intend to use .NET Remoting or WCF or ASP.NET MVC for this application.

Any kind of help will be appreciated. Thanks.

Uzair Anwaar
  • 121
  • 1
  • 4
  • 9

4 Answers4

2

Tim McCarthy's book .NET Domain-Driven Design with C#: Problem - Design - Solution designs and implements a system with similar requirements. It is a little dated, but I think would point you in a good direction. (look at page five, where he lists the requirements of the system the book is designing, they are similar to yours.)

He uses C#, WCF, Microsoft's Sync Framework, Smart Clients and more. He states that as of the printing of the book the Entity Framework was not available with Visual Studio and so he creates his own (which is OK, but I think the book would have been much better if he had been able to include EF.)

I hope that helps!

Khadaji
  • 2,147
  • 2
  • 17
  • 19
0

I have two answer for you. If you are using Web API or Servicestack in back end and use HTML5 with upshotjs on client end. That will store data in browser for you.

But as you are working with Account type stuff that are critical, I ll go with Rich client type application. Backend will be same, but now you will having two database, one on server and other on client. User will enter details in client but than that data will sync with server. For this you can check NoSQL options too.

Please let me know if further details required.

kunjee
  • 2,739
  • 1
  • 23
  • 38
-1

Summary:

  • WCF for server side
  • Any database and client framework r good to go
  • Client works with local database and there is background process to synchronize new data and get edit permissions.
  • Server business logic level controls conflicts and solves them (automatically) or by informing clients.
  • There is quite few situations when it is better to solve conflicts on database level.

Full answer

Really dont see any need in any exotic addons.

As i see u r building client side application with server side synchronization. WCF ll be very good choice and whatever application framework u ll use is ok, even if it ll be win8 metro application)

Of course there ll be 2 databases client side and server side. U can choose any database that suites needs of ur application best. It could be different server and client side databases.

Client gets information from server and posts new data(and data change requests) to server using WCF API.

I recommend to make user to work directly with local database and use async requests for server synchronization. Then ur application will run more smooth, no annoying lags.

So ull have two business logic parts of your application. One to interact with user give and store his data and another to synchronize all data in background.

What about conflicts in data? I think that the best way to solve such conflicts is too solve them in business logic level of ur server. There is quite few situations when it is better to solve conflicts on database level.

Pavel Luzhetskiy
  • 789
  • 1
  • 8
  • 26
  • Thanks for detailed answer but I want to know how to build this application? What patterns are used for?Is there any example application exist?Basically I want to get an idea for theses kind of applications before building it. – Uzair Anwaar Apr 23 '12 at 08:57
  • Just look at any WCF based client application or mobile application with server side. The main idea is very simple the devil is in details. – Pavel Luzhetskiy Apr 23 '12 at 09:33
-1

This link How to detect online/offline browser... may help you to check the browser online/offline status so you can switch the connection string. Rest of the things can be developed as normal application.

I am considering changing the connection string the easiest possible way to switch between online and offline mode. But then you have to deal with synchronization.

Community
  • 1
  • 1
IrfanRaza
  • 3,030
  • 17
  • 64
  • 89