Breeze.Sharp with non web-api/wcf data services - breeze

We are using EasyNetQ(RabbitMQ) with a data layer that uses EF6.1
We are developing a WPF client that will request data via the Message Bus. We would love to be able to use Breeze.Sharp to manage the data on the client but the only DataServices that are currently available are for WebApi/web(HttpClient) services.
Is it possible to introduce an interface so that we can provide a custom DataService that will communicate with the EasyNetQ message bus?

This is absolutely possible, the breeze.sharp product is intended to be able to talk to all of the same data services that our breeze.js product does.
Take a look at the breeze.dataService.mongo adapter ( part of the breeze.js product). It is used to talk to a mongoDB database running on Node with Express. ( i.e. no WebApi and actually no .NET on the server at all. )
That said, we have not yet built other adapters for the breeze.sharp product, although we plan to, as well as provide documentation on how to do this yourself. No timeframes yet unfortunately, we have a lot on our plate.
Another alternative to waiting, is to contact breeze#ideablade.com to build the adapter for you.

Related

Use QBFC from a desktop application to interface to Quickbooks online

We have a windows desktop based application that interfaces to Quickbooks Pro desktop using QBFC.
It creates a QBSessionManager, adds message sets to it, performs the requests, and parses the responses.
Is it possible to use this existing QBFC based interface from the desktop application to update Quickbooks online instead? Obviously there would be some changes since we're not loading a local company file, but can we leverage this code to also talk to Quickbooks online?
Perhaps by installing a shim that transports the XML to the online version?
Or utilizing the XML generated by QBFC to update QB online?
Is it possible to use this existing QBFC based interface from the desktop application to update Quickbooks online instead?
No.
The issue here is that the XML that you're generating for QBD(desktop) is very different from the XML (or JSON) that QBO(nline) requires.
The concepts are the same (there are still customers, and invoices, and payments, etc.) but the actual XML messages are significantly different.
Additionally, the authentication mechanisms (a DCOM handshake vs. OAuth) and transports (COM vs. HTTP/TLS) are significantly different so that you can't really use the QBFC components with QBO.
You will likely get to re-use a lot of your code because the concepts are the same, but the parts you re-use won't be any QBFC or XML bits.

OData vs XSJS in SAP Hana Development

I am developing an application using SAP Hana studio and I am confused on why I would use XSODATA and why I would use XSJS. Why can't I just use a XSODATA file to perform all of my database transactions? I get XSJS is server-side, but if I am doing basic CRUD operations could I just use XSODATA?
A related question, would the XSODATA file be create in SAP Hana studio and work fine from there? The reason I ask is because before I had to create a service in Gateway service builder and provide the URL to the application to access it. But now I am assuming everything is done on hana studio and there's no need to do anything beside this.
For CRUD operations XSOData would be ideal when you are on HANA. Since XSOData implements the OData protocol, most of the heavy lifting is done by the underlying XS Engine. So once you provide the service definition you can expect everything to work out of the box. You also get the feature set of OData v2.0.
However with XSJS, you will have to implement all CRUD operations. This can be useful for complicated scenarios like when you are trying to send/recieve data from external services, identifying session users, running some dynamic sql, file upload, emails and the like. If XSOData does not fulfill you needs in such cases, XSJS is the way to go.
Also, if you are developing UI5 applications, XSOData is a better choice as it will be much easier to use OData services in UI5 compared to other REST services like XSJS.
You are right. If all you need is CRUDQ on the database, then XSODATA is the way to go. XSJS should be used for non-CRUD operations (e.g. custom processing operations, file uploads, etc).
And yes, you can create it directly in the HANA studio or in the Web Based Workbench. The Gateway is used when you have a Netweaver system (not necessarily a HANA system) and you want to expose some business entities from there. They are two distinct technologies (Netweaver vs HANA XS Classic) with different usage scenarios (albeit you can combine them in some cases).

Entity framework along with plain old ADO.Net

I am building a new applications architecture and I need your advice. We have a central MSSQL server database hosted as SQL Azure. This database needs to be accessed from many different applications, most of them are web applications hosted in windows azure and couple of them are winforms apps.
Accessing database for web application is straight forward with ADO.Net. For winforms applications, the wcf data services technology seems impressive along with client authentication services for security.
I need to know whether this mixed mode of database access will work? In other words, will database integrity will be maintained if it is being hit by applications using a mix of ADO.Net and Entity framework.
Thanks in advance.
If you query the database using EntityFramework it will cache the data until you call SaveChanges(). If the database is modified (e.g. using plain old ADO.NET) in the meantime there is a risk of the data from the database being overriden by the application that is using Entity Framework. To prevent from this you need to use Concurrency Token. You can find some details here: http://social.technet.microsoft.com/wiki/contents/articles/3866.aspx
Note that when you start using concurrency tokens you need to be aware of possible concurrency exceptions which you need to handle. You can take a look at this blog post http://blogs.msdn.com/b/rickandy/archive/2011/02/17/handling-optimistic-concurrency-exception-with-ef-and-mvc-3.aspx for some ideas. WCF Data Services uses ETags for concurrency (http://blogs.msdn.com/b/astoriateam/archive/2008/04/22/optimistic-concurrency-data-services.aspx) but you may not need to do anything here if you setup concurrency in the EF model for the database that is exposed via WCF Data Services.
We are going with WCF RIA services. They seem to work well with multiple client types providing out of the box data access layer.

