[微处理器开发] J2EE软件开发面试题

[复制链接]
发表于 2022-9-28 16:02:04
一、你对MVC的理解,MVC有啥优故障?联系Struts,说明在一个Web使用如何去使用?答:??MVC设计方式(使用观察者方式的结构方式)M:Model(Businessprocesslayer),模型,操作数据的业务管理层,并独立于发挥层(Independentofpresentation)。V:View(Presentationlayer),视图,通过客户端数据类型显示数据,并回显模型层的履行成果。C:Controller(Controllayer),控制器,也即是视图层和模型层桥梁,控制数据的流向,承受视图层发出的事情,偏重绘视图MVC结构的一种实现模型模型二(Servlet-centric):JSP+Servlet+JavaBean,以控制为核心,JSP只负责显示和搜集数据,Sevlet,连接视图和模型,将视图层数据,发送给模型层,JavaBean,分为业务类和数据实体,业务类管理业务数据,数据实体,承载数据,基本上大多数的项目都是使用这种MVC的实现方式。StrutsMVC结构(Webapplicationframeworks)Struts是使用MVC的实现方式二来实现的,也即是以控制器为核心。Struts提供了一些组件使用MVC开发使用程序:Model:Struts没有提供model类。这个商业逻辑必须由Web使用程序的开发者以JavaBean或EJB的方式提供View:Struts提供了actionform创建formbean,关于在controller和view间传输数据。此外,Struts提供了自定义JSP标签库,辅佐开发者用JSP创建交互式的以表单为基础的使用程序,使用程序资源文件保留了一些文本常量和错误消息,可转变为其它言语,可关于JSP中。Controller:Struts提供了一个核心的控制器ActionServlet,通过这个核心的控制器来调用其他用户注册了的自定义的控制器Action,自定义Action需要契合Struts的自定义Action标准,还需要在struts-config.xml的特定配置文件中进行配置,接收JSP输入字段形成Actionform,然后调用一个Action控制器。Action控制器中提供了model的逻辑接口。
部分面试题答案.doc

(1. Your understanding of MVC, what are the advantages and disadvantages of MVC? Contact Struts to explain how to use it in a Web application? Answer: ?? MVC design method (structure method using observer method) M: Model (Business process layer), model , the business management layer that operates the data, and is independent of the play layer (Independentofpresentation). V: View(Presentationlayer), view, displays data through client data type, and echoes the performance results of the model layer. C: Controller (Controllayer), the controller, that is, the bridge between the view layer and the model layer, controls the flow of data, bears things sent by the view layer, and focuses on redrawing the view MVC structure An implementation model model II (Servlet-centric): JSP Servlet JavaBean, with control as the core, JSP is only responsible for displaying and collecting data, Sevlet, connecting view and model, sending view layer data to model layer, JavaBean, divided into business class and data entity, business class manages business Data, data entities, carrying data, basically most projects use this MVC implementation. StrutsMVC structure (Webapplicationframeworks) Struts is implemented using the second implementation of MVC, that is, the controller is the core. Struts provides some components to develop applications using MVC: Model: Struts does not provide a model class. This business logic must be provided by the developer of the Web application in the form of JavaBean or EJB View: Struts provides an actionform to create a formbean, which is about transferring data between the controller and the view. In addition, Struts provides a custom JSP tag library to assist developers in creating interactive form-based applications with JSP, using program resource files to retain some text constants and error messages, which can be converted into other languages. middle. Controller: Struts provides a core controller ActionServlet, through this core controller to call the custom controller Action registered by other users, the custom Action needs to conform to the Struts custom Action standard, and also needs to be in struts-config .xml to configure in a specific configuration file, receive JSP input fields to form Actionform, and then call an Action controller. The logical interface of the model is provided in the Action controller.
Partial interview questions answers.doc)

[下载]16020474985.rar




上一篇:C++ 6.0
下一篇:java 设计模式

使用道具 举报

Archiver|手机版|小黑屋|吾爱开源 |网站地图

Copyright 2011 - 2012 Lnqq.NET.All Rights Reserved( ICP备案粤ICP备14042591号-1粤ICP14042591号 )

关于本站 - 版权申明 - 侵删联系 - Ln Studio! - 广告联系

本站资源来自互联网,仅供用户测试使用,相关版权归原作者所有

快速回复 返回顶部 返回列表