9 front-end development classic face questions and answers

1. What is the W3C standard?

WEB standard is not a standard, but a collection of standards. The main page consists of three parts: structure (Structure), performance (Presentation) and behavior (Behavior). Corresponding standard can be divided into three areas: the structure of the standard languages ​​including XHTML and XML, the performance standard languages ​​including CSS, standards of conduct including object models (such as the W3C DOM), ECMAScript and so on.

2, bootstrap responsive principle

Through the lattice systems and media queries implemented @ small screen (flat, greater than or equal 768px) @media (min-width: @ screen-sm-min) {...} // medium screen (desktop monitor, greater than or equal 992px) @media (min-width: @ screen-md-min) {...} // screen (large desktop monitors, greater than or equal ... 1200

The difference 3, HTML / XHTM of

XHTML and HTML 4.01 standard is not much different.

XHTML elements must be properly nested.

XHTML elements must be closed.

Label names must be lowercase.

XHTML documents must have a root element.

[If we programmers, web front-end interest, want to learn, look Xiaobian it. I am a front-end development programmer now online lessons to teach front-end, every night live free in the group. From the most basic HTML + CSS + JS to move to the end of HTML5 frameworks are finishing, given to every small front-end partners, here it is the gathering place for white, welcome beginners and advanced junior partner. Plus group: 731 771 211. Learning essential public front-end number ID: mtbcxx]

4, page layout and architecture

Layout can be coded terms, it can be visual aspect.

Related to the semantic tags (also contains a div + css) layout, iframe frame (special local use) layout and table layout (only used in some special place, not recommended for site-wide use), you can Baidu under the specific terms of coding Learn a learning knowledge.

If it is visual interaction aspects, is more and more, there will be a new design layout, such as advanced parallax type layout, full screen layout, waterfall, seamless puzzle layout a little every year, these are not confined to the traditional layout; traditional e-commerce, information class of mostly single-column, two-column or three-column layout, and more-column layout; the relevant resolution widescreen layout and narrow screen layout, inductive layout. Too many choices, and things will be more to learn, to get to know it. There is more need to slowly groping and layout experience. I know I say.

As for the mobile phone side, are some examples: vertical list, horizontal squares, squares, TAB switching, accordion layout (there are more than content to showcase its classification), drawer / sidebar, label episodic), because of the small screen to increase the user experience can use a different layout depending on the circumstances.

5, BootStrap study notes, summarize the advantages and disadvantages

advantage:

BT One of the advantages is that you can adjust the page based on the user's screen size to size in all performed well.

BT pre-defined CSS class a lot, when directly used to impart class corresponding to the class name, such as text-left, text-align, .table the like. The most representative is btn class, BT defines a base class .bt, if you want other styles can also be extended on the basis of class, to achieve different visual effects.

BT's JavaScript plugin is very rich, either with their own ready-made can be expanded, BT provides integrated BT.js a board that you can directly take over use can be used individually introduced * .js can be.

insufficient:

Compatible with IE there is not a small problem, all of the elements of the BT box model are set to become a border-box, which is under the IE box model promiscuous mode, this has led to the light incompatible IE. It also uses a lot of H5 tags and CSS3 syntax, grammatical labels compatibility of these aspects there are also not a small problem, of course, there are many ways online compatible with IE, but need to introduce other documents, some not small, will inevitably lead to loading speed change slow, affecting the user experience.

BT compatibility IE6,7 certainly not good, support for IE8 also require some additional documents.

With media queries required to achieve the response.js of IE8

BT does not support the old IE compatibility mode. In order to run the latest IE browser rendering mode it is recommended that this label is added to your page:

Press the F12 key to open IE debugging tool, you can see what the current IE rendering mode yes.

BT belongs to the front-end UI library, you can quickly set up the front page, and design a responsive interface, you can also use the saas redesigned components,

6, JQeury study notes, summarize the advantages and disadvantages

advantage:

jQuery script and page separation, is the preferred operating DOM js library.

A minimum of code to do most things

