General Web Application Architecture. 通用網絡應用架構.
-NatureDNS : -GWA2 , -吉娃兔
.
-
From Interface to Interactions
-
From Demand to Design
Core Services, which also being called compenents, consists of databases, sessions, quenes, caches, file-systems....;
Objects, business-oriented objects, which stand for what to do, i.e., users, products, transactions, locations, articles....;
Interactions, beared with objects, which define how to do, i.e., request, responses, UI, UE, HCI....
Modules ,
Controllers ,
Views
Objects ,
Handlers ,
Drivers
-PHP Version
-Java Version
-Aspx Version
-Perl Version
-Python Version
GWA2写日志的两种方法setBy和debug
-GWA2 Java版本的i18n/中文编码/乱码问题
-GWA2新增命令行运行及NO_SQL_CHECK支持
gwa2更新多数据库驱动支持
-gwa2 vs -thinkphp
-GWA2更新:扩展增加read/writeObject to setBy/getBy
-gMIS/-GWA2更新:自动安装程序和MySQLi
-GWA2 core updates: 容错处理,孤儿占位符
-gwa2 安全更新及域名绑定到模块
-gwa2安全更新
-gMIS更新兼容Strict SQL Mode
create table gmis_usertbl(
id int(11) not null auto_increment,
iname char(32) not null default '',
email char(32) not null default '',
password char(64) not null default '',
ibirthday date not null default '0000-00-00',
igroup tinyint(1) not null default 0,
istate tinyint(1) not null default 1,
inserttime datetime not null default '0000-00-00 00:00:00',
updatetime datetime not null default '0000-00-00 00:00:00',
primary key k1(id),
unique index k2(email)
);
mod/user.class.php
继承 inc/webapp.class.php
实现 inc/webapp.interface.php
ctrl/user.php
引入 mod/user.class 并实例化
根据 $act 区分不同的代码模块
act=signin
act=signup
act=update
act=logout
act=my
在控制器中处理逻辑,然后指定要加载的模板,引入 smarty (自2019年起,模板引擎改为 Hanjst/汉吉斯特)
view/default/signin.html
其中 view 是模块目录, default 是默认风格
view/default/signup.html
view/default/update.html
view/default/logout.html
view/default/my.html
/index.php?mod=user&act=xxxx
.
Please put all files under a sub directory and init from the script ./install.php .
For GWA2 in Java and other languages versions, manual work is still in need.