Need my apps to talk to each other

In a DELPHI 2007 application that I am developing some prospect clients just found interesting to be able to share data and information with each other.
They all have the same application.
All have independent Databases
But all have the same installed application and there are some data types that they might want to share (replicate) between their databases.
How can I enable them to share data with other users of the same application program, but not to everybody on the whole internet.
I would like this to be as automatic as possible, as I already have considered approaches that involve manually sending emails.
I know Datasnap is an option, is there any other.
UPDATE:
The idea is to enable companies that have the same application to be able to share data.
They should be able to select what partner and what to send.
I have been investigating datasnap, but would like to know if there is another way to do this
Another standard way to connect distributed applications and share data and information is through some Message-oriented middleware (MOM). There are many open source middleware products (message brokers) available, which can be used over Delphi client libraries, even in multithreaded Delphi server applications. (Disclaimer: I am the author of message broker client libraries for Delphi and Free Pascal)
There are many essential differences between web services and message brokers, like peer-to-peer and publish/subscribe communication models. They also play a key role in enterprise application integration patterns.
One standard way to connect applications to other applications is to make a web-service, and make a client that consumes that web-service, called a web-client. Technologies like SOAP and REST refer to such web service and web clients.
Your question is vague, perhaps due to english not being your language, but you should probably edit it and be more specific.
If all your applications are going to talk directly to each other that is called "peer to peer networking" and there are huge problems with enabling that kind of communication directly over the internet. It is much easier if you build a server that all these applications will connect to.
As a sample, consider the IRC Chat service, and consider writing a Web Service that will be the Chat Server, and consider all your clients to be "Chat clients". Sharing data could be the same idea as creating "rooms" or "channels" on a chat server.
I get the idea that you want something like a Peer to Peer Data Replication Service. I think that the closest you're going to get to that is something like "RSS Feeds" (used by blog syndication services). You subscribe to them via a simple web service, and pull down the new content on some periodic basis. Since that data has to be published to a central server, that means, that a peer to peer approach is out of the question. If you don't have your own web server running on a web hosting service, or on a "cloud", and you need a truly peer to peer solution, I am not aware of any way to do that, at least not without an incredible custom engineering effort.

Communicating between Node.Js and ASP.NET MVC Application

I have an existing complex website built using ASP.NET MVC, including a database backend, data layer, as well as the Web UI layer. Rebuilding this website in another language is not a feasible option.
There are some UI elements on some views (client side) which would benefit from live interactivity, involving both push and pull, so rather than implement some kind of custom long polling or websocket server in asp.net, I am looking to leverage node.js for Windows, and Socket.io.
My problem is that I need two way communication between both applications. Each user should only be able to receive data once they are authorised on the ASP.NET website, so I first need communication for this. Secondly, once certain events occur on the ASP.NET website I want to immediately push this data to the Node server, to be broadcast to specific users or groups of users. Thirdly, I would like any data sent to the node.js server to be pushed to the ASP.NET website for processing, as this is where all our business logic lies. The sole reason for adding Node.js is to have the possibility to push data directly to the client, I do not want to build any business logic into it (or as little as possible).
I would like to know what the fastest method of two-way push communication is between Node.Js and ASP.NET. The only good option I'm aware of so far is to create a special listener on a specific port on the node.js server and connect to that, but I was wondering if there's a more elegant or more efficient method? I also know that you could use a database inbetween but surely this would need to be polled and would be less efficient? Both servers will be running on the same server under a Visual Studio project.
Many thanks for any help you can provide.
I'm not an ASP.NET expert, but I think there are multiple ways you can achieve this:
1) As you said, you could make Node listen on a specific port for data and then react based on the data received (TCP)
2) You can make POST requests to Node.js (HTTP) and also send an auth-key in the process to be extra-secure. Like on 1) Node would react to the data you send.
3) Use something like Redis for pub-sub, send messages from ASP.NET (pub) and get them on the Node.js part (sub). This is even better if you want to scale your app across multiple machines etc.
The only good option I'm aware of so far is to create a special
listener on a specific port on the node.js server and connect to that,
but I was wondering if there's a more elegant or more efficient
method?
You can try to look at redis pub/sub model where ASP.NET MVC application and node.js would communicate through separate channels in order to achieve full-duplex communication. Or you can also try to use CouchDB change nofitications.
I also know that you could use a database inbetween but surely this
would need to be polled and would be less efficient?
Former techniques do not require you to poll for changes, but instead they will notify you when the changes happens or channel message arrives.

Resources