Web|web Standard | program | programmer
This article discusses how Web site programmers are positioned and how to work with designers to develop web-standard projects in the context of web standards popularization.
This article is suitable for the reader is the traditional table layout under the division of labor is not very clear programmer.
1: Learn the Web standards to make your work easier.
Web standards are the general trend, so as web programmers. You have to brainwash, you have to learn web standards. Go back to the HTML tab and learn how to get the program to output the code that the page needs.
Like what:
The top is the artwork out of the effect diagram, below is the standard program code:
Dim ohtml
set Rs=server.createobject ("Adodb.recordset")
Sql = "SELECT top Id,title out tbl_news order by id desc"
rs.open sql,conn,1, 1
ohtml= "
"
rs.close
set rs=nothing
Response.Write (ohtml)
And if it is the traditional table layout, the programmer will write a lot of HTML code, to write table, to determine when output tr to change lines, to each piece of news in front of an img to output small icons, to use the program to control the output of the title length. All work requires the first page code, the programmer can write this program.
For programmers, you should think of web standards as a boon, and you should read it as a Bible to understand what the page code really needs, and then you'll see. You're a lot easier than you used to be. Because Web standards focus on performance versus content, programs are only responsible for content data. From then on you will no longer need to consider how to use the code to control the alternate color, row and column output, and so on. What you need to do is to output the most direct content to the page, without any decorative content.
Of course, if you are using. NET development, you can be a little more thorough. You can fully focus on building objects, class libraries, data access, etc., and provide methods to the presentation layer. The example below is my previous project, it should be a bit of reference value.
2: Web programmer, don't let HTML tags block your view.
If you think you really hate cumbersome HTML tags, and your learning direction is not on the site's performance layer, then you have to say goodbye to the HTML tags completely.
I used to work for a company that works in a traditional desktop software development, and programmers don't have HTML and have to ask them to help when the site is tight. We'll take a few examples of visual Studio. Net 2003 to carefully analyze, according to the object-oriented structured layered development model, can also be very good to cooperate. Take the development of news module as an example:
The first step : the website programmer may according to the requirement analysis carries on the database design, you may be responsible for the establishment table, writes the stored procedure. Programmers are very familiar with this kind of thing.
Step Two : Define the object. Object The information of the website, for example:
public Class News
Protected _id as Integer
Protected _typeid as Integer
Protected _title As String
Protected _author As String
& nbsp; Protected _original as String
Protected _updatetime as DateTime
Protected _content as String
Protected _clickcount as Integer
Public Property Id () as Integer
Get
return _id
End Get
Set (ByVal Value as Integer)
_id = Value
End Set
End Property
Public Property typeID () as Integer
Get
Return _typeid
End Get
Set (ByVal Value as Integer)
_typeid = Value
End Set
End Property
Public Property Title () as String
End Property
Public Property Author () as String
End Property
Public Property original () as String
End Property
Public Property UpdateTime () as DateTime
End Property
Public Property Content () as String
End Property
Public Property Clickcount () as Integer
End Property
End Class
Just like this, all the tables in the site are trying to object. It then defines the object-related recordset, which defines a single news object, and then defines a recordset for the news.
Public Class Newss
......
End Class
Step three : Define a set of common data access methods.
Defines some common methods for manipulating databases and executing stored procedures.
Step Fourth : Write an object-based method layer. Such as:
Public Function readnews (ByVal ID as Integer) as News
End Function
The function returns a news object. Depending on your functionality, you will typically define some related functions, such as:
' Read the News list
Public Function Readnewss (ByVal newstype as Enewstype, ByVal ncount as Integer) as News
End Function
' Add a News
Public Function Insertnews (ByVal N as News) as Integer
End Function
' Update a piece of news
Public Function Updatenews (ByVal N as News) as Integer
End Function
' Delete a piece of news
Public Function deletenews (ByVal ID As Integer) As Integer
End Function
To do so, web development can be divided into object layer, data access layer, method layer, performance layer. Programmers, however, only need to provide the means required by the presentation layer. As a result, when the presentation layer needs to display a news listing, the page designer only needs to use the Repeater control in. NET, as follows:
And in the presentation layer of the program code we just need to add:
Topnewslist.datasource = New Facade.newsfacade (). Readnewss (Enewstype, Newscount)
In this way, the programmer can basically be completely disconnected from the HTML. In this way, members of the entire project team can work in parallel. Can significantly improve the overall development efficiency of the project. Moreover, the rise of web2.0 mode has put forward higher requirements for the development of backstage database. such as Douban, 365Kit and other websites, the background of the database mining work is very complex. So in the clear division of labor today, in addition to the HTML code, there are many more important job waiting for the site programmer to do.
3: The user-centric design is inseparable from the front-end development engineers.
If you feel like you're a little reluctant to get out of the familiar HTML code, it doesn't matter. Simply push yourself to the cusp of web technology. Make a product design close to the foreground development engineer.
Along with the network, the computer hardware facility unceasing enhancement, we are moving toward the rich client direction. For the ease of use of products, to the Web site programmers put forward very high requirements. The position of front development engineer is becoming more and more important. This position should be said to have in recent years, and this position is not a general web designer can do, so the site programmers also naturally separate, the background of the development of Engineers and front development engineers, this direction should be said to be a very good choice. And this requires you to have a more comprehensive understanding of the web standards. You need to know a lot about JavaScript as well as the DOM document Object model, CSS presentation layer style code, and Ajax Asynchrony. The relevant examples are very many, such as: Online registration form of real-time detection, password strength hints, multi-level drop-down menu linkage and so on. It is very important to improve the user experience and improve the speed of Web Access.