开发者

Querying RavenDb from Silverlight

Need to decide about architecture and design of one Silverlight application i'm building. App is for requirements/issue tracking.

Requirements:

  • SL 4
  • ASP.NET (MVC)
  • shared hosting enviroment with Full trust, IIS7

I would like to have:

  • CQS (CQRS) style of separation, queryies and commands
  • one db, don't need two storages like in 'real' CQRS, i don't have race condition nor the scaling problems. It would be great if i could use RavenDb
  • for commands, i'll use one-way command DTO objects that are processed on server-side, and published on client side (SL), inspired by NDC11 session on "CQRS, stop CRUDing, love domain"
  • I like RIA Services style of querying data, exposing entites through DataService, but it really works just with EF and NH开发者_如何学Go (relational model)
  • how can I use RavenDb for querying data? I'm on shared hosting, so i have to use embedded mode, and can't start ravendb.exe process, it has to be hosted inside asp.net app. I really don't have any experiance with RavenDb, and this will be like learning project.
  • would not like to expose RPC SOAP endpoints with WCF, is there any better solution, REST?

So, command side isn't a problem, but can't figure out how to use RavenDb, shared hosting, and some easy REST-style for querying data from Silverlight app. Does RavenDb supports something like that out-of-the-box?

As Ayende answered, RavenDb can be run in asp.net, and queryed from Silverlight. Question is now, is this good approach, at least for read side? Db is exposed to client app, without any server side logic (service/app layer), so anybody can modify data (if it's authenticated).

Do I execute command (write) from Silverlight, or transfer Command DTO objects (DelegateToOtherMemberCommand) to server, and execute it there, on domain object (Ticket.AssignTo(member))?


Hrvoje, You can use RavenDB with shared hosting. You usually setup RavenDB as a virtual directory inside your app, and you setup it up in IIS as shown here: http://ravendb.net/documentation/docs-deployment-iis

You can then expose RavenDB to your SL client and just use the Raven.Client.Silverlight assembly

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