PHP“速度编码”提示 [英] PHP "speed coding" tips

查看:76
本文介绍了PHP“速度编码”提示的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好吧


我想知道人们在这里用什么方法来加速他们的PHP

代码(即你生成代码的速度) )。


类似''代码模板'',''基础对象''这个和那个?


我以为它会有趣的是要知道我是否错过了任何可以帮助加快开发的凉爽的东西。


谢谢。

Hi everyone

I wondered what if any methods people here use to speed up their PHP
code (ie. speed at which you produce your code).

Things like ''code templates'', ''base objects'' for this and that?

I thought it would be interesting to find out if I''m missing out any
anything cool that could aid in speeding up development.

Thanks.

推荐答案

5月8日下午12:42,Tyno Gendo< you @ localhostwrote:
On May 8, 12:42 pm, Tyno Gendo <you@localhostwrote:

Hi每个人


我想知道人们在这里使用什么方法来加速他们的PHP

代码(即你生成代码的速度)。


类似''代码模板'',''基础对象''这个和那个?


我觉得找到它会很有趣如果我错过任何可能有帮助的任何凉爽的东西加快发展。


谢谢。
Hi everyone

I wondered what if any methods people here use to speed up their PHP
code (ie. speed at which you produce your code).

Things like ''code templates'', ''base objects'' for this and that?

I thought it would be interesting to find out if I''m missing out any
anything cool that could aid in speeding up development.

Thanks.



好​​吧,我不认为这真的很重要。和人一样

在这里说测量三次,只切一次,在编程时它就是

同样的事情。你最好提前重新思考你的想法,这样你就可以了b $ b不必写双重代码,最后改变你的想法

两天开始以不同的方向解决问题,以
组织解决方案,以便您以后可以轻松扩展它




唯一的机械师你可以做的事情让你的编码更快

会学习触摸打字,因为在键盘上观看

分散你的代码太多了。


干杯

Well, I don''t think it''s really something that matters. Like people
here say "Measure three times, cut only once", in programming it''s the
same thing. It''s better that you rethink your ideas in advance so you
don''t have to write double code, to change your mind throw away last
two days and start solving the problem in different direction, to
organize the solution in such way that you can easily extend it later
etc.

The only "mechanic" thing you could do to make your coding faster
would be learning touch-typing, since watching at the keyboard
distracts you way too much from your code.

Cheers


Tyno Gendo写道:
Tyno Gendo wrote:

大家好


我想知道人们在这里使用什么方法来加速他们的PHP

代码(即你生成代码的速度)。


类似''代码模板'',''基础对象''这个和那个?


我觉得找出来会很有趣如果我错过任何可以帮助加速开发的任何酷的话。


谢谢。
Hi everyone

I wondered what if any methods people here use to speed up their PHP
code (ie. speed at which you produce your code).

Things like ''code templates'', ''base objects'' for this and that?

I thought it would be interesting to find out if I''m missing out any
anything cool that could aid in speeding up development.

Thanks.






加快代码的执行时间当然与
$ b $不同b加快你的开发时间。


加速执行:可以说很多。我只想说

大多数缓慢使用愚蠢/重复数据库查询的脚本。

解决方案:学习更好的SQL并修复它。 :-)


加快开发时间:对于我怀疑的大多数程序员来说,这是一件非常困难的事情,而且非常个人化。

我的意见:每当你从一个复杂的项目开始时:

确保你在编写PHP之前提前设计你的数据库。

一个好的数据库设计就是开始。理解规范化,

外键,索引等概念。

在现实世界中,您始终必须在开发过程中更改数据库。

你的原始设计越好,痛苦越少。


作为模板和第三方对象:我从不使用它们,只有PEAR

包,和''着名/经过验证的第三方代码,如ADODB(不是VB

的东西)和htmlmailers。


我无法将自己的想法转移到其他人身上s''编程流程图''

或模式,所以我倾向于自己写一切。这样我肯定我知道我在做什么。


如果这是明智的,我不能说。

它当您重复使用其他人的代码时,可以节省时间。

当代码失败并且您可以开始调试其他

人的代码时,它会花费很大。

最后,这是一个信任问题。我相信X或Y写的好代码

我敢用在我开发的软件中吗?


我有(还有更多的编码器)一个包含我编写的函数的库,并在

不同的项目中重用。我知道它们是如何工作的,以及它们能做什么或不能做什么。

这也节省了时间。


如果你是相对较新的PHP(我不喜欢)不知道你的专家,我的建议

首先要自己学习所有东西,学习陷阱,并写下你没有模板/模式/第三方插件等的自己的代码。

当你对自己的技能感到满意时,你可以判断你需要什么样的套餐才能融入你的软件。


在这里询问人们对某个框架或

包的看法是不是很痛苦。如果你收到很多投诉,当然不要使用它! ;-)


只需2美元。


问候,

Erwin Moller

Hi,

speeding up the executiontime of code is of course a different matter than
speeding up your developmenttime.

Speed up execution: A lot can be said about this. I just want to say that
most scripts that that are slow use stupid/repetitive databasequeries.
Solution: Learn better SQL and fix it. :-)

Speed up developmenttime: This is a difficult matter and very personal to
most programmers I suspect.
My opinion: Whenever you start with a project that is modarate complex: be
sure you design your database in advance, before coding PHP.
A good databasedesign is the start. Understand concepts like normalization,
foreign keys, indexes, etc.
In the real world, you always must change your database during development.
The better your original design, the less pain.

As templates and third party objects go: I never use them, only PEAR
packages, and ''famous/proven'' third party code like ADODB (not the VB
thing) and htmlmailers.

I have trouble folding my mind into other people''s ''programming flowcharts''
or patterns, so I tend to write everything myself. That way I am sure I
know what I am doing.

If that is wise, I cannot say.
It saves time when you reuse other people''s code.
It costs tremendously when the code fails and you can start debugging other
people''s code.
In the end it is a matter of trust. Do I trust that X or Y wrote good code
that I dare to use in my software I develop?

I have (and many more coders too) a lib with functions I wrote and reuse in
different projects. I know how they work, and what they can or cannot do.
That saves time too.

If you are relatively new to PHP (I don''t know your expertice), my advise
would be to first learn everything yourself, learn pitfalls, and write your
own code without templates/patterns/thirdparty addons/etc.
When you are comfortable with your skills, you can judge what packages you
trust enough to incorporate into your software.

It won''t hurt to ask in here what people think about a certain framework or
package. If you receive a lot of complaints, don''t use it of course! ;-)

Just my 2 cent.

Regards,
Erwin Moller


5月8日上午7:57,Erwin Moller

< since_humans_read_this_I_am_spammed_too_m ... @ spam yourself.comwrote:
On May 8, 7:57 am, Erwin Moller
<since_humans_read_this_I_am_spammed_too_m...@spam yourself.comwrote:

Tyno Gendo写道:
Tyno Gendo wrote:

大家好
Hi everyone


我想知道如果人们在这里使用任何方法来加速他们的PHP

代码(即你生成代码的速度)。
I wondered what if any methods people here use to speed up their PHP
code (ie. speed at which you produce your code).


类似''代码模板'',''基础对象''这个和那个?
Things like ''code templates'', ''base objects'' for this and that?


我觉得有趣的是找出我是否错过任何可以帮助的任何凉爽的东西加快发展。
I thought it would be interesting to find out if I''m missing out any
anything cool that could aid in speeding up development.


谢谢。
Thanks.






加快代码的执行时间当然与
$ b $不同b加快你的开发时间。


加速执行:可以说很多。我只想说

大多数缓慢使用愚蠢/重复数据库查询的脚本。

解决方案:学习更好的SQL并修复它。 :-)


加快开发时间:对于我怀疑的大多数程序员来说,这是一件非常困难的事情,而且非常个人化。

我的意见:每当你从一个复杂的项目开始时:

确保你在编写PHP之前提前设计你的数据库。

一个好的数据库设计就是开始。理解规范化,

外键,索引等概念。

在现实世界中,您始终必须在开发过程中更改数据库。

你的原始设计越好,痛苦越少。


作为模板和第三方对象:我从不使用它们,只有PEAR

包,和''着名/经过验证的第三方代码,如ADODB(不是VB

的东西)和htmlmailers。


我无法将自己的想法转移到其他人身上s''编程流程图''

或模式,所以我倾向于自己写一切。这样我肯定我知道我在做什么。


如果这是明智的,我不能说。

它当您重复使用其他人的代码时,可以节省时间。

当代码失败并且您可以开始调试其他

人的代码时,它会花费很大。

最后,这是一个信任问题。我相信X或Y写的好代码

我敢用在我开发的软件中吗?


我有(还有更多的编码器)一个包含我编写的函数的库,并在

不同的项目中重用。我知道它们是如何工作的,以及它们能做什么或不能做什么。

这也节省了时间。


如果你是相对较新的PHP(我不喜欢)不知道你的专家,我的建议

首先要自己学习所有东西,学习陷阱,并写下你没有模板/模式/第三方插件等的自己的代码。

当你对自己的技能感到满意时,你可以判断你需要什么样的套餐才能融入你的软件。


在这里询问人们对某个框架或

包的看法是不是很痛苦。如果你收到很多投诉,当然不要使用它! ;-)


只需2美元。


问候,

Erwin Moller


Hi,

speeding up the executiontime of code is of course a different matter than
speeding up your developmenttime.

Speed up execution: A lot can be said about this. I just want to say that
most scripts that that are slow use stupid/repetitive databasequeries.
Solution: Learn better SQL and fix it. :-)

Speed up developmenttime: This is a difficult matter and very personal to
most programmers I suspect.
My opinion: Whenever you start with a project that is modarate complex: be
sure you design your database in advance, before coding PHP.
A good databasedesign is the start. Understand concepts like normalization,
foreign keys, indexes, etc.
In the real world, you always must change your database during development.
The better your original design, the less pain.

As templates and third party objects go: I never use them, only PEAR
packages, and ''famous/proven'' third party code like ADODB (not the VB
thing) and htmlmailers.

I have trouble folding my mind into other people''s ''programming flowcharts''
or patterns, so I tend to write everything myself. That way I am sure I
know what I am doing.

If that is wise, I cannot say.
It saves time when you reuse other people''s code.
It costs tremendously when the code fails and you can start debugging other
people''s code.
In the end it is a matter of trust. Do I trust that X or Y wrote good code
that I dare to use in my software I develop?

I have (and many more coders too) a lib with functions I wrote and reuse in
different projects. I know how they work, and what they can or cannot do.
That saves time too.

If you are relatively new to PHP (I don''t know your expertice), my advise
would be to first learn everything yourself, learn pitfalls, and write your
own code without templates/patterns/thirdparty addons/etc.
When you are comfortable with your skills, you can judge what packages you
trust enough to incorporate into your software.

It won''t hurt to ask in here what people think about a certain framework or
package. If you receive a lot of complaints, don''t use it of course! ;-)

Just my 2 cent.

Regards,
Erwin Moller



你好Erwin,我也是一个新的PHP程序员 - 我曾经做过纯HTML。我的

答案可能听起来有点可怜,但它肯定有效:我依赖IDE,

但它必须是一个好的。我得到了NuSphere PhpED - 他们有你要求的b $ b bb,代码模板,代码完成 - +调试器,我认为

这是最重要的一件事。我明白这与你所谈论的不同有什么不同 - 我不依赖任何PHP

框架,但它确实对我很好,所以我想我与

分享。如果我浪费你的时间,请原谅我:-)

Hi Erwin, I am a new PHP programmer too - I used to do plain HTML. My
answer might sound a bit pathetic, but it sure works: I rely on IDE,
but it must be a good one. I got NuSphere PhpED - they have what you
are asking for, code templates, code completion - + debugger, I think
this is one most important thing. I understand that this is different
from what you are talking about - I am not relying on any PHP
framework, but it sure serves me well, so I figure I''d share it with
out. Please forgive me if I am wasting your time :-)


这篇关于PHP“速度编码”提示的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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