WPF Technology Stack - wpf

I have the below stack:
tomcat+java 6+ spring on the server side.
and WPF on the client side.
we can add additional frameworks on both sides if needed.
Is there any way to make the WPF talk to java server directly and data can be transferred similar to binary transfer in flex remoting?i.e. java object to c# object serialization with good performace
I know xml is one of the other ways.
I have read an similar question here. But the performance is not discussed on the article.
Regards,
Shah

I don't see how you would be able to communicate between two ends when one uses RMI and other uses Remoting. I recommend you use Web Service instead.

Take a look at Hessian. It's a binary protocol, implemented in java and .net (and many more). Fits well with Spring as seen here.

Related

Creating basic push-style notification app using WPF and WCF?

I'm an asp.net developer with very little experience in WPF. I'm looking to create a very basic application, one that would be distributed to a couple clients and allow any given client to send a basic message to all of the others running the application.
I'm not exactly sure where to start or what to look for, being that I'm new to the WPF world. Could someone point me in the direction I need? Would it involve MSMQ? I'd like to stay away from polling if possible, but what generally would I need to know to get started? Thanks.
You could take advantage of the classes in the System.Net.PeerToPeer Namespace.
I did some push notification with WPF and WCF in 2006 using the framework classes from .NET 3.0 which were deprecated by System.Net.PeerToPeer in .NET 3.5 / 4.0, but the old system worked well, so I can only assume that the new classes in the framework are even better :-)
We used push notifications for the majority of data that didn't matter if it was missed by a client, but MSMQ for sending important occasional messages that absolutely could not be lost. You don't necessarily need MSMQ though - we were running mission-critical apps which demanded it, so we played it safe.
Click here to read the MSDN Magazine article that was published to introduced the new P2P namespace in 2007.

How to query SQL Server through Silverlight web project?

I passed the hello world phase in the Silverlight world but I found out that ADO.NET is not part of the party. :_(
I'd like to know what is the easiest method to retrieve tables\rows\single value from SQL Server.
(At the moment I have a very small DB, so simplicity is more important than complicated smart solutions that can handle large amount of data.)
I what to be able to send a query like:
SELECT * FROM a JOIN b....
I found this article which I'm learning at the moment, yet I'd like to know if there are other ways to access the DB.
Thanks
Asaf
Other way is to use WCF RIA service.
You can't access a database directly from a Silverlight application.
The only way is to use some service.
Here you can learn how to do that with RIA service.
As suggested above, use WCF. This means setting up a WCF service on the webserve which does all the SQL magic. You may want to look at LINQ2SQL (obsolete) or Enterprise Framework for accessing database in this service. In Silverlight you just connect to the WCF service and it will be like magic, especially if you use LINQ.
Remember that you must access the same server your Silverlight app was downloaded from. If not there are special rules that apply.
For binding the data and interface Silverlight (and WPF) supports the MVVM model. This model really simplifies GUI implementation and makes it very easy to maintain the code.

Why would a developer use Silverlight?

I know virtually nothing about Silverlight. I'm considering creating a browser based app and really don't know if it should be built using Silverlight or ASP.NET (which I am familiar with). I'm curious as to the reasons why a developer chooses to use Silverlight.
Thanks very much.
ASP.NET and Silverlight aren't comparable.
Silverlight is a client-side framework, comparable (perhaps) only to Adobe's Flash while ASP.NET is a server-side framework.
You use those in conjuction, not one instead of the other and they're not connected in any way.
There are a few reasons you may want to consider using Silverlight:
You have a need for great looking and
interactive web applications (that
are not Ajax, jQuery, etc.).
You want to utilize your current
programming language (VB.NET, C#,
etc) skills.
You want your "web app" to be
available out-of-the browser.
There are other reasons - have a read: Top 10 Reasons to Use Silverlight. There can be a signifcant ramp you would need to make, but once made, you may prefer SL for certain things over ASP.NET and even in some cases, not really have option available to you in ASP.NET, like, for example, perspective transforms of images that can be animated from user interactively.
If you are building something that requires lots of UI interaction, and is reasonably non-static with its presentation then i would suggest Silverlight.
If you are doing (relatively) simple UI (i.e. tabular based presentation of data like clients and orders) with not too much UI trickery then i would suggest that you stick with ASP.NET.
Having done both, i find that Silverlight kicks butt when it comes to doing complex UI stuff, or you need to eliminate callbacks and postbacks to the server.
Reuse .NET code and skill on the client browser.
Achieve high performance.
Use Silverlight if you want a flash type site without using Flash. If you want to use the .NET stack Silverlight is the way to go to do what flash can do.
Silverlight was originally known as WPF/E. It is a light version of Windows Presentation Foundation, designed for the web and embedded devices.
But yes, you can think of it as Microsoft Flash.
You could also try using web standards also, sprinkled with some Jquery and Ajax, with maybe Modernizr to use html5. What do you need to do with this exactly?
Because it's the only option for third party software development on the upcoming Windows Phone 7 platform. (OK, also XNA, but that's for games)
Oh, and they also use it on the Web for some reason.

