I understand my "this" query may sound very generic but any pointers to guide is highly appreciated.
We are building an WPF application based on MVVM design pattern (with DevXpress controls) and want to achieve the following.
There will be one .EXE file which will run the applications.
All my XAML files need to be as DLL [Why? - Reasons specified below].
Call the DLL dynamically and load with in the WPF application.
[Why?? - Reasons]
Our application is a client/server intranet application. We are planning to use ClickOnce deployment to deploy the application. In case there are any changes to the application, my though is we don't have to change the entire application and recompile it and then deploy so the client machines will be updated.
Instead we can change only those screen or XAML file which are needed and update on the server and ClickOnce will automatically handles the updates on the clients. This also, helps us in maintaining our application and less troublesome for the developers and UI designers.
I am welcome to another better approach also.
Related
We are in the middle of developing a new CRM, and it uses both WPF for local users, and a Windows Universal App (Store App) for the users in the field. The basic flow is this
Customer calls in and gets scheduled on a field user in WPF app.
Field user goes on service call and updates on Surface through Universal App.
Customer gets billed from the WPF App.
All the modules are in place and working, but I do not seem to be able to integration test the entire project flow due to the different Project Types.
What I need to be able to do is add a reference to my Universal App in the unit test for my WPF app (or the other way around), so I can test the flow through both components.
I have been searching for a solution over the last few weeks, and have not been able to come up with any way to do this. If this is not directly possible (which I am guessing it is not), is there any way I can setup a test playlist so that the integration tests run in a particular order.
I am looking to avoid hard coding sample data into the db in order to test the Universal app, as this would not show the true flow of data from one app to another and back again. Any help is appreciated.
UPDATE 8-21-2015:
We realize because of the Framework difference the best solution is going to be to run some type of ordered test. We are using MSTest. The problem with this is that Ordered Tests in Visual Studios are not solution wide, they are only allowed in a unit test project, which means it will be using the References from that project, and not allow both tests.
We don't care if we have to switch to a different testing framework, as having the proper tests is more important than using a specific framework.
You should use a Portable Class Library (PCL). You can create a PCL in Visual Studio from the add new project screen.
When creating your PCL it will ask you what type of projects you want to target. Since you stated WPF and Windows Store app you would .Net 4.5(or whatever version you are on) and WIndows 8.1 (or 8.0)
The PCL will allow you to write code in the Run Time with the lowest level of language features for the targeted projects. In your case this would be the Window's Store app.
Now, instead of storing your logic inside your Window's store project, you will need to move your logic into the PCL.
Once you have compiled your PCL, you will need to add references to the Window's Store app so that you can use the logic within you Windows Store App (you will have to add the namespace for the PCL to make this work). You will also add a reference to the PCL in your unit test project. Because you targeted both Run times in your PCL, you will be able to call the code from your integration tests.
Since all your Logic is in the PCL, you should be able to test everything. The only thing in your Window's Store app now should be the view specific data.
If you ever need to change the targets for your PCL (lets say want it to work with Windows Phone), you can edit the properties of the PCL project, and change the targets. Be warned that if you add a target with a more constricted run time than one you currently selected, you will have to refactor your code to use only functions available in the lowest functional run time.
Our client has a Desktop application (VBA and Access) that they are using for the past 10 years and it is buggy and they want to upgrade it. I want to use the latest MS technologies and plan to make this a web application using .NET 4.0, C#, SQL server and MVC running on the Intranet.
Since the application has many visual components (about 10 different tabs on top and each tab has atleast 10 different controls on it), I was wondering what is the best way to implement the UI layer a .NET web application. The 2 candidates are Silverlight and Telerik controls (we have license for this).
Some issues to consider :
Silverlight Plug-in : Since this new application will only be used internally on the intranet, I dont think installing a Silverlight plug-in will be an issue. Also, since its on the intranet, hopefully download speed should not be an issue for SL apps.
Telerik-MVC : It is really rich in functionality, however, I played around with it (.NET version not MVC) using some of the controls and if there is anything out of the recommended way to use a control, its a pain to get it working.
Skill-set : Do I want to learn how to use a tool (Telerik) or would I be better off learing a technology (Silverlight) in terms of future projects.
I would like to hear any feedback/ issues to help me decide which way to go.
If you are replacing a desktop application then going with Silverlight may be the best approach.
With Silverlight you are writing an application that happens to be delivered across the internet (well intranet in this case). This can be as stateful as you need to be. You have good access (no pun intended) to the database via the WCF RIA Services.
There's also the Prism MVVM model you can develop on top of.
However, I'd double check with the client as to what they are expecting.
Telerik also do a set of Silverlight controls.
If the project time permits, go for Silverlight. Also, if needed, it's possible to create a desktop version (WPF) out of the Silverlight project.
Issues with Telerik control set(or any control set), if you need a control that doesn't exist in the current set, you'll have to either buy from Telerik, or create your own. In the latter case, the whole UI aesthetics might break because it's not easy to create a control matches the tool set.
I am in the process of recommending an UI automation tool for a windows based WPF application in a company
Which targets wide range of customers . The Application lives on a layer of WCF services for getting
The data. The company is already having a small VBScript framework written specifically for Test Complete
and is really not robust, Hence I am lookout for a right tool, where we could reuse the scripts or
Improve the already existing tool. Any ideas are welcome.
I have looked at Microsoft UI Automation, Project White, UIA Verify and Ranorex. Each one of them
Is having a feature lack.
I was able to go through the process of Microsoft UI Automation. I am still in the process of understanding how it works
with WPF, since it is totally dependent on Automation IDS.
Our application is huge and is not written with this in mind. All the code either does not implement
Automation ID property or Name property which is very much essential for object identification in the visual tree
in tools like UISpy and VisualUIAVerify.
What I am looking in specific are the following. Please give ratings to each of these
1) Recording : Recording , play back and automatic execution of test scripts and generate a report.
2) Dependencies : Minimal Dependencies(.NET frameworks, API modules , SDK Versions etc..)
3) )Code Generation : Code Generation of test scripts from Templates, Macros and Recording.
4)Object Name Mapping: Avoid explicit usage of Automation IDS and screen corrdinates, if they use, does it support any tools which would take XAML Files and insert Automation IDS into it and also avoid Problems With duplicate Automation IDS.
5) Events: Any Events and call backs that the user(tester) may receive if the GUI has undergone any changes
and how the scripts would change in this Case.
6) Support : Support for different scripting languages and easy Code conversions(C#, VBScript, Python.. etc)
7) Fast and Reliable: Easy and fast accessibility of GUI elements for manipulation( Like support to xml dom, Json.. etc), navigation, code duplication replacement tasks for changes in UI and easy configuration(xml, ini files)
8)Code Converters: the tester writes code in vbscript and developer could simply convert it into c# for embedding them into any stand alone framework if need be).
9)Custom controls: Support for custom controls and object mapping. If you have a custom object that behaves like one of standard controls. are you able to map (tell the test tool that the custom control behaves like the standard) control? Does it support all the standard controls methods? Can you add the custom control to it’s own class of control?
10)Reports: Should be able to execute multiple tests at once and generate a report similar to VisualUIAVerify.
Visual Studio 2010 Coded UI Tests
You can use Visual Studio 2010 Ultimate or Visual Studio 2010 Premium to create automated tests of the user interface known as coded UI tests. These tests provide functional testing of the user interface and validation of user interface controls.
I am using Coded UI Tests to automate tests of a WPF application built on the MVVM pattern. The record/playback features of the tool are impressive, generating really nice models. For large suites, the advice is to tear apart the generated code, structuring and extending it for your own purposes.
I recommend Visual UIA Verify to assist viewing the automation structure of your application while developing and debugging.
Have you tried AutomatedQA testcomplete
http://www.automatedqa.com/products/testcomplete/
We are planning to build a new integration component that can provide us access to user's machine installed apps from our web site.
The first word that came to me was ActiveX, but our expertise with the technology was not the best in the past.
Thinkink a lit bit more, the work Silverlight also came to my head, but the full trust thing was one of the few things I remembered reading about the technology..
The question is: is there a way that Silverlight (2, 3, 4, whatever) can run as a full trusted application from within the browser?
Links are appreciated.
Filipe
Unfortunately, no. Full trust is a feature of Silverlight 4, currently in beta, and is restricted to out-of-browser applications.
Additionally, full trust SL4 applications do not have unrestricted access to the system (particularly file system), though this may change before before release (if I have anything to do with it).
Edit: If you are considering ActiveX (which is Windows/IE only), you might want to have a look at WPF, since it can run full trust from the browser (if it's in a trusted zone).
No, like Richard said, this is not at all possible inside the browser, even in SL4. There is a sandbox, and you live in it. You can talk to web services, other Silverlight applications or the browser.
By talking to the browser, I mean you can talk to the DOM and the Javascript engine. We needed to launch a Windows application and communicate to it via Silverlight. We accomplished this by putting a small ActiveX control in the web page. It is responsible for launching the WinForms application and handling inter-process communication to it.
This method has many drawbacks: It can only work in IE, and it only works in Windows. You might also run into permissions issues. The ActiveX component needs to be installed along with the desktop application, or as an additional download. The deployment story there is pretty awful, if you ask me.
In our case, the analysts were willing to deal with the restrictions for the re-usability of an existing application, and we consider it to be an optional feature.
Does it have to be a web application? sounds like you want a desktop app. It can be easiliy distributed with one Click deployment. Will work on windows only but since you were considering ActiveX sounds like that's what you need.
Well - if you're hosting the silverlight control from an ASP.NET application - Believe you have access to
Request.ServerVariables["AUTH_USER"];
...and you can pass that on to your control as a parameter.
D
This may seem like a high-level question. But that is because I'm unfamiliar with cutting edge ASP.net and even less with this behemoth called Sharepoint. So please bear with me..
First off is it possible to take functional custom WPF controls which contain certain unmanaged subcomponents that do DirectX rendering (for performance reasons) and drop it into ASP.Net? as an example consider a specialized chart control
Does Sharepoint add anything that makes this possible ?
The use-case is to take certain panes or areas from a thick WPF client and slot it into an existing Sharepoint based solution.
Is this possible or are they (WPF Controls and Web Controls) as different as chalk and cheese? (Assume that the current control interface can be freely changed.) Would it wise to develop web-aware stripped down version of these controls than to attempt to hammer the current controls in somehow...
On a fundamental level, can a web-page contain a control which takes over the rendering for its client-area/rectange ? Or does everything have to broken down into plain html by the time it hits the browser.
I found a few unanswered queries online. But other than that its unexplored (or forbidden).. in either case I'd like to know. Thanks for reading..
The short answer is: Yes it's possible but you probably don't want to do it.
Asp.Net, with the exception of java script, is primarily a server side technology. Meaning that the majority of the processing code runs on the server vs. the client. IIRC share point is built on top of Asp.Net and thus has the same format.
WPF is a client side technology. The code runs on the actual physical client computer.
Combining these two technologies into one application does not work due to their conflicting natures. However, there are several options for you.
Silverlight: It's easiest to think of this as flash for .Net. It allows for rich WPF applications to be run via a web browser on client machines. It's a subset of the full .Net framework but rich enough to build great applications.Silverlight is limited in that it must be a 100% managed solution. You're post mentions using a DirectX control which I presume is native code. If this is the case Silverlight will not work for you
ActiveX controls: These allow for essentially any form of client code to be hosted in a web browser and run on the client machine. This includes .Net, WPF, C++, etc ... If you have a native component this is really your only option.Unfortunately though, ActiveX controls are following out of favor. Primarily due to their insecure nature. Once you run an ActiveX control on your machine you're at the mercy of the control author and it's easy to do malicious acts.More data on ActiveX controls: http://en.wikipedia.org/wiki/ActiveX