- 浏览: 10019 次
- 性别:
- 来自: 南京
-
最新评论
-
since1027:
Backbone系列教程的最后一章了,希望对Backbone入 ...
Part 8: Understanding Backbone.js Events
In this article, we will try to look at the View classes in Backbone.js and see how view classes help us in updating the relevant parts of the application easily.
Background
The biggest problem while writing JavaScript applications is the spaghetti code that one needs to write just for HTML DOM manipulation. Every element on the UI will need some actions to happen when the user interacts with them. Some UI elements would want to automatically update the values based on the new/updated data. Doing all this using plain HTML and JavaScript/jQuery is a big problem (doable but nightmare) specially from maintenance perspective.
Backbone.js view greatly helps us when it comes to creating large scale manageable applications. The view classes are more like a glue that holds an HTML template with the model object. Also, this provides the mechanism to handle the events raised from the model and update the UI and handle UI events and act on them (perform some operations on the model). So in a way we can say that the views are just observers who are listening to the model and UI events which makes them a perfect place to handle all the events and act upon them. Backbone views can be thought of as:
Observers that keep listening to the DOM events and in case the event fires taking the appropriate actions.
Objects backed by models that are responsible for rendering the model data on the screen.
Let us see how we can use backbone.js views to efficiently manage the applications.
Link to complete series:
Using the code
Creating a simple view
Let is start the discussion by looking at how we can create backbone views. Like backbone models and collections, creating a backbone view is also as easy as extending the existing Viewclass of backbone.
Like models and collections, we can also override the initialize and constructor of the backbone views. Lets try to see how we can override the initializefunction.
Instantiating the view is also straight forward. A view can simply be instantiated using the newkeyword.
Associating model with a view
Every view will be backed by a model. This modelcan be passed to the view in the constructor.
This model can either be a backbone model or a backbone collection. The view can extract the information from its model and render the HTML accordingly.
Understanding the el property
Now we are saying that the views are responsible for listening to DOM element’s events and also for updating the DOM elements. For this to happen the view class should be associated/attached to a DOM element. Backbone views are always associated to a DOM element. This associated DOM element can be accessed/manipulated using the elproperty.
Now there are 2 ways to create view:
1.Creating a view that will get associated with an existing DOM element.
2.Creating a view that will create its own DOM element on the fly.
So lets start by looking at how we can create a view that will get associated with an existing DOM element. The views constructor is capable of accepting a lot of parameters. It can accept models, collections and even the DOM element that this view should associate itself to.
Lets say we want to create a view for an existing DOM element i.e. a div with id="sampleDiv".
When we run the application and try to watch the elproperty, we can see that the el property contains the div element.
Now lets see how we can create a view that will create a DOM element for it dynamically. The way it works is that we can specify tagName, className, id and attributes in a backbone view. Based on these values the el will be created by backbone. Lets try to create a simple div with id using this approach.
When we create this view, we can see that the view is associated with a div which was created using our specified tagName and id values.
Now these two approached provides a lot of flexibility while developing backbone applications. Let us try to look at a simple example to understand the complete picture. lets say we need to create a list of books. We know the area where these items should be rendered but we the actual items will be added at runtime. This can easily be achieved by creating an empty list and using JavaScript to add list items at runtime. Lets see how we can use backbone views to achieve this.
First let us create the a simple view that will render the book data as a list element. Do do this we will use the dynamically generated DOM element.
What this view is doing is that, it is overiding the render function to render the book name in a list element. We have overridden the renderfunction to render the book as a list element.
Now we need a view that will contain this list elements i.e. the list view. For this lets create a simple list element on my HTML and then lets use this view class to use that el.
What this view is doing is that, it is accepting a collection of books and in the render function it is using the bookViewto render the books inside the associated el. Now the next thing we need to do is to associated the list created on the HTML page with this view as its el and pass the books collection to this view as model.
Calling the render function of this view will use our backbone views and render the list of books in an unordered list.
Note: A view’s elcan be changed anytime by calling the setElementmethod of the view.
Using templates
Now in our example we have overridden the render function of our views and took charge of rendering the HTML is our own code. This is still better than plain JavaScript/jquery based approach because here our JavaScript code is not intermingled with HTML and there is a logical structure to our views.
But the problem is that our view HTML could become very complex and it might always not be possible to spit out that HTML from our render functions. To ease this problem backbone supports view templates. Any template engine can be used with backbone view. To understand the concept of templates, let us use the simple JavaScript style templates.
Lets say that every book needs to be rendered as a drop down menu. This can be achived by using bootstrap very easily. But creating all that HTML in the render function might not be a very good idea. So let us create one more set of views that will use the template to render the books in a drop-down.
And the template is defined in the HTML file itself as:
What will happen here is that the bookView2will use this template to render the books as list elements. Backbone can work on any view engine. Also the example taken here was little contrived but very complex templates can also be created and rendered using this approach very easily.
Listening to DOM events
Now there is one important thing remaining. how can a view object listen to DOM elements and perform needed actions. To understand this let us add a simple button on our list view and try to listen to its click action.
Now whenever an a DOM element raises an event the associated view will look for its handler in the events section. If the handler exists, it calls that handler. this is very useful when we need to listen to DOM events and take some actions. we can use {"event selector": "callback"}format to declare our DOM event handlers. the selector are are usual jquery/css selectors.
Listening to Model changes
In large scale applications there might be multiple views rendering the same data. what if one view changes the data? should other views continue to show the stale data? Probably no. Thus we also need to listen to the model changes too. this can easily be achieved by listening to model changes as:
What we did here is that whenever new books are added to the collection. The associated view will be listening to the add event. On recieving this event it will simply renders the view again. This can be tested by simply adding few more books in the already rendering collection
On same lines, we can also listen to change event to listen to model updates.
To test this, lets just try to update a book that is already being rendered on screen.
Removing a view from DOM
Removing a view from DOM can be easily achieved by calling the remove function on the view.
Point of interest
In this article we looked at the backbone views. We looked at how we can use backbone views to implement better structured applications that can easily perform DOM manipulations.
原文链接:http://rahulrajatsingh.com/2014/07/backbone-tutorial-part-6-understanding-backbone-js-views/
Background
The biggest problem while writing JavaScript applications is the spaghetti code that one needs to write just for HTML DOM manipulation. Every element on the UI will need some actions to happen when the user interacts with them. Some UI elements would want to automatically update the values based on the new/updated data. Doing all this using plain HTML and JavaScript/jQuery is a big problem (doable but nightmare) specially from maintenance perspective.
Backbone.js view greatly helps us when it comes to creating large scale manageable applications. The view classes are more like a glue that holds an HTML template with the model object. Also, this provides the mechanism to handle the events raised from the model and update the UI and handle UI events and act on them (perform some operations on the model). So in a way we can say that the views are just observers who are listening to the model and UI events which makes them a perfect place to handle all the events and act upon them. Backbone views can be thought of as:
Observers that keep listening to the DOM events and in case the event fires taking the appropriate actions.
Objects backed by models that are responsible for rendering the model data on the screen.
Let us see how we can use backbone.js views to efficiently manage the applications.
Link to complete series:
- Part 1: Introduction to Backbone.Js
- Part 2: Understanding the basics of Backbone Models
- Part 3: More about Backbone Models
- Part 4: CRUD Operations on BackboneJs Models using HTTP REST Service
- Part 5: Understanding Backbone.js Collections
- Part 6: Understanding Backbone.js Views
- Part 7: Understanding Backbone.js Routes and History
- Part 8: Understanding Backbone.js Events
Using the code
Creating a simple view
Let is start the discussion by looking at how we can create backbone views. Like backbone models and collections, creating a backbone view is also as easy as extending the existing Viewclass of backbone.
var sampleView = Backbone.View.extend({ });
Like models and collections, we can also override the initialize and constructor of the backbone views. Lets try to see how we can override the initializefunction.
var sampleView = Backbone.View.extend({ initialize: function() { console.log('sampleView has been created'); } });
Instantiating the view is also straight forward. A view can simply be instantiated using the newkeyword.
var view1 = new sampleView();
Associating model with a view
Every view will be backed by a model. This modelcan be passed to the view in the constructor.
var book1 = new Book({ ID: 1, BookName: "Book 1" }); var m_bookView = new bookView({model: book1});
This model can either be a backbone model or a backbone collection. The view can extract the information from its model and render the HTML accordingly.
Understanding the el property
Now we are saying that the views are responsible for listening to DOM element’s events and also for updating the DOM elements. For this to happen the view class should be associated/attached to a DOM element. Backbone views are always associated to a DOM element. This associated DOM element can be accessed/manipulated using the elproperty.
Now there are 2 ways to create view:
1.Creating a view that will get associated with an existing DOM element.
2.Creating a view that will create its own DOM element on the fly.
So lets start by looking at how we can create a view that will get associated with an existing DOM element. The views constructor is capable of accepting a lot of parameters. It can accept models, collections and even the DOM element that this view should associate itself to.
Lets say we want to create a view for an existing DOM element i.e. a div with id="sampleDiv".
var view1 = new sampleView({ el: $("#sampleDiv") });
When we run the application and try to watch the elproperty, we can see that the el property contains the div element.
![](http://i2.wp.com/rahulrajatsingh.com/wp-content/uploads/2014/07/elExistingDom.jpg)
Now lets see how we can create a view that will create a DOM element for it dynamically. The way it works is that we can specify tagName, className, id and attributes in a backbone view. Based on these values the el will be created by backbone. Lets try to create a simple div with id using this approach.
var sampleView2 = Backbone.View.extend({ tagname: 'div', id: 'sampleDiv' });
When we create this view, we can see that the view is associated with a div which was created using our specified tagName and id values.
![](http://i1.wp.com/rahulrajatsingh.com/wp-content/uploads/2014/07/elDynamicDom.jpg)
Now these two approached provides a lot of flexibility while developing backbone applications. Let us try to look at a simple example to understand the complete picture. lets say we need to create a list of books. We know the area where these items should be rendered but we the actual items will be added at runtime. This can easily be achieved by creating an empty list and using JavaScript to add list items at runtime. Lets see how we can use backbone views to achieve this.
First let us create the a simple view that will render the book data as a list element. Do do this we will use the dynamically generated DOM element.
var bookView = Backbone.View.extend({ tagname: "li", model: Book, render: function (){ this.$el.html('<li>' + this.model.get("BookName") + '</li>'); return this; } });
What this view is doing is that, it is overiding the render function to render the book name in a list element. We have overridden the renderfunction to render the book as a list element.
Now we need a view that will contain this list elements i.e. the list view. For this lets create a simple list element on my HTML and then lets use this view class to use that el.
var bookListView = Backbone.View.extend({ model: BooksCollection, render: function() { this.$el.html(); // lets render this view var self = this; for(var i = 0; i < this.model.length; ++i) { // lets create a book view to render var m_bookView = new bookView({model: this.model.at(i)}); // lets add this book view to this list view this.$el.append(m_bookView.$el); m_bookView.render(); // lets render the book } return this; }, });
What this view is doing is that, it is accepting a collection of books and in the render function it is using the bookViewto render the books inside the associated el. Now the next thing we need to do is to associated the list created on the HTML page with this view as its el and pass the books collection to this view as model.
var book1 = new Book({ ID: 1, BookName: "Book 1" }); var book2 = new Book({ ID: 2, BookName: "Book 2" }); var book3 = new Book({ ID: 3, BookName: "Book 3" }); var book4 = new Book({ ID: 4, BookName: "Book 4" }); var book5 = new Book({ ID: 5, BookName: "Book 5" }); var bookCollection = new BooksCollection([book1, book2, book3, book4, book5]); var bookList = null; $(document).ready(function () { bookList = new bookListView({ el: $("#bookList"), model: bookCollection }); bookList.render(); });
Calling the render function of this view will use our backbone views and render the list of books in an unordered list.
![](http://i1.wp.com/rahulrajatsingh.com/wp-content/uploads/2014/07/runningSample.jpg)
Note: A view’s elcan be changed anytime by calling the setElementmethod of the view.
Using templates
Now in our example we have overridden the render function of our views and took charge of rendering the HTML is our own code. This is still better than plain JavaScript/jquery based approach because here our JavaScript code is not intermingled with HTML and there is a logical structure to our views.
But the problem is that our view HTML could become very complex and it might always not be possible to spit out that HTML from our render functions. To ease this problem backbone supports view templates. Any template engine can be used with backbone view. To understand the concept of templates, let us use the simple JavaScript style templates.
Lets say that every book needs to be rendered as a drop down menu. This can be achived by using bootstrap very easily. But creating all that HTML in the render function might not be a very good idea. So let us create one more set of views that will use the template to render the books in a drop-down.
var bookView2 = Backbone.View.extend({ model: Book, tagName: 'li', template: '', initialize: function() { this.template = _.template($('#bookItem').html()); }, render: function() { this.$el.html(this.template(this.model.attributes)); return this; } }); var bookListView2 = Backbone.View.extend({ model: BooksCollection, render: function() { this.$el.html(); // lets render this view for(var i = 0; i < this.model.length; ++i) { // lets create a book view to render var m_bookView = new bookView2({model: this.model.at(i)}); // lets add this book view to this list view this.$el.append(m_bookView.$el); m_bookView.render(); // lets render the book } return this; }, });
And the template is defined in the HTML file itself as:
<script type="text/template" id="bookItem"> <li role="presentation"><a role="menuitem" tabindex="-1" href="#"> <%= BookName %> </a></li> </script>
![](http://i1.wp.com/rahulrajatsingh.com/wp-content/uploads/2014/07/templateViewRendering.jpg)
What will happen here is that the bookView2will use this template to render the books as list elements. Backbone can work on any view engine. Also the example taken here was little contrived but very complex templates can also be created and rendered using this approach very easily.
Listening to DOM events
Now there is one important thing remaining. how can a view object listen to DOM elements and perform needed actions. To understand this let us add a simple button on our list view and try to listen to its click action.
var bookView2 = Backbone.View.extend({ model: Book, tagName: 'li', template: '', events: { 'click': "itemClicked" }, itemClicked: function () { alert('clicked: ' + this.model.get('BookName')); }, initialize: function() { this.template = _.template($('#bookItem').html()); }, render: function() { this.$el.html(this.template(this.model.attributes)); return this; } });
Now whenever an a DOM element raises an event the associated view will look for its handler in the events section. If the handler exists, it calls that handler. this is very useful when we need to listen to DOM events and take some actions. we can use {"event selector": "callback"}format to declare our DOM event handlers. the selector are are usual jquery/css selectors.
Listening to Model changes
In large scale applications there might be multiple views rendering the same data. what if one view changes the data? should other views continue to show the stale data? Probably no. Thus we also need to listen to the model changes too. this can easily be achieved by listening to model changes as:
var bookListView = Backbone.View.extend({ model: BooksCollection, initialize: function() { // lets listen to model change and update ourselves this.listenTo(this.model, "add", this.modelUpdated); }, modelUpdated: function() { this.render(); }, });
What we did here is that whenever new books are added to the collection. The associated view will be listening to the add event. On recieving this event it will simply renders the view again. This can be tested by simply adding few more books in the already rendering collection
function AddMoreBooks() { var i = bookCollection.length + 1; var newBook = new Book({ID: i, BookName: 'yet another book_' + i}); bookCollection.add(newBook); }
![](http://i1.wp.com/rahulrajatsingh.com/wp-content/uploads/2014/07/listenToAdd.jpg?w=318)
On same lines, we can also listen to change event to listen to model updates.
var bookView = Backbone.View.extend({ tagName: "li", model: Book, initialize: function() { // lets listen to model change and update ourselves this.listenTo(this.model, "change", this.render); } });
To test this, lets just try to update a book that is already being rendered on screen.
book1.set('BookName', book1.get('BookName') + '_updated');
![](http://i1.wp.com/rahulrajatsingh.com/wp-content/uploads/2014/07/listenChange.jpg?w=351)
Removing a view from DOM
Removing a view from DOM can be easily achieved by calling the remove function on the view.
bookList.remove();
Point of interest
In this article we looked at the backbone views. We looked at how we can use backbone views to implement better structured applications that can easily perform DOM manipulations.
原文链接:http://rahulrajatsingh.com/2014/07/backbone-tutorial-part-6-understanding-backbone-js-views/
- backboneViewsSample.zip (323.1 KB)
- 下载次数: 0
发表评论
-
Part 8: Understanding Backbone.js Events
2016-06-22 10:34 836In this article, we will look a ... -
Part 7: Understanding Backbone.js Routes and History
2016-06-22 09:52 589In this article, we will try to ... -
Part 5: Understanding Backbone.js Collections
2016-06-21 14:39 674In this article we will discuss ... -
Part 4: CRUD Operations on BackboneJs Models using HTTP REST Service
2016-06-21 14:21 964In this article we will discuss ... -
Part 3: More about Backbone Models
2016-06-21 14:08 817In this article we will look at ... -
Part 2: Understanding the basics of Backbone Models
2016-06-21 12:55 713When we talk about any MV* patt ... -
Part 1: Introduction to Backbone.Js
2016-06-21 11:12 736It was a long time ago (almost ...
相关推荐
在IT行业中,Backbone.js是一个非常重要的JavaScript库,它为构建复杂的Web应用程序提供了一种结构化的方法。在本文中,我们将深入理解Backbone Models的基本概念,这是Backbone框架的核心组件之一。 **Backbone ...
Cocoa Frameworks: The Backbone of Your App Creating Views Programmatically Strings, Text, and Fonts Get More from Interface Buillder Drawing on the Strength of Core Graphics Moving to Core Animation ...
JESD79-2F DDR2 JESD79-3F DDR3 JESD79-4D DDR4 JESD79-5C DDR5 JESD209-2F LPDDR2 JESD209-3C LPDDR3 JESD209-4E LPDDR4 JESD209-4-1A LPDDR4X JESD209-5C LPDDR5(X)
COMSOL二维光子晶体角态研究:单胞与超胞能带计算及边界态与角态特性分析,COMSOL二维光子晶体角态研究:单胞与超胞能带计算及边界态与角态特性分析,comsol二维光子晶体角态。 单胞能带,超胞能带,边界态以及角态计算。 ,comsol;二维光子晶体;角态;单胞能带;超胞能带;边界态计算,基于Comsol的二维光子晶体角态及能带边界计算研究
六自由度机械臂抓取动作仿真与代码解析:抓取动画、关节参数变化及轨迹图解详解,六自由度机械臂抓取动作仿真指南:掌握两套代码实现动画与轨迹图模拟学习攻略,六自由度机械臂抓取动作仿真-8 两套关于抓取动作的代码,包括抓取动画、关节角、角速度、角加速度的变化仿真、以及抓取轨迹图 简单易懂好上手~ ,六自由度机械臂;抓取动作仿真;抓取动画;关节角变化;角速度角加速度;抓取轨迹图;两套代码;简单易懂好上手,六自由度机械臂抓取动作仿真演示:代码与轨迹图解
ITC网络广播工具软件
Multisim四位密码锁电路仿真设计:设定、开锁与声光报警功能演示资料包,Multisim四位密码锁电路仿真设计:设定、输入、开锁与报警功能详解,附源文件、原理说明书与演示视频,multisim四位密码锁电路仿真设计 功能: 1.通过拨码开关1进行初始密码设定。 2.通过拨码开关2输入密码,实现开锁判断。 3.如果密码正确,LED绿灯亮,表示开锁。 4.如果密码不正确,LED红灯亮,蜂鸣器鸣叫,声光报警。 资料包含:仿真源文件+原理说明书+演示视频 ,四位密码锁电路、Multisim仿真设计、初始密码设定;拨码开关输入;开锁判断;LED灯显示;声光报警;仿真源文件;原理说明书;演示视频,Multisim四位密码锁电路仿真设计:初始密码设置与智能解锁功能的声光报警展示
俗话说,摸鱼摸的好,上班没烦恼,毕竟谁能拒绝带薪拉屎呢(手动狗头) 这是一个云开发职场打工人专属上班摸鱼划水微信小程序源码,没有后台 直接导入微信开发者工具即可运行,UI简约大气漂亮,只需登录微信公众平台配置完合法域名即可轻松上线。 用户进入摸鱼小程序,可以自由设置薪资,上班时间、下班时间、发薪日、 月工作天数以提醒自己摸鱼,全民打酱油,让自己成为摸鱼冠军,《商鞅摸鱼哲学》 摸鱼不是自我放纵,而是个人实力的积蓄,我们的小目标是晚睡晚起 小程序中的今日待办会提醒用户带薪拉屎和闲逛,下方展示的是距离休息日的天数,距离下一次发工资的天数和节日的天数。
【毕业设计】基于Java的开发的一个集合校园二手交易、拼车、失物招领等功能的app_pgj
个人记录:PICkit3离线烧录流程 使用软件:MPLAB X IDE v5.30 记录时间:20250215
基于Matlab代码的电力系统状态估计与实验仿真研究:扩展卡尔曼滤波和无迹卡尔曼滤波在电力系统动态状态估计中的应用及效果分析,Matlab仿真实验研究:基于扩展卡尔曼滤波器与无迹卡尔曼滤波器对电力系统状态估计的影响及验证,状态估计 电力系统状态估计 Matlab代码 实验仿真研究 电力系统由于测量值和传输误差,还有测量噪声的影响,会对状态估计产生影响。 因此,需要对嘈杂的测量进行滤波,以获得准确的电力系统运行动态。 本文使用扩展卡尔曼滤波器(EKF)和无迹卡尔曼滤波器(UKF)来估计电力系统的动态状态。 扩展卡尔曼滤波EKF、无迹卡尔曼滤波UKF 利用扩展的无迹卡尔曼滤波器估计了动力系统的动态状态。 对WECC 3机9总线系统和新英格兰10机39总线系统进行了案例研究。 结果表明EKF和UKF都能准确地估计电力系统的动态状态。 ,核心关键词:状态估计; 电力系统状态估计; Matlab代码; 实验仿真; 测量值误差; 测量噪声; 扩展卡尔曼滤波器(EKF); 无迹卡尔曼滤波器(UKF); 动力系统; 动态状态估计; WECC 3机9总线系统; 新英格兰10机39总线系统。,Matlab
springboot在线考试--
台达DVP EH3与MS300 PLC&变频器通讯程序的全面解决方案,台达DVP EH3与MS300通讯程序:稳定可靠的频率控制与启停管理系统,台达DVP EH3与台达MS300通讯程序(TDEH-9) 可直接用于实际的程序,程序带注释,并附送触摸屏程序,有接线方式和设置,通讯地址说明等。 程序采用轮询,可靠稳定 器件:台达DVP EH3系列PLC,台达MS300系列变频器,昆仑通态7022Ni 功能:实现频率设定,启停控制,实际频率读取,加减速时间设定。 资料:带注释程序,触摸屏程序,接线和设置说明,后续有技术咨询。 ,核心关键词:台达DVP EH3; 台达MS300; 通讯程序(TDEH-9); 轮询; 稳定; 频率设定; 启停控制; 实际频率读取; 加减速时间设定; 触摸屏程序; 接线方式; 设置说明; 技术咨询。,台达PLC与变频器通讯程序(带注释、触摸屏控制)
项目资源包含:可运行源码+sql文件 适用人群:学习不同技术领域的小白或进阶学习者;可作为毕设项目、课程设计、大作业、工程实训或初期项目立项。项目具有较高的学习借鉴价值,也可拿来修改、二次开发。 个人账户管理:支持用户注册、登录与个人信息编辑;提供密码找回及账号安全保护措施。 声纹采集:利用麦克风设备录制用户的声纹样本;支持多种录音格式和质量调整,确保采集到清晰、准确的声纹数据。 声纹模板库管理:建立和维护一个安全的声纹模板库;支持声纹模板的添加、删除、更新和查询操作。 声纹比对与识别:运用深度学习算法对输入的声纹数据进行特征提取和匹配;实现快速、准确的声纹身份验证。 多场景应用支持:适用于多种场景,如门禁系统、移动支付、远程登录等;可根据实际需求定制开发相应的应用场景。 实时监控与报警:实时监控系统运行状态,包括声纹识别成功率、处理速度等指标;当出现异常情况时,及时发出报警信息。 数据分析与报告生成:收集并分析声纹识别过程中的数据,如识别准确率、处理时间等;根据用户需求输出包含详细图表说明的专业级文档供下载打印保存。 社区互动交流:设立论坛版块鼓励用户分享心得体会讨论热点话题;定期邀请行业专家举办线上讲座传授实用技巧知识。 音乐筛选与推荐:集成音乐平台API,根据用户的浏览习惯和情绪状态推荐背景音乐,增强用户体验。 数据可视化:提供交互式的数据可视化面板,使非技术用户也能轻松理解复杂的数据集,从而做出更明智的决策。
三相与多相开绕组永磁同步电机仿真模型的先进控制策略探讨与实现,三相与多相开绕组永磁同步电机的Simulink仿真模型与先进控制策略研究,开绕组电机,开绕组永磁同步电机仿真模型、simulink仿真 共直流母线、独立直流母线,两相容错,三相容错控制,零序电流抑制,控制策略很多 三相开绕组永磁同步电机,六相开绕组永磁同步电机 五相开绕组永磁同步电机,五相开绕组电机 ,开绕组电机; 永磁同步电机仿真模型; simulink仿真; 共直流母线; 独立直流母线; 两相容错; 三相容错控制; 零序电流抑制; 控制策略; 六相开绕组永磁同步电机; 五相开绕组永磁同步电机,开绕组电机仿真研究:共直流母线与独立直流母线的容错控制策略
【毕业设计】基于Java的开发的网上汽车租赁管理系统_pgj
csv 模块是 Python 的标准库,无需额外安装。 运行结果如下图: ['姓名', '年龄', '城市'] ['张三', '25', '北京'] ['李四', '30', '上海'] ['王五', '22', '广州']
【毕业设计】基于Java+Springboot+Vue的宠物领养系统_pgj
让前端开发者学习“机器学习”!
【毕业设计】基于Java的实现的以宠物为主体的论坛式的APP