简体   繁体   English

与Flex和C#/ Asp.Net的数据库连接

[英]Database connection with Flex and C#/Asp.Net

I've started with Flex recently, I've noticed that some plugin for Visual Studio exist, instead of buying a licence for another program (Flex Builder). 我最近刚开始使用Flex,但我发现存在一些Visual Studio插件,而不是购买其他程序(Flex Builder)的许可证。

I was wondering how I could manage to remotely connect to my database with a Flash/Flex application with the help of C#/Asp.Net. 我想知道如何在C#/ Asp.Net的帮助下通过Flash / Flex应用程序远程连接到数据库。

If I've correctly understood what I've read in the last few days, there is basically no way to 'query' to a database with Flex 3. So I suppose there is another way by using a webservice in C# on the database server that would respond to the Http query from Flex. 如果我正确理解了最近几天阅读的内容,则基本上没有办法使用Flex 3来“查询”数据库。因此,我想有另一种方式可以通过在数据库服务器上使用C#中的Web服务这将响应来自Flex的Http查询。

Am I right or totally of the track? 我是对的还是完全对的? If you have any other thoughts about this, please share. 如果对此还有其他想法,请分享。

I prefer (and recommend) using Webservices for the communication between Flex and C#. 我更喜欢(并推荐)使用Web服务在Flex和C#之间进行通信。 It's easy to use, and they both support serialization, so you can easily transfer Strong-Typed Objects. 它易于使用,并且它们都支持序列化,因此您可以轻松地传输“强类型对象”。 More on Flex and .NET can be found at http://www.adobe.com/devnet/flex/flex_net.html 有关Flex和.NET的更多信息, 请访问http://www.adobe.com/devnet/flex/flex_net.html。

Alternatively, you could consider using WebORB. 或者,您可以考虑使用WebORB。 This program functions as a gateway between and Flex, and enables you to use the Flash RemoteObject API for the communication to C#. 该程序充当Flex与Flex之间的网关,使您可以使用Flash RemoteObject API与C#进行通信。 More on this can be found at http://www.adobe.com/devnet/flex/articles/flextodotnet_remoteobject.html . 有关更多信息, 请访问http://www.adobe.com/devnet/flex/articles/flextodotnet_remoteobject.html

Your understanding is correct. 您的理解是正确的。 Flex is intended for developing client-side applications, and communication with a database is done through a server-side application. Flex用于开发客户端应用程序,并且通过服务器端应用程序与数据库进行通信。

Pretty much the same as building a JavaScript application. 与构建JavaScript应用程序几乎相同。 Though, Flex has several additional options for communicating with the backend. 但是,Flex还有一些与后端通信的其他选项。 Webservices are great in a lot of cases, but the other options are worth looking into. Web服务在很多情况下都很好,但是其他选择也值得研究。

Here's a pretty happening article on the topic, if you haven't already seen it. 如果您还没有看过这则话题,这是一篇不错的文章。

http://www.dehats.com/drupal/?q=node/33 http://www.dehats.com/drupal/?q=node/33

You really should consider using FluorineFx. 您确实应该考虑使用FluorineFx。

It takes about 5 minutes to set up an will allow Flex to call your methods like a service. 设置一个约5分钟的时间即可使Flex像服务一样调用您的方法。 You can then pass classes back and forth from .NET to Flex and back. 然后,您可以从.NET到Flex来回传递类。

It's also the standard form of communication by Adobe, it's free and it's super fast. 它也是Adobe的标准通信形式,它是免费的,而且速度非常快。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM