Home Backend Development PHP Tutorial 关于php和DAO的有关问题

关于php和DAO的有关问题

Jun 13, 2016 am 10:05 AM
access dao data php

关于php和DAO的问题
摆渡了一下php+dao关键字,好像没有多少这方面资料。在坛子里搜索了一下,结果居然没有。不知道那位实际运用了DAO+php,交流一下经验。

------解决方案--------------------
如果想要用DAO,通常都要用接口抽象化操作。
PHP也是可以办到的,而且,我在实际的开发中也常用。

不过,任何一种模式都不会独立存在于系统之中,
建议,lz可以参考一下J2EE的设计模式。
把它的模型,用PHP实现,大体模块应该就清晰了。

设计模式是不受语言限制的,还是先理解传统OOP语言中的DAO,在把它转到php上的好。
------解决方案--------------------
学习啊~>..顶
------解决方案--------------------
此DAO非彼DAO也

VB里面的DAO(Data Access Objects)是操作数据库的一组函数库,后来被ADO取代(微软发明的类似的缩写词还有ODBC,MDAC等等,也算微软的一大特色)

设计模式里面的DAO(Data Access Object)是OO Design的一种设计策略,用来抽象和封装对数据源的访问
参见http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html
------解决方案--------------------

探讨
此DAO非彼DAO也

VB里面的DAO(Data Access Objects)是操作数据库的一组函数库,后来被ADO取代(微软发明的类似的缩写词还有ODBC,MDAC等等,也算微软的一大特色)

设计模式里面的DAO(Data Access Object)是OO Design的一种设计策略,用来抽象和封装对数据源的访问
参见http://java.sun.com/blueprints/corej2eepatterns/Patterns/DataAccessObject.html

------解决方案--------------------
唉,帮顶…………………………………………


------解决方案--------------------
dao==数据岛概念。有点数据仓储的味道~
是数据操作的高度抽象化。

作为,开源的东西,自写类还是不错的。~
------解决方案--------------------
顺便帮我解决这个问题,谢谢了先(特级)
http://topic.csdn.net/u/20081015/11/b8a41991-407d-43b8-8fb9-7ddddcb8888a.html

------解决方案--------------------
学习
------解决方案--------------------
如果用到dao 估計要轉成。net了
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn

Hot AI Tools

Undresser.AI Undress

Undresser.AI Undress

AI-powered app for creating realistic nude photos

AI Clothes Remover

AI Clothes Remover

Online AI tool for removing clothes from photos.

Undress AI Tool

Undress AI Tool

Undress images for free

Clothoff.io

Clothoff.io

AI clothes remover

Video Face Swap

Video Face Swap

Swap faces in any video effortlessly with our completely free AI face swap tool!

Hot Article

Roblox: Bubble Gum Simulator Infinity - How To Get And Use Royal Keys
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Nordhold: Fusion System, Explained
4 weeks ago By 尊渡假赌尊渡假赌尊渡假赌
Mandragora: Whispers Of The Witch Tree - How To Unlock The Grappling Hook
3 weeks ago By 尊渡假赌尊渡假赌尊渡假赌

Hot Tools

Notepad++7.3.1

Notepad++7.3.1

Easy-to-use and free code editor

SublimeText3 Chinese version

SublimeText3 Chinese version

Chinese version, very easy to use

Zend Studio 13.0.1

Zend Studio 13.0.1

Powerful PHP integrated development environment

Dreamweaver CS6

Dreamweaver CS6

Visual web development tools

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

Hot Topics

Java Tutorial
1670
14
PHP Tutorial
1274
29
C# Tutorial
1256
24
The Continued Use of PHP: Reasons for Its Endurance The Continued Use of PHP: Reasons for Its Endurance Apr 19, 2025 am 12:23 AM

What’s still popular is the ease of use, flexibility and a strong ecosystem. 1) Ease of use and simple syntax make it the first choice for beginners. 2) Closely integrated with web development, excellent interaction with HTTP requests and database. 3) The huge ecosystem provides a wealth of tools and libraries. 4) Active community and open source nature adapts them to new needs and technology trends.

Using Dicr/Yii2-Google to integrate Google API in YII2 Using Dicr/Yii2-Google to integrate Google API in YII2 Apr 18, 2025 am 11:54 AM

VprocesserazrabotkiveB-enclosed, Мнепришлостольностьсясзадачейтерациигооглапидляпапакробоглесхетсigootrive. LEAVALLYSUMBALLANCEFRIABLANCEFAUMDOPTOMATIFICATION, ČtookazaLovnetakProsto, Kakaožidal.Posenesko

Title: Use Composer to solve the problem of unified representation of complex data types Title: Use Composer to solve the problem of unified representation of complex data types Apr 18, 2025 am 08:33 AM

Summary Description: When dealing with complex data types, you often encounter problems of how to uniformly represent and operate. This problem can be easily solved with Composer using the phrity/o library. It provides encapsulation classes and traits for various data types, making data processing more consistent and efficient.

The Compatibility of IIS and PHP: A Deep Dive The Compatibility of IIS and PHP: A Deep Dive Apr 22, 2025 am 12:01 AM

IIS and PHP are compatible and are implemented through FastCGI. 1.IIS forwards the .php file request to the FastCGI module through the configuration file. 2. The FastCGI module starts the PHP process to process requests to improve performance and stability. 3. In actual applications, you need to pay attention to configuration details, error debugging and performance optimization.

What happens if session_start() is called multiple times? What happens if session_start() is called multiple times? Apr 25, 2025 am 12:06 AM

Multiple calls to session_start() will result in warning messages and possible data overwrites. 1) PHP will issue a warning, prompting that the session has been started. 2) It may cause unexpected overwriting of session data. 3) Use session_status() to check the session status to avoid repeated calls.

What are the plugins for wordpress blocking ip What are the plugins for wordpress blocking ip Apr 20, 2025 am 08:27 AM

WordPress IP blocking plugin selection is crucial. The following types can be considered: based on .htaccess: efficient, but complex operation; database operation: flexible, but low efficiency; firewall: high security performance, but complex configuration; self-written: highest control, but requires more technical level.

Composer: Aiding PHP Development Through AI Composer: Aiding PHP Development Through AI Apr 29, 2025 am 12:27 AM

AI can help optimize the use of Composer. Specific methods include: 1. Dependency management optimization: AI analyzes dependencies, recommends the best version combination, and reduces conflicts. 2. Automated code generation: AI generates composer.json files that conform to best practices. 3. Improve code quality: AI detects potential problems, provides optimization suggestions, and improves code quality. These methods are implemented through machine learning and natural language processing technologies to help developers improve efficiency and code quality.

How to parse next-auth generated JWT token in Java and get information in it? How to parse next-auth generated JWT token in Java and get information in it? Apr 19, 2025 pm 08:21 PM

In processing next-auth generated JWT...

See all articles