• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

GWA2: GWA2 is General Web Application Architecture. 通用网络应用框架.

原作者: [db:作者] 来自: 网络 收藏 邀请

GWA2

General Web Application Architecture. 通用網絡應用架構.

gwa2

-NatureDNS : -GWA2 , -吉娃兔

  • GWA2 speaks in Java ,

  • GWA2 speaks in PHP ,

  • GWA2 speaks in Perl ,

  • GWA2 speaks in Aspx , and

  • GWA2 speaks in Python Python .

.

GWA2 is cross-scripts programming framework for web applications.

  • From Interface to Interactions

  • From Demand to Design

gwa2-architecture

Three Layers

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....

Three Layers II

Modules ,

Controllers ,

Views

Three Layers III

Objects ,

Handlers ,

Drivers

Three More Instances

-PHP Version

-Java Version

-Aspx Version

-Perl Version

-Python Version


GWA2 Updates

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


An Example Functional Module (User)

User module, 用户模块

0. Create data table, 建用戶表

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));

1. Create module class, 创建对象类

mod/user.class.php

继承 inc/webapp.class.php

实现 inc/webapp.interface.php

2. Create controller, 创建控制器

ctrl/user.php

引入 mod/user.class 并实例化

根据 $act 区分不同的代码模块

act=signin

act=signup

act=update

act=logout

act=my

在控制器中处理逻辑,然后指定要加载的模板,引入 smarty (自2019年起,模板引擎改为 Hanjst/汉吉斯特

3. Create view, 创建视图页面

view/default/signin.html

其中 view 是模块目录, default 是默认风格

view/default/signup.html

view/default/update.html

view/default/logout.html

view/default/my.html

4. Define routing, 在入口定义路由

/index.php?mod=user&act=xxxx

.

Installation for GWA2 in PHP

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.


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
热门推荐
热门话题
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap