首页 \ 问答 \ 什么是使用WPF,WCF,PRISM的更好方法(What is the better way to use WPF,WCF,PRISM)

什么是使用WPF,WCF,PRISM的更好方法(What is the better way to use WPF,WCF,PRISM)

我正在开发一个EMR应用程序作为我的项目。 我使用WCF从集中式服务器传输所有数据,WPF用于UI,PRISM用于构建模块。

我在WPF / PRISM应用程序的解决方案中有3个项目

  1. shell和bootsrapper所在的Main项目(mainApplication)。
  2. 用于保存所有模块的类库(modulesLib)
  3. 与wcf服务通信的类库(基础结构)(在visual studio 2008中使用scvutil.exe添加的服务引用)

项目参考添加如下

  • mainApplication引用了'modulesLib'和'infrastructure'
  • modulesLib对“基础设施”有所依据

我目前的程序如下

  1. 使用Windows服务公开了6个wcf服务(6个主机)
  2. wcf服务实现(查询,字段,表)中的硬编码数据库详细信息
  3. 使用viewmodels / presenters直接调用WCF服务(通过基础结构库)。
  4. 创建的类称为抽象ViewModelBase(实现INotifyPropertyChanged,也有IUnityContainer,IRegionManager,IEventAggregator引用),抽象ModuleBase(实现IModule),每当我添加一个viewmodel或模块​​时,我都会使用这两个类继承
  5. 我将所有数据绑定属性放入viewmodel并使用viewmodel的构造函数来实例化给定视图,设置其数据上下文并将其添加到shell中的某个区域
  6. 项目清单

每当我想在模块之间进行通信时,我都使用CompositePresentationEvents

我想知道什么

  1. 我是否做过这样的事情,对你们来说似乎没问题。
  2. 仍然存在大量错误,崩溃等等。我可以有一个地方来处理这些异常,因此应用程序不会中断(日志记录或类似的东西)
  3. 使用WPF,WCF,MSSQL和PRISM处理项目的方法是什么?

谢谢,Nadun


I'm developing an EMR Application as my project. there Im using WCF to transfer all the data from the centralized server , WPF for the UI and PRISM to build modules.

I have 3 projects in my solution for WPF/PRISM application

  1. The Main project(mainApplication) where the shell and bootsrapper are.
  2. Class library(modulesLib) to hold all the modules
  3. Class library(infrastructure) to communicate with wcf service ( service reference added with scvutil.exe in visual studio 2008)

project references are added as below

  • mainApplication have references of 'modulesLib' and 'infrastructure'
  • modulesLib have refence to 'infrastructure'

my current procedure is below

  1. There are 6 wcf services (6 hosts) exposed using a windows service
  2. hard coded database details inside wcf service implementations (queries, fields, tables)
  3. calling the WCF services directly withing viewmodels/ presenters for modules (through infrastructure library).
  4. Created classes called abstract ViewModelBase (which implements INotifyPropertyChanged , also having IUnityContainer,IRegionManager,IEventAggregator references) , abstract ModuleBase (which implements IModule) and I use these 2 classes to inherit from whenever I add a viewmodel or a module
  5. I put all the databinding properties in to viewmodel and use the viewmodel's constructor to instantiate a given view, set its data context and add it to a region in the shell
  6. List item

whenever I want to communicate between modules, I use CompositePresentationEvents

what I would like to know

  1. whether the way i have done things, is it seems OK for you guys .
  2. Still there are loads of errors, crashing bugs etc.. can I have a single place to handle these exceptions so the application wont break (logging or something like that)
  3. what would be your way to working on a project using WPF,WCF,MSSQL and PRISM

thank you, Nadun


原文:https://stackoverflow.com/questions/3502470
更新时间:2022-04-27 16:04

最满意答案

您可以使用onShowHideCol回调或"jqGridShowHideCol"事件 showColhideCol 之后 showCol某些操作。 例如,您可以使用

var resizeGrid = function () {
        grid.jqGrid("setGridWidth", grid.closest(".ui-jqgrid").parent().width());
    };

// resize the grid on showing/hiding columns
grid.bind("jqGridShowHideCol", function () {
    resizeGrid();
});

// resize the grid on resizing the window
$(window).bind("resize", function () {
    resizeGrid();
});

有关在调整窗口大小时调整网格大小的代码示例,请参阅答案示例。 请参阅演示 演示


You can use onShowHideCol callback or "jqGridShowHideCol" event to make some action after showCol or hideCol. For example you can use

var resizeGrid = function () {
        grid.jqGrid("setGridWidth", grid.closest(".ui-jqgrid").parent().width());
    };

// resize the grid on showing/hiding columns
grid.bind("jqGridShowHideCol", function () {
    resizeGrid();
});

// resize the grid on resizing the window
$(window).bind("resize", function () {
    resizeGrid();
});

See the answer and this one for code examples about resizing the grid on resizing the window. See the demo and this one.

相关问答

更多

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。