June 26 Interview

Source: Internet
Author: User

Result: failed! I have not answered many questions. Please try again.

I. Design Pattern (MVC and factory pattern)
Factory model:Defines an interface for users to create objects, so that the subclass determines which class to instantiate. Factory method delays the instantiation of a class to its subclass. The factory model reflects the combination and inheritance relationship.
MVC mode:Model-View-controller mode: model, view, and controller mode.
The model represents enterprise data and business rules. Among the three components of MVC, the model has the most processing tasks. For example, it may use component objects such as ejbs and ColdFusion components to process databases. The data returned by the model is neutral, that is, the model has nothing to do with the data format, so that a model can provide data for multiple views. Because the Code applied to the model can be reused by multiple views only once, code duplication is reduced.
The Controller accepts user input and calls models and views to fulfill user requirements. Therefore, when you click a hyperlink on a web page and send an HTML form, the controller does not output anything or process anything. It only receives the request and determines which model component is called to process the request, and then determines which view is used to display the data returned by the model for processing.
A view is the interface on which the user sees and interacts with it. One major benefit of MVC is that it can process many different views for your applications. In fact, there is no real processing in the view. Whether the data is stored online or an employee list, as a view, it is just a way to output data and allow users to manipulate it.
Other modes: Observer mode and adapter Mode

Ii. What paradigms does a relational database meet?

1. First paradigm: If the attribute of each relational R in the relational model R is an inseparable data item, then R is called the first paradigm. (The paradigm that must be met by relational databases)
2. Second paradigm: If the relational model R is 1nf and each non-primary attribute fully function depends on the candidate key, then R is called the second paradigm.
3. Third paradigm: If the relational model R is 2nf and all the non-primary attributes in the relational model R (u, f) do not have a passing dependency on any candidate keywords, the relationship R belongs to the third paradigm.
4. BC paradigm: the BC paradigm is the enhanced version of the third paradigm. However, some people say that it has developed directly from 1nf, that is, each attribute, including primary or non-primary attributes, both depend entirely on the candidate key, and there is no transfer dependency.

3. Process of page request to return data
When the client requests a page containing web forms controls from the server, Asp.. NET environment will load this page in turn, create controls in the page, establish control Association, run the page logic, generate HTML code to return to the client, and display the HTML page in the browser.

Iv. Static Constructor

1. Static constructor can coexist with instance constructor without parameters. Although the parameter list is the same, the execution time of the two is different. The static constructor is executed when the Runtime Library loads the class, and the instance constructor is executed when the instance is created.

2. The static constructor can only initialize static members and cannot act on non-static members. The instance constructor can operate static and non-static members, except static read-only members.

3. The static constructor can be executed only once, and the. NET Runtime Library cannot determine when to execute it.

4. A class can have only one static constructor. There can be multiple instance constructors. Static members can be initialized during Declaration or in static constructor. In general, simple static members are initialized during declaration, and complex static members are initialized in the static constructor.

5. execution sequence of constructor: allocate memory space for static members -- execute static member initialization -- execute static constructor -- allocate memory space for instance members -- execute instance Member initialization -- execute instance Constructor

5. Can I submit two pages for one page?
Yes. See the foreground script.

Document. form1.action = "test. asp ";
Document.form1.tar get = "_ blank ";
Document. form1.submit ();

Document. form1.action = "test-2.asp ";
Document.form1.tar get = "_ Self ";
Document. form1.submit ();

6. What interfaces must the DataGrid-bound class implement?
Ilist or ilistsource

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.