SmartClient Software factory中的Composite UI Application Block(Cab)技术了解(一):Shell&Layout

Basic Layout 基本布局 UI系列2 Basic Layout 基本布局 本文档主要是对Unity官方手册的个人理解与总结(其实以翻译记录为主:>) 仅作为个人学习使用,不得作为商业用途,欢迎转载,并请注明出处。 文章中涉及到的操作都是基于Unity2018.3版本 参考链接:https://docs.unity3d.com/Manual/UIBasicLayout.html In this section we’ll look... 阅读详情

序

本来以为SmartClient Software factory(以下简称SCSF)已经发布了不短的时间了,在网上应该有不少它的资料,结构找了几天还是失望了,网上的资料很少,而且多数好点的资料只有E文的。那也没所谓了,关键是连E文的资料也是说的比较简单,即使是MSDN也说的不是很好,最后还是只能自己来研究,用了半个月左右的时间,终于对SCSF有一点了解了,这里把一些例子写下来,让自己有个参考,也让其他人可以提出点意见给我,由于水平有限,错误是难免的,希望各位牛人提出意见了,下面是准备了解的技术点,主要是针对准备开发的项目所去做的了解,其他更多的技术点暂时不研究了,这里是后边几篇文章的例子,喜欢可以下载看看(SCSF实例):

 

 

名称

解决问题

1

Shell/Shell Application

主要解决视图表现方式的统一风格问题

2

WorkItem/SmartPart

主要解决业务逻辑的模块化和插件化问题,以及符合MVC/MVP模式开发的要求

3

UIElement/ UIElement adapter

依然为了解决界面表现风格一致和UI扩展问题

4

Command

主要解决在开发中对于对象事件委托的广播问题,能让一个事件在IOC容器中实现给多个对象共享的问题

5

Event Broker

主要解决事件的发布和订阅功能

6

SmartPartInfo

视图的描述信息和SmartPart对应,Smartpart可根据不同的场景使用不同的Smartpartinfo,并且可以定义Smartpart的显示属性

7

Service

这是CAB的基础功能,包括一些基础的服务还有可以进行服务的扩展等,主要解决项目中的队列问题,离线处理问题,异步调用问题,调度问题,权限问题等等,所有这些问题都可以通过自定义来扩展或如果CAB或SCSF本身提供的话则直接使用都可

8

State

相当于SESSION的功能,让一些公用信息能在模块或类之间进行传递,实现项目的状态管理和多入口代码执行需求

这里要说明的是,SCSF的核心其实就是Composite UI Application Block(Cab),这些技术点就是经过SCSF封装过的CAB的技术,这次先写这8个技术点,后边还会有一些其他的技术点(包括自定义WorkSpace等)在后续补上。好了,废话少说,先说说第一个技术点吧:

SHELL描述和实例

       Shell和Shell Application是一个外壳宿主程序,所有的模块的调用和组合都是从这里提供的接口开始的,在这里我们可以定义好整个系统的视图风格或根据不同的需求进行风格上的切换。如图三所示,Shell已经把整个框架和结构都定义好了,而其他的模块只要看具体位置放进去即可。下面我们通过一个实例来了解SHELL的建立方法。

 

图三 Shell的结构关系图

 

1.  利用SCSF建立一个解决方案:

图 2.2.1

 

图 2.2.2

 

命名为SCSample,按确定。

SCSF会自动创建SOURCE部分的项目,同时定义了其中的SHELL,其中ShellForm为表现视图,ShellApplication则为控制类,它继承了已经过SCSF包装后的抽象类SmartClientApplication 。 App.config和ProfileCatalog.xml为两个配置文件,其中我们只要关注后者即可。完成以后我们直接运行就可以看图 2.2.3 :

图 2.2.3

 

当我们需要使用一个自定义视图时,则可以通过创建Layout模块来实现,创建Layout模块:

图 2.2.4

 

图 2.2.5

图 2.2.6

       Shell和Layout这两部分基本不用进行代码编写。但需要在配置文件中进行设置,定义“Layout”部分,其他只需要对视图进行编辑,让后边所有的模块都以这种框架方式显示即可。

 

