I am designing a simple system, which main features are:
Get data in application A
Export data
Import data to application B and consume it
Details:
Application A is a CMS with rather limited functionality. It runs on Web Forms. I use custom control to build a form which is linked to a local database. A form is being filled by the user and details are saved in the database.
Application B is located on another tier. It is an MVC application which should expose data provided by the user and allow to accept or deny them. The accepted records would be saved in the local database, the denied ones would be disposed.
This way database A holds all of the user inputs, database B holds only accepted user inputs for the future use.
Both applications are completely separate systems and are located on different tiers. Now, I need to transfer user input data between them in some way. The best choice would be probably SOA and Web APIs, but it is a simple project and I do not need to go
into such depth with it (not mentioning my lack of experience in this field).
Is there any other way I could expose data on application A and consume it on application B using simple System.XML classes? How would I release the transfer event? Should I use any other file format like JSON or CSV rather then XML?
Is there any other way I could expose data on application A and consume it on application B using simple System.XML classes? How would I release the transfer event? Should I use any other file format like JSON or CSV rather then XML?
The best/easiest/most scalable way to accomplish this task IMO regardless of your skill level is to use a RESTful WCF service as the medium to expose data between 1:n clients. You can easily return data in XML or JSON. You use a webHttpBinding in WCF to
create a restful service, and hosting it in IIS is probably the simplest option too. Once it is up and running, you can make RESTful calls and get the data as needed. Yes, there is a learning curve for creating a service, but in the long run and thinking 'big
picture' these skills will be valuable, so it will not be a 1-off deal that you could never use again.
Another idea is to just have all applications use SQL to store the data and then have direct queries to the database to fetch the data. This takes out the service layer abstraction. In some cases, access directly to the database is not allowed, and that's
where a service comes in handy.
Have a look at the following for more information on creating a RESTful service:
bartek4c
Member
88 Points
45 Posts
The use of XML
May 07, 2012 10:31 AM|LINK
Hi,
I am designing a simple system, which main features are:
Get data in application A
Export data
Import data to application B and consume it
Details:
Application A is a CMS with rather limited functionality. It runs on Web Forms. I use custom control to build a form which is linked to a local database. A form is being filled by the user and details are saved in the database.
Application B is located on another tier. It is an MVC application which should expose data provided by the user and allow to accept or deny them. The accepted records would be saved in the local database, the denied ones would be disposed.
This way database A holds all of the user inputs, database B holds only accepted user inputs for the future use.
Both applications are completely separate systems and are located on different tiers. Now, I need to transfer user input data between them in some way. The best choice would be probably SOA and Web APIs, but it is a simple project and I do not need to go into such depth with it (not mentioning my lack of experience in this field).
Is there any other way I could expose data on application A and consume it on application B using simple System.XML classes? How would I release the transfer event? Should I use any other file format like JSON or CSV rather then XML?
Regards,
Bartosz
atconway
All-Star
16846 Points
2756 Posts
Re: The use of XML
May 07, 2012 05:26 PM|LINK
The best/easiest/most scalable way to accomplish this task IMO regardless of your skill level is to use a RESTful WCF service as the medium to expose data between 1:n clients. You can easily return data in XML or JSON. You use a webHttpBinding in WCF to create a restful service, and hosting it in IIS is probably the simplest option too. Once it is up and running, you can make RESTful calls and get the data as needed. Yes, there is a learning curve for creating a service, but in the long run and thinking 'big picture' these skills will be valuable, so it will not be a 1-off deal that you could never use again.
Another idea is to just have all applications use SQL to store the data and then have direct queries to the database to fetch the data. This takes out the service layer abstraction. In some cases, access directly to the database is not allowed, and that's where a service comes in handy.
Have a look at the following for more information on creating a RESTful service:
An Introduction To RESTful Services With WCF:
http://msdn.microsoft.com/en-us/magazine/dd315413.aspx
Lastly, you could also look into passing values between pages directly, but I am not sure if this will work in your scenario:
How to: Pass Values Between ASP.NET Web Pages
http://forums.asp.net/post/set/16/1800930/4968853
Kelmen
Member
180 Points
79 Posts
Re: The use of XML
May 09, 2012 05:41 AM|LINK
...using simple System.XML classes?...
afaik, no.
the way i look at it, you need to work with B directly.
basically get some sample how to invoke app/svc B programmatically, it's not very hard.
the challenging part probably in setting the config to talk/work with the app/svc B, and it depend how the B been configured.
you also need to get/workout a program to load the data from A, combine with the above program to talk with B.