zoukankan      html  css  js  c++  java
  • Some thoughts on my own O/R Mapping or Code Generation tools

    Code tells:
    Category
    	has_many Forums,
    	Name,
    	nSortOrder,
    
    Forum
    	belongs_to Category,
    	has_many Users as Moderators,
    	has_many! Threads,
    	has_many Posts,
    	has_one? Post as LastPost : Last of Posts on tPostOn,
    	Name,
    	Description?,
    	nTopics,
    	nPosts,
    	tLastPostOn?,
    	LastPostAuthor?,
    	nSortOrder,
    	canRead,
    	canReply,
    	canTopic,
    
    Thread
    	belongs_to Forum,
    	belongs_to User as Starter,
    	has_many! Posts,
    	has_one Post as LastPost : Last of Posts on tPostOn,
    	Subject,
    	tStartOn,
    	tLastReplyOn,
    	isLocked,
    	isSticky,
    
    Post
    	has_one User as Author,
    	belongs_to Thread,
    	AuthorName,
    	AuthorIp?,
    	AuthorEmail?,
    	Message max,
    	isHidingSmilies,
    	tPostOn,
    	tEditOn?,
    	EditedBy?,
    
    User
    	has_many! Threads,
    	has_many! Posts,
    	belongs_to UserGroup as Group,
    	external Id,
    	Name,
    	Phone : {PhoneNumber}
    	isUsingAvantar,
    	isUsingSignture,
    	Signature? 500,
    	nTopicsPerPage,
    	nPostsPerPage,
    	EmailSetting : EmailSettings (ShowEmail, HideEmailAllowForm, NoContact)
    	shouldShowSmilies,
    	shouldShowImages,
    	shouldShowImagesInSignature,
    	shouldShowSignatures,
    	ForumTheme,
    	nPosts,
    	tLastPostOn,
    
    Lengends
    	has_many! = could be paged;
    	? = could be null,
    	external = user asigned primary key
    	FieldName = string (255)
    	nFieldName = int
    	tFieldName = datetime
    	can/is/shouldFieldName = bool
    	: {ClassName} = ClassName (IConvertiable)
    	: (A, B, C) = Enum
    	FieldName 500 = string with length<=500
    	: Last/First/Top 100 of Collection on orderBy = no explaination needed
    	has_***, belongs_to = not properties but method, lazy loaded for ever
    
    version tracking:
    	+ for new field,
    	- for old field,
    	* for modified field, out dated line should not be deleted?
    
    code generating: 
    	both SQL and DAL, abstract BL(Entities included), skeleton for real BL
    
    why my own?
    	I know what will happen.
    	I know what is doable.
    	I write mine faster than learning others.
    
  • 相关阅读:
    debian/ubuntu系统vi无法删除字符的解决办法
    kvm磁盘镜像文件管理,格式转换,调整大小
    读懂MACD背离,多空力量分析
    OpenStack部署都有哪些方式
    [STM32F10x] 利用定时器测量频率
    [STM32F10x] 利用定时器测量脉冲宽度
    曼彻斯特编码
    最近关注的几个技术点网页链接
    windows中cmd常用命令收集
    Mybatis Generator代码自动生成(实体类、dao层、映射文件)
  • 原文地址:https://www.cnblogs.com/deerchao/p/716135.html
Copyright © 2011-2022 走看看