CAB Composite UI Application Block December Composite UI Application Block December 2005 (C#) 立即下载

相关推荐

Smart Client Software Factory

SCSF 教程 经典版 其中详细阐述了CAB和SCSF的相关概念,是学习SCSF的必读书。

Composite UI Application Block (CAB) 详解

微软开发了一套开源的企业库(Enterprise Library),通过使用这套企业库里面提供的各种应用程序块可以极大的提高应用程序的开发效率和缩短开发周期,也由此得到了大家的广泛应用。 企业库包括大家熟知的如下应用程序块: Caching Application Block. Cryptography Application Block. Data Access Applicatio...

顺其自然~专栏 1483

Programming Microsoft® Composite UI Application Block

Programming Microsoft® Composite UI Application Block and Smart Client Software Factory WinForm的CAB/SCSF框架

Composite UI Application Block(Cab)实例学习资料收集

1.1. Commands1.1.1.    类关系图图 2‑6 主要类关系图说明:1.         Command定义了一个命令,如“FileExit”,它跟一系列的CommandAdapter相关,好比一个命令可以从多个地方下发(菜单或工具栏等等)。2.         Command持有一个ICommandAdapterMapService接口,也正是这个接口,通

牛牛工作室 9634

Android存储方案对比(SharedPreferences 、 MMKV 、 DataStore)

简介:本文介绍了Android开发中常用的键值对存储方案,包括SharedPreferences、MMKV和DataStore,并且对比了它们在性能、并发处理、易用性和稳定性上的特点。通过实际代码示例,帮助开发者根据项目需求选择最适合的存储方案,提升应用性能和用户体验。

LiuYong_01的博客 1809

保姆级教程:在紫光同创Titan2 FPGA上实现PCIe DMA,实测带宽接近理论极限

本文详细介绍了在紫光同创Titan2 FPGA上实现PCIe DMA性能调优的全过程,通过参数优化和架构设计,实测带宽达到6.91GB/s,接近理论极限。涵盖开发环境搭建、PCIe IP核定制、DMA引擎设计、驱动开发及性能调优等关键步骤,为FPGA开发者提供实用指南。

weixin_30954817的博客 343

组合界面程序块介绍(Composite UI Application Block)

 组合界面程序块介绍(Composite UI Application Block) 看来微软要全力推SmartClient了,Application Block推出了一个又一个。我们这个项目既然要用SmartClient,自然会关注这些好东东。目前我们确定要使用的Application Block 包括, Offline 和 CompositeUI 。有的同学就会说,这些个Block

funstar888的专栏 3240

5分钟搞定单细胞marker基因气泡图:scDotPlot保姆级教程(含Seurat适配)

本文提供了一份详细的scDotPlot R包使用教程,帮助用户在5分钟内完成单细胞marker基因气泡图的绘制。教程涵盖环境准备、Seurat和SingleCellExperiment对象的适配处理、进阶可视化技巧及自动化报告生成,特别适合生物信息学新手和临床研究者快速掌握这一高效的可视化工具。

weixin_29047545的博客 266

智能客户端应用学习系列:SmartClient Software factory中的Composite UI Application Block(Cab)技术了解(九):Custom WorkSpace

WorkSpace扩展       自定义WorkSpace分两种方式:一种是Control_Based;一种是WorkSpace_Based。这两种的具体区别就是继承的接口不同,而且开发的方式也不同,前者以用户控件形式开发,后者是以组件方式开发。先看看两种方式的WorkSpace视图:图3.3.11.         Control_Based方式这个例子思路上很简单,就

牛牛工作室 1758

nRF52840开发环境搭建:从零开始配置Keil与SDK

本文详细介绍了nRF52840开发环境搭建的全过程,包括硬件准备、Keil MDK与nRF5 SDK的安装配置、常见问题解决方案及蓝牙功能开发进阶。特别强调了J-Link调试器的使用和SDK版本匹配的重要性,帮助开发者快速上手nRF52840开发。

weixin_29176179的博客 892

脆弱的冗余:链路聚合(LACP)中单条链路故障引发的网络震荡

show etherchannel summary# 查看聚合组中所有端口的标志位,健康状态应为 ‘P’ (Port-channel) 或 ‘SU’(Stand-up)。本次故障的核心教训是:网络系统对“部分故障”的容忍度和自愈能力,远比应对“完全故障”要重要和复杂得多。3.加强监控:部署网管系统,监控聚合端口的包错误计数、LACP状态变化频率,并设置阈值告警。标签: #链路聚合 #LACP故障 #网络冗余 #排障案例 #网络高可用性。修复链路:更换光模块、清洁光纤接口、检查物理线路。

danyth的博客 1990

Composite UI Application Block 之自定义UIElement(二)

目标:让我们建立一个树形结构菜单,具体的说用一个TreeView来显示菜单。先看效果图 1、首先我们需要建立一个自定义的TreeView,实现单击事件。 namespace CustomUIElements...{    public delegate void NodeClickedEvent(object sender, TreeNode nodeClicked);    

烟沉往逝 1240

把数据库算力拉满的 ABAP CDS Table Function:从语法、权限到可运行样例的全景解析

文章摘要: 本文针对ABAP开发者探讨了CDS Table Function的应用场景与实现细节。当CDS View无法处理复杂计算(如窗口函数、递归等)时,可通过Table Function将逻辑下推到HANA数据库执行。关键点包括:1)CDS实体声明与AMDP实现的协作关系;2)多租户环境下的Client处理机制(@ClientHandling.type注解);3)激活与传输的阶段性特点可能导致的"暂不可用"问题;4)基于SFLIGHT的完整示例,展示如何定义Client依赖函数、实

