PHP设计工具? IDE? [英] PHP Design tools? IDE?

查看:64
本文介绍了PHP设计工具? IDE?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述




我是一位经验丰富的数据库+软件设计师和开发人员,

但不幸的是,与网络编程和

网络系统设计对我来说仍然是一个非常新的领域...

(过去十年一直主要使用遗留环境)

>
所以我写这篇文章,希望得到一些有用的建议和反馈...


我用html / PHP做了一些非常简单的小网站,

现在开始更高级的一个,我将需要SQL

数据库支持,并且可能会用于MySQL。


当然,我已经在网上阅读了一些简单的教程和文章,

但仍然想知道在创建更大的网站时,实际上PHP是如何实际使用的。 ..


PHP通常是手写的吗?

就像......你只是组成一个数据库,然后是你认为会做的一些表,

最后(我最喜欢的是什么)以特别的方式关注多种不同的
PHP脚本文件?

(我希望不会,因为它似乎很快会产生一个漂亮的

难以维持和掌握整个系统的混乱)


所以我想学习的是什么好(最好免费/开源)

可用于设计和项目管理的工具?


我的想法是你想要一些IDE应用程序,某些东西

像VB或Delphi或VC ++,您可以用图形方式设计网页和

表格,并且可以编写事件代码。代码片段

将对点击,按钮和用户操作做出反应,比如传统IDE中的

:s。

然后有一些编译器或者更确切地说,做所有无聊的例行工作

将您的设计转换为HTML / PHP代码。

页面设计也将基于模板,当然,

所以如果你想改变整个网站的外观和感觉,它可以灵活修改。


理想情况下,我还希望将整个网站设计

存储在数据库中一个单独的,固定的表格集中,而不是以b $ b为单位不同的脚本文件,CSS表等。


我还可以设想一个设计,即使网站包含

a大量的页面和不同函数,

实际上只有一个PHP脚本" index.php"

并且所有子页面都是从参数<动态生成的URL中的
,即所有网址看起来都像:

index.php?pageid = 1

index.php?pageid = 2

...

index.php?pageid = productlist

index.php?pageid =注册

index.php?pageid = loginform

index.php?pageid = contactform


等...


index.php startfile可能看起来像:


< html>

< php?

include(" lib.php");

main();

?>

< / html>


然后所有页面都将由main()函数即时生成

(在lib.php中定义,以及一系列有用的子例程),

并由URL参数''pageid'和整体网站设计驱动$>
以某种方式存储在数据库中。


你在IDE中完成的所有设计工作(图形,代码片段等)

然后实际上将存储在数据库中,PHP脚本文件

可能是一个非常静态的PHP实现的引擎

读取DB-内容并输出HTML代码和页面/>

所以...你能不能给我一个简短的简介/提示/链接到那些

IDE和/或其他免费工具存在

或在实际开发中常用于PHP / MySQL的东西。


谢谢,

Hi,

Im an experienced database+software designer and developer,
but, unfortunately, anything to do with web-programming and
web-systems designs is still a pretty new area to me...
(been working mostly with "legacy" environments the last 10 years)

So I am writing this, hoping to get some useful advise and feedback...

I have done some pretty trivial, small websites with html/PHP,
and now starting a bit more advanced one, where I will need SQL
database-support, and will probably go for MySQL.

Of course, I have read some elemantary tutorials and articles on the web,
but still wonder how PHP is actually being used in practice when
creating bigger web-sites...

Is PHP usually handcoded?
Like... you just make up a database, then a number of tables you think will do,
and finally (what I am most concerned about) a multiplicity of different
PHP script-files in an ad-hoc fashion?
(I hope not, since it seems that this will quite soon produce a pretty
diffcult-to-maintain-and-grasp mess of the whole system)

So what I would like to learn, is what nice (preferrably free/open-source)
tools for design and project-management are available?

My idea is that you would like to have some IDE application, something
like VB or Delphi or VC++, where you design your webpages and
forms in a graphical manner, and you can code "event" pieces of code
that will react to clicks, buttons and user-actions like
in the traditional IDE:s.
And then there is some "compiler" or rather that do all the boring routine-work
of converting your design to html/PHP code.
The page-designs would also be based on "templates", of course,
so its flexible to modify if you want to change the look-and-feel
of your whole site.

Ideally, I would also prefer that the whole website-design
would be stored in a separate, fixed set of tables in the database,
rather than in a zillion different script-files, CSS-sheets, etc.

I can also envision a design where, even if the website contains
a huge number of pages and different functions,
there would actually only be a single PHP-script "index.php"
and all sub-pages are generated on-the-fly, from arguments
in the URL, i.e. all URLs simply looking like:

index.php?pageid=1
index.php?pageid=2
...
index.php?pageid=productlist
index.php?pageid=registration
index.php?pageid=loginform
index.php?pageid=contactform

etc...

The index.php startfile might only look something like:

<html>
<php?
include("lib.php");
main();
?>
</html>

Then all pages would be generated on-the-fly by the main() function
(defined in "lib.php", along with a host of useful subroutines),
and driven by the URL-parameter ''pageid'' and the overall site-design
somehow stored in the database.

All design-work you did in the IDE (graphical, code-snippets, etc)
would then actually be stored in the DB, and the PHP script-files
could then be a quite static PHP-implementation of an "engine"
reading the DB-content and outputting the HTML-code and pages.

So... could you please give me a short brief/hints/links to what
IDEs and/or other free tools, along those lines, that already exist
or what are commonly used for PHP/MySQL in real-world development.

Thanks,

推荐答案

grz02写道:
所以...请你给我一个简短的提示/提示/链接到什么
IDE和/或其他免费工具,沿着这些方向,已经存在的或者在实际开发中常用于PHP / MySQL的东西。
So... could you please give me a short brief/hints/links to what
IDEs and/or other free tools, along those lines, that already exist
or what are commonly used for PHP/MySQL in real-world development.




嗨!


我不是这方面的专家,因为我已经完成了大部分日常工作,

类和模板引擎我自己,但只是你可能想要的一些网站

来看看吧。


请参阅流行的Smarty模板引擎:
http://smarty.php.net/


对于一个真正的PHP IDE,至少可以查看Zends PHP Studio
http://www.zend.com/store/products/zend-studio.php?home

对于mySQL数据库管理,有当然至少是PhpMyAdmin:
http://www.phpmyadmin.net


我知道有很多其他的但没有真正的个人经验

那些,我会让其他人通知你。


HTH


-

Suni



Hi!

Im not an expert on the matter since I''ve done most of my routines,
classes and template engines myself, but just some sites you might want
to check out come to mind.

See the popular Smarty template engine at:
http://smarty.php.net/

And for a real PHP IDE at least check out Zends PHP Studio at
http://www.zend.com/store/products/zend-studio.php?home

For mySQL database management there is of course at least PhpMyAdmin:
http://www.phpmyadmin.net

I know there are tons of others but without real personal experience on
those, I will let others inform you.

HTH

--
Suni




" grz02" < GR *** @ spray.se>在消息中写道

news:16 ************************** @ posting.google.c om ...

"grz02" <gr***@spray.se> wrote in message
news:16**************************@posting.google.c om...


我是一位经验丰富的数据库+软件设计师和开发人员,但不幸的是,任何与网络编程和网页有关的事情 - 系统设计对我来说仍然是一个非常新的领域...
(过去十年一直在传统环境中工作)

所以我写这篇文章,希望得到一些有用的建议和反馈...

我已经用html / PHP做了一些非常琐碎的小网站,现在开始更高级的一个,我将需要SQL
数据库支持,可能会用于MySQL。

当然,我已经在网上阅读了一些学术教程和文章,但仍然想知道PHP实际上是如何在实践中使用的什么时候创建更大的网站...

PHP通常是手写的吗?
就像...你只是组成一个数据库,然后你认为很多表格/ >将会以特别的方式做到,最后(我最关心的)多个不同的PHP脚本文件?
(我希望不会,因为它似乎是这将很快产生一个相当困难的整个系统的混乱 -


快速应用程序开发(RAD)的任何语言的方式,而不仅仅是
PHP,是一个坚实的架构框架,有许多可重复使用的模块,你可以访问这些模块以构建单独的组件或

交易。你可以先用其他人预先写好的东西开始,

但是一旦你知道它是如何工作的,你可能希望自定义它,

因为你希望添加更多选项,或者因为你的个人风格

不同。


谈到架构框架我会建议3层

体系结构或模型 - 视图 - 控制器(我个人将两者结合使用)。

3层架构包括一个数据访问对象(DAO),其中包含

代码,用于执行与数据库的所有通信。


当用自己的屏幕构建单个组件时,你可以从PHP代码中生成所有HTML标签,或者你可以使用

模板系统。我个人使用XML数据的XSL转换,因为它是由b3标准控制的,并且在整个

行业中广泛使用,而不仅仅是在PHP世界中。


如果您想了解更多想法,可以浏览我网站上的文章
http://www.tonymarston.co.uk/php-mysql/index.html

所以我想要的是什么学习,是不是很好(最好是免费/开源)
设计和项目管理工具?

我的想法是你想要一些IDE应用程序,一些<像VB或Delphi或VC ++一样,您可以用图形方式设计网页和表单,并且可以编写事件代码。代码片段
将对传统IDE中的点击,按钮和用户操作做出反应:



网页没有事件像传统桌面应用程序。

客户端发出HTTP请求,Web服务器将其复原并生成

响应。网页也是无状态的,这涉及到另外一个很大的改变。

然后还有一些编译器。或者更确切地说,将您的设计转换为html / PHP代码的所有无聊的例行工作。


PHP代码未编译,已被解释。但是,有第三方

实用程序能够缓存中间字节码。

页面设计也将基于模板,当然,
因此,如果您想要改变整个网站的外观,可以灵活修改。


模板系统不是内置于PHP中的,您可以选择一个并将

插入到您的框架中。

理想情况下,我还希望整个网站设计将存储在数据库中一个单独的,固定的表集中,而不是存储在多个不同的脚本文件,CSS表等中。 。


梦想。除非您可以配置您的Web服务器来访问数据库,否则您需要将脚本作为目录中的文件。

我还可以设想一个设计,即使网站包含
大量的页面和不同的功能,实际上只有一个PHP脚本index.php
并且所有的子页面都是即时生成的,来自URL中的参数
,即所有URL看起来像:


哎呀!你说的是前控制器。就个人而言,我会避免像瘟疫这样的事情,并选择较小的页面控制器。

index.php?pageid = 1
index.php?pageid = 2
...
index.php?pageid = productlist
index.php?pageid = registration
index.php?pageid = loginform
index.php?pageid = contactform

等...

index.php startfile可能看起来像:

< html>
< php?
include(" lib.php");
main();
?>
< / html>

然后全部页面将由main()函数动态生成
(在lib.php中定义,以及一系列有用的子例程),
并由URL参数驱动pageid和整个网站设计以某种方式存储在数据库中。

您在IDE中完成的所有设计工作(图形,代码片段等)
然后实际上将存储在DB中,然后PHP脚本文件可以是一个非常静态的PHP工具引擎读取DB内容并输出HTML代码和页面。


WYSIWYG网页编辑器因生成效率低下的HTML

代码而臭名昭着。坦率地说,如果你没有这样的
编辑器就无法构建网页,那么你是一个非常糟糕的开发者。 PHP被设计为生成

HTML标签,所以如果你不知道如何手动生成HTML标签,你将会发现PHP对你的有限能力来说太难了。

那么......你能否给我一个简短的提示/提示/链接到已经存在的
IDE和/或其他免费工具
或者什么是常见的用于实际开发中的PHP / MySQL。
Hi,

Im an experienced database+software designer and developer,
but, unfortunately, anything to do with web-programming and
web-systems designs is still a pretty new area to me...
(been working mostly with "legacy" environments the last 10 years)

So I am writing this, hoping to get some useful advise and feedback...

I have done some pretty trivial, small websites with html/PHP,
and now starting a bit more advanced one, where I will need SQL
database-support, and will probably go for MySQL.

Of course, I have read some elemantary tutorials and articles on the web,
but still wonder how PHP is actually being used in practice when
creating bigger web-sites...

Is PHP usually handcoded?
Like... you just make up a database, then a number of tables you think
will do,
and finally (what I am most concerned about) a multiplicity of different
PHP script-files in an ad-hoc fashion?
(I hope not, since it seems that this will quite soon produce a pretty
diffcult-to-maintain-and-grasp mess of the whole system)
The way to Rapid Application Development (RAD) in any language, not just
PHP, is to have a solid architectural framework with lots of reusable
modules which you can access in order to build individual components or
transactions. You may start by using something pre-written by somebody else,
but once you have sussed out how it works you may wish to customise it,
either because you wish to add more options, or because your personal style
is different.

When it comes to architectural frameworks I would suggest the 3-tier
architecture or Model-View-Controller (personally I use both combined). The
3-tier architecture includes a Data Access Object (DAO) which contains the
code which carries out all communication with the database.

When it comes to building individual components with their own screens you
can either produce all HTML tags from within your PHP code, or you can use a
templating system. Personally I use XSL transformations from XML data as it
is controlled by W3C standards and is used widely across the entire
industry, not just within the PHP world.

If you want further ideas you can browse the articles on my website at
http://www.tonymarston.co.uk/php-mysql/index.html
So what I would like to learn, is what nice (preferrably free/open-source)
tools for design and project-management are available?

My idea is that you would like to have some IDE application, something
like VB or Delphi or VC++, where you design your webpages and
forms in a graphical manner, and you can code "event" pieces of code
that will react to clicks, buttons and user-actions like
in the traditional IDE:s.
Web pages do not have "events" like traditional desktop applications. The
client issues an HTTP request, the web server recives it and generates a
response. Web pages are also stateless, which involves another big change in
thinking.
And then there is some "compiler" or rather that do all the boring
routine-work
of converting your design to html/PHP code.
PHP code is not compiled, it is interpretted. However, there are third-party
utilities that are able to cache the intermedaite bytecode.
The page-designs would also be based on "templates", of course,
so its flexible to modify if you want to change the look-and-feel
of your whole site.
Templating systems do not come built into PHP, you have you choose one and
plug it in to your framework.
Ideally, I would also prefer that the whole website-design
would be stored in a separate, fixed set of tables in the database,
rather than in a zillion different script-files, CSS-sheets, etc.
Dream on. Unless you can configure your web server to access a database you
MUST have scripts as files in a directory.
I can also envision a design where, even if the website contains
a huge number of pages and different functions,
there would actually only be a single PHP-script "index.php"
and all sub-pages are generated on-the-fly, from arguments
in the URL, i.e. all URLs simply looking like:
Yuck! You are talking about a front controller. Personally I would avoid
such things like the plague and go for smaller page controllers.
index.php?pageid=1
index.php?pageid=2
...
index.php?pageid=productlist
index.php?pageid=registration
index.php?pageid=loginform
index.php?pageid=contactform

etc...

The index.php startfile might only look something like:

<html>
<php?
include("lib.php");
main();
?>
</html>

Then all pages would be generated on-the-fly by the main() function
(defined in "lib.php", along with a host of useful subroutines),
and driven by the URL-parameter ''pageid'' and the overall site-design
somehow stored in the database.

All design-work you did in the IDE (graphical, code-snippets, etc)
would then actually be stored in the DB, and the PHP script-files
could then be a quite static PHP-implementation of an "engine"
reading the DB-content and outputting the HTML-code and pages.
WYSIWYG editors for web pages are notorious for producing inefficient HTML
code. Quite frankly if you are unable to build web pages without such an
editor then your are a pretty poor developer. PHP was designed to produce
HTML tags, so if you do not know how to generate HTML tags manually you will
find PHP too difficult for your limited abilities.
So... could you please give me a short brief/hints/links to what
IDEs and/or other free tools, along those lines, that already exist
or what are commonly used for PHP/MySQL in real-world development.




不同的开发人员使用不同的工具组合来实现他们的b
目的。我是这样做的,但是其他一千个开发者会以其他方式做到这一点。谁是对的?我们都是。你支付你的钱,你需要你的选择。


快乐狩猎。


-

Tony Marston

http://www.tonymarston.net



Different developers use different combinations of tools to achieve their
purpose. I do it one way, but a thousand other developers will do it a
thousand other ways. Who is right? We all are. You pays your money and you
takes your choice.

Happy hunting.

--
Tony Marston

http://www.tonymarston.net


grz02< gr *** @ spray.se>写道或引用:
grz02 <gr***@spray.se> wrote or quoted:
我还可以设想一个设计,即使网站包含大量的页面和不同的功能,
实际上只会是一个单独的PHP脚本" index.php"
所有子页面都是在URL中的参数
中即时生成的,即所有URL看起来都像:

index.php?pageid = 1
index.php?pageid = 2
...
index.php?pageid = productlist
index.php?pageid =注册
index.php?pageid = loginform
index.php?pageid = contactform

等...

index.php startfile可能只是看起来像:

< html>
< php?
include(" lib.php");
main();
?>
< / html>
I can also envision a design where, even if the website contains
a huge number of pages and different functions,
there would actually only be a single PHP-script "index.php"
and all sub-pages are generated on-the-fly, from arguments
in the URL, i.e. all URLs simply looking like:

index.php?pageid=1
index.php?pageid=2
...
index.php?pageid=productlist
index.php?pageid=registration
index.php?pageid=loginform
index.php?pageid=contactform

etc...

The index.php startfile might only look something like:

<html>
<php?
include("lib.php");
main();
?>
</html>




这就是所谓的前控制器。

http ://www.phppatterns.com/index.php...leview/81/1/1/


....是一篇关于前控制器的文章PHP。


这很好 - 但是AFAICS,对前控制器给出的论点

就是h ..,$ / b $ b主要的反对意见是:


``在上面的简单示例中,这可能看起来不是什么问题,但是当你有数百个时,这是什么

页面控制器?你最终得到一个

大规模的交换机声明,或者可能是在数组中伪装的东西,一个
XML文档或其他什么。对于每个页面请求,PHP都必须重新加载一堆数据,这些数据与

用户试图执行的当前请求无关。'''''br />

这基本上与网络服务器在文件系统中查找

文件时执行的任务相同。如果PHP正在执行任务,那么网络服务器

并不是必须的。它可能在PHP中比在C中慢一点 - 但是

这几乎不是不用PHP做的理由​​。


... 。并且...


``通过单个PHP脚本运行所有内容的另一个问题,如$。b $ b,如index.php,是一个重要的问题限制

灵活性默认情况下,PHP允许开发人员删除一个

脚本。 Web服务器的Web根目录下的任何位置。采用

这种方法可能会在以后引起您的问题,这两种方法都来自于必须更新命令层次结构的实际视角。每次创建时间都是b
一个新的文件,例如与其他PHP

应用程序集成的问题。''''


....这对我来说似乎是胡说八道。如果您/必须/访问代码

与前端控制器不兼容(由于某种原因)没有什么

阻止您这样做。你在这个过程中失去了前控制器的设施

- 但是替代方案是首先没有它们,所以在实践中很少丢失。


将您的代码存储在文件系统中有点倒退 - 因为

您必须进行独立版本控制,历史跟踪,

备份,权限处理和更新。


一切都应该进入数据库。


Microsoft意识到这一点 - 使用WinFS:

http://msdn.microsoft .com / Longhorn / u ... S / default.aspx


....但还没有把它拉下来。

-

__________

| im | yler http: //timtyler.org/ ti*@tt1lock.org 删除锁定以回复。



That''s called a "front controller".

http://www.phppatterns.com/index.php...leview/81/1/1/

....is an article about front controllers in PHP.

It is good - but AFAICS, the arguments given against front controllers
in it are hogwash.

The main objections are:

``In the simple example above, that may not seem like a problem, but what
about when you have hundreds of Page Controllers? You end up with a
massive switch statment or perhaps something disguised in an array, an
XML document or whatever. For every page request, PHP will have to
reload a bunch of data which is irrelevant to the current request the
user is trying to perform.''''

This is fundamentally the same task a webserver performs when looking up a
file in a filing system. If PHP is doing the task, the webserver
doesn''t have to. It might be a bit slower in PHP than in C - but
that''s hardly a reason for not doing it in PHP.

....and...

``The other problem with running everything through a single PHP script,
such as index.php, is it imposes a significant restriction on the
flexibility PHP offers, by default, of allowing developers to "drop a
script" anywhere under the web server''s web root directory. Adopting
this approach will likely cause you problems later, both from the
practical perspective of having to updating the command hierarchy each
time you create a new file to issues like integration with other PHP
applications.''''

....which seems like nonsense to me. If you /must/ access code that
is incompatible with a front controller (for some reason) nothing
stops you from doing so. You lose the front controller''s facilities
in the process - but the alternative is not having them at all in
the first place - so in practice little is lost.

Storing your code in a filing system is a bit backwards - since
you have to do independent version control, history tracking,
backups, permission handling and updates.

Everything should go into a database.

Microsoft realised this - with WinFS:

http://msdn.microsoft.com/Longhorn/u...S/default.aspx

....but have yet to pull it off.
--
__________
|im |yler http://timtyler.org/ ti*@tt1lock.org Remove lock to reply.


这篇关于PHP设计工具? IDE?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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