Angularjs+nodejs+mongodb three-piece set

Source: Internet
Author: User

To tell the truth, your own knowledge of the front of the web is not too deep, but because of the needs of the project, so there will always be a need to contact the front of the web. When it comes to the Web front-end, you will certainly think of css+js+html, indeed, the work of the Web front-end, from a general point of view is to add some necessary page style to the page to achieve the beautification effect. Let's start with a CSS bar, a style language that allows us to beautify the HTML tag by adding a certain property function to the page. In CSS style writing, allow us to define three types of CSS styles: 1.class style, 2. Property style, 3.id style; The three styles are the same, but the ease of use is much worse. When we think that there are too many redundant styles in an HTML page, we can pull out the same CSS separately, and this time it will be an external style. We can use the Link property in the header tag of the HTML to do the CSS's outreach. You can think of it as a bit of an object-oriented programming property, which makes it easy to implement abstract encapsulation. However, in this case, it is very likely that the page rendering is too slow. Because of the mechanism of the browser's rendering engine, when it starts to render from top to bottom, when it encounters the link property, the browser blocks the current page rendering and begins loading the external stylesheet. When the external CSS is loaded, the browser will not start the subsequent HTML page rendering action. So what about JS? What is the purpose of starting up the entire Web front end? Obviously JS is out of the core of the position. If the CSS is compared to drawing the HTML page of the brush, then we can compare JS to the art instructor, CSS drawing process, JS can be a dynamic command of how it should do? Not only that, JS can also start the front page of the data request function, will request the data back without refreshing the exhibition HTML page. So sometimes, if we want a good HTML page effect, as long as you have a good css+js to use the technology, then you can make very cool HTML page.

        Sometimes I think css+js should be a very simple skill to learn. Because it is the kind of thing that can be learned, but it is really very troublesome. But it's not about how sophisticated the algorithmic problem is, it's because things are annoying, and there are a variety of browser compatibility issues. So is there a good framework that can help us do a good job: page data is not refreshed, request sent, CSS style dynamic changes? I think Angularjs will be able to meet your requirements very well. What is the biggest feature of Angularjs? App/controller two sets of JS Modular front-end programming based on single-page no-refresh. Using ANGULARJS, we can organize our own JS script well, while the background of the $scope-based JS variable can be well updated to the front page. Well, ANGULARJS has solved the problem of our HTML to JS well, and then what? Should we consider the processing logic of JS to backend code. You think if the back-end language is Java, then we need to use JS to the HTML page inside the display of the data sent to the background Java code inside, at the same time? We also need to put back the data that the background Java code responds to on the HTML page. In the middle from JS to the Java language of a span, then there is a good way to ensure that both the front and back end are the same language? The answer is Nodejs, and by Nodejs we can unify the front end and back end into a JS language. This will be a good vision, so a dozen to my familiarity with JS, is it meant that I can both back and forth to develop at the same time? is not the development cost of the project can be reduced to very low. Originally needed at least two people can do things, now I find a design of the Web front-end, theoretically can be dry. Through Nodejs, I have not tested large-scale commercial projects, but small and medium-sized projects are certainly no problem. And the development efficiency is very high, I have been through the nodejs with a week to achieve a similar to the Watercress reading module of the second-hand book platform, although the function, design aspects are not too complete, but competent high-strength development needs are absolutely no problem. Say here, you may feel strange, through JS can I connect to the database? Can I persist the persistence of data? The answer is yes, because the database connection mainly depends on the database driver, access to my database driver support JS language connection, then can not it?

Now, for the big data platform, there is a nosql concept, I think the back-end development of the comrades are certainly not unfamiliar. Ask what would suggest such a concept? Mainly in this era of background, the data information is too big, if we still use the traditional relational database to save data, one is the real world in the data is not necessarily all the same rules, relevance. Another type of data read operation through a relational database is particularly laborious, and the data format that we read out requires another level of processing to meet our project usage needs. So in the face of such a scenario demand, there is a nosql meaning: not only SQL. We can directly to the data in accordance with the reality of the real world to save data, such as a person in the real world, we will say what this person is called, how big, male female, live, handsome, drift not beautiful and so on. If this is the case, we will be able to break the above information into a single field by storing it as a relational type. But what? Using NoSQL, we can simply save the data in a JSON format, and this JSON-formatted data includes you as a person. Read, I directly find this data can, do not need this table to check, the table even check.

In the many NoSQL database products, I think MongoDB should be the most operating, more mature and stable.

Now we can imagine, if there is a project based on H5 or small and medium-sized web sites, we use the Three Musketeers to develop, what kind of enjoyment experience? Sometimes it takes less than a week for the project to be formed. Under the cost, imagine!

Angularjs+nodejs+mongodb three-piece set

Related Article

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.