PHP 框架新手,这种方法怎么样?

发布于 2024-12-06 11:07:05 字数 801 浏览 1 评论 0原文

我即将开始一个自己的新 PHP 项目,比如说 CRM SaaS。 我不是 PHP 专家,多年来我一直在开发非常简单的 PHP/MySQL 网站。我对 CSS、jQUERY 等的了解足以弄清楚如何做我当时需要的事情。

几个月后,我发现了 PHP 框架的存在,所以我想检查一下它们。 我还没有进入这个项目,之前也没有使用过框架,在进入之前我会学习一下OOP和Secure PHP。

现在,让我的项目分为两个主要阶段怎么样:

A) 为了让项目快速启动并运行到我们的(本地第一)市场,我们可以使用框架已经提供的基本数据管理功能。 我们将坚持使用自己的方式来“显示”和“链接”东西(我猜是“视图”)。

毕竟,该项目主要是登录和管理大量数据(联系人、产品、博客、消息、采购订单、用户等) 因此,我们的客户有能力管理这一点,已经是一个很好的情况,因为他们没有使用其他在线应用程序来进行比较。 这个阶段将是坚实、安全和及时交付的。

B) 现在,阶段 A) 不是主要想法,我的计划是尽可能以最好的方式,特别是在其界面中,例如 Facebook 如何尽可能简单、快速地管理每次点击和选项。

所以这个界面和功能的改进将在后面添加,我说的是表格网格在某些区域或链接中如何反应,带有某些数据的仪表板等等...... 这就是我不知道会有多难,但是,我想因为视图和 html 是可定制的,我将能够做任何我需要集成 jquery、ajax、css 等的事情。 ?

你们觉得怎么样?

或者我应该考虑使用框架吗?

(Yii 是我的首选)

I'm about to start a new PHP project of my own, let say is a CRM SaaS.
I'm no PHP expert, I've been developing very simple PHP/MySQL websites for several years. I know CSS, jQUERY, etc. enough to figure out how to do specifically what I need at that moment.

Few months a go I found out about the existence of PHP frameworks so I was thinking to check them out.
I haven't got into the project yet, and I haven't use a Framework before, I will study OOP and Secure PHP before getting into it.

Now, how about having my project in 2 main stages:

A)
For the sake of having the project up and running fast to our (local first)market, we could use the essential data managing features the Framework already offers.
We'll be sticking with its own way of "showing" and "linking" stuff(the "views" I guess).

After all, the Project is mainly logging in and managing good amount of data(contacts, products, blog, messages, purchasing orders, users, etc. etc.)
So, our customers having the ability to manage this, is already a good situation as they don´t have used other online applications to compare it.
This stage will be solid, secure and promptly delivered.

B)
Now, stage A) is NOT the main idea, my plan is to have it the best way possible specially in its interface, for example like how facebook manages every click and option as easy and fast as possible.

So this interface and functionality improvements will be added latter, I'm talking about how the table grid reacts in certain regions or links, a dashboard with certain data, etc...
and here is what I don't know how hard is going to be, but, I suppose that because the views and html is customizable, I will be able to do whatever I need to integrate jquery, ajax, css, etc etc. right?

what you guys think?

Or should I even consider to use a Framework at all?

(Yii is on my top option)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(3

半山落雨半山空 2024-12-13 11:07:05

框架只是提供一种架构来帮助您更快地开发代码并使其更易于维护。一般意义上,框架不会限制您可以做的事情;框架不会限制您可以做的事情。它只会为您提供经过验证的工具来构建应用程序。

A framework simply provides an architecture to help you develop code faster and make it easier to maintain. A framework is not going to restrict what you can do in the general sense; it will simply give you proven tools to build an application.

意犹 2024-12-13 11:07:05

我写了一篇关于 UI 框架和这似乎正是您正在寻找的。如果您计划大量操作数据并且不介意框架为您做界面,那么找到一个可以让您免于研究 HTML / AJAX / CSS / JavaScript / JSON 的框架是非常现实的。

通过正确的选择,您可以专注于代码,当您需要仪表板时,您可以添加一些 HTML 模板。实现所有其他基础内容只是重新发明轮子。

学习OOP也是正确的选择。

I have wrote a blog article about UI Frameworks and it seems exactly what you are looking for. If you plan to manipulate with data a lot and you don't mind the framework to do interface for you, then finding a framework which can save you from looking into a HTML / AJAX / CSS / JavaScript / JSON is very realistic.

With the right choice you can focus on the code and when you come to the point when you need dash-board you can add some HTML templates. Implementing all the other base stuff is just reinventing the wheel.

Learning OOP is right choice too.

抚你发端 2024-12-13 11:07:05

我强烈建议您在开始之前构建一个框架或构建一些框架。构建一个真正的 MVC 设置,Smarty 3 构建一个出色的视图层,并让您最大限度地重用模板。预测您通常需要执行的任务 - 例如最小化所有 js并上传到 CDN 并使其尽可能自动化。保持面向对象并尝试接近 100% 自动加载的代码,这样您就不需要浪费时间记住文件的路径。一点点深思熟虑可以为您节省大量时间并提高代码质量。

I strongly recommend a framework or constructing some framework before you start.. Build a true MVC setup, Smarty 3 makes a great view layer and lets you maximize template reuse.. anticipate tasks you'll need to commonly do - like minimize all your js and upload to a CDN and make these as automated as possible. Stay object oriented and try to approach 100% autoloaded code so you don't need to waste time remembering the paths to your files. A little forethought can save you a ton of time and lead to much butter code quality..

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文