Web site programmers how to deal with Web Standard 1th/2 page _ Related tips

Source: Internet
Author: User
Tags datetime html tags

Author: Jxdawei

Jxdawei's blog:http://www.iwcn.net/

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= "<ul>"
    do and not rs.eof
        ohtml=ohtml & "<li><a href=" "Shownews.asp?id=" & RS ("id" ) & "" "Title=" "" & RS ("title") & "" > "& RS (" title ") &" </a></li> "
  &nb Sp Rs.movenext
    Loop
    ohtml=ohtml & "</ul>"
    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

current 1/2 page   1 2 Next read the full text

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.