As was to be expected there were lots of announcements around Silverlight at the last MIX conference in Las Vegas. One particular product announcement is very interesting for line Of Business (LOB) application developers. This big announcement is all about the .NET RIA Services.
What are .NET RIA Services?
RIA,short for Rich Internet Applications,is a bit of an umbrella term for all sorts of applications delivered through the browser. The key aspect however is that they deliver some business function and are not just about flashy graphics. Business applications tend to work with data and other business resources so they are usually built in the standard N tIEr architecture. If we take a look at this N tIEr architecture for the most common type of business resource,the database,we typically see the Create,Read,Update,Delete,(CRUD) pattern appear all the time. While implementing the CRUD pattern in Silverlight isn’t extremely difficult the very fact that the Silverlight application runs in the browser without direct database access and all server communication is done asynchronously makes this harder than it needs to be. This is exactly one of the problems the .NET RIA Services is trying to solve. Of course there is more to the .NET RIA Services and the standard CRUD operations is just one of the issues addressed. As we will see in this article it addresses much more by including things like data valIDation,general communication,keePing clIEnt and server code synchronized and more.
When evaluating the .NET RIA Services we should be looking at it from two different perspectives. First of all it is a set of design guIDelines of how to create a RIA style application. Secondly it is a serIEs of .NET librarIEs and Visual Studio templates implementing the design guIDelines. So even if you don’t want to use the .NET RIA Services binarIEs,studying the design is very useful for a Silverlight line-of-business (LOB) developer. Another thing to keep in mind when evaluating the .NET RIA Services is that it is not just about Silverlight but more general. The first samples may be with Silverlight clIEnts but a clIEnt Could equally well be written in ASP.NET/JavaScript,WPF or any other clIEnt that can call WCF services.
Some of the problems the .NET RIA Services trIEs to solve
When develoPing Silverlight LOB style applications developers today are faced with a number of challenges not directly related to the business problem they are trying to solve. Some of the problems a Silverlight RIA developer faces include:
Both the server and clIEnt sIDe logic need to be developed together but both are very separate from each other. Often when the server sIDe code has been updated the developer must manually update the WCF service reference so the clIEnt sIDe code is aware of the changes. It is not possible,at least without some trickery,to use an assembly both in a regular .NET and a Silverlight assembly,making it hard to share code between the clIEnt and the server. Using WCF to communicate to the server. The asynchronous nature of WCF,or all external communication for that matter,when used insIDe of Silverlight is an extra complicating factor. Data entered needs to be valIDated both on the clIEnt,for immediate UI Feedback,and again on the server,for security purposes. The server has to be secured to prevent unauthorized use by other than the intended clIEnt application.All of these are common problems but really not related to the actual business problem we are trying to solve. The .NET RIA Services trIEs to solve these problems for us making it easIEr to develop LOB applications in Silverlight.
Some of the techniques the .NET RIA Services uses to solve these problems.
The .NET RIA Services lets us work in such a way that the server and clIEnt parts of our application are two sIDes of one single application. This means we are not working in a Service OrIEnted Application (SOA) style with a very disconnected application. Instead the .NET RIA Services sees both parts of the application as one that just happens to be split into parts by the network. automatic,compile time,code generation is used to connect the clIEnt with the server parts of the application. No need to manually set a service reference or update it. By using file naming conventions code written in the server part of the application can automatically be inserted into the clIEnt part of the application. Again no need for the developer to do anything except use a simple naming convention. Most of the WCF communication is completely hIDden from the developer and for the most part there is no need to worry about the fact that all communication is asynchronous. Data valIDation rules are added to the entity classes in the server part of the code. These are automatically added to the clIEnt part and evaluated in both parts of the application. The standard simple declarative security model we are all already familiar with can be used.The main thing to remember when evaluating the .NET RIA Services is that it is not intended for SOA style applications where the service and the clIEnt are very loosely coupled. Where it is intended to be used is where the clIEnt and service are tightly coupled; just like in desktop clIEnt/server applications,only in this case the clIEnt and server parts of the application are separated by an internet or intranet connection.
总结以上是内存溢出为你收集整理的让你了解.NET RIA Service全部内容,希望文章能够帮你解决让你了解.NET RIA Service所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)