delphi xe---intraweb基本介绍
版本10 seattle
新建intraWeb
new->other->Delphi Projecs->IntraWeb->IntraWeb Application wizard
建立测试工程时, 一般要使用 StandAlone Application, 这方便调试; 具体发布时只需稍稍修改.

自动生成,以下几个文件

Project1
program Project1;
uses
Vcl.Forms, ---这里本来是生成是Forms, //报错,看了万一的博客说了这句“ 还是以前的那个 Forms, 现在叫 Vcl.Forms 了 ”,改了不报错
IWStart,
UTF8ContentParser,
Unit1 in 'Unit1.pas' {IWForm1: TIWAppForm},
ServerController in 'ServerController.pas' {IWServerController: TIWServerControllerBase}, //这才是 IntraWeb 工程的核心单元, 每个工程都会在该单元自动建立一个(只有一个) Server Controller 对象, 这个对象统管所有(包括 Session)
UserSessionUnit in 'UserSessionUnit.pas' {IWUserSession: TIWUserSessionBase}; //该单元主要维护一个 Session 数据对象, 并提供给 ServerController 使用
{$R *.res}
begin
TIWStart.Execute(True);
end.
//这里的代码是自动维护的; 只有在修改发布模式时, 才会来这里做简单的修改(譬如把 program Project1 改为 library Project1
UserSessionUnit;
unit UserSessionUnit;
{
This is a DataModule where you can add components or declare fields that are specific to
ONE user. Instead of creating global variables, it is better to use this datamodule. You can then
access the it using UserSession.
}
{注释}
//该单元目前只有一个空的 TIWUserSession, 但也已被 ServerController 单元 uses 并使用
//不同的网站程序对用户信息的需求可能不一样(譬如: 登陆信息、购物车信息等等), 我们可以在这里定义需要的数据格式; 因为灵活性很大, 所以关于 Session 的方便操作也是 IW 在宣传时首先要吹嘘的
//在它的窗体上可以放置非可视控件
//TIWUserSessionBase 的父类是我们熟悉的 TDataModule, 所以我说这是 Session 相关的数据模块.
interface
uses
IWUserSessionBase, SysUtils, Classes;
type
TIWUserSession = class(TIWUserSessionBase)
private
{ Private declarations }
public
{ Public declarations }
end;
implementation
{$R *.dfm}
end.
ServerController;
unit ServerController;
interface
uses
SysUtils, Classes, IWServerControllerBase, IWBaseForm, HTTPApp,
// For OnNewSession Event
UserSessionUnit, IWApplication, IWAppForm;
type
TIWServerController = class(TIWServerControllerBase)
procedure IWServerControllerBaseNewSession(ASession: TIWApplication);
private
public
end;
function UserSession: TIWUserSession;
function IWServerController: TIWServerController;
implementation
{$R *.dfm}
uses
IWInit, IWGlobal;
function IWServerController: TIWServerController;
begin
Result := TIWServerController(GServerController);
end;
function UserSession: TIWUserSession;
begin
Result := TIWUserSession(WebApplication.Data);
end;
procedure TIWServerController.IWServerControllerBaseNewSession(
ASession: TIWApplication);
begin
ASession.Data := TIWUserSession.Create(nil);
end;
initialization
TIWServerController.SetServerControllerClass;
end.
delphi xe---intraweb基本介绍的更多相关文章
- Delphi XE中使用dbExpress连接MySQL数据库疑难问题解决(对三层的例子配置有帮助)
Delphi IDE中包含一个Data Explorer的组件,如下图所示: 该组件基于dbExpress(包含TSQLConnection.TSQLDataSet.TSQLQuery.TSQLSto ...
- Delphi XE中使用dbExpress连接MySQL数据库疑难问题解决
Delphi IDE中包含一个Data Explorer的组件,如下图所示: 该组件基于dbExpress(包含TSQLConnection.TSQLDataSet.TSQLQuery.TSQLSto ...
- delphi 2010与delphi XE破解版的冲突
在系统中同时安装了Dephi 2010LITE版与Delphi XE lite后,总是会有一个有问题 是因为两者都是读取C:\ProgramData\Embarcadero目录下的license文件, ...
- [转载]: delphi中XLSReadWrite控件的使用(2)---delphi XE下安装
一.下载 官方下载网址: http://www.axolot.com/components/download.htm 从这里可以下载到从Delphi5到DelphiXE全部支持的版本. 二.软件安装 ...
- delphi XE Berlin ReadProcessMemory WriteProcessMemory
delphi XE,Berlin [dcc32 Error] Unit9.pas(93): E2033 Types of actual and formal var parameters must ...
- FastReport for delphi xe 安装步骤
FastReport for delphi xe 安装步骤 1.先关闭DELPHI:2.下载后解压到一个目录,比如:D:FR:3.打开D:FR,运行recompile.exe ->点击" ...
- Delphi XE的firemonkey获取当前文件所在路径的方法
Delphi XE的firemonkey获取当前文件所在路径的方法 在之前,我们知道有三种方法: ExtractFilePath(ParamStr(0)) ExtractFilePath(Applic ...
- Delphi xe 下快捷使用 FastMM 的内存泄露检测功能
Delphi xe 集成了FastMM,调试程序是的时候可以方便地检查内存泄露了. 使用方法:在project中,添加一行: ReportMemoryLeaksOnShutdown := Debug ...
- Delphi XE中类成员的访问权限(新增了strict private和strict protected,还有automated)
Delphi XE中类成员的访问权限共提供了6个关键词来用于限定访问权限:public.private.protected.published.automated strict private . s ...
- [转]:Delphi XE中泛型数组的使用范例
Delphi XE中泛型数组的使用范例,下面的范例简单的使用了泛型字符串数组,如用 TArray 代替 array of Word, 还可以使用 TArray 类提供的算法(就是少了点). uses ...
随机推荐
- SQL数据库相关
数据库相关知识点 SQL, 对表的理解, 对表的主键, 外键的理解, 视图, 为什么要有视图, 视图有什么功能, 视图与表有什么区别 主键是唯一标识的一条记录,不能重复,不能为空. 表的外键是另一个表 ...
- js的常见函数
var n=0.0145; n.toFixed(2);//保留两位小数 n.lastIndexOf('a');//检索字符串最后出现的位置 n.indexof("h");//检索字 ...
- MYSQL手工注入某日本网站
作者:ice 团队:www.anying.org 转载必须注明. E-mail:1c30day@gmail.com 经过一天的辛苦劳动下班了,实在无聊,QQ上的基友基本都挂机睡觉了.找点乐子打发时 ...
- linux下查看cc攻击
什么是CC攻击?CC攻击就是利用大量代理服务器对目标计算机发起大量连接,导致目标服务器资源枯竭造成拒绝服务.那么如何判断查询CC攻击呢?本文主要介绍了一些Linux下判断CC攻击的命令. 查看所有80 ...
- PHP:计算文件或数组中单词出现频率
一:如果是小文件,可以一次性读入到数组中,使用方便的数组计数函数进行词频统计(假设文件中内容都是空格隔开的单词): <?php $str = file_get_contents("/p ...
- 学习笔记:iOS 视图控制器(UIViewController)剖析
转自:http://www.cnblogs.com/martin1009/archive/2012/06/01/2531136.html 视图控制器在iOS编程中占据非常重要的位置,因此我们一定要掌握 ...
- 动态添加定时任务-quartz定时器
Quartz动态添加.修改和删除定时任务 在项目中有一个需求,需要灵活配置调度任务时间,刚开始用的Java自带的java.util.Timer类,通过调度一个java.util.TimerTask任务 ...
- 关于linux PPA源问题
添加PPA: 1.首先进入ubuntu系统,system—>administration—>update manager—>setting,在软件源界面,点击other softwa ...
- [转]c++ virtual public的含义和作用
我在写基于MICO的CORBA程序的时候遇到的,上网查了一下 转自:http://bbs.seu.edu.cn/pc/pccon.php?id=872&nid=16822 Question:父 ...
- NetBeans 设置code completion/auto pop-up delay
如果你在Tools>Options>Editor>Code Completion>Language: Java 没有找到设置delay的选项.那就去C盘(如果你用的是Windo ...