search

现在市场上的OA基本上可归结为两大阵营,即php阵营和java阵营。但对接触Oa不久的用户来说,看到的往往只是它们的表相,只是明显的价格差异,却很难看出它们之间的实际差异。其实, PHP + MYSQL 不值钱不仅仅局限于oa软件,而是整体上PHP + MYSQL开发的软件都不如java开发的软件值钱。为什么PHP + MYSQL 的OA为什么不值钱呢?首先得明白php和java之间的差异才行。 

  1、系统的技术架构比较 

  分层是将系统进行有效组织的方式,分而治之的思想是计算机领域中非常重要的思想。在好的分层思想引导下,便能实现“高内聚、低耦合”,也能将具体的问题割裂开来,易于控制、易于延展,更易于分配资源。PHP只能实现简单的分布式两层或三层的架构,而JAVA在这方面就十分强大,可以实现多层的网络架构。运用MVC的设计模式,可使oa系统具有更加高效、合理的系统架构。技术架构的落后,使运用php编写的oa软件系统先天不足,而后天又无法补足其先天上的劣势。使得系统在可拓展性、需求应变性上与JAVA编写的oa软件系统的差距越来越大。架构的差距,注定了php做的oa充其量是个小家碧玉,始终无法和java这种大家闺秀同台竞技。 

 2、数据库访问比较 

  PHP可编译成具有与许多数据库相连接的函数。将自己编写外围的函数去间接存取数据库。通过这样的途径当更换使用的数据库时,可以轻松地修改编码以适应这样的变化。但PHP提供的数据库接口支持彼此不统一,比如对Oracle, MySQL,Sybase的接口,彼此都不一样。由于PHP对于不同的数据库采用不同的数据库访问接口,所以数据库访问代码的通用性不强。 

  而Java通过JDBC来访问数据库,通过不同的数据库厂商提供的数据库驱动方便地访问数据库,访问数据库的接口比较统一。如果同样是将开发的web应用从MYSQL数据数转到ORACLE数据,PHP需要做大量的修改工作,而且比较繁琐。但JAVA开发的便只需要很少的更改便能实现。 

  数据库访问方式的差异,奠定了php开发出的oa和java开发出来的oa是马车和火车的差距,前者只能亦步亦趋而且额度有限,后者却是工业化的结晶,不仅能够包容万物而且速度上稳步提升。 

  3、安全性对比 

  在同是开源和跨平台的java面前,php丢掉了很多的优势。在代码的安全性上尤为突出。php的开发程序在别人拿到代码后,可以很容易的进行修改。而java开发的程序由于无法看到完整的源代码,只能看到一些编译好的类文件,所以安全性较高。加之系统架构的优势,在安全性上php和java是相去甚远。 

  如果非要将php和java在安全性上做个比较的话,同一个小偷光顾php那是随便拿来随便改,想拿什么拿什么,拿的高兴还能大笔一辉某某到此一游。而光顾java的时候,便会发现警察把守,内设自动报警装置,即便突破重重阻扰后进入居室。那值钱的东西都放在加密后的保险柜中,只能望洋兴叹、铩羽而归。 

  4、前瞻性和拓展性 

  从整体来说,php适用于中小型系统,而java适用于大型系统。Php能够将单一的事件做好,但却不适合完成集成度较高的多项并发事件。为什么说php适合中小型系统而不适合做大系统呢? 

  首先, php缺乏多层结构支持。而对于大型的系统负荷站点,只能采用分布计算。将数据库、应用逻辑层和表示逻辑层彼此分开,并将同层的根据流量分开,组成二维数组。而php恰恰缺乏这种支持。 

  其次,PHP提供的数据库接口不统一,要将多个不同的数据库数据统一需要花费很大的力气。而JAVA则没有这种缺陷,可通过SUN Java的Java Class和EJB获得规模支持,通过EJB/CORBA以及众多厂商的Application Server获得结构支持。如IBM的E-business,它的核心是采用JSP/Servlet的Web Sphere,是通过CGI来提供支持的。 

  如果将Php比作将才,具备独挡一方的能力。那么java便是帅才,具有较好的前瞻性和拓展性,整体布局和协同能力强。能够指挥千军万马,最后逐鹿中原。 

  5、开发成本比较 

  既然php在诸多方面都不如java优异,那么php开发出的oa产品何以与java产品竞争呢?在于Php阵营普遍走的是低端路线,而java阵营走的是中高端路线。两者之间交叉的区域较小。 

  软件价格的高低很大程度上和自身成本和功能相挂钩。php的入门门槛较低,绝大多数学过c的程序员都很容易转型为php程序员,这使得php程序员的泛滥成灾的同时,低成本的php软件产品也层出不穷。以PHP最经典的组合PHP + MySQL + Apache为例,由于所有软件都是开源免费的,所以投入并不高。 

 而java开发需要特定的环境,成长为一个合格的java程序员需要一定的时间,java程序员的成本也是php成本的几倍。Java的web应用服务器免费的有Tomcat、JBoss等,而要想具有很好的商业化服务便必须选用Web Sphere和 Web logic。这其中投入的成本无形中便超是php成本的N倍。所以,java开发oa的成本要远远高于php开发出来的同类软件产品。但也正由于java开发的成本较高,很难实现抄袭和短期内逾越的可能,也使得java用开发出的产品门槛更高。 

  不怕不识货,就怕货比货。Php开发出来的产品也能用,但是和java开出的同类产品是没法比较的。正因为php开发的产品整体性能和java开发的相去甚远,所以php运用低成本的低价优势和同类的java产品抗争,以价格落差来平衡购买者的心态。所以,PHP + MYSQL 的OA不值钱也就不足为怪了

Statement
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
The Continued Use of PHP: Reasons for Its EnduranceThe Continued Use of PHP: Reasons for Its EnduranceApr 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.

PHP and Python: Exploring Their Similarities and DifferencesPHP and Python: Exploring Their Similarities and DifferencesApr 19, 2025 am 12:21 AM

PHP and Python are both high-level programming languages ​​that are widely used in web development, data processing and automation tasks. 1.PHP is often used to build dynamic websites and content management systems, while Python is often used to build web frameworks and data science. 2.PHP uses echo to output content, Python uses print. 3. Both support object-oriented programming, but the syntax and keywords are different. 4. PHP supports weak type conversion, while Python is more stringent. 5. PHP performance optimization includes using OPcache and asynchronous programming, while Python uses cProfile and asynchronous programming.

PHP and Python: Different Paradigms ExplainedPHP and Python: Different Paradigms ExplainedApr 18, 2025 am 12:26 AM

PHP is mainly procedural programming, but also supports object-oriented programming (OOP); Python supports a variety of paradigms, including OOP, functional and procedural programming. PHP is suitable for web development, and Python is suitable for a variety of applications such as data analysis and machine learning.

PHP and Python: A Deep Dive into Their HistoryPHP and Python: A Deep Dive into Their HistoryApr 18, 2025 am 12:25 AM

PHP originated in 1994 and was developed by RasmusLerdorf. It was originally used to track website visitors and gradually evolved into a server-side scripting language and was widely used in web development. Python was developed by Guidovan Rossum in the late 1980s and was first released in 1991. It emphasizes code readability and simplicity, and is suitable for scientific computing, data analysis and other fields.

Choosing Between PHP and Python: A GuideChoosing Between PHP and Python: A GuideApr 18, 2025 am 12:24 AM

PHP is suitable for web development and rapid prototyping, and Python is suitable for data science and machine learning. 1.PHP is used for dynamic web development, with simple syntax and suitable for rapid development. 2. Python has concise syntax, is suitable for multiple fields, and has a strong library ecosystem.

PHP and Frameworks: Modernizing the LanguagePHP and Frameworks: Modernizing the LanguageApr 18, 2025 am 12:14 AM

PHP remains important in the modernization process because it supports a large number of websites and applications and adapts to development needs through frameworks. 1.PHP7 improves performance and introduces new features. 2. Modern frameworks such as Laravel, Symfony and CodeIgniter simplify development and improve code quality. 3. Performance optimization and best practices further improve application efficiency.

PHP's Impact: Web Development and BeyondPHP's Impact: Web Development and BeyondApr 18, 2025 am 12:10 AM

PHPhassignificantlyimpactedwebdevelopmentandextendsbeyondit.1)ItpowersmajorplatformslikeWordPressandexcelsindatabaseinteractions.2)PHP'sadaptabilityallowsittoscaleforlargeapplicationsusingframeworkslikeLaravel.3)Beyondweb,PHPisusedincommand-linescrip

How does PHP type hinting work, including scalar types, return types, union types, and nullable types?How does PHP type hinting work, including scalar types, return types, union types, and nullable types?Apr 17, 2025 am 12:25 AM

PHP type prompts to improve code quality and readability. 1) Scalar type tips: Since PHP7.0, basic data types are allowed to be specified in function parameters, such as int, float, etc. 2) Return type prompt: Ensure the consistency of the function return value type. 3) Union type prompt: Since PHP8.0, multiple types are allowed to be specified in function parameters or return values. 4) Nullable type prompt: Allows to include null values ​​and handle functions that may return null values.

See all articles

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 Tools

SublimeText3 English version

SublimeText3 English version

Recommended: Win version, supports code prompts!

mPDF

mPDF

mPDF is a PHP library that can generate PDF files from UTF-8 encoded HTML. The original author, Ian Back, wrote mPDF to output PDF files "on the fly" from his website and handle different languages. It is slower than original scripts like HTML2FPDF and produces larger files when using Unicode fonts, but supports CSS styles etc. and has a lot of enhancements. Supports almost all languages, including RTL (Arabic and Hebrew) and CJK (Chinese, Japanese and Korean). Supports nested block-level elements (such as P, DIV),

SublimeText3 Mac version

SublimeText3 Mac version

God-level code editing software (SublimeText3)

MinGW - Minimalist GNU for Windows

MinGW - Minimalist GNU for Windows

This project is in the process of being migrated to osdn.net/projects/mingw, you can continue to follow us there. MinGW: A native Windows port of the GNU Compiler Collection (GCC), freely distributable import libraries and header files for building native Windows applications; includes extensions to the MSVC runtime to support C99 functionality. All MinGW software can run on 64-bit Windows platforms.

Atom editor mac version download

Atom editor mac version download

The most popular open source editor