What are the methods of communication between Silverlight and server side?

Background:
I have basically no experience in Silverlight, i was asked to start reading up on the tech and provide some insight for client which may want to rebuild the UI of their .Net Desktop application in silverlight. So my experience is what i have been able to google (which surprisingly is not easy) and the few tutorials i have done.
I am aware Silverlight could use ASMX Web Service , WCF Services or REST to do communications with the server.
Question:
Are there any other official or non-official mothods of communication anyone knows of?
Thank you in advance,
David
Start here:
http://msdn.microsoft.com/en-us/library/dd470099(VS.95).aspx
http://videos.visitmix.com/MIX08/T13
http://videos.visitmix.com/MIX09/T42F
I am somewhat biased having worked on the technology :), but I would urge you to consider WCF.
This method gives you great usability: It literally takes a few minutes to "Add New... Silverlight-enabled WCF Service" to your project and have everything up-and-running. In Silverlight 3, this uses a very performant binary XML protocol under the covers, which can be easily switched to regular text XML for debuging with just a 2-line config change. And it integrates nicely with most authentication models that you would want (see the security section in the doc link above).
Of course, you can roll-your-own communication using HttpWebRequest, WebClient, or even sockets. Using WebClient is probably best if you want to go with REST on the server. Keep in mind that some things that are normally possible in REST (such as using PUT and DELETE HTTP verbs) are not possible in browser plugins such as Flash and Silverlight due to browser restrictions.
Finally, there's .NET RIA Services. It's a bit too heavy-weight for some scenarios and doesn't have some of the WCF features (like binary and duplex), but it's more than just a way to communicate with the server: It gives you a whole perscriptive framework for building SL apps with server-side data, and gives you a lot of nice features like validation, paging, etc. for free.

How to establish database connectivity in Silverlight application?

I am developing a RIA using Silverlight its completely Database Driven Application but I dont know how to establish Database connectivity?
I am using MsSQL database and C#
I found the answer to my question upto a good extent... so sharing with you all
Check this link it contains a great set of documentation on using ADO.Net data services in Silverlight.
I found one more good article so editing my answer.... but its the luck if this works for you if not then author of the article donot respond :( quite sad...
Here is the best link i found hurry!!! It solves the problem.. Lots of thanks to kencox the sample is with SQL2008 but i tried it with sql2005 and it worked so You can also try it with MySQL hope it works for you too...
Well, it depends what database you are using, if you're using mysql, you can have a look here:
http://www.mysql.com/products/connector/
And get the .NET client.
If you're making an application hosted on the Internet, you don't want the RIA directly accessing the database. Firewalls make this unfeasible, and it could expose you to dangerous attacks. Typically, you'll have a web service as an intermediary. If you really need a more direct connectivity to data, you may want to consider ADO.NET Data Services.

Resources