SharePoint 2010 Silverlight application server object model? - silverlight

I am currently getting myself up to speed with SharePoint 2010 and I am working my way through the different way SharePoint can expose silverlight applications.
As I understand it, the client object model is more restricted, and is for other applications to interact with SharePoint via WCF for example. An example would be a custom build system that retrieves reference data from SharePoint lists.
The server object model provides more functionality in SharePoint. One example is code written for a web part.
I have been told to deploy a silverlight application, you create the xap, make it accessible by SharePoint web front end, create a silverlight web part and point to it.
So, my question is, assuming what I have previously mentioned is more-or-less the case, can SharePoint access the server object model or is it the same as an external system for example, and uses the client object model?
I am learning all of this so happy to receive feedback on anything I may have not understood correctly.

You would access the client object model from Silverlight. Silverlight is a client. It runs in the user's browser, so it is not on the server, and therefore cannot access the server's features except via service calls. The client object model will provide you direct integration with various lists and functions, and makes it very easy to integrate.
Check out this video for more:
http://channel9.msdn.com/learn/courses/SharePoint2010Developer/ClientObjectModel/SilverlightClientObjectModel/

Related

Having issue for load test scripting for application implemented using silverlight and CSLA

We are testing application which is implemented using Silverlight. The development team has used CSLA for encryption and decryption of request and response body. A message body is in an encrypted format, we are facing issues for co-relation and parameterization.
Anyone having experience of load testing for such kind of application? We are using VSTS 2015
Csla is not an encryption; rather it is a framework for development of business objects. One of the key features is that the object can move across the network, so that the same business rules run on both the Silverlight client and the Asp.net server (which is where you data access will occur). It does this by serializing the objects using HTTP, WCF or some other protocol back and forth.
If the calls you are load testing do not require a user to be authenticated, you should be able to capture them with something like Fiddler and replace them. If the calls are authenticated, you may encounter issues as Csla automatically can serialize the Silverlight appdomain's IPrincipal so its available on the server as well. That may or may not cause problems with your load testing, but it would depend on how exactly the authorization and authentication was implemented.

Understanding the different ways to connect to CRM 2011

I'm a beginner CRM developer and I'm quite confused about the connection methods to CRM.
What's the difference between creating a SOAP service reference to connect to CRM 2011 from a windows form application VS using connection string VS creating a web service?
Are they the same and I can use them interchangeably ? Or it depends on the task I want to do?
Thanks
Out of the 3 links that you have provided, one contains the best approach.
this - CRM SDK says to use this approach when you want to connect with CRM from some other application like Winform app, WPF app, website. In summary, you provide connection values through configuration and then use dlls provided by CRM to access data.
this - This is a special case in CRM. So here you are accessing some data from CRM, processing it in a service and then using that service to access processed data.
this - This document itself says that you should not use this approach. Problem with this approach is about hard coded service references.
You can find plenty of examples to start up with from CRM SDK.

Send simple data from wp7 to winforms application

I want to send simple data (geolocation data to be precise) from Windows Phone 7 application to a windows forms application and use it, as I'm a total beginner in this field I don't know which tools to use.
I searched about wcf services and tested this method but there's some issues: the data is sent from the phone application but isn't sent to the winforms application (guess something is missing)
If your know how to do this in a quick way, or have good tutorials I'll be thankful.
EDIT
I found this tutorial, it show how to connect directly wp7 application and desktop application without using sockets neither wcf service, I'm wondering if it is really works if the application isn't in localhost.
the like for the tutorial: wp7 tutorial
I had a similar problem and so I created a REST/JSON WCF service hosted in IIS with AppHarbor to provide the data. There's hundreds of ways to do it (Ruby/Heroku, etc..), but that particular one fits well within the Microsoft stack. I also needed to share route data and I used the WCF service to wrap the BingMaps services so that route computations are cached and shared. Considering that I had already created a local model, moving it out of my phone project into a service took less than a few hours (including the usual config hiccups, and forgetting to add the appharbor user to my bitbucket repo).
Consuming the service from WinForms (or any client) shouldn't be an issue as the service knows nothing about the client implementation.
Here's a tutorial from code project. REST WCF Service with JSON
I think you would need to implement some sort of server side solution which you could upload to on your Windows Phone and download from on your Windows Form application. This could be achieved using a WCF service which was connected to a server side database.
Another option would be to use sockets and communicate directly with your WinForms application. Check this tutorial on how to use basic sockets on WP7.

How to access PostgreSQL with Silverlight

I create hangman game with silverlight ironpython and I use data in postgresql for random word but I don't know to access data in postgresql in silverlight.
how can or should it be done?
Thanks!!
From Silverlight you cannot access a database directly (remember it's a web technology that actually runs locally on the client and the client cannot access your database directly over the internet).
To communicate with the server from Silverlight, you must create a separated WebService either with SOAP, WCF or RIA Services for example.
That Webservice will expose your data on the web. Call the WebService method to get your data from your Silverlight program.
This WebService layer will be your middle tiers that actually makes the bridge between your postgresql database and your Silverlight application.

Sharepoint as a CMS

I am looking at using Sharepoint as a CMS for my WPF application, I was hoping to create some kind of a repository and access that using .NET web services. The repository would simply be some images and perhaps some meta-data about the images (name, description, etc...)
Im am stuck to Sharepoint, so another system is not really an option.
Does anyone have any links or experience with this?
Im not a newbie to Sharepoint, I just cannot find anything on what versions to use, if I need plugins, security, how to go about it in general.
You can do this with the free version of SharePoint (SharePoint Foundation, formerly Windows SharePoint Services) that comes with Windows Server--no plugins required.
If you simply want to store the images in SharePoint you can upload them to a Document Library via a web service call. If you want to be able to view the images directly in SharePoint use a Picture Library instead. As you can see in the list of SharePoint 3.0 web services you can work with both Document and Picture Libraries. You could even have the WPF application create the libraries if need be.
As Henrico points out in Storing Images on Sharepoint you'll want to consider whether to store the image file itself in SharePoint or have the file elsewhere and use SharePoint to store the path. His post also points out some other considerations on storing images in SharePoint. Note that his post refers to using SharePoint directly, but the same considerations apply.
I'm not sure what to say about security, since SharePoint supports authorization and authentication with its normal web interface and with web services.
I once used a hosted version of SharePoint to store PDFs uploaded from a command line application that were then viewed by a separate application. It worked great for my needs.

Resources