WPF, Clickonce and WCF - wpf

Is it possible to deploy with ClickOnce a WPF app that calls one or more WCF services?
It is a "normal" WPF app, not an XBAP WPF.
Does anyone has an example?

Not sure on the question.
I have a working WPF app that acts as a client to several WCF services. It is deployed via ClickOnce.
However, the deployment medium (clickonce) and the design pattern (WCF) really aren't related when you are talking about the client.
What are you trying to do, and what problems are you having?

Sure you can. A normal WPF app is just like WinForms. Consuming WCF services is behaviour that is allowed.
I don't have any samples by hand but simply googeling for standard ClickOnce Deployment should bring give you plenty of tutorials

Related

Can we share Silverlight application with access Db over LAN

I am developing small institute management system as an academic project in my college.
I am going to develop the project in silverlight 4 or 5. In this project I want to provide attendance facility; i.e students will able to log in application from their respective machine which will be connected to LAN. There will be no internet connection available.
Can I develop this application which will not required internet connection once it is installed but can still accessible to different machine which are connected in a network over a LAN
1.How can I achive this?
2. should I use silverlight out of browser app or simple silverlight app
3. Is there any way to achive this using WPF?
After some research I found out the concept called Intranet which should solve my problem of sharing of source code and database.
About what technology should be used:
its better to develop this application in Silverlight as it is nothing but a subset of WPF.
Even better to develop the app in both technology to start with as I can use same XAML for both technology with few or no changes at all.
Connecting to database will be simpler in WPF than in Silverlight, as the later does not connect to the database directly and needs a service to achieve this. This service can be written using WCF or Ria service even in a php.
#Ash,
Silverlight can be desktop oriented, same as WPF. Caveat in some respects is that Silverlight is simplified to utilize Web Services communication, just like Adobe Flash is.
WPF is more oriented to non-Internat (ie Intranet/LAN) connections but pretty much utilizes the same .Net framework as Silverlight.
Although Silverlight is more platform independent than WPF, they operate the same.
You can take a Silverlight application and transition it to WPF with little to no changes (pending on the complexity of your application) to the code-base.
One benefit for WPF over Silverlight is the ability to utilize Click-Once deployment and Version control. Although you can implement a Click-Once styled Silverlight deployment it doesnt work the same as the majority of the Click-Once deployment models out there for the Desktop applications.
I hope this helps you.

ASP.NET MVC vs Silverlight for an internal application

I'm in the early planning stages of an internal application and I'm considering ASP.NET MVC and Silverlight 4 as my possible platforms.
The Environment
We're a Microsoft shop and we're in the process of migrating desktops to Win7 (from XP) and servers to W2k8, I'll be able to get Silverlight 4 installed as part of our baseline Win7 build
The Application
Provide a dashboard to monitor system status
Monitoring third party connections
Monitoring database tables for particular events
Monitoring SQL Server Log Shipping
...
Provide portal like access to system tasks to end users
Bulk updates to databse rows
Running SSRS Reports
Re-running automated tasks that have failed
...
The Team
We're a small team of 2 and neither of us have production exeprience in Silverlight or ASP.NET MVC so we'll be learning whichever we go for.
What would you pick and why?
The answer really depends on your experience. If you are an experienced web developer and have a lot of practice with ASP.NET then use that for sure. If your background is WPF and WinForms then use Silverlight.
My experience is that the ramp up time to use Silverlight for an ASP.NET developer is significantly longer than it is for a straight .NET application developer. The ASP.NET developer has to unlearn a great deal before they begin because the development paradigm for Silverlight is more akin to app development.
The other alternative is to use both. ASP.NET for the navigation, authentication, general layout and Silverlight for the data realisation (graphs etc).
I would pick ASP.NET MVC. I have experience in both Silverlight and ASP.NET MVC and Silverlight undoubtedly has a steeper learning curve. While it will definitely enable you to develop rich user interfaces (it enables amazing composition) it may be overkill for an internal application.
ASP.NET MVC on the other hand will enable you to do what you are aiming to achieve but I believe (due to the learning curve) you'll be able to do so MUCH more quickly. It is also much easier in my experience to enable dependency injection and write unit tests for ASP.NET MVC than it is for silverlight which may or may not be a consideration..
Silverlight. I think ASP.NET MVC more for public websites, whereas internal applications - Webforms or Silverlight in your case.
Silverlight - Desktop > Web for applications (not for simple data presentations though) whenever possible. The bad news is that desktop is not always possible. The good news is that it is possible for you. You can even use the out of browser features which is even cooler.
Use Silverlight with the MVVM pattern.

Silverlight and Line of Business Applications

