某储备粮的“学习笔记” - design http://blog.gregwym.info/tag/design/ zh-CN Fri, 22 Jun 2012 10:46:34 +0800 Fri, 22 Jun 2012 10:46:34 +0800 Software Architecture - CS 446 Midterm Outline http://blog.gregwym.info/software-architecture-CS446-midterm.html http://blog.gregwym.info/software-architecture-CS446-midterm.html Fri, 22 Jun 2012 10:46:34 +0800 咳嗽di小鱼 Software Design Process Models

Design as search. Design spaces. Design state, goal structure, generative design operations, early quantitative evaluations, control of design process. Basic models of design (transformational, plan/architecture driven). Relationship to other life-cycle activities.

Terms

  • Module: a collection of classes
  • Subsystem: a collection of classes with an interface
  • Design window: the time, which design decision have to be made
  • Service: the operation in common purpose, offered by a subsystem

Different Views

  • Analysis focus on the problem domain

    • Analyst, end user, customer
  • Design focus on the solution domain

    • designer, implementer

Goals

  • Designer

    • Specify interface of subsystems
    • Usability
    • Reusability
  • Implementer

    • implementer
    • Extender
    • User

Major Design Goals

  • Behavioural Model

    1. Concurrency
    2. Resource Handling
    3. Software Control
  • Structural Model

    1. Hardware/Software mapping
    2. Data Management
  • Use Case Model

    1. Boundary Conditions (边缘情况)
  • Non Functional Requirements

    1. Feasibility (可行性)

A lot of others.

Most of them involves trade off between each other

Decomposition

  • High cohesion
  • Low coupling

Architecture/Design Representation

What should be represented (structure, behaviour)? Informal representations of design, examples of design notations. Formal representation of design. Domain specific architecture descriptions. Role of standards, reference architectures. Design documentation.

Terms

  • Subsystem decomposition: identify subsystems, service, and their association in between
  • Architectural style: pattern for a subsystem decomposition
  • Software architecture: instance of a style. composed of components and connectors
  • Components: encapsulated subsystem, provides services
  • Connectors: Facilitate communication within software. Simple procedure calls or shared data accesses

-

  • Conceptual Arch
  • Concrete Arch
  • Evolution
  • Degradation

    • Drift: add things to conceptual
    • Erosion: conflict to conceptual
    • Recover: determining from implementation

Architectural Style

  • Vocab of design elements
  • Set of config rules
  • Semantic interpretation

Benefits

  • Design/Code reuse
  • Visualization
  • Interoperability (WTH is this word…)
  • Style-specific analyses

Style Examples

  • Main program and subroutines
  • Object-Oriented Style
  • Layered Style
  • Virtual Machine Layers

    • Closed/Open Layering
  • 3/4-Tier
  • Client/Server
  • Peer-to-Peer
  • Batch Sequential
  • Pipes and Filters
  • Repository
  • Implicit Invocation
  • Publish-Subscribe
  • Event-Based
  • MVC
  • Interpreter
  • Sservice-Oriented Arch (SOA)

Architectural Model

Arch Views and Viewpoints
Different views should be consistent between each other.

  • Logical View

    • UML component diagram
  • Physical View
  • Deployment View

    • UML deployment diagram
  • Concurrency/Process View
  • Behavioral View

    • UML collaboration diagram

Metamodel意会了, 但是不知道怎么总结…
主要用来保证view之间的consistency

Design Goals

  • Reduce Complexity
  • Scalability
  • Adaptability
  • Heterogeneity
  • Portability
  • Dependability

    • Reliability
    • Availability
    • Robustness
    • Fault-tolerant

Detail design activities

  • Identify modules

    • Data Flow Analysis (DFA)
  • Identify control structure

    • Instantiation of modules
    • Management of base processes
  • Decide on overall control structure

    • Centralized/Decentralized control
  • Address boundary control conditions
  • Address persistent data management
  • Address hardware/software mapping
  • Implement concurrency
  • Define access control

...继续ing...

Design Plans/Architecture

Review of small/medium scale plans (data structures, programming language structures, concurrency). Plans/architectures for common types of software systems (translators, embedded, real-time, user interface).

...未开始...

]]>
0 http://blog.gregwym.info/software-architecture-CS446-midterm.html#comments http://blog.gregwym.info/feed/software-architecture-CS446-midterm.html
Trapecho - 基于Bootstrap的Typecho主题 http://blog.gregwym.info/Trapecho-boostrap-based-typecho-theme.html http://blog.gregwym.info/Trapecho-boostrap-based-typecho-theme.html Sat, 17 Mar 2012 23:00:44 +0800 咳嗽di小鱼 之前的浮云主题也用了快一年了, 有些腻味.
主题本身也有很多问题, 比如代码质量不是很好, 主题的CSS对博客文章的Typography没有很规范的支持, 浮云比较吃CPU...

一直想换主题却没有找到好的. 最近对Bootstrap很是痴迷, 又有了点空闲, 就顺手仿着Bootstrap官网风格做了一个Typecho的主题.
自己觉得效果还不错, po出来给喜欢的朋友.

设计风格

  • 黑白灰
  • 简洁明了

特色功能

  • 自动吸附顶端的导航栏
  • 在各种设备上自适应显示 (如: iPhone/iPad)
  • 侧栏的新浪微博展示插件
  • 集成Google Code Prettify

应用的技术

  • Bootstrap + jQuery
  • HTML5 + CSS3
  • Responsive CSS

下载

下载我放在doLast.com上了, 点Download即可

http://dolast.com/pages/trapecho
https://github.com/gregwym/Trapecho/zipball/master


功能详解

新浪微博

  • /admin/options-theme.php主题设置页中填入新浪微博的UID, 侧栏中就会显示新浪微博的插件.
  • 在设置中删除UID号码并保存, 即可关闭插件

根据分辨率自适应布局

  • 如果您在看我的博客, 现在把浏览器缩小就能看出效果.
  • 在iPhone/iPad等移动设备上也能有很好的博客阅读体验
  • 支持iOS的阅读器模式

侧栏可选项

  • 显示最新文章
  • 显示相关文章
  • 显示最近回复
  • 显示标签
  • 显示分类
  • 显示归档
  • 显示友情链接(需要友情链接插件)
  • 显示其它杂项

Google Code Prettify

  • 为了统一主题风格, 也特别定义了代码的高亮方式, 如果有朋友不喜欢, 从footer.php最后删除和pre有关的几行JavaScript即可.
  • 使用很简单, 展示大段的代码, 使用<pre>将代码括住, 就会自动高亮, 语言类型自动识别.



    <pre>
        <!--你的代码放在中间-->
    </pre>
    
  • 比如,



    int main(){
        cout << "Welcome to Trapecho" << endl;
        return 0;
    }
    
  • 更多使用方法请参考, google-code-prettify README

]]>
47 http://blog.gregwym.info/Trapecho-boostrap-based-typecho-theme.html#comments http://blog.gregwym.info/feed/Trapecho-boostrap-based-typecho-theme.html