I was wondering whether or not BreezeJS is compatible when using other technologies other than Web API and/or Entity Framework? As I'm currently in development of a SPA using Service Stack to retrieve data and ORMLite?
So I am curious how BreezeJS handle's this as I know it uses it's own API Controller usually with an extension of the DbContext class which Entity Framework uses. Thanks.
There is currently a sample called NoDb in the samples zip available on the breeze website. This sample does not use EF, but it does use WebApi. So I'd start by looking there. ( additional documentation on this sample should be added within a day or two as well).
In terms of using ServiceStack instead of WebApi, breeze supports the concept of a "dataServiceAdapter" and currently ships with two, an OData adapter and a WebApi adapter. It is certainly possible to write a ServiceStack adapter that breeze could use but this is not trivial. Please add this as a feature request ( and vote for it) on the breeze User Voice. We take these requests seriously.
Related
After reading a lot about ServiceStack, I think it's such a beautiful work of art and I decided to use it for our upcoming Xamarin iOS App.
The problem currently is that after installing the ServiceStack.Client for Xamarin.iOS, I can't find the Request/Response DTOs (i.e POCOs) that are used for registration or authentication given that I have enabled the Authentication and Registration Plugins in the service host.
After digging into the source code, I found those Request/Response DTOs to reside in ServiceStack assembly which is a huge dependency and I don't think I can include it in our iOS App.
is there a way around that ? shouldn't these DTOs be shipped as well with the ServiceStack clients themselves under maybe ServiceStack.Client.Auth ?
Thanks
Sorry, I guess I found them already available inside ServiceStack.Client .. what confused me is that I took some sample code from the C# client wiki and the DTOs were named differently and not available .. Thanks –
Given the most awesome release of the Visual Studio Extension for ServiceStack, I wanted to make sure that after creating my service with ServiceStack, that when I create a client to consume said services that I'm doing it correctly. By that I mean in a loosely coupled, high performance way.
Let's say that we examine the EmailContacts project so we're all on the same page. The Email Contacts project has a reference to both the EmailContacts.ServiceInterface and EmailContacts.ServiceModel, this is understandable as this IS the service. Now I want to consume this service from another .NET project, doesn't matter what type, console or web.
So my question is this "In the consumer application, will I add a reference to EmailContacts.ServiceInterface and EmailContacts.ServiceModel and use the ServiceStack C# client library?", I don't see where I have a choice not too.
Thank you,
Stephen
Keep Service Models in their own Assembly
The benefit of having a well-defined Service Contract where your DTO's are maintained in their own separate impl-free project is that clients will only ever need to reference your Services DTO's to use with one of ServiceStack's C#'s Generic Service Client to call any Service.
Add ServiceStack Reference
Clients are also able to avoid referencing any of your Server dlls if they use ServiceStack's Add ServiceStack Reference feature which provides another way for clients to access your Web Services DTO's.
Clients shouldn't reference any Server implementation projects
It's a code-smell if you find clients needing any reference other than your Service Model and ServiceStack's client libraries, which is an indication that your Service Models aren't in their own dependency and impl-free .dll, which shouldn't depend on anything other than ServiceStack.Interfaces.dll.
I got the week off from work to learn servicestack and I am in awe of its simplicity, power, and speed.
I am a pluralsight subscriber and I am going through the Jon Somnez course which is great and as far as I can tell is using the new service stack api.
However, the examples in the pluralsight course are extremely simple and as such I am looking for a working example THAT USES the new API. I see that the wiki is up to date and that is very helpful...but I was hoping to find a working implementation that uses the new API and it seems that all of the examples I have downloaded or browsed are using the old API.
IS there a new working example/implementation (vs solution and projects.) that uses the new API yet?
If I can sneak in another question. Is there a recommendation (hopefully in the example project you can point me to) that explains a best practice for structuring your servicestack API project. (DTOs in a folder, services in a folder, response objects in a folder ??)
Thanks.
Update: ServiceStack Live Demo's and Examples are now being published on LiveDemos GitHub Project.
Most of the examples in ServiceStack.Examples has switched over to use the New API and are mostly available to demo on the servicestack.net homepage.
ServiceStack.UseCases contain a number of small single-purposed applications that are focused on how to enable specific features for different use-cases.
The SocialBootstrap API deployed at bootstrapapi.apphb.com is an example of an MVC and ServiceStack website together making with all the available authentication options together.
The Razor Rockstars is an example of a stand-alone ServiceStack application that demonstrates its website and HTML capabilities showing how you can add razor and markdown views to existing services to create a website that enhances existing services. There are 3 versions of Razor Rockstars available:
An ASP.NET Host
A Stand-alone Self-hosted using HttpListener
A Windows Service
Another website that's similar in spirit to Razor Rockstars is the Nortwind Database editor which demonstrates how you can enable a full-featured server-side HTML website to enhance your existing services. It includes a full-writeup of how he developed it and its capabilities on the accompanying blog post.
I have a Monotouch project that today uses WCF Web Services to get data. Now I want to migrate it in order to start using ASP.NET Web Api Json.
Does anyone know how can I send a viewmodel data from a ASP.NET Web Api and then read it in monotouch?
Thanks for the help in advance.
I think you should read this Xamarin article.
In general, Web API is just standard HTTP passing either XML or JSON back and forth. There is not necessarily a client framework accessing it--you can consume it with raw HttpWebRequests or the equivalent in whichever programming language you are using.
Considering that, your options are:
Use an open-source library to do it (something like RestSharp)
Create the HttpWebRequest calls, and format the XML or JSON for the requests and responses yourself (you can use the .Net BCL to do this or other open source projects)
I tend to do the former, just because I like fine grained control of what is going on. #1 might be easier for you though.
I'm trying to call ServiceStack service from a console app with a service reference client (generated after using Add Service Reference in VS 2010).
I looked at the sample at github but was unable to create a similar client code.
My objective is to provide a set of services with a simple API that can be called by a .NET client as easy as possible. Ideally, client should not need any knowledge of ServiceStack to call the services.
My questions are:
How should I create request if the service does not need any parameters?
How can I resolve proxy.Properties?
Here is the gist
You can use SOAP/WSDL's Add Service Reference but you should be mindful of SOAP's Limitations.
Although the current recommendations for client libraries is to use your preferred choice of ServiceStack's built-in generic service clients.
Got it working, updated gist Removed properties, version, request