I'm trying to understand the best way to create line of business applications in Silverlight. I hear about entity framework and RIA Services and prism and I am completely confused. If I want to create a line of business application that pushes data to the the client application, which framework should I use?
Well, Prism in the context of Silverlight is definitely not the Mozilla project mentioned in the other answer. Prism is a Silverlight/WPF framework from Microsoft. The "Overview" paragraph on the following page explains it pretty well:
http://www.codeplex.com/CompositeWPF
I would recommend that you look into RIA services and the MVVM pattern to start with. Rather than Prism (which is a large framework that can seem daunting at first), I would recommend that you check out one of the smaller MVVM frameworks. I use MVVMLight from Laurent Bugnion (Sorry, I tried linking to it but stackoverflow won't let me. Just google it.) and that work fine for my requirements. Once you are comfortable with that you can decide whether you need the power of Prism or not.
/Henrik
You will likely want to use Silverlight + RIA Services. This is really designed exactly for that scenario.
I recommend reading Brad Abram's blog for info, in particular, What is .NET RIA Services?
He also wrote a very long, detailed series about RIA Services.
RIA Services gets data from the LOB application to your Silverlight client (and vice versa).
Entity Framework is the way to get data from your database to your LOB application (and vice versa).
Prism is a project Mozilla has developed that makes a web application look like a desktop application: http://www.riapedia.com/2007/10/26/prism_gives_web_apps_desktop_space
You can user WCF Ria services (very nice and usable data access) and silverlight. Prism is a very nice pattern for architecting modular applications, but I think that it would be an overhead if you want a simple application. MVVM is what you are looking for. MVVM is the design pattern depicting the presentation interacting with the model, but still you could avoid this also, if you want something pretty simple and quick. The learning curve from my pov includes (in order): Silverlight, WCF Ria Services, MVVM, Prism.

Silverlight - Good for Internet Business Application?

I've heard the comment several times, once in one of Shawn Wildermuth's podcasts, that Silverlight is great, but might not be so good for 'entire' internet applications. This comment never get's amplified, but the implication seems to be that you would use Silverlight in conjunction with standard aspx web pages.
So far, the only downside I can see to an all Silverlight application is that the XAP file could get very large, meaning that when a web app is opened, there would be a very noticeable delay.
Most of the apps I do in .NET would be considered small. They are business / CRUD apps of maybe 25 aspx screens along with the supporting cast.
Does anyone have an expanation of the downside of a mostly Silverlight app?
Thanks
Mike Thomas
I'm aware of Shawn's comment, but I think it's a bit dated. If I remember correctly that comment was made before Silverlight could easily handle browser navigation, deep linking and SEO. Those issues are addressed now (largely thanks to RIA services) and Silverlight is a first class web citizen imo. I've done 2 Silverlight only business apps (i.e. the Silverlight content is full screened; there are no ASPX parts to the apps) and have been quite successful with them. A big plus about creating a Silverlight only site is that it's very easy to debug homogeneous content. Take a look at .NET RIA Services if you're seeing holes that need to be plugged when creating a SL business app.
EDIT: RIA Services is Silverlight framework that facilitates development of data oriented Silverlight applications - it's currently in a preview (i.e. not finished) release state but my experience has been that it's stable. WCF is a communications framework used by Silverlight to enable client to server connectivity; it's very similar to traditional web services. RIA Services uses WCF to perform client/server communication. Check out Brad Abram's post "What is RIA Services" for a quick overview here http://blogs.msdn.com/brada/archive/2009/03/19/what-is-net-ria-services.aspx then read his full 25 post series for all the details on RIA Services here http://blogs.msdn.com/brada/archive/2009/08/02/business-apps-example-for-silverlight-3-rtm-and-net-ria-services-july-update-summary.aspx
If you want to see a complete Silverlight application in action, check out http://www.mediacourtyard.com. They have implemented a complete CMS front-end in Silverlight. Check out the demo, it appears to be fairly stable and functional.
(I have nothing to do with them btw. I trawl the web for Silverlight apps a lot and that CMS is the coolest "full" app I've found so far.)

Silverlight databinding

I have to bind sql table to one of the grid in my silverlight page.
I have seen all the examples in web using wcf services or web services for databinding.
Can i use datalayer dll (regular way of datalayer classes) to bind data to silverlight pages.
Anyone please suggest a good article on this.I am used to the regular way of devolopment like datalayer as dll.
Is this possible in silverlight?If this is possible why system.data dll's are missing from the project.?
Thanks
SNA
System.Data.dlls are missing from Silverlight because Silverlight is a subset of .Net designed to run in a browser - and browsers don't usually have databases available! For this reason you usually have to create custom objects and return these through a WCF service.
Scott Guthrie's tutorial might be helpful as a guide to building Data Driven silverlight applciations.
Looking a few months into the future, you'll soon be able to use .Net RIA Services (Rich Internet Applications) for this kind of thing. Here's a link to the preview

Resources