2007 年 ~ 2025 年,深耕 SAP 技术 18 年 312

设计模式:享元模式(Flyweight)

 运用共享技术有效地支持大量细粒度的对象。又名“蝇量模式”。  在Java语言中,String类型就是使用了享元模式。String对象是final类型,对象一旦创建就不可改变。在JAVA中字符串常量都是存在常量池中的,Java会确保一个字符串常量在常量池中只有一个拷贝。譬如: String a = "abc"; String b...

weixin_34345560的博客 383

基于R-CNN深度学习的石头剪刀布手势识别系统:数据集、模型和UI界面的完整实现

本项目的目标是开发一个基于R-CNN深度学习模型的手势识别系统,能够识别石头、剪刀、布三种手势,并通过UI界面让用户能够进行交互。数据集准备与标注:收集包含石头剪刀布手势的图像,并对其进行标注。深度学习模型构建与训练:采用R-CNN模型进行手势的识别和定位。UI界面设计:设计一个简洁的界面,用户可以上传手势图像并进行识别。R-CNN(Region Convolutional Neural Networks)是一个典型的目标检测模型。生成候选区域。

YOLO 880

精雕软件(JDpaint) 5.5 绿色版

精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版精雕软件(JDpaint) 5.5 绿色版

Composite UI Application Block

The Composite UI Application Block is a framework based on .NET 2.0, developed the patterns & practices team to assist anyone building complex UIs using Winforms.The key design pattern: composabil...

weixin_30814223的博客 166

老版QQ原生表情gif动态

这是老版的QQ表情,不过全是动态的的,Windows照片查看器是不会动的,可以右击用浏览器打开查看,再说一遍是老版的,只是分享给宁愿用老版也要动态的人。

Composite UI Application Block开发的介绍

完成本实验之后,您能够:·         了解Composite UI Application Block。·         使用Composite UI Application Block 的Module Loading特性。·         了解推荐

老翁的嵌入式专栏 3676

汉书HE8,好用的汇编代码编写工具

汉书HE8,好用的汇编代码编写工具早期编写汇编代码所用功能强大

深度学习工具包 DeepLearningToolbox

