3.2 把Page Item和Marker Item绑定

之前我们实现了PagePanel组件, 使用了三个state来切换Page组件的opacity属性; 这一步我们会使用Marker和MarkerPanel组件来实现页面导航;

在原型阶段, MarkerPanel组件十分简单, 没有不论什么功能; 它使用了Repeater类型来产生三个QML Item以及Marker组件作为delegate;

MarkerPanel应该存储当前激活的marker(标记), 即那个被用户点击的marker; 基于MarkerPanel中激活的marker, PagePanel会更新它的state属性; 我们须要将PagePanel的state属性和MarkerPanel新的属性--持有当前激活marker的属性绑定起来;

在MarkerPanel中定义一个string属性--activeMarker;

// MarkerPanel.qml

1
2
3
4
5
6
7
Item
{
    id:
root
    width:
150;    height: 450
    //
a property of type string to hold
    //
the value of the current active marker
    property
string activeMarker: 
"personal"
//...

我们能够把一个markerid值存储起来, 用来唯一地识别marker item; 这样, activeMarker会持实用户所点击的marker item的markerid的值,

依据model, Repeater元素能够产生三个marker item, 因此我们能够使用一个model来存储markerid值, 然后在Repeater中使用;

// MarkerPanel.qml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
Item
{
    id:
root
    width:
150;    height: 450
    //
a property of type string to hold
    //
the value of the current active marker
    property
string activeMarker: 
"personal"
 
    //
a list for holding respective data for a Marker item.
    property
variant markerData: [
        {
markerid: 
"personal" },
        {
markerid: 
"fun" },
        {
markerid: 
"work" }
    ]
 
    Column
{
        id:
layout
        anchors.fill:
parent
        spacing:
5
        Repeater
{
            //
using the defined list as our model
            model:
markerData
            delegate:
Marker {
                id:
marker
                //
handling the clicked signal of the Marker item,
                //
setting the currentMarker property
                //
of MarkerPanel based on the clicked Marker
                //MouseArea
{
                    //anchors.fill:
parent
                    onClicked:
root.activeMarker = modelData.markerid
                //}
            }
        }
    }
}

上述代码中我们在onClicked signal handler中设置了 activeMarker属性; 这意味着我们已经在Marker组件中定义了一个clicked() signal来通知用户的鼠标点击事件;

// Marker.qml

1
2
3
4
5
6
7
8
9
10
11
Item
{
    id:
root
    width:
50; height: 90
    signal
clicked()
    MouseArea
{
        id:
mouseArea
        anchors.fill:
parent
        //
emitting the clicked() signal Marker item
        onClicked:
root.clicked()
    }
}

眼下我们以后有了PagePanel组件使用state属性来管理page, 让MarkPanel组件能够识别激活的marker, 因此, 切换各个page的可见性能够通过改变page的opacity属性来做到;

来看看如何使用 activeMarker属性来相应地更新PagePanel的state;

在main.qml里面, 已经有了Page item和 MarkerPanel定位好了, 我们会创建以及使用PagePanel item而不是各自使用anchor定位;

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
    //
creating a MarkerPanel item
    MarkerPanel
{
        id:
markerPanel
        width:
50
        anchors.topMargin:
20
        anchors
{
            right:
window.right
            top:
window.top
            bottom:
window.bottom
        }
    }
//...
    //
creating a PagePanel item
    PagePanel
{
        id:
pagePanel
        //
binding the state of PagePanel to the
        //
activeMarker property of MarkerPanel
        state:
markerPanel.activeMarker
        anchors
{
            right:
markerPanel.left
            left:
toolbar.right
            top:
parent.top
            bottom:
parent.bottom
            leftMargin:
1
            rightMargin:
-50
            topMargin:
3
            bottomMargin:
15
        }
    }

上面代码中, 我们能够看到QML的 property binding特性, 能够把state属性和activeMarker属性绑定起来; 这样不论activeMarker通过用户操作获得了什么值, 同样的值会被分配给PagePanel的state属性, 这样就能开关各个page的可见性了;

下一步

给出如何使用使用图形来强化UI的细节;

3.3 加入graphics(图形)

由于QML的特性, 开发和设计全然能够一起紧密工作, 贯彻整个开发生命期; 现在, 使用graphics让用户体验有了非常大的不同, 这也是程序让用户感受到的地方;

QML鼓舞在UI实现过程中尽可能地使用graphics; 使用QML让图形设计和开发之间的协作更easy, 设计能够立马在主要的UI元素上測试graphics; 这帮助设计来理解在开发新的组件时, 程序猿会须要什么, 这也让程序的UI更有吸引力并且某种程度上更易维护;

3.3.1 给组件设置背景图片

BorderImage类型推荐使用的情况是: 在你想要把一个图片scale(按比例拉伸), 但它的border(边界)保持不变的时候; 这样的类型的一个好的用例(use case)是在QML item上有阴影效果的背景图片; 你的item可能会在某些时刻scale可是须要保持corners(四角)不变;

来看下如何在组件中将BorderImage设置成背景;

// PagePanel.qml

1
2
3
4
5
6
7
8
9
10
11
//...
    BorderImage
{
        id:
background
        //
filling the entire PagePanel
        anchors.fill:
parent
        source: "images/page.png"
        //
specifying the border margins for each corner,
        //
this info should be given by the designer
        border.left:
68; border.top: 69
        border.right:
40; border.bottom: 80
    }

// Note.qml

1
2
3
4
5
6
7
BorderImage
{
    id:
noteImage
    anchors
{ fill: parent}
    source: "images/personal_note.png"
    border.left:
20; border.top: 20
    border.right:
20; border.bottom: 20
}

Warning: 注意BorderImage类型要以正确的次序在组件里面使用, 由于实现的次序定义了显示的顺序; 具有同样 z值的item显示的次序是按它们被声明的次序决定的; 很多其它细节參考stack ordering of items-- z property;

当这些item都在MarkerPanel组件中创建的时候, 如何才是给Marker item设置背景的最佳方案--这个方法已经在MarkerPanel中展现了;

这里有个markerData list, 把它作为model给Repeater来创建Marker item, 当一个marker item被点击的时候, 设置markerid作为activeMarker; 我们能够扩展markerData, 存储一个图像的的url路径, 使用Image类型作为Marker组件的顶层类型;

// Marker.qml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//
The Image type as top level is convenient
//
as the Marker component simply is a graphical
//
UI with a clicked() signal.
Image
{
    id:
root
    //
declaring the clicked() signal to be used in the MarkerPanel
    signal
clicked()
    //
creating a MouseArea type to intercept the mouse click
    MouseArea
{
        id:
mouseArea
        anchors.fill:
parent
        //
emitting the clicked() signal Marker item
        onClicked:
root.clicked()
    }
}

这样就能够增强MarkerPanel组件;

// MarkerPanel.qml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
//...
    //
for the markerData, we add the img value pointing to the image url
    property
variant markerData: [
        {
img: 
"images/personalmarker.png",
markerid: 
"personal" },
        {
img: 
"images/funmarker.png",
markerid: 
"fun" },
        {
img: 
"images/workmarker.png",
markerid: 
"work" }
    ]
 
    Column
{
        id:
layout
        anchors.fill:
parent
        spacing:
5
        Repeater
{
            //
using the defined list as our model
            model:
markerData
            delegate:
Marker {
                id:
marker
                //
binding the source property of Marker to that
                //
of the modelData' s img value.
                //
note that the Marker is an Image element
                source:
modelData.img
                //
handling the clicked signal of the Marker item,
                //
setting the currentMarker property
                //
of MarkerPanel based on the clicked Marker
                onClicked:
root.activeMarker = modelData.markerid
            }
        }
    }

上述代码中, 能够看到Marker item的source属性是怎样绑定到markerData model的image值的;

我们使用了BorderImage类型来为NoteToolbar组件设置背景, 也作为main.qml的顶层类型;

Note 关于图像的border margins, 以及图像的怎样anchor和align(对齐), 要和graphics设计讨论清楚;

MarkerPanel组件看起来是这种:

然后来看看如何在原型阶段使用graphics依照设计来增强toolbar;

3.3.2 创建Tool组件

基于代码重用考虑, 定义一个新组件给toolbar中的New Note和Clear All工具使用; 这是为什么我们已经实现了一个Tool组件, 使用Image类型作为顶层类型, 处理鼠标点击事件;

Image类型经经常使用作UI元素自身, 不论是静态的或是动绘图像; 它会按像素布局, 能够非常好地依照设计需求来定义;

// Tool.qml

1
2
3
4
5
6
7
8
9
10
11
12
13
//
Use Image as the top level type
Image
{
    id:
root
    //
defining the clicked signal
    signal
clicked()
    //
using a MouseArea type to capture
    //
the mouse click of the user
    MouseArea
{
        anchors.fill:
parent
        //
emitting the clicked() signal of the root item
        onClicked:
root.clicked()
    }
}

如今用Tool组件来创建toolbar; 我们从原型阶段改动代码, 用Tool item取代Rectangle元素;

//main.qml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
//...
    //
toolbar background
    Rectangle
{
        anchors.fill:
toolbar
        color: "white"
        opacity:
0.15
        radius:
16
        border
{ color: 
"#600";
width: 4 }
    }
 
    //
using a Column element to layout
    //
the Tool items vertically
    Column
//
sidebar toolbar
        id:
toolbar
        spacing:
16
        anchors
{
            top:
window.top
            left:
window.left
            bottom:
window.bottom
            topMargin:
50
            bottomMargin:
50
            leftMargin:
8
        }
        //
new note tool
        Tool
{
            id:
newNoteTool
            source: "images/add.png"
        }
        //
clear page tool
        Tool
{
            id:
clearAllTool
            source: "images/clear.png"
        }
    }

如今我们给我们的组件设置了全部的graphics, 程序应该有了更吸引人的外观和很多其它定义好的UI了;

下一步

下一章具体介绍怎样动态地创建和管理Note item以及怎样在本地数据库存储它们;

---3End---

CHAPTER4 动态管理Note对象

我们眼下看到的QML是一个很强大的声明性(declarative)语言, 和JavaScript组合使用让它更强大; QML不仅提供了 inline JavaScript, 并且还能够把整个JavaScript库导入到文件里;

NoteApp的核心功能是能够让用户去创建, 改动和删除note, 可是程序应该也要自己主动存储note, 无需提示;

这一章会指导怎样使用JavaScript来给QML代码加入逻辑, 实现本地存储--Qt Quick Local Storage

本章主要主题:

- 使用JavaScript实现动态对象管理的功能;

- 怎样使用 Qt Quick Database API 进行本地数据存储;

4.1 创建和管理Note Item

用户应该随时能够创建和删除note, 这意味着我们的代码应该能够动态地创建和删除Note item; 有多种方式创建和管理QML对象; 其实, 我们已经使用一种--Repeater类型; 创建一个QML对象意味着在创建组件的实例之前, 组件必需要被创建和载入起来;

QML对象能够通过 createObject(Item parent, object properties) JavaScript方法在组件上创建; 很多其它细节參考 Dynamic Object Management in QML http://qt-project.org/doc/qt-5/qtqml-javascript-dynamicobjectcreation.html  

4.1.1 Note对象的动态创建

我们知道一个Note item是属于Page组件的, 它负责note对象的创建, 也会从数据库中读取笔记; 

如前面所说, 首先载入Note组件:

// Page.qml

1
2
3
4
5
6
//...
    //
loading the Note Component
    Component
{
        id:
noteComponent
        Note
{ }
    }

如今我们来定义一个Javascript方法, 创建QML Note对象; 创建QML对象的时候, 必须保证一个參数是这个对象的parent; 在Page组件中持有一个Note item容器(container)是个管理note对象的好主意, 这样我们能够在数据库中保存这些note;

// Page.qml

1
2
3
4
5
6
7
8
9
10
11
12
13
//...
    //
creating an Item element that will be used as a note container
    Item
{ id: container }
 
    //
a Javascript helper function for creating QML Note objects
    function newNoteObject(args)
{
        //
calling the createObject() function on noteComponent item
        //
and the container item will be the parent of the new
        //
object and args as the set of arguments
        var note
= noteComponent.createObject(container, args)
        if(note
== 
null)
            console.log("note
object failed to be created!"
)
    }

在前面显示的代码中, 我们看到一个新的 note item对象是如何在 newNoteObject()方法中创建的; 新建的 note对象隶属于container item;

如今我们要在toolbar上的new note tool被按下的时候调用这种方法, toolbar在main.qml中; 因为PagePanel组件知道当前可见的page item, 我们能够在PagePanel中创建一个新的属性来存储那个page;

// PagePanel.qml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
//...
    //
this property holds the current visible page
    property
Page currentPage: personalpage
 
    //
creating the list of states
    states:
[
        //
creating a state item with its corresponding name
        State
{
            name: "personal"
            PropertyChanges
{
                target:
personalpage
                opacity:1.0
                restoreEntryValues: true
            }
            PropertyChanges
{
                target:
root
                currentPage:
personalpage
                explicit: true
            }
        },
        State
{
            name: "fun"
            PropertyChanges
{
                target:
funpage
                opacity:1.0
                restoreEntryValues: true
            }
            PropertyChanges
{
                target:
root
                currentPage:
funpage
                explicit: true
            }
        },
        State
{
            name: "work"
            PropertyChanges
{
                target:
workpage
                opacity:1.0
                restoreEntryValues: true
            }
            PropertyChanges
{
                target:
root
                currentPage:
workpage
                explicit: true
            }
        }
    ]

我们改动了三个state来给currentPage属性设置合适的值;

在main.qml中, 看看在new note tool被点击的时候如何调用方法来创建新的note对象;

// main.qml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
//
using a Column element to layout the Tool items vertically
Column
{
    id:
toolbar
    spacing:
16
    anchors
{
        top:
window.top; left: window.left; bottom: window.bottom
        topMargin:
50; bottomMargin: 50; leftMargin: 8
    }
    //
new note tool, also known as the plus icon
    Tool
{
        id:
newNoteTool
        source: "images/add.png"
        //
using the currentPage property of PagePanel and
        //
calling newNoteObject() function without any arguments.
        onClicked:
pagePanel.currentPage.newNoteObject()
    }

4.1.2 删除Note对象

删除Note对象是个更直接的过程, 由于QML item类型提供了一个JavaScipt方法--destroy() http://qt-project.org/doc/qt-5/qtqml-javascript-dynamicobjectcreation.html#deleting-objects-dynamically 
; 由于我们已经有一个container item的children是Note item, 我们能够简单地对children逐个地调用 destroy;

在Page组件上, 定义一个方法来为我们运行操作:

// Page.qml

1
2
3
4
5
6
7
//...
    //
a JavaScript helper function for iterating through the children elements of the
    //
container item and calls destroy() for deleting them
    function clear()
{
        for(var i=0;
i<container.children.length; ++i)
            container.children[i].destroy()
    }

在main.qml文件里, 我们在clear tool被按下时调用 clear()方法:

1
2
3
4
5
6
7
//...
        //
the clear tool
        Tool
{
            id:
clearAllTool
            source: "images/clear.png"
            onClicked:
pagePanel.currentPage.clear()
        }

为了让用户能够独立地删除每个note, 我们在NoteToolbar组件中为Note组件加入了一个tool; 能够使用签名实现的Tool组件:

// Note.qml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
//...
    //
creating a NoteToolbar that will be anchored to its parent
    NoteToolbar
{
        id:
toolbar
        height:
40
        anchors
{ top: root.top; left: root.left; right: root.right }
        //
using the drag property alias to set the drag.target to our Note item.
        drag.target:
root
        //
creating the delete  tool for deleting the note item
        Tool
{
            id:
deleteItem
            source: "images/delete.png"
            onClicked:
root.destroy()
        }
    }

下一步

关于怎样在本地数据库存储note item的具体步骤;

4.2 从数据库存储和读取数据

眼下我们实现了NoteApp的功能: 实时地创建和管理note item;

这里我们会了解在本地数据库存储note的具体实现; QML提供了一个简单的 Qt Quick Local Storage API, 使用SQLite数据库来实现我们想要的功能;

首选的方式是在NoteApp程序启动的时候从数据库读取note, 然后在程序关闭的是保存它们; 用户不会收到提示;

4.2.1 定义数据库

NoteApp的数据库非常easy; 它仅仅有一个table--note table, 包括我们所保存的note的信息;

看一下Table的定义, 让我们了解下Note组件的哪些属性或哪些新的数据应该被引入:

x和y是每一个QML item都有的几何属性; 从Note item获得这些值非常easy; 这些值会用来粗糙你note在page中的位置; noteText是note的实际文字, 我们能够从Note组件中的Text元素中获取它们, 我们应该定义一个alias(别名_)--noteText; noteId和markerId是每一个note item都该有的标识符; noteId是一个唯一的标识符, 数据库须要用到, markerId用来标识note item属于哪一个page; 因此我们会在Note组件里面加入两个新的属性;

// Note.qml

1
2
3
4
5
6
7
8
9
10
11
12
Item
{
    id:
root
    width:
200; height: 200
 
    property
string markerId;
    property
int  noteId;
    property
alias noteText: editArea.text
//...
    //
creating a TextEdit
    TextEdit
{
        id:
editArea
//...

考虑到Page组件负责创建Note item, 它应该也知道Note和哪个markerId相关联; 当一个新的Note item创建出来(不是从数据库读取), Page应该设置好Note的markerId属性;

使用一个JavaScript的 helper方法:

// Page.qml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
Item
{
    id:
root
 
    //
this property is held for helping store
    //
the note items in the database
    property
string markerId
    //
this Javascript helper function is used to create,
    //
Note items not loaded from database so that it will set
    //
the markerId property of the note.
    function newNote()
{
        //
calling the newNoteObject and passing the a set of
        //
arguments where the markerId is set.
        newNoteObject(
"markerId":
root.markerId } )
    }
//...

先前在main.qml中, 我们使用了 newNoteObject()方法, 但就如前面解释的, 我们须要用newNote()方法取代它来达到目的;

如今每一个Page组件有个markerId属性, 能够在Note item被创建的时候设置markerId; 我们必须保证page的markerId属性在Page item在PagePanel组件中创建的时候就被设置了;

// PagePanel.qml

1
2
3
4
5
//...
//
creating three Page items that are anchored to fill the parent
Page
{ id: personalpage; anchors.fill: parent; markerId: 
"personal" }
Page
{ id: funpage; anchors.fill: parent; markerId: 
"fun" }
Page
{ id: workpage; anchors.fill: parent; markerId: 
"work" }

眼下我们保证的:

- 从相应的关系数据库[relational database http://en.wikipedia.org/wiki/Relational_database ]得到的note和page之间的关系是正确的;

- 每一个Note item有一个唯一的ID, ID属于page, 能够识别marker ID;

- 这些属性值要被正确设置;

以下来读取和存储笔记;

---TBC---

QtQuick桌面应用程序开发指导 3)达到UI而功能_B 4)动态管理Note物_A的更多相关文章

  1. QtQuick桌面应用程序开发指南 4)动态管理Note对象_B 5)加强外观 6)许多其他的改进

    4.2.2 Stateless(不管状态)JavaScript库 为了让开发轻松点, 使用一个JavaScript接口来和数据库交互是个好主意, 它在QML中提供了方便的方法; 在QtCreator中 ...

  2. Electron与WEB桌面应用程序开发及其它

    这几天在构思项目,研究了一下Electron,记录下来. 说起WEB桌面程序,当前最火的就是Electron了. Electron的架构用一句话总结,就是一个main.js进程加上一个或数个chrom ...

  3. c#桌面应用程序开发--登陆窗口

    一.显示登陆窗口 应用程序入口点为Main方法,因此在Main方法中创建登陆窗体. 1)创建登陆窗体(登陆窗体UI已提前创建好); 2)显示窗体,以模式对话框的形式显示,并赋值给result; 3)判 ...

  4. mpvue小程序开发之 集成第三方UI框架Vant Weapp UI

    集成进第三方的UI框架其实很简单 这里把vant-weapp的dist目录重命名为vant-weapp放在项目根目录的static文件夹下: 在src文件夹下,即我们写vue代码的位置,正在编写的页面 ...

  5. 微信小程序开发 -- 点击右上角实现转发功能

    // 在page的js文件中加入以下代码/** * 用户点击右上角分享 */ onShareAppMessage: function () { }

  6. 微信小程序开发 (资料汇总,谁还没被坑过?希望助你绕过一些坑)

    最近帮人家做一个微信小程序,刚好想熟悉一下.由于牵扯到多用户使用系统,以及数据共享,所以自然架构选择了,客户端和服务器的方式. 后台服务器是windows server,后台程序是.Net  WebA ...

  7. 微信小程序开发(3) 热门电影

    在这篇微信小程序开发教程中,我们将介绍如何使用微信小程序开发热门电影及预览功能. 本文主要分为两个部分,小程序主体部分及电影主页和详情页页面部分 一.小程序主体部分 一个小程序主体部分由三个文件组成, ...

  8. QtQuick桌面应用开发指导 1)关于教程 2)原型和设计 3)实现UI和功能_A

    Release1.0 http://qt-project.org/wiki/developer-guides Qt Quick Application Developer Guide for Desk ...

  9. electron之Windows下使用 html js css 开发桌面应用程序

    1.atom/electron github: https://github.com/atom/electron 中文文档: https://github.com/atom/electron/tree ...

随机推荐

  1. jQuery插件使用和写法

    jQuery插件分类3中: 1.封装对象方法的插件. 2.封装全局函数的插件. 3.选择器插件. jQuery插件机制 jQuery提供了两个用于扩展jQuery功能的方法: 1.jQuery.fn. ...

  2. 移动web:图片切换(焦点图)

    在web页面上图片切换(焦点图)效果实在是太常见了,PC端.移动端到处都有它的身影. 上次写了个tab选项卡的效果,在这里延续一下,改成图片切换的效果. 如果不需要自动播放,稍微修改下html标签.和 ...

  3. spring改版官网下载jar包, 源代码和文档

    从网上找了一些方法,现在都整理了一下,有简单粗暴的,也有百转回肠的(详细,直接从官网一步一步的进入下载页),希望大家根据自己的喜好可以找到的真爱. 方法一:(简单粗暴直接) http://repo.s ...

  4. Android多线程的研究(8)——Java5于Futrue获取线程返回结果

    我们先来看看ExecutorService操作的方法: watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvZGF3YW5nYW5iYW4=/font/5a6L5 ...

  5. 北邮iptv用WindowsMediaplayer打不开的解决的方法

    前言:之前我的iptv能够用,可是有次我安装了realplayer,它就偷偷把iptv文件的默认打开方式给篡改了,卸载了                  realplayer之后,iptv不能直接用 ...

  6. BP神经网络的基本原理

    2.1 BP神经网络基本原理 BP网络模型处理信息的基本原理是:输入信号Xi通过中间节点(隐层点)作用于输出节点.经过非线形变换,产生输出信号Yk,网络训练的每一个样本包含输入向量X和期望输出量t,网 ...

  7. js 加载初始化日期

    //初始化加载时间 $(function(){  var now = new Date();            var year = now.getFullYear();       //年   ...

  8. C#中的Virtual

    在 C# 中,派生类可以包含与基类方法同名的方法. 基类方法必须定义为 virtual. 如果派生类中的方法前面没有 new 或 override 关键字,则编译器将发出警告,该方法将有如存在 new ...

  9. 【Android进阶】Android调用WebService的实现

    最近想自己搞搞服务器,就从最简单的webservice开始吧 先上效果图 项目结构 开始贴代码,注释都有,有问题的请留言 MainActivity.java package com.example.w ...

  10. 发展,需求驱动 &#183; 一间 所见即所得

    从需求不是一句空话.同样是在发展过程中真正的. 需求驱动,与极限编程的一些想法和测试驱动开发基本重合. 鉴于该网站的发展是一个比较流行的方向,我会从网站开始,阐述自己的"需求驱动的发展&qu ...