A minimum of code to do most things, this is the slogan of jQuery, but also worthy of the name. Using its advanced selector, developers only need to write a few lines of code can achieve amazing results. Developers need not be too worried browser differences, which in addition also fully supports Ajax, but has many other abstract concepts to improve programming efficiency of developers. jQuery JavaScript brought to a higher level. The following is a very simple example:

code show as below:

$("p.neat").addClass("ohmy").show("slow");

Through the above short code, developers can traverse the "neat" class in all

Element, then the addition thereto of "ohmy" class, while displaying animation slowly every paragraph. Developers do not need to check the client browser type, without writing loop code, without having to write complex animation function, the above-mentioned effects can be achieved only through a line of code.

performance

In large JavaScript framework, jQuery understood best performance. Despite the different versions with many new features, its most stripped-down version is only 18KB size, this figure has been difficult to reduce. Each version of jQuery have a significant performance increase.

Plug

jQuery plug-ins developed based on currently has about thousands. Developers can use plug-ins to confirm the form, chart type, field prompts, animation, progress bars and other tasks.

Saving developers time to learn

Of course, if we really want to learn jQuery, developers still need to invest a little time, especially if you want to write a lot of code words or independent plug-in, even more so. However, developers can take "all broken up" approach, and jQuery provides a number of sample code, getting started is a very easy thing.

insufficient:

Not backward compatible

Plug-in compatibility.

jQuery stability

In a large framework, jQuery core code library support for animation and special effects are relatively poor.

7 "high cohesion, low coupling," in the end mean?

'High cohesion, low coupling' with respect to the tags, a project:

Linkages between each module degree of close contact between the modules more closely, the higher the coupling, the independence of the module worse! On the other hand the same way;

A module tightness of the connection between the individual elements, if the link between the higher the degree of each element (statement block), the higher the cohesive, i.e., 'high cohesion'!

Such as: a project there are 20 good method calls, but to modify one of them, another 19 should be modified, this is the high coupling! Independence bad!

Now the software architecture design, will require "high cohesion, low coupling", to ensure high-quality software! mark!

8, there are front and rear end of the technical principles of joint development (Ajax, Json) must know and understand DOM, Xml concept, familiar with the front and back interactively.

Ajax asynchronous interaction principle: Ajax has its core JavaScript, XMLHTTPRequest, DOM objects, to send an asynchronous request to the server through the XmlHttpRequest object to obtain data from the server, and then use JavaScript to manipulate the DOM and update the page.

Json: I generally use more of is to get the JSON data asynchronously via AJAX.

DOM: Document Object Model, one glance everything is dom node, the root is that it can wireless nested. Used to get or set the property tag of the document, for example, get or set the value of the form of the input value.

BOM: browser object model. Used to get or set the browser's properties, behavior, such as: new window, access the screen resolution, browser version number.

XML: is designed to transmit and store data, and is designed to display the formatted data. Just plain text.

- front and back interactively:

9, GET and POST requests difference

Body GET data is placed after the submitted URL to? URL and transmit the divided data, is connected to between & parameter, such as EditPosts.aspx? Name = test1 & id = 123456. POST method is the data submitted in a HTTP packet .

GET data submitted by size limitations (because the browser restrictions on the length of the URL), and data submitted by the POST method is not limited.

GET requires the use Request.QueryString to get the value of a variable, while the POST method to obtain the value of a variable by Request.Form.

Submit a GET data, it will bring security problems, such as a login page when submitting data via GET, the user name and password will appear in the URL, if the page can be cached or others can access this machine, you can from history record obtain the user ID and password.

As a someone who has, I have to tell you to ask the older cattle is really important, so that you can take a lot less detours, do not be afraid shame, no face, the face value of some money? Learn a real skill is most important. No skill called really no face.

Here I recommend the front-end development learning buckle QUN: 767 273 102 , which is the front end of the study, from the most basic HTML + CSS + JS [cool special effects, games, plug-in package design patterns] to move to the end of the project HTML5 combat learning materials are finishing, given to every front-end junior partner, had wanted to learn web front-end, or change jobs, or college students, as well as work want to upgrade their skills, we are learning the junior partner welcome to join.

Guess you like

Origin blog.51cto.com/14284898/2402297