深度学习工具包Deprecation notice.-----This toolbox is outdated and no longer maintained.There are much better tools available for deep learning than this toolbox, e.g. [Theano](http://deeplearning.net/software/theano/), [torch](http://torch.ch/) or [tensorflow](http://www.tensorflow.org/)I would suggest you use one of the tools mentioned above rather than use this toolbox.Best, Rasmus.DeepLearnToolbox================A Matlab toolbox for Deep Learning.Deep Learning is a new subfield of machine learning that focuses on learning deep hierarchical models of data.It is inspired by the human brain's apparent deep (layered, hierarchical) architecture.A good overview of the theory of Deep Learning theory is[Learning Deep Architectures for AI](http://www.iro.umontreal.ca/~bengioy/papers/ftml_book.pdf)For a more informal introduction, see the following videos by Geoffrey Hinton and Andrew Ng.* [The Next Generation of Neural Networks](http://www.youtube.com/watch?v=AyzOUbkUf3M) (Hinton, 2007)* [Recent Developments in Deep Learning](http://www.youtube.com/watch?v=VdIURAu1-aU) (Hinton, 2010)* [Unsupervised Feature Learning and Deep Learning](http://www.youtube.com/watch?v=ZmNOAtZIgIk) (Ng, 2011)If you use this toolbox in your research please cite [Prediction as a candidate for learning deep hierarchical models of data](http://www2.imm.dtu.dk/pubdb/views/publication_details.php?id=6284)```@MASTERSTHESIS\{IMM2012-06284, author = "R. B. Palm", title = "Prediction as a candidate for learning deep hierarchical models of data", year = "2012",}```Contact: rasmusbergpalm at gmail dot comDirectories included in the toolbox-----------------------------------`NN/` - A library for Feedforward Backpropagation Neural Networks`CNN/` - A library for Convolutional Neural Networks`DBN/` - A library for Deep Belief Networks`SAE/` - A library for Stacked Auto-Encoders`CAE/` - A library for Convolutional Auto-Encoders`util/` - Utility functions used by the libraries`data/` - Data used by the examples`tests/` - unit tests to verify toolbox is workingFor references on each library check REFS.mdSetup-----1. Download.2. addpath(genpath('DeepLearnToolbox'));Example: Deep Belief Network---------------------```matlabfunction test_example_DBNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit RBM and visualize its weightsrand('state',0)dbn.sizes = [100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);figure; visualize(dbn.rbm{1}.W'); % Visualize the RBM weights%% ex2 train a 100-100 hidden unit DBN and use its weights to initialize a NNrand('state',0)%train dbndbn.sizes = [100 100];opts.numepochs = 1;opts.batchsize = 100;opts.momentum = 0;opts.alpha = 1;dbn = dbnsetup(dbn, train_x, opts);dbn = dbntrain(dbn, train_x, opts);%unfold dbn to nnnn = dbnunfoldtonn(dbn, 10);nn.activation_function = 'sigm';%train nnopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.10, 'Too big error');```Example: Stacked Auto-Encoders---------------------```matlabfunction test_example_SAEload mnist_uint8;train_x = double(train_x)/255;test_x = double(test_x)/255;train_y = double(train_y);test_y = double(test_y);%% ex1 train a 100 hidden unit SDAE and use it to initialize a FFNN% Setup and train a stacked denoising autoencoder (SDAE)rand('state',0)sae = saesetup([784 100]);sae.ae{1}.activation_function = 'sigm';sae.ae{1}.learningRate = 1;sae.ae{1}.inputZeroMaskedFraction = 0.5;opts.numepochs = 1;opts.batchsize = 100;sae = saetrain(sae, train_x, opts);visualize(sae.ae{1}.W{1}(:,2:end)')% Use the SDAE to initialize a FFNNnn = nnsetup([784 100 10]);nn.activation_function = 'sigm';nn.learningRate = 1;nn.W{1} = sae.ae{1}.W{1};% Train the FFNNopts.numepochs = 1;opts.batchsize = 100;nn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.16, 'Too big error');```Example: Convolutional Neural Nets---------------------```matlabfunction test_example_CNNload mnist_uint8;train_x = double(reshape(train_x',28,28,60000))/255;test_x = double(reshape(test_x',28,28,10000))/255;train_y = double(train_y');test_y = double(test_y');%% ex1 Train a 6c-2s-12c-2s Convolutional neural network %will run 1 epoch in about 200 second and get around 11% error. %With 100 epochs you'll get around 1.2% errorrand('state',0)cnn.layers = { struct('type', 'i') %input layer struct('type', 'c', 'outputmaps', 6, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %sub sampling layer struct('type', 'c', 'outputmaps', 12, 'kernelsize', 5) %convolution layer struct('type', 's', 'scale', 2) %subsampling layer};cnn = cnnsetup(cnn, train_x, train_y);opts.alpha = 1;opts.batchsize = 50;opts.numepochs = 1;cnn = cnntrain(cnn, train_x, train_y, opts);[er, bad] = cnntest(cnn, test_x, test_y);%plot mean squared errorfigure; plot(cnn.rL);assert(er<0.12, 'Too big error');```Example: Neural Networks---------------------```matlabfunction test_example_NNload mnist_uint8;train_x = double(train_x) / 255;test_x = double(test_x) / 255;train_y = double(train_y);test_y = double(test_y);% normalize[train_x, mu, sigma] = zscore(train_x);test_x = normalize(test_x, mu, sigma);%% ex1 vanilla neural netrand('state',0)nn = nnsetup([784 100 10]);opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samples[nn, L] = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.08, 'Too big error');%% ex2 neural net with L2 weight decayrand('state',0)nn = nnsetup([784 100 10]);nn.weightPenaltyL2 = 1e-4; % L2 weight decayopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex3 neural net with dropoutrand('state',0)nn = nnsetup([784 100 10]);nn.dropoutFraction = 0.5; % Dropout fraction opts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex4 neural net with sigmoid activation functionrand('state',0)nn = nnsetup([784 100 10]);nn.activation_function = 'sigm'; % Sigmoid activation functionnn.learningRate = 1; % Sigm require a lower learning rateopts.numepochs = 1; % Number of full sweeps through dataopts.batchsize = 100; % Take a mean gradient step over this many samplesnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex5 plotting functionalityrand('state',0)nn = nnsetup([784 20 10]);opts.numepochs = 5; % Number of full sweeps through datann.output = 'softmax'; % use softmax outputopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, train_x, train_y, opts);[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');%% ex6 neural net with sigmoid activation and plotting of validation and training error% split training data into training and validation datavx = train_x(1:10000,:);tx = train_x(10001:end,:);vy = train_y(1:10000,:);ty = train_y(10001:end,:);rand('state',0)nn = nnsetup([784 20 10]); nn.output = 'softmax'; % use softmax outputopts.numepochs = 5; % Number of full sweeps through dataopts.batchsize = 1000; % Take a mean gradient step over this many samplesopts.plot = 1; % enable plottingnn = nntrain(nn, tx, ty, opts, vx, vy); % nntrain takes validation set as last two arguments (optionally)[er, bad] = nntest(nn, test_x, test_y);assert(er < 0.1, 'Too big error');```[![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/rasmusbergpalm/deeplearntoolbox/trend.png)](https://bitdeli.com/free "Bitdeli Badge")

Composite UI Application Block学习笔记 Event Broker

Composite UI Application Block学习笔记之Event Broker      Composite UI Application Block着重于将应用逻辑和界面分开,让应用系统具备更清晰的结构,更强的扩展性、可移植性。在曹严明先生的讲座中,提及到了关于应用CAB开发的几个指导性原则:将 views (SmartPart)设计为独立于 controllers

zhaojp0411的专栏 855

1,Composite UI Application Block (CAB) 介绍

微软开发了一套开源的企业库(Enterprise Library),通过使用这套企业库里面提供的各种应用程序块可以极大的提高应用程序的开发效率和缩短开发周期,也由此得到了大家的广泛应用。 企业库包括大家熟知的如下应用程序块: Caching Application Block. Cryptography Application Block. Data Access A...

weixin_34319640的博客 187

Composite UI Application Block 之一:概述

   在网上找了很久,希望能找到相关的文章,然后自己可以不用打那么多字,现在没办法了。但是还是坚持一个原则,能引用别人的就不自己写。CAB简单了说就是一套程序集,或者说是一套代码框架。使用了很多设计模式以优化软件开发,主要是实现winForm桌面程序开发的。CAB 的优点:1:允许构建由各个具有协作关系的独立模块组合成的复杂应用。2:分离关注点,能将各个模块的开发的关注点和Shel

xujianrj的专栏 1022

Composite UI Application Block 初试

初试Composite UI Application Block Composite UI Application Block主要用来创建一个聚合的智能客户端解决方案,客户端可以由一组功能块构建而成。 一、用Composite UI 创建应用程序的一般步骤 创建Shell ...

weixin_30788619的博客 196

了解Composite UI Application Block的基本应用

了解Composite UI Application Block的基本应用理解容器、WorkItem、Shell的概念1.1.2                    步骤1、新建Windows应用程序项目 CustomerDemo。引用Microsoft.Practices.CompositeUI.dll、Microsoft.Practices.CompositeUI.WinForms.dll、

funstar888的专栏 4475

the Composite UI Application Block学习笔记

先放一篇引用文章,讲得很详细,推荐先看此篇 http://www.cnblogs.com/mixiaobo/archive/2008/01/15/1040512.html 主要记录下学习心得,刚刚看了一天左右,理解相当肤浅~欢迎拍砖 其思想我用简单的话解释就是:客户端是一个空架子+一堆DLL,每一个DLL代表一个独立的功能模块,通过框架与其它模块交互;这些DLL可以来自本地,直接...

weixin_34128839的博客 160

Composite UI Application Block (CAB) 概念和术语

1、CAB. Composite UI Application Block的缩写2、Module. 应用程序的组成部件,其中包含SmartParts,支持Service,业务逻辑和配置信息等3、ObjectBuilder.通过策略和配置信息自动创建对象实例的对象构造器。4、Shell. 承载了用户接口元素,SmartPart,服务的外壳宿主程序。5、MVP6、WorkItem(1)、W

dawn023的专栏 1616
上一篇: Composite UI Application Block(Cab)实例学习资料收集
下一篇: SmartClient Software factory中的Composite UI Application Block(Cab)技术了解(二):WorkItem&SmartPart
simonllf
博客等级 码龄23年 23粉丝 35原创
评论 3
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符
 
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

个

红包个数最小为10个

元

红包金额最低5元

当前余额3.43元 前往充值 >
需支付:10.00元
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付元
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值