我应该使用什么架构来在PHP中编写我的第一个动态网站? [英] What architecture should I use for writing my first dynamic website in PHP?

查看:125
本文介绍了我应该使用什么架构来在PHP中编写我的第一个动态网站?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只想建立我的第一个动态网站。我想用PHP,MYSQL,AJAX,HTML,CSS b
$ b 我有一些初学者的问题:


  • 标题和导航栏是否应该排除在header.php中并用echo打印出来?

  • (例如:< a> 1 Test test< / a> )或仅返回数据
  • 是否有制作动态网站的好例子?



我的主要问题是我不知道如何制作结构清晰。哪里可以做出正确的设计(在PHP中打印出来?) 解决方案

实际上建议在框架方面不要使用任何东西。这会让您花一些时间来适应HTML / CSS,SQL和PHP,而不会使用MVC(模型/视图/控制器)等更高级别的原则来重载您。我主要担心的是,立即从框架开始让学习曲线变得陡峭,并跳过诸如使用您将要使用的编程语言的习惯。



<你最终会乱成一团,但这只会让你更加欣赏框架;然后您可以转换为使用框架,例如 CodeIgniter Symfony CakePHP (或其他人,因为有一个整个一堆更多)。



其他我真正喜欢的框架是Play!对于Java,以及针对Ruby的 Rails 。既然你说过你是初学者,你也可以考虑这些。


I just want to build my first dynamic Website. I want to use PHP, MYSQL, AJAX, HTML, CSS

I have some beginner Questions:

  • Should the Header and Navigation Bar excluded in a header.php and print out with echo?

  • Should the design tags in the echo in php (like: <a>1 Test test</a>) or only return the the data

  • Is there a good example for making dynamic websites?

My main problem is that i don't know how to make a clear structure. Where to make the right design (print out in the php ?)

解决方案

If it is really your first website, I'd actually recommend using nothing in terms of frameworks. This buys you some time to get comfortable with HTML/CSS, SQL and PHP, without overloading you with higher-level principles such as MVC (model/view/controller) and others. I'm mostly concerned that starting with a framework right away makes the learning curve to steep, and skips over things such as getting comfortable with the programming language you'll be using.

You'll eventually make a mess with way, but this will only make you appreciate the frameworks more; you can then make the transition to using a framework such as CodeIgniter, Symfony or CakePHP (or others, because there's a whole bunch more).

Other frameworks that I really like working with are Play! for Java, and Rails for Ruby. Since you stated you're a beginner, you might consider these as well.

这篇关于我应该使用什么架构来在PHP中编写我的第一个动态网站?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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