Javascript-how to solve the frontend development process?

Source: Internet
Author: User
What is the front-end development process for websites whose content needs to be updated frequently? Is html, css, and js still written to the backend or html based on backend templates such as smarty? What is the front-end development process for websites whose content needs to be updated frequently? Is html, css, and js still written to the backend or html based on backend templates such as smarty?

Reply content:

What is the front-end development process for websites whose content needs to be updated frequently? Is html, css, and js still written to the backend or html based on backend templates such as smarty?

The frontend needs to write data interfaces at the backend to obtain data and then update the website. This should be a good way to handle it. What you say is that the frontend and backend are not separated by templates, you need to work with the frontend and backend to modify an item.

Without using open-source projects.

Front end:
Generate front-end pages based on the design draft
Implement page effects in demand
Backend:
Data Interaction and frontend page Interface
Cooperation:
Front-end: User smarty or ajax for Data Interaction
Backend: Describes data interaction rules.
Frontend + backend: Check whether the data on the debug page is displayed normally. process the data that cannot be provided or cannot be provided.

Taking my development experience as an example:
Frontend responsibilities:
1. Generate a front-end page based on the design draft
2. Implement the page effect in the requirement
3. Place all the page content in a separate file. When loading, use js to control file loading.
Backend responsibilities:
Data Interaction and frontend page Interface
Finally:
Front-end: Data Interaction with backend ajax can be considered as a joint debugging process
Write a velocity shelf, load some common headers and tails, and write the js path to be referenced to the backend.
Backend: accept the velocity file and place it in the corresponding location

The advantage of this is that the complete separation is achieved, because the shelves on the page are the same, but the js paths are different, and the content is controlled by js. Once the demand changes, do not negotiate and pull out resources to help you modify the template. You only need to change the content in the separate file.

Answer: The current process of working companies:

The frontend defines interfaces, template data interfaces, and asynchronous data interfaces with the backend.
Then, the front-end simulates false data requests and calls the front-end presentation and interaction logic.
After completing the debugging, you can call back-end.

Front-end edp:
Debugging
Build
Code Generation

Use edp WebServer for debugging.

Interested can take a look: https://github.com/ecomfe/edp
I am not very familiar with this tool, and I just took over the project.

Generally, the front-end and back-end define page data. The front-end can use the edp tool for simulation and debugging.

The content is updated frequently and requires a content management system. You do not need to change the code when updating the content image.
If the page is complex, you can perform static operations and then set up smarty. If it is simple, you can directly change the smarty to test the environment by yourself.

Isn't the smarty template developed by the front-end? Can you still expect a PHPer to write HTML, JS, and CSS?

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.