Archive for八月, 2005

浑身乏力,真想睡上个三四天

可能是宁波这边的天气问题, 感觉很闷,在家里一直没啥问题的,一回来就感觉有气无力了..

Comments (1)

测试html标记功能

我想我是海…
冬天的大海..

Comments (2)

ks回来了,又要走了…

ks 旅游回来了,中午请我们吃了一顿好的 , 明天他们一行人又要到内蒙古瞎折腾,祝他们好运.

本来打算6号回去的,后来我爸打电话过来说,6号温州有台风,呵呵,可以在学校里多呆几天了.

昨天是看plog的文档,今天就是实战了.

plog 的DAO 类用起来很方便,加文章,加用户,加Blog,加评论等,都用类封装好了,更难得的是,各种类都有统一的接口,不必看API Manual或源代码都可以猜出要用到的成员函数是什么. 实在过瘾. 哈哈. 这些代码绝对可以拿来当面象对象设计与设计模式课程的样例.

ISO-8859-1 就是拉丁字符集1, 西方的字母大部分包括进去了. 这么变态的名字.

其实 GB2312 也挺变态的

评论

看了一下午的plog文档

今天早上6:30 就醒了,因为肉松要回去,我怕他起得太早,忘了把寝室钥匙留给我,潜意识就早早地就醒了.
醒来后,肉松还在睡觉,他走后我又接着睡一直到12点,起来叫外卖,送外卖的说时间已过,大门关了,送不进来.中午只能吃泡面.

下午粗略地看了下 plog wiki上的一些文档, 主要是关于plog代码结构的.从中了解了不少东西.
plog 采用 MVC 模式设计, MVC 设计模式要求将程序逻辑(logic/bussinss) 和表现(prestension/view) 分离.

所以在 plog 的代码中看不到html的影子,全部是php代码, 网页表现由 template(plog 采用 smarty)实现.

晚上基本是在各种用plog架设的blog间游荡,比较有意思的是几个香港的blog,香港人用广东话写文章真是挺搞笑的,好比东北人用东北方言播新闻,怪怪.

看的博客越多,越感觉博客可以成为我们了解世界的另一个窗口,在以前我们认为不同世界的人在以相同的方式表述着自己的喜怒哀乐,生活的点点滴滴.呵.

言归正传, 晚上的一个收获是,在一个台湾的Blog 上看到一个由 MT 向Plog 转换数据的PHP脚本程序,可以拿来当框架用.哈哈,赚到了.脚本的名字叫做 MTtoPlog .

看台湾的Blog ,给我的感觉是似乎FreeBSD在台湾非常之流行,呵呵,让大家失望了.另一个感觉是:两岸的IT界应加强交流,尤其是在开源项目方面,加强合作可以提高效率,避免重复劳动.

Comments (1)

什么是DAO

//摘自 Plog API Manual

DAO

——————————————————————————–

Detailed Description
DAO stands for “Data Access Object” and represents a data model according to the MVC architecture.
DAO classes isolate developers of all the intricacies of the database structure, so that for example loading a post from the dabase is as easy as:

$articles = new Articles();
$userPost = $arcticles->getBlogArticle( 15 );

Otherwise, developers would need to write an SQL query every time we need to load an article from the database. In general, DAO classes provide access to reading, updating and removing data from the database. In pLog, we usually have two classes per entity: a smaller one that contains no database access logic and that only contains the information necessary (usually, it represents a row from the database), and the second will be a bigger class that includes SQL code and database logic and that provides all the methods outlined above (read, update and remove from the database) Examples of this are Articles and Article, or Users and UserInfo.

Other relevant DAO classes are ArticleComments and UserComment, MyLink and MyLinks, etc.

All classes that extend the base Model class, automatically inherit an open connection to the database (via the private attribute Model::_db) and several other database-related methods.

If you need to implement some kind of data access, please extend from Model.

Classes
class ArchiveLink
class Article
class ArticleCategories
class ArticleCategory
class ArticleComments
class ArticleCommentStatus
class ArticleNotification
class ArticleNotifications
class Articles
class ArticleStatus
class BayesianFilterInfo
class BayesianFilterInfos
class BayesianToken
class BayesianTokens
class BlogInfo
class Blogs
class BlogSettings
class BlogStatus
class CustomField
class CustomFieldCheckboxValue
class CustomFieldDateValue
class CustomFieldsValues
class CustomFieldValue
class CustomFieldValueFactory
class Model
class MyLink
class MyLinks
class MyLinksCategories
class MyLinksCategory
class Referer
class Referers
class SearchEngine
class SearchResult
class SiteStatistics
class GenericStatusList
class TrackBack
class TrackbackClient
class Trackbacks
class UserComment
class UserInfo
class UserPermission
class UserPermissions
class Users
class UserStatus
class SummaryStats

Enumerations
enum CUSTOM_FIELD_TEXTBOX

——————————————————————————–

Enumeration Type Documentation
enum CUSTOM_FIELD_TEXTBOX

different custom field types available

Definition at line 12 of file customfields.class.php.

评论

« Previous entries