当前位置:网站首页>面试第二家公司的面试题及答案(二)
面试第二家公司的面试题及答案(二)
2022-07-26 10:15:00 【Xaivor】
- 一个页面的组成主要由哪三个部分组成?
html head body - 一个盒子模型的基本属性主要有?
margin padding width height border 等等 - 1B = 8 bit
- 堆和栈的区别?
我们都知道:在计算机领域中,堆栈是两种数据结构,它们只能在一端(称为栈顶(top))对数据项进行插入和删除。
栈:队列优先,先进先出;由操作系统自动分配释放 ,存放函数的参数值,局部变量的值等。其操作方式类似于数据结构中的栈。
堆:先进后出;动态分配的空间 一般由程序员分配释放, 若程序员不释放,程序结束时可能由OS回收,分配方式倒是类似于链表。
5.MVC是什么,分别是什么?那MVVM呢?
MVC 是一种使用 MVC(Model View Controller 模型-视图-控制器)设计创建 Web 应用程序的模式:
- Model(模型)表示应用程序核心(比如数据库记录列表)。
- View(视图)显示数据(数据库记录)。
- Controller(控制器)处理输入(写入数据库记录)。
MVC 模式同时提供了对 HTML、CSS 和 JavaScript 的完全控制。
Model(模型)是应用程序中用于处理应用程序数据逻辑的部分,通常模型对象负责在数据库中存取数据。
View(视图)是应用程序中处理数据显示的部分,通常视图是依据模型数据创建的。
Controller(控制器)是应用程序中处理用户交互的部分,通常控制器负责从视图读取数据,控制用户输入,并向模型发送数据。
MVC 分层有助于管理复杂的应用程序,因为您可以在一个时间内专门关注一个方面。例如,您可以在不依赖业务逻辑的情况下专注于视图设计。同时也让应用程序的测试更加容易。
MVC 分层同时也简化了分组开发。不同的开发人员可同时开发视图、控制器逻辑和业务逻辑。
最简单的来说就是:
前端 | 后端 | |
M | json xml html数据 等 | 数据库 文件等 |
V | 模板引擎 模板片段等 | HTML模板 |
C | JS 业务逻辑 HTTP请求交互(AJAX,JSONP,WEBSOCKET) | HTTP请求路由 搜索引擎 数据分析 文件服务 |
- 低耦合。视图(View)可以独立于Model变化和修改,一个ViewModel可以绑定到不同的"View"上,当View变化的时候Model可以不变,当Model变化的时候View也可以不变。
- 可重用性。你可以把一些视图逻辑放在一个ViewModel里面,让很多view重用这段视图逻辑。
- 独立开发。开发人员可以专注于业务逻辑和数据的开发(ViewModel),设计人员可以专注于页面设计,使用Expression Blend可以很容易设计界面并生成xaml代码。
- 可测试。界面素来是比较难于测试的,而现在测试可以针对ViewModel来写。
边栏推荐
- Tower of Hanoi II | tower of Hanoi 4 columns
- 30 minutes to thoroughly understand the synchronized lock upgrade process
- Sqoop【付诸实践 02】Sqoop1最新版 全库导入 + 数据过滤 + 字段类型支持 说明及举例代码(query参数及字段类型强制转换)
- Mysql5.7.25 master-slave replication (one-way)
- Leetcode 504. 七进制数
- Learning about tensorflow (I)
- Phpexcel export Emoji symbol error
- Write a script that can run in Bash / shell and PowerShell
- Principle analysis and source code interpretation of service discovery
- Encapsulation of tabbarcontroller
猜你喜欢
Leetcode 504. 七进制数
Unstoppable, pure domestic PCs have been in place, and the monopoly of the U.S. software and hardware system has been officially broken
Learning about tensorflow (II)
Necessary for beginners: debug breakpoint debugging skills in idea and common breakpoint skills
[qualcomm][network] QTI service analysis
2022 zhongkepan cloud - server internal information acquisition and analysis flag
数据库的复习--1.概述
万字详解“用知识图谱驱动企业业绩增长”
数通基础-Telnet远程管理设备
[datawhale] [machine learning] Diabetes genetic risk detection challenge
随机推荐
IE7 set overflow attribute failure solution
Principle analysis and source code interpretation of service discovery
What is the principle of reflection mechanism?
Write a script that can run in Bash / shell and PowerShell
SSG framework Gatsby accesses the database and displays it on the page
Wu Enda linear regression of machine learning
Vs2019 configuring opencv
分布式网络通信框架:本地服务怎么发布成RPC服务
论文笔记(SESSION-BASED RECOMMENDATIONS WITHRECURRENT NEURAL NETWORKS)
Mysql5.7.25 master-slave replication (one-way)
点赞,《新程序员》电子书限时免费领啦!
Unstoppable, pure domestic PCs have been in place, and the monopoly of the U.S. software and hardware system has been officially broken
Study notes of the third week of sophomore year
In the same CONDA environment, install pytroch first and then tensorflow
Uni app learning summary
Apple dominates, Samsung revives, and domestic mobile phones fail in the high-end market
30 minutes to thoroughly understand the synchronized lock upgrade process
网易云UI模仿-->侧边栏
【有奖提问】向图灵奖得主、贝叶斯网络之父 Judea Pearl 提问啦
Phpexcel export Emoji symbol error