Today, we finally come up with a convenient dynamic development method.
It is easier than JSS and less sass.
Required tools:
Microsoft Visual maxcompute 2010
Aptana Studio 3
Project Introduction:
1. Four people are co-encoded. Many times, multiple people modify the same file at the same time.
2. Modular
3. For details, see the image description.
Start work:
Question 1-how to reduce duplicationCodeWriting?
Solution 1-Modularization
Question 2-how to reduce the number of common code that is repeated in the copy operation? Such as the color value and border.
Solution 2-dynamicProgramInformatization
We will focus on the solution to question 2.
All public modules are suffixed with HTML. The suffix of aspx is used for assembly. Our goal is to use some basic procedural functions provided by Aspx.
Why can we define variables in HTML files?
The reason is simple. We finally call these public modules with Aspx.
A picture has a truth.
These are the processing of HTML.
Next, process CSS. A little more complicated.
First, let's look at the figure -- isn't the CSS file with the aspx suffix a little weird? Otherwise, we aim to use the procedural function of aspx to process CSS.
Reference in head like this.
<LINK rel = "stylesheet" type = "text/CSS" href = "CSS/*****. aspx"/>
IE is something of Microsoft, and it is absolutely compatible.
Google is more strict. Write such a line of code in the first line of the aspx file with CSS code written.
<% Response. contenttype = "text/CSS" %>
Then let's see what the aspx file looks like.
Functions and variables can be used at will. What loops and so on are even more difficult!
This is what CSS can do!
Careful people may find that the Code is not highlighted. I am also very entangled. I want to configure it in vs2010, but I cannot find it. Please let us know if you have any experts!
To make up for this, I used the external editor Aptana Studio 3.
Highlight under configuration
Follow these steps to achieve satisfactory results.
However, my pages are all suffixed with aspx, And the handover work will be very depressing.
What we need is completely static.
What should we do?
It's easy to produce HTML, so I wrote a very simple production tool.
The final HTML code
click the mouse to implement it immediately! It's coming to work. Write it here first!