惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

P
Palo Alto Networks Blog
T
The Blog of Author Tim Ferriss
Engineering at Meta
Engineering at Meta
博客园_首页
博客园 - 三生石上(FineUI控件)
G
Google Developers Blog
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
博客园 - 【当耐特】
Microsoft Security Blog
Microsoft Security Blog
P
Privacy & Cybersecurity Law Blog
Recent Commits to openclaw:main
Recent Commits to openclaw:main
S
Secure Thoughts
爱范儿
爱范儿
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Exploit-DB.com RSS Feed
Exploit-DB.com RSS Feed
H
Help Net Security
The Cloudflare Blog
Recorded Future
Recorded Future
Attack and Defense Labs
Attack and Defense Labs
J
Java Code Geeks
O
OpenAI News
T
Tor Project blog
B
Blog RSS Feed
D
Darknet – Hacking Tools, Hacker News & Cyber Security
PCI Perspectives
PCI Perspectives
V
Visual Studio Blog
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
A
About on SuperTechFans
www.infosecurity-magazine.com
www.infosecurity-magazine.com
W
WeLiveSecurity
Cyberwarzone
Cyberwarzone
云风的 BLOG
云风的 BLOG
Security Latest
Security Latest
S
Schneier on Security
Know Your Adversary
Know Your Adversary
cs.CL updates on arXiv.org
cs.CL updates on arXiv.org
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com
V
Vulnerabilities – Threatpost
D
DataBreaches.Net
宝玉的分享
宝玉的分享
T
Troy Hunt's Blog
V
V2EX
Cisco Talos Blog
Cisco Talos Blog
酷 壳 – CoolShell
酷 壳 – CoolShell
美团技术团队
Application and Cybersecurity Blog
Application and Cybersecurity Blog
Latest news
Latest news
量子位
Microsoft Azure Blog
Microsoft Azure Blog

博客园 - chelsea

Performance Tuning Technique: Ultra-Fast ASP.Net 书摘 ASP.Net 备忘 On Extension Method: 扩展方法该如何使用 REST on ASP.Net MVC (and Future) IoC 问题域 Log 问题域 Validation 问题域 代码的物理组织 C#代码组织: project over folder C#泛型: 消除Visitor模式的循环依赖, 以及无聊的Accept方法 ORM问题域 Web开发问题域 向 Spring.Net 提交的建议被采纳并实现了 开源.Net中文分词组件 [导入]C# 备忘录 The C# Programming Language Notes II [导入]C++/CLI:被忽视的集成技术 持续集成 .Net手册 The Programming Language Idioms
DNN4 (DotNetNuke) 备忘录
chelsea · 2005-12-24 · via 博客园 - chelsea

Posted on 2005-12-24 23:57  chelsea  阅读(1206)  评论()    收藏  举报

 

环境:Visual Web Developer 2005 Express,DNN4 Starter Kit,C#

1,安装DNN

  • 改一下SQL Server连接信息和赋予文件系统目录和IIS虚拟目录相应权限即可顺利安装

2,下载安装第三方Module(.zip)

  • 使用Host->Module Definitions->Uplode New Module安装,或者
  • 拷贝到/Install目录下使用url “Install/Install.aspx?mode=InstallResources”安装(or through the Install Resources Scheduled Event.)

3,创建安装自定义Module

  • 使用Starter Kit创建并修改
  • 使用Host->Module Definitions->Add New Definitions安装
  • 或者使用xxx.sqldataprovider 脚本来将Module注册到DNN数据库中
  • 引用:

为了在DotNetNuke框架中注册模块,需要增加一些记录到数据库。可以通过Host下的模块定义来增加。为了开发方便,也可以使用Item Template来创建模块SQL脚本。这个脚本在DesktopModules目录下,和Add New Item输入的模块名一致 ( 例如这里名叫Widget.SqlDataProvider ).  

DotNetNuke

SQL脚本使用特殊的语法,以保证正确性。最简单的方法就是在DotNetNuke应用程序中执行这些脚本。在Visual Web Developer, Ctrl-F5,来启动应用程序,通过Host登陆(默认密码为"host")选择Host下的SQL项。
 
粘贴模块的SQL脚本,选中 Run As Script option,Execute.

模块内容已经存放到数据库里了,通过DotNetNuke模块模板创建的 01.00.00.SqlDataProvider SQL脚本,将用来在数据库里创建需要的表和存储过程。这些脚本放在  DesktopModules里,从 01.00.00.SqlDataProvider SQL 脚本文件里,拷贝并粘贴SQL脚本,选中 Run As Script option,Execute.

--from www.dnnchina.net

4,How to export/import module?   

  • DotNetNuke.Entities.Modules.IPortable?
  • Private Assembly Package, zip file(dll, ascx, dnn, db script, ...)

5, How to add/retrieve custom settings for module?

  • modify Settings.ascx to add new control
  • using DNN Framework setting service: ModuleSettings table: moduleId, key, value;

6, How to use custom database table for module?

  • in .SqlDataProvider script, add your table and stored procedure, then execute it.
  • in your xxxInfo class, add responding property.
  • in your SqlDataProvider class, add responding parameter.
  • Reference:
Each field in the data store should map to a corresponding property in the Info class. To allow the generic CBO helper class to automate the transfer of data from IDataReader to Custom Business Object, the directly related class properties and database fields MUST be identical in terms of Name and DataType.

As an example which demonstrates the steps involved in extending the core, we will assume we are adding a new Field to a core Table.

If necessary, change the Presentation Layer to display/edit the new field

Modify the associated Business Logic Layer ( BLL ) class to add the Field to the necessary methods ( typically AddTable, UpdateTable )

Update the DataProvider base class with the necessary changes from Step #2 and recompile the application.

Update each DataProvider subclass implementation ( ie. SqlDataProvider, AccessDataProvider ) with the necessary changes. Recompiling the applicatioin will reveal any discrepancies between the base class and implementation. The number of implementations which need to be modified is dependent on the number of different databases your application supports.

Update each DataProvider subclass implementation script with the specific database alteration commands ( ie. ALTER TABLE ). In the case of database providers which use stored procedures, the new versions of the stored procedures must be scripted as well (with associated DROP and CREATE commands ).

--from www.dotnetnuke.com

7, Structure for a module created by Starter Kit

  • BLL: app_code/modulename
  • DAL: app_code/modulename
  • View: desktopmodules/modulename
  • Admin(Edit&Setting): desktopmodules/modulename
  • "模板将创建一个自定义模块所需要的文件,包括SQL脚本文件,数据访问层,业务对象,用户接口和部署清单。也包括了在开发环境里的模块说明。"
     

8, Custom Experience

  • GetProfile/SetProfile to support custom experience.

Thinking in DNN

1, Platform

  • A couple of basic infrastructures, an extension mechanism, and an administrator tool.

2, Extra Middle Layer

  • Data Access Layer (DAL) be independent with Business Logical Layer (BLL), it use DataReader to pass data to up layer.
  • Business Logical Layer (BLL) be independent with Data Access Layer (DAL), it use Custom Business Object (CBO) to pass data to under layer.
  • Then how to match DataReader with CBO each other ? It be called Mapper Layer, or Mapper Pattern (POSA).
  • You will notice that the Controller methods which send information to the database ( ie. Add and Update ) pass a Custom Business Object instance as a parameter. The benefit of this approach is that the object definition is isolated to the BLL which reduces the modifications required to the application when the class definition changes. The individual object properties are then extracted and passed as Scalar values to the Data Access Layer ( this is because the DAL is not aware of the BLL object structures ).

Questions for DNN

  • 是否每个Module都最多只能有一个View,Edit,Setting控件文件(.ascx)?
  • how to seperate module project from DNN  using VWD Express?
  • Where could I get .Net Framework 2.0 Full Feature Description?
  • Where could I get C# 2.0 Full Feature?.

Memorandum