快速完成基于表单的 Web 项目的最佳、有效方法是什么?
我是一名数据库专家,自从我使用 PHP 做任何事情以来已经有几年了(没有 MVC 经验)。我现在必须处理数据输入项目 - 用户将填写并将数据提交到数据库的表单。我认为这比电子表格方法更有效。
我所需要的只是:
1)身份验证 2)数据验证 3)向数据库提交数据。
您建议我如何继续?我有两周的时间来做这个项目。我应该涉足 MVC 并按照行业标准方式进行操作,还是采用良好的过程 PHP 方式?
我看了一些东西: 1) 交响乐团 2) 蛋糕PHP 3) Django
非常感谢任何想法、建议。
谢谢你!
I am a database guy and its been few years since I did anything with PHP (no MVC experience). I now have to work on a Data Entry project - a form that a user will fill and submit data to the database. I figured this is much more efficient than a spreadsheet approach.
All I need is :
1) Authentication
2) Validation of data
3) Submit data to the database.
How would you suggest I proceed? I have 2 weeks time for this project. Should I dabble with MVC and do it the industry standard way or go with good 'ol procedural PHP way?
Some things I looked at :
1) Symfony
2) CakePHP
3) Django
Any ideas, suggestions are really appreciated.
Thank you!
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(4)
使用 django 已经两年了,我有过一个使用 cakephp 的项目的经历,并且讨厌它。 Django 能够在各个方面表现得更好,其中很大一部分采用了 Python 和透明的框架工作方式。我强烈推荐Django。
Use django to two years, and I had an experience of a project using cakephp and hated it. Django was able to show better in all aspects, much of it takes the python and transparent way how the framework works. I strongly recommend Django.
您应该将 Symfony 与 Doctrine 一起使用:您所要做的就是定义您的模式,然后您将能够生成您的表单。 Doctrine 有自己的验证系统,许多约束可以在架构本身中指定。
You should use Symfony with Doctrine : all you'll have to do is define your schema, and you will be able to generate your forms. Doctrine has its own validation system, many constraints can be specified in the schema itself.
如果您只是做一些一次性的数据收集,您可以节省自己的工作并使用 Google 电子表格(创建新 -> 表单)。我知道您提到了电子表格,但是一旦您获得了数据,您就可以将其导出并用它做您想做的事情。
这是一个简单的解决方案,可能不适合,但如果适合,它会将您的时间减少到几个小时,而不是几周。
If you're just doing some one off data gathering, you could save yourself the work and use Google Spreadsheets ( Create New -> Form). I know you mentioned spreadsheets, but once you've got the data you can export it and do what you want with it.
It's a simple solution and might not fit, but if it does it'll cut your time down to a couple of hours instead of a couple of weeks.
老实说,我认为如果您遵循 Andrew Perkins 的教程
http://www.youtube.com/watch?v=nO9oSQhRa9s
I honestly think you can learn enough about cakephp to be lethal in less than a half a day if you follow Andrew Perkins' tutorials
http://www.youtube.com/watch?v=nO9oSQhRa9s