ASP编码问题讨论 [英] ASP Coding Questions Discussion

查看:61
本文介绍了ASP编码问题讨论的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我想知道我做得对。请指教。


我创建了一个包含8个主要步骤的系统,每个步骤都可以不同

方向。一般来说,里面有很多if语句和函数。


每页超过1000行。为了让我调试,我按行分隔行

并创建一个模板页面。


然后我使用< - #include .. 。 - >链接到这个模板页面。


还有一些代码与其他页面链接查询共享,表...,我

也创建一个temp这个页面包含在其他页面中。


专家是:


1.如果更新,我只更新一个临时页面所有页面都将更新。

2.易于调试,因为它会缩短页面。包含

页面的页面只有140行,没有包含页面超过1500行。


con可能是:


1.太多包括让系统变慢的命令??


我的问题是我做得对吗?还是有更好的解决方案?


谢谢,


林马


解决方案

什么样的应用程序每页需要1000行?


这看起来很荒谬,恕我直言。

每页超过1000行。为了让我调试,我按功能分隔
行并创建一个模板页面。



感谢您的回复。我有表格,标题,查询,JavaScript,我还

有if语句...有些页面也发送电子邮件给某个组...


系统就像一个文档审批系统,不同级别的人

将采取不同的行动,签署他们的选择并转移到下一级别的人。

下一个人可以拒绝,接受,暂停...很多功能。


我的意思是我可以按功能将代码划分到服务器区域。每个

区域都会创建一个单独的文件。然后使用Include命令将这个

文件组合在一起?


感谢您的回复。


Lin


" Aaron Bertrand - MVP" < AA *** @ TRASHaspfaq.com>在消息中写道

新闻:%2 **************** @ TK2MSFTNGP09.phx.gbl ...

什么样的应用程序需要每页1000行吗?

这看起来很荒谬,恕我直言。


每页超过1000行。为了让我调试,我按功能分开


并创建一个模板页面。




当然你可以这样做,但是,永远记住在代码中写入的SSI(包含语句)

总是包含在任何构建之前代码。

这意味着如果你在if ... end if语句中包含一个文件,那么这个文件总是包含在内。

这对于服务器来说有点沉重,但对于debuging

目的非常有帮助。

不要过度使用它,这就是全部

Hi,

I am wondering if I am doing right. Please advise.

I create a system with 8 major steps and each step can go different
direction. General speaking, a lot of if statements and functions inside.

Each page is over 1000 lines. In order for me to debug, I separate the lines
by function and create a template page.

Then I use <--# include... --> to link to this template page.

Also some of the code are shared with other page link query, table..., I
also create a temp page for this and include into other pages.

The pro is that:

1. if update, I just update one temp page and all the page will be updated.
2. easy to debug because it will make the page shorter. The one with include
page has only 140 lines and without the include page is over 1500 lines.

The con may be:

1. too many include command to make the system slow??

My question is Am I Doing correct? Or there is a better solution?

Thanks,

Lin Ma


解决方案

What kind of application needs 1000 lines per page?

That seems ludicrously overboard, IMHO.


Each page is over 1000 lines. In order for me to debug, I separate the lines by function and create a template page.



Thanks for the response. I have tables, headers, queries, JavaScript, I also
have if statements... Some pages also send email to certain group...

The system is like a documentation approval system, different level people
will take different action, sign their option and move to next level person.
The next person can reject, accept, on hold... A lot of functions.

My point is that Can I divide my code into server area by function. Each of
the area creates a separate file. Then use Include command to assembly this
files together?

Thanks for the response.

Lin

"Aaron Bertrand - MVP" <aa***@TRASHaspfaq.com> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...

What kind of application needs 1000 lines per page?

That seems ludicrously overboard, IMHO.


Each page is over 1000 lines. In order for me to debug, I separate the


lines

by function and create a template page.




Off course you can do it but, always remember that a SSI (include statement)
is writen in the code is always included before any building of the code.
this mean that if you include a file in an if ... end if statement this file
will always be included.
This is a bit heavy for the server but can be really helpful for a debuging
purpose.
do not overuse it, that''s all


这篇关于ASP编码问题讨论的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