Tuesday, November 22, 2005

ficken writes "Web browser pioneer Marc Andreessen recently announced his prediction that PHP will be more popular than Java for building web-based applications." From the article: "Wooing programmers is nothing new in the computing industry, where players constantly jockey to establish their products as an essential foundation. Indeed, many credit Microsoft's success to its highly regarded programming tools, which make it easier for developers to write software that run on Windows. PHP has caught on widely. About 22 million Web sites employ it, and useage is steadily increasing. About 450 programmers have privileges to approve changes to the software. Major companies that employ PHP include Yahoo, Lufthansa and Deutsche Telekom's T-Online." Meanwhilie, Piersky writes "Zend has announced its rival to .NET and J2EE, with the Zend PHP Framework. In a press release, they stated that it will be 'A Web application framework which will standardize the way PHP applications are built. The Zend PHP Framework will accelerate and improve the development and deployment of mission-critical PHP Web applications'. This will for part of Zend's PHP Collaboration Project"Ads_xl=0;Ads_yl=0;Ads_xp='';Ads_yp='';Ads_xp1='';Ads_yp1='';Ads_par='';Ads_cnturl='';Ads_prf='page=article';Ads_channels='RON_P6_IMU';Ads_wrd='programming';Ads_kid=0;Ads_bid=0;Ads_sec=0; PHP Succeeding Where Java Has Failed Log in/Create an Account | Top | 561 comments (Spill at 50!) | Index Only | Search Discussion Display Options Threshold: -1: 561 comments 0: 555 comments 1: 450 comments 2: 314 comments 3: 70 comments 4: 39 comments 5: 23 comments Flat Nested No Comments Threaded Oldest First Newest First Highest Scores First Oldest First (Ignore Threads) Newest First (Ignore Threads) The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way. (1) | 2 I am completely unbiased... (Score:5, Funny) by Fortyseven (240736) on Friday October 21, @10:11AM (#13844098) (http://bteg.us/ | Last Journal: Tuesday November 27, @09:32AM) As a PHP coder and Java hater, I am completely in agreement with whatever the hell this article says. :D [ Reply to This Re:I am completely unbiased... (Score:5, Insightful) by SatanicPuppy (611928) <SatanicpuppyNO@SPAMgmail.com> on Friday October 21, @10:19AM (#13844171) (Last Journal: Thursday September 02, @11:32PM) Well, as a Java coder who's been coding almost exclusively in php for a year or so, I have to say it makes me feel better about my time spent. Php is definitely easy to work with, though that creates the opportunity for some seriously scary code.I have to say, just not working with Tomcat is a plus (though I give major Props to the Fedora team for the option to install Tomcat right off the install disks)...When gcj finally catches up, I'll be a happy puppy. [ Reply to This | ParentRe:I am completely unbiased... by (A)*(B)!0_- (Score:1) Friday October 21, @10:36AMRe:I am completely unbiased... by SatanicPuppy (Score:2) Friday October 21, @11:00AMRe:I am completely unbiased... by masklinn (Score:2) Friday October 21, @11:08AMRe:I am completely unbiased... by SatanicPuppy (Score:2) Friday October 21, @11:13AMI can't believe you just said that. by Marc2k (Score:2) Friday October 21, @11:49AMRe:I can't believe you just said that. by Agarax (Score:1) Friday October 21, @01:20PMRe:I can't believe you just said that. by mforbes (Score:2) Friday October 21, @01:42PMRe:I can't believe you just said that. by ShieldW0lf (Score:2) Friday October 21, @08:36PM Re:I am completely unbiased... (Score:4, Funny) by Xugumad (39311) on Friday October 21, @12:00PM (#13845056) Note to self - write article claiming people who use the online name "Xugumad" at 100% more productive than regular employees :) [ Reply to This | Parent1 reply beneath your current threshold.Re:I am completely unbiased... by KiloByte (Score:2) Friday October 21, @10:59AM Re:I am completely unbiased... (Score:5, Interesting) by SatanicPuppy (611928) <SatanicpuppyNO@SPAMgmail.com> on Friday October 21, @11:09AM (#13844580) (Last Journal: Thursday September 02, @11:32PM) Yea. You can write good code in Php, but I've seen a lot of slop as well, and I've talked to a lot of "Php programmers" who don't know the first thing about datastructures---unsuprising since php really doesn't have anything besides a weird hash-array-stack thing with ad hoc support for multidimensions, and don't understand reusable objects or abstraction.Does definitely remind me of VB, though the syntax isn't as screwy. [ Reply to This | Parent4 replies beneath your current threshold. Re:I am completely unbiased... (Score:5, Insightful) by LDoggg_ (659725) on Friday October 21, @11:51AM (#13844968) (http://k12wincd.sourceforge.net/) The problem with Java is that you can't really integrate it with anything other than Java itself Huh?Not sure what you mean here. If by integrate you mean communicate with other languages there's things like CORBA and SOAP, if you mean call other shared libraries there's always JNI if you can't find a java lib to do something. Until, as you say, gcj or any other piece of free software catches up, Java won't be usable. Strange, I'm using it every day at work. Have been in one way or another professionally for 8 years now. It died as a client-side language, and is struggling on the server as well. You do realise that is no better than a BSD is dying troll right?Just checked Moster.com. 105 java positions available within 50 miles of my house, 18 for PHP, 42 for perl Now I'm saying that as someone who also uses PHP. I've been using it quite a bit lately and don't mind it at all, but we're talking apples and oranges here. Sure PHP can be used to write monstrously sloppy and/or insecure code, but so can any language. PHP can also be used to write clean easily maintable secure code.PHP wasn't even close to java in terms of object oriented coding until PHP5 came out, which unfortuneatly has been very slow to appear on most 3rd party hosting servers and distros. My only real gripes with PHP are the lack of a standard DB connectivity layer like JDBC. PEAR:DB and ADODB are close, but they still rely on non-php libraries so setting up a connection to oracle or sql server is painful. The other thing is a lack of type hinting for primatives. Seems kinda silly to have to do a check if something is an int or double in the method instead of just putting it in the method's signature. I'm know its a loosely typed language, but type hinting is there as an option for objects, why not primatives too? I'm looking forward to PHP5.5 its going to have some real nice features that will bring it little closer to server side java and a little further from something like .asp where most of the business logic is in the presentation layer. [ Reply to This | ParentKeep in mind how bloated most java shops are. by Some Random Username (Score:2) Friday October 21, @01:41PMRe:Keep in mind how bloated most java shops are. by plughead (Score:1) Friday October 21, @02:03PMRe:Keep in mind how bloated most java shops are. by Some Random Username (Score:2) Friday October 21, @03:12PMRe:Keep in mind how bloated most java shops are. by plughead (Score:1) Friday October 21, @05:53PMRe:Keep in mind how bloated most java shops are. by Some Random Username (Score:1) Friday October 21, @09:10PMRe:I am completely unbiased... by dreadlock9 (Score:1) Friday October 21, @05:49PMRe:I am completely unbiased... by jZnat (Score:2) Friday October 21, @08:32PMRe:I am completely unbiased... by LDoggg_ (Score:2) Friday October 21, @02:45PMRe:I am completely unbiased... by LDoggg_ (Score:2) Friday October 21, @04:21PM2 replies beneath your current threshold.Re:I am completely unbiased... by KanSer (Score:2) Friday October 21, @11:53AMRe:I am completely unbiased... by rsheridan6 (Score:3) Friday October 21, @12:21PMRe:I am completely unbiased... by SatanicPuppy (Score:3) Friday October 21, @03:27PMRe:I am completely unbiased... by KiloByte (Score:2) Friday October 21, @06:19PM Re:I am completely unbiased... (Score:5, Interesting) by Mercano (826132) <mercano@@@gmail...com> on Friday October 21, @01:01PM (#13845654) [Java] died as a client-side language. Not sure how much this is worth, but as we speak the top item on the Most Active Projects list over on SourceForge (insert tinfoil hat disclaimer here), Azureus [sourceforge.net] is a client side Java app. For those of you keeping score at home, the #2 spot, GAIM [sourceforge.net], is in C and PHP comes in at #3 via phpMyAdmin [sourceforge.net]. Keep in mind this is looking at quality (and a pretty wierd messure of quality, at that), not quantity, but still intersting. [ Reply to This | ParentRe:I am completely unbiased... by Crayon Kid (Score:2) Friday October 21, @02:12PMRe:I am completely unbiased... by Ryan Amos (Score:2) Friday October 21, @05:17PMRe:I am completely unbiased... by bani (Score:2) Friday October 21, @06:13PMBetter check your boxen by Trinition (Score:2) Friday October 21, @08:57PMRe:Better check your boxen by bani (Score:2) Friday October 21, @09:27PMWhat about FireFox? by Trinition (Score:2) Friday October 21, @11:13PMRe:What about FireFox? by bani (Score:2) Friday October 21, @11:31PMRe:What about FireFox? by Mercano (Score:2) Saturday October 22, @12:23AM1 reply beneath your current threshold.Re:I am completely unbiased... by Xugumad (Score:2) Friday October 21, @11:51AMRe:I am completely unbiased... by Xugumad (Score:2) Friday October 21, @12:39PM1 reply beneath your current threshold.Re:I am completely unbiased... by BlightShadow (Score:1) Friday October 21, @10:34AMRe:I am completely unbiased... by David's Boy Toy (Score:1) Friday October 21, @10:43AMRe:I am completely unbiased... by CastrTroy (Score:2) Friday October 21, @11:45AMRe:I am completely unbiased... by Anonymous Coward (Score:2) Friday October 21, @12:15PMRe:I am completely unbiased... by anti-trojan (Score:1) Friday October 21, @04:54PM1 reply beneath your current threshold.2 replies beneath your current threshold.PHP is great stuff by ReformedExCon (Score:2) Friday October 21, @10:11AM Re:PHP is great stuff (Score:5, Interesting) by rovingeyes (575063) on Friday October 21, @10:14AM (#13844130) "If you are a web "programmer", it's definitely nice to have well-built tools that let you think even less about what you are doing and come up with something useful."Don't know about you, but it sounds dangerous to me. [ Reply to This | ParentRe:PHP is great stuff by AVee (Score:3) Friday October 21, @10:40AMRe:PHP is great stuff by Crayon Kid (Score:2) Friday October 21, @11:20AMRe:PHP is great stuff by DrSkwid (Score:2) Friday October 21, @11:52AMRe:PHP is great stuff by Doctor Faustus (Score:2) Friday October 21, @01:01PMwhy ignore naming conventions by shmlco (Score:2) Friday October 21, @02:00PMRe:PHP is great stuff by DrSkwid (Score:2) Friday October 21, @07:25PMRe:why ignore naming conventions by Doctor Faustus (Score:2) Friday October 21, @03:13PMRe:why ignore naming conventions by pivo (Score:2) Friday October 21, @05:08PMRe:why ignore naming conventions by pyite (Score:2) Friday October 21, @07:55PMRe:why ignore naming conventions by Doctor Faustus (Score:2) Friday October 21, @10:27PMRe:PHP is great stuff by lastchance_000 (Score:1) Friday October 21, @12:01PMRe:PHP is great stuff by Taliesan999 (Score:1) Friday October 21, @11:08PM1 reply beneath your current threshold.Re:PHP is great stuff by enrico_suave (Score:2) Friday October 21, @04:53PMRe:PHP is great stuff by Demerol (Score:1) Friday October 21, @11:08AM3 replies beneath your current threshold. Pardon me while I roll my eyes (Score:5, Insightful) by Anonymous Coward on Friday October 21, @10:18AM (#13844154) "Java is much more programmer-friendly than C or C++, or was for a few years there until they made just as complicated. It's become arguably even harder to learn than C++," Andreessen said. And the mantle of simplicity is being passed on: "PHP is such is an easier environment to develop in than Java."This is just silly. PHP is far from "simpler" than Java. PHP *is* better suited to basic page generation tasks. Its syntax is easy to learn, and it's quick to get a page running. However, any sort of complexity thrown at the system starts making PHP look difficult and Java look easy. For example, I often write web applications that require that user sessions communicate with each other. Now this is stupidly simple in Java thanks to the use of Singletons or named derivitives. One can easily build a chat room, for example, whereas PHP begins to get a bit more tricky. Now throw really complex needs like PDF generation, Dynamic Excel Spreadsheets, XML/SOAP/XML-RPC/EDI communication, mainframe interfaces, off-brand databases, performance caches, and other large scale features, and suddenly Java doesn't look so hard anymore. PHP, OTOH, begins screaming for mercy.One would think that Andreessen would understand how to use the right tool for the right job, but apparently not. He should be kept away from the press. He always manages to sound 50 IQ points dumber than he actually is. (A common problem when dealing with the press.) [ Reply to This | ParentRe:Pardon me while I roll my eyes by netkid91 (Score:2) Friday October 21, @10:31AM Re:Pardon me while I roll my eyes (Score:4, Funny) by Gilmoure (18428) <gilmoure@gmaiCOLAl.com minus caffeine> on Friday October 21, @10:54AM (#13844457) (http://www.livejournal.com/users/gilmoure/ | Last Journal: Saturday November 16, @06:41PM) Don't you know that non-partisanship on Slashdork won't be tolerated? If your comment can't be fodder for flamewar, you may be modded down (and cute bunnies won't like you anymore). [ Reply to This | Parent Re:Pardon me while I roll my eyes (Score:4, Informative) by coder111 (912060) <coder&rrmail,com> on Friday October 21, @11:02AM (#13844529) There's usually no need to integrate PHP with Java and use PHP for page rendering, because there are tools in Java that do page rendering just as well as PHP, if not better. If you need integration anyway, you can integrate Tomcat with Apache- then all your static (images, CSS) and PHP stuff will run on apache, for java stuff tomcat will get called. This will both increase performance (as Apache is better suited for serving static stuff than Tomcat) and allow PHP to be used on same box, same port.Java is not slow in server-side, it is just slow on desktop with Swing. Get Tomcat and try benchmarking some JSPs if you don't believe me. Templates with java might be slower than JSP, but anyway, page rendering is something that impacts the performance of web application the least.With java you EXTREMELY RARELY need to write extensions, usually you can find java libraries (most of them open source) that do the stuff you need. Or you can just use standart java class libraries, that are enough for 95% of cases. This way you can get a platform-independent solution for no additional cost. While your DLLs (.so's?) will have to be compiled for each architecture, coded to be cross-platform, installed by system administrators, etc.If you need to interface with C++/C, there is JNI (Java native interface, It is hairy and unfriendly though). Of you can integrate via some kind of interprocess communication (pipes still work, as will TCP, with java you can write TCP client/server in 10-30 lines of code). This way you can have any language on the other side of IPC. You can use webservices/CORBA/XML RPC if you want to be fancy.--Coder [ Reply to This | ParentRe:Pardon me while I roll my eyes by Decaff (Score:2) Friday October 21, @02:52PMRe:Pardon me while I roll my eyes by masklinn (Score:3) Friday October 21, @11:13AMThere goes portability...thank you for playing... by irritating environme (Score:2) Friday October 21, @11:39AMRe:Pardon me while I roll my eyes by Mercano (Score:2) Friday October 21, @01:09PMRe:Pardon me while I roll my eyes by Decaff (Score:3) Friday October 21, @01:37PMRe:Pardon me while I roll my eyes by bani (Score:2) Friday October 21, @06:34PMRe:Pardon me while I roll my eyes by Decaff (Score:2) Friday October 21, @07:09PM1 reply beneath your current threshold.Re:Pardon me while I roll my eyes by FortKnox (Score:2) Friday October 21, @10:32AMRe:Pardon me while I roll my eyes by nuttzy (Score:1) Friday October 21, @11:48AMRe:Pardon me while I roll my eyes by popeyethesailor (Score:1) Friday October 21, @10:38AM Re:Pardon me while I roll my eyes (Score:5, Informative) by Crayon Kid (700279) on Friday October 21, @10:55AM (#13844467) However, the real strength of these systems is not in themselves; they are built on a superb platform base which provides Threading, IO, Networking, Graphics, Db access, i18n,and all the things a programmer might ever require. PHP doesnt have anything remotely similar, as far as i can see.OK, this is a troll if I ever saw one and may I be damned for feeding one but here it goes:Go look at PEAR [php.net] and the PHP manual index [php.net] and then tell people PHP doesn't have a platform offering all those. [ Reply to This | ParentRe:Pardon me while I roll my eyes by LDoggg_ (Score:2) Friday October 21, @12:09PMRe:Pardon me while I roll my eyes by LDoggg_ (Score:2) Friday October 21, @02:28PMRe:Pardon me while I roll my eyes by fimbulvetr (Score:2) Friday October 21, @02:48PMRe:Pardon me while I roll my eyes by LDoggg_ (Score:2) Friday October 21, @02:51PMRe:Pardon me while I roll my eyes by fimbulvetr (Score:2) Friday October 21, @07:34PM1 reply beneath your current threshold.1 reply beneath your current threshold.Re:Pardon me while I roll my eyes by Zebra_X (Score:2) Friday October 21, @10:41AMRe:Pardon me while I roll my eyes by colinrichardday (Score:1) Friday October 21, @11:04AMRe:Pardon me while I roll my eyes by Anonymous Coward (Score:1) Friday October 21, @11:20AMRe:Pardon me while I roll my eyes by radixvir (Score:2) Friday October 21, @11:16AMRe:Pardon me while I roll my eyes by TobascoKid (Score:2) Friday October 21, @11:32AMJava failing? by mcvos (Score:1) Friday October 21, @11:17AMRe:Java failing? by bloo9298 (Score:3) Friday October 21, @11:23AMRe:Java failing? by ShieldW0lf (Score:2) Friday October 21, @04:18PMI'm sorry but I, almost, completely disagree by burnttoy (Score:1) Friday October 21, @11:22AMRe:I'm sorry but I, almost, completely disagree by coder111 (Score:1) Friday October 21, @11:44AMRe:I'm sorry but I, almost, completely disagree by PyroX_Pro (Score:1) Friday October 21, @03:21PMRe:I'm sorry but I, almost, completely disagree by saberworks (Score:1) Friday October 21, @12:46PMRe:I'm sorry but I, almost, completely disagree by burnttoy (Score:1) Friday October 21, @02:19PMPardon me while I poke your eyes with a fork by Foofoobar (Score:2) Friday October 21, @11:27AMRe:Pardon me while I poke your eyes with a fork by Foofoobar (Score:2) Friday October 21, @12:26PMRe:Pardon me while I poke your eyes with a fork by Foofoobar (Score:2) Friday October 21, @01:29PMRe:Pardon me while I poke your eyes with a fork by Foofoobar (Score:2) Friday October 21, @02:43PMRe:Pardon me while I poke your eyes with a fork by Foofoobar (Score:2) Friday October 21, @04:07PMRe:Pardon me while I poke your eyes with a fork by Foofoobar (Score:2) Friday October 21, @05:39PM1 reply beneath your current threshold.1 reply beneath your current threshold.1 reply beneath your current threshold.Re:Pardon me while I poke your eyes with a fork by fimbulvetr (Score:1) Friday October 21, @04:55PM1 reply beneath your current threshold.1 reply beneath your current threshold.1 reply beneath your current threshold.1 reply beneath your current threshold.Re:Pardon me while I unroll your eyes by Mateo_LeFou (Score:1) Friday October 21, @11:47AM Re:Pardon me while I roll my eyes (Score:5, Insightful) by hoggoth (414195) on Friday October 21, @12:35PM (#13845369) (Last Journal: Monday February 23, @05:55PM) > One would think that Andreessen would understand how to use the right tool for the right job, but apparently notAndreessen knows exactly how to use the right tool for the job, like a surgeon. His tool is the media, and his job, as a new member of the board at Zend, is to promote PHP. [ Reply to This | ParentRe:Pardon me while I roll my eyes by hellraizr (Score:1) Friday October 21, @12:44PMshared-nothing architecture? What? by irritating environme (Score:2) Friday October 21, @11:48AMRe:shared-nothing architecture? What? by scotbot (Score:1) Friday October 21, @12:01PMRe:Pardon me while I roll my eyes by matfud (Score:1) Friday October 21, @03:18PM2 replies beneath your current threshold.Re:PHP is great stuff by outsider007 (Score:2) Friday October 21, @12:53PMRe:PHP is great stuff by masklinn (Score:3) Friday October 21, @11:21AMRe:PHP is great stuff by Samus (Score:1) Friday October 21, @01:00PMRe:PHP is great stuff by masklinn (Score:2) Friday October 21, @02:25PM1 reply beneath your current threshold. J2EE won't fail... (Score:5, Insightful) by _undan (804517) <dan@undumb.com> on Friday October 21, @10:12AM (#13844108) ... until companies who need mission critical systems have someone they can phone when something goes wrong, and some form of developer accreditation. Don't kid yourself. J2EE isn't picked because of the language, it's because it's got Sun and IBM (through Websphere) behind it. [ Reply to ThisRe:J2EE won't fail... by digidave (Score:3) Friday October 21, @10:30AMRe:J2EE won't fail... by bloodredsun (Score:1) Friday October 21, @10:49AMRe:J2EE won't fail... by aled (Score:2) Friday October 21, @11:45AMRe:J2EE won't fail... by bloodredsun (Score:1) Friday October 21, @11:56AMRe:J2EE won't fail... by arkanes (Score:3) Friday October 21, @11:11AMRe:J2EE won't fail... by jadavis (Score:2) Friday October 21, @10:05PMRe:J2EE won't fail... by Gilmoure (Score:2) Friday October 21, @12:49PMRe:J2EE won't fail... by eikonos (Score:1) Saturday October 22, @12:51AM1 reply beneath your current threshold. In other news (Score:5, Funny) by Anonymous Coward on Friday October 21, @10:13AM (#13844113) Coke succeeding where peanuts fail.What? The two do different things. [ Reply to ThisRe:In other news by Anonymous Coward (Score:1) Friday October 21, @11:09AMRe:In other news by grasshoppa (Score:2) Friday October 21, @12:44PMRe:In other news by curunir (Score:2) Friday October 21, @01:21PM1 reply beneath your current threshold.Re:In other news by timeOday (Score:2) Friday October 21, @01:32PMRe:In other news by Skjellifetti (Score:2) Friday October 21, @05:23PMPHP can do allot by fak3r (Score:1) Friday October 21, @10:14AM Re:PHP can do allot (Score:5, Informative) by christopherfinke (608750) <cfinke@gmail.com> on Friday October 21, @10:21AM (#13844182) (http://www.efinke.com/ | Last Journal: Sunday March 30, @01:54PM) I'm very impressed with how far PHP (Personal Home Page) has gone.PHP hasn't stood for Personal Home Page for a long time. It stands for "PHP: Hypertext Preprocessor." [ Reply to This | ParentRe:PHP can do allot by 62vette (Score:1) Friday October 21, @11:03AMRe:PHP can do allot by ScrewMaster (Score:2) Friday October 21, @11:16AMRe:PHP can do allot by ortholattice (Score:2) Friday October 21, @11:18AMRe:PHP can do allot by Sique (Score:2) Friday October 21, @02:01PMRe:PHP can do allot by tourvil (Score:2) Friday October 21, @02:06PMRe:PHP can do allot by demigod (Score:2) Friday October 21, @03:05PMRe:PHP can do allot by b1t r0t (Score:1) Friday October 21, @10:41AMRe:PHP can do allot by ScrewMaster (Score:2) Friday October 21, @12:06PMRe:PHP can do allot by Marc2k (Score:2) Friday October 21, @12:18PMRe:PHP can do allot by Tack (Score:2) Friday October 21, @12:47PM3 replies beneath your current threshold.Re:PHP can do allot by totallygeek (Score:3) Friday October 21, @10:22AMRe:PHP can do allot by bloodredsun (Score:1) Friday October 21, @11:09AMOS-independent Java by totallygeek (Score:2) Friday October 21, @11:20AMRe:OS-independent Java by aled (Score:2) Friday October 21, @11:50AMRe:OS-independent Java by bloodredsun (Score:1) Friday October 21, @12:04PM1 reply beneath your current threshold.Re:PHP can do allot by John Nowak (Score:1) Friday October 21, @11:10AMRe:PHP can do allot by Ozwald (Score:2) Friday October 21, @11:14AMRe:PHP can do allot by aled (Score:2) Friday October 21, @11:58AMRe:PHP can do allot by Vancorps (Score:2) Friday October 21, @01:23PMRe:PHP can do allot by aled (Score:2) Friday October 21, @02:06PMRe:PHP can do allot by Vancorps (Score:2) Friday October 21, @03:37PM1 reply beneath your current threshold.2 replies beneath your current threshold.Will be? by bhirsch (Score:3) Friday October 21, @10:14AMRe:Will be? by Anonymous Coward (Score:1) Friday October 21, @11:36AM1 reply beneath your current threshold.Re:Will be? by yomahz (Score:2) Friday October 21, @12:39PM Help me out here (Score:5, Insightful) by wren337 (182018) on Friday October 21, @10:15AM (#13844138) (http://www.detroitscientific.com/) Doesn't PHP tend to be embedded in the page? I thought it was a more direct comparison to JSP than to Java. And like JSP I expected it violated the seperation of logic and presentation that I love so dearly. I've been avoiding PHP for the same reason I don't do JSP pages, I don't like code in the presentation layer.I am prepared to have my mind blown here, can someone enlighten me?    [ Reply to This Re:Help me out here (Score:5, Informative) by TheSpoom (715771) * on Friday October 21, @10:20AM (#13844179) (http://www.uberm00.net/ | Last Journal: Monday January 19, @10:27PM) You're pretty much correct. PHP is a lot closer to JSP or ASP than Java, and yes, it can violate separation of logic and presentation. However, you can use the Smarty templating library [php.net] to separate code and presentation (and I recommend this to anyone learning PHP, because embedding PHP in HTML makes for very sloppy and nigh unreadable code). [ Reply to This | ParentRe:Help me out here by jiushao (Score:2) Friday October 21, @10:28AMTemplating: Re:Help me out here by foolfodder (Score:1) Friday October 21, @10:35AMHave to be "nuts" to mix the two ... by isolationism (Score:2) Friday October 21, @10:52AM Re:Help me out here (Score:4, Informative) by kingmundi (54911) on Friday October 21, @11:08AM (#13844571) I find it strange how people recommend Smarty for separation of code from content. Smarty implements its own while loops and if then statements. I have yet to come across a web application using Smarty that was easily readable. I would think if the goal was to separate code from content, one would use a templating engine more akin to QuickTemplates [sourceforge.net]. It does not make you relearn a whole new programming language syntax for while loops and if then statements like Smarty does. [ Reply to This | ParentRe:Help me out here by bobdinkel (Score:3) Friday October 21, @11:22AMRe:Help me out here by the_2nd_coming (Score:2) Friday October 21, @03:15PMRe:Help me out here by robla (Score:2) Friday October 21, @05:03PMRe:Help me out here by captainclever (Score:2) Friday October 21, @04:21PM1 reply beneath your current threshold.Re:Help me out here by Anonymous Coward (Score:2) Friday October 21, @11:28AMRe:Help me out here by mildgift (Score:1) Friday October 21, @02:56PM Re:Help me out here (Score:4, Insightful) by thePowerOfGrayskull (905905) on Friday October 21, @12:20PM (#13845249) However, you can use the Smarty templating library to separate code and presentation (and I recommend this to anyone learning PHP, because embedding PHP in HTML makes for very sloppy and nigh unreadable code). Come again? You're saying that {$value} somehow separates presentation from code more than does <?=$value;?>? [ Reply to This | ParentRe:Help me out here by moof1138 (Score:3) Friday October 21, @03:39PMRe:Help me out here by thePowerOfGrayskull (Score:1) Friday October 21, @10:39PM2 replies beneath your current threshold.Re:Help me out here by Decaff (Score:2) Friday October 21, @01:41PMRe:Help me out here by killjoe (Score:2) Friday October 21, @06:27PM2 replies beneath your current threshold.Re:Help me out here by Dukael_Mikakis (Score:2) Friday October 21, @10:21AMRe:Help me out here by Randolpho (Score:3) Friday October 21, @11:11AMRe:Help me out here by hoggoth (Score:2) Friday October 21, @11:50AMRe:Help me out here by potHead42 (Score:1) Friday October 21, @10:21AMRe:Help me out here by Anonymous Coward (Score:2) Friday October 21, @10:22AMRe:Help me out here by tertullian (Score:2) Friday October 21, @10:24AMRe:Help me out here by wren337 (Score:2) Friday October 21, @10:29AMRe:Help me out here by JASegler (Score:2) Friday October 21, @10:52AMRe:Help me out here by wren337 (Score:2) Friday October 21, @11:04AMRe:Help me out here by 1010011010 (Score:2) Friday October 21, @11:07AMThere's no reason to put logic into presentation by coder111 (Score:1) Friday October 21, @10:42AMRe:There's no reason to put logic into presentatio by vidarh (Score:2) Friday October 21, @12:07PMRe:Help me out here by seann (Score:1) Friday October 21, @12:19PM1 reply beneath your current threshold.Re:Help me out here by digidave (Score:3) Friday October 21, @10:40AMRe:Help me out here by bahwi (Score:2) Friday October 21, @11:00AMRe:Help me out here by bahwi (Score:2) Friday October 21, @05:45PM1 reply beneath your current threshold.Re:Help me out here by davesag (Score:2) Friday October 21, @11:52AMRe:Help me out here by HeaththeGreat (Score:1) Friday October 21, @12:07PMRe:Help me out here by budgenator (Score:2) Friday October 21, @12:09PMRe:Help me out here by dan the person (Score:2) Friday October 21, @12:29PMRe:Help me out here by hurricaen (Score:1) Friday October 21, @12:36PMRe:Help me out here by lemnik (Score:1) Friday October 21, @04:23PMRe:Help me out here by aftermath09 (Score:1) Friday October 21, @08:18PM4 replies beneath your current threshold.

0 Comments:

Post a Comment

<< Home