I am designing an internal utility web application for the team.
The front-end will be PHP based on Joomla so it will take care of user-authentication and all CMS stuff.
The back-end databases are varied: Excel, MS Access, MSSQL. Therefore I wish to build a C#-based web services which wraps the business logic and data access.
Modules in Joomla will be built which call the web services and presents the data in HTML.
Would it be a good idea? If it is, are there any existing libraries or framework that can facilitate?
Many thanks
Related
I am asked to develop (from scratch) a REST web service in .NET that wrapps calls to various data sources:
Databases (SQL, DB2, Oracle, etc)
Other web services (SalesForce, Microsoft CRM, etc)
Flat files
etc
In the end, we would display this data in web UIs : grid, charts, etc. Other features include: caching, usage monitoring, user roles management. And the idea would be to query this web service with a syntax similar to Open Data.
The data sources configuration would be done in a database, or in a configuration file.
Ex: Data source "DS1" is of type "Database" to server "srv001" on database "db001" and gets data from stored procedure "sp001".
Before I start developing that from scratch, I first googled to see if an existing stardard component exists for that. But I couldn't find any.
=> Is there an existing tool on the market that does it out of the box (or close to out of the box) ?
Thank you
Alex
There are lots of ways to expose data through a restful interface using .NET
For exposing a data source as a service you should use OData.
For combining various sources, as you mentioned, as your own mashup service use Web API
If your service is only going to be used internally I would use WCF which will be the most performant and easy-to-work-with option.
I need to insert some fields of data (example: Customer Phone etc) from outside(Externally) into the already developed/working (Installed) ERP Invoicing application. When I open the ERP application those fields should automatically appear in the application for the particular order in the form. Currently the the external data is entering manually into the ERP application. I need to integrate from the different place to ERP Application using some another application, like C# Windows Application. We can access ERP database. How can I approach this for the solution to the problem using C#/windows application externally.
I am not sure what approach you used for Integration, but as it seems from your question that you have enough knowledge about their database structure and flow of data you can directly write to the tables to reflect the updated information in that ERP.
But this is not a recommended approach to integrate with any ERP, by directly interacting to their database tables, even if you have access to them and you very well understand the data flow. Integration to any ERP should only be done through API's provided by that ERP, or through some connectors available in market which are recommended by the ERP vendor.
You should look for an API or interface your ERP application provides to integrate external applications and/or modules, otherwise, if you have enough knowledge of how this ERP works and underlying database structure, than you can directly interact with the data...
I am new to silverlight, WCF RIA services. We have a medium size financial business web application. There is a lot of code. The code is well organized with lots of business objects, web controls, web forms, Data Access layer, Business logic layer.
There is a requirement for some enhancements to the web application and one of the team member wants to use silverlight to improve UI and responsiveness.
We tried to integrate a small silverlight application in the web application, But what I found is we copy the xap file and it always opens the Main form.
how can we open other silverlight controls?
How can we use the business objects and business logic with the silverlight as the silverlight supports on silverlight class library?
How can we use the existing data access library?
How can we connect to the database? I saw WCF RIA services, all the examples I saw with entity framework and we use oracle and the cannot use the beta version of oracle entity framework?
how to pass data to & from silverlight app to asp.net?
There maybe some other issues which I am unaware.
Thanks, Naveen
how can we open other silverlight controls?
You would create a Navigation Framework based Silverlight application. This allows the use of a path following # in the URL to navigate to other pages within the Silverlight application.
How can we use the business objects and business logic with the silverlight as the silverlight supports on silverlight class library?
You won't be able to use them directly. Here you would create a Silverlight WCF service to access your business objects, you keep the business objects on the server.
How can we use the existing data access library?
You don't, you are going via WCF to your business objects which are on the server and from there on to your data.
How can we connect to the database? I saw WCF RIA services, all the examples I saw with entity framework and we use oracle and the cannot use the beta version of oracle entity framework?
As above, the Silverlight app only sees your specialist WCF Service.
how to pass data to & from silverlight app to asp.net?
You can do that via your business objects and/or your new WCF Service.
Following the KISS principle, I suddenly realised the following:
In .NET, you can use the Entity Model Framework to wrap around a database.
This model can be exposed as a web service through WCF.
This web service would have a very standardized definition.
A client application could be created which could consume any such RESTful web service.
I don't want to re-invent the wheel and it wouldn't surprise me if someone has already done this, so my question is simple: Has anyone already created a simple (desktop, not web) client application that can consume a RESTful service that's based on the Entity Framework and which will allow the user to read and write data directly to this service?
Otherwise, I'll just have to "invent" this myself. :-)Problem is, the database layer and RESTful service is already finished. The RESTful service will only stay in the project during it's development phase, since we can use the database-layer assembly directly from the web applications that are build around it. When the web application is deployed, the RESTful services are just kept out of the deployment.
But the database has a lot of data to manage over nearly 50 tables. When developing against a local database, we can have straight access to the database so I wouldn't need this tool for this. When it's deployed, the web application would be the only way to access the data so I could not use this tool. But we're also having a test phase where the database is stored on another system outside the local domain and this database is not available for developers. Only administrators have direct access to this database, making tests a bit more complex.
However, through the RESTful service, I can still access the data directly. Thus, when some test goes wrong, I can repair the data through this connection or just create a copy of the data for tests on my local system. There's plenty of other functionality and it's even possible to just open the URL to a table service straight in Excel or XMLSpy to see the contents. But when I want to write something back, I have to write special code to do just that. A generic tool that would allow me to access the data and modify it would be easier. Since it's a generic setup around the ADO.NET Data services, this should be reasonable easy too.
Thus, I can do it but hoped someone else has already done something similar. But it appears that there's no such tool made yet...
You are referring to ADO.Net Data Services. It basically creates an Entity Database Model and adds a REST frontend to the service using ASMX. There is a How To article availble from MSDN here on consuming the service using .Net. I have also done the same thing using the normally WebClient class in .Net in the past.
You can also look at the WCF REST Starter Kit if you want to roll your own based on Entity Framework. The starter kit also contains a handy new WebClient class that can be used to communicate with REST services.
Clarification
There is no prebuilt application client that I am aware off which will talk to these service, since they are pretty much accessing the data using Web Services. There is the Microsoft Smart Client Factory which is most likely the closest thing I have worked with.
I mentioned the above 2 options since they already have libraries in .Net that work with them directly, either as a referenced Web Service, or for the more adventurious, myself included, using the WebClient library or alternatively the new HTTPClient library in the WCF REST Starter kit.
I have used both, in Windows, Web, Silverlight and WCF. The latter being the easiest since they are focussed at REST.
We are currently investigating Prism which strongly leans to using this method when using WCF for front-end development.
Assumption
With regards to this question, you are making a generic assumption that wrapping ADO Entity Framework with a WCF service it will be generic. ADO.Net Data Services is the closest you will get, however the structure of the database will fundamently change the way you interact with it. Going a level higher in a "generic" way would be dangerous, as these 2 technologies, individually or together, are already as generic as possible.
In addition to Data Services (+1), consider RIA Services. It's like a domain-specific version of data services for Silverlight or WPF clients. Less flexible, but easier, than Data Services.
I have an application that runs on a server and uses SQL server 2005. If I wanted to make this application integratable with other systems such as a CRM, what would be the best strategy? My idea was to create a public Web Service with authentication...does this sound like the right approach?
Any idea's would be appreciated.
Yes, Ideally all integration is done using industry standard communication protocols, requiring some middleware that links these standards. Ideally these protocols would be something like a webservice as you say where the API ensures validation all data imported into your system.
Most basic integration between systems means Transfer of Data between systems. You can either choose to build an API to which you or others provide the middleware to connect. Or depending on the nature of the applications, you your case CRM, it may be worth ising this same API to build an Import/Export mechanism where users can just just Export their data into xml, CSV and also import their data, building a nice interace to map any CSV format to your own fields is a nice touch and means less technical users can perform non-automated tasks.