Page 1 of 2

Why use LAMP instead of J2EE or .NET?

Posted: Fri Feb 06, 2009 7:05 am
by gmarch
I am seeking alternative environments for application development frameworks, and having been a LAMP programmer about 10 years ago (yeah, management now...), I suggested LAMP.

Recently, I've discovered the Zend Framework which I like a lot. I think the PHP community has come a long way since I was actively coding in it.

That said, I am having a hard time justifying to my management why they should consider it at all (and, I'm talking about LAMP in general, not specifically ZF which has it's pros and cons).

It's kind of "natural" to me why we should have LAMP as an alternative, but it is hard to put into words. We currently develop mostly in J2EE (WebSphere, Oracle) and in .NET. Obviously, cost (both initial and TCO) is a factor, but believe it or not, that doesn't make it a slam dunk. We have intellectual capital in the commercial technologies and get a lot of resistance when they are asked to try something new.

I'm hoping to come up with come compelling arguments that demonstrate:

1) Concrete criteria for moving to LAMP
2) Provoking factors in such a move
3) Distinguishing characteristics of LAMP

I'd appreciate any and all suggestions that will help me make my case.

Thanks!

/greg

Re: Why use LAMP instead of J2EE or .NET?

Posted: Fri Feb 06, 2009 9:33 am
by mintedjo
I'm currently doing a "year in industry" and using LAMP for all the development we do.
When I told my university tutor last week he basically told me to stop it.
He proposed that I learn to use .net and asp and ditch php altogether because it would be more productive and more reliable than to continue with PHP even though I have no experience with asp/.net stuff at all. Other tutors agreed with him. Their only argument FOR php was that it's free. They were mostly experienced web developers so I trust their opinion - but I'm not gonna stop using PHP because I don't want to...
I know this isn't exactly gonna help your case, I just thought I'd mention it :-) I wasn't aware that asp was actually "better" in any way than php.

Re: Why use LAMP instead of J2EE or .NET?

Posted: Fri Feb 06, 2009 10:07 am
by matthijs
I have absolutely no experience with .Net, the only thing I read about it was that it spits out horrible code and it's extremely hard to change that. But I'm not able to help you with your choice.

However, it would probably help if you'd explain what exactly you want to do and need. They are different platforms, each with pros and cons. .Net might be better suited for solving problem A, problem B might be better solved with PHP/Lamp

For the web specifically, often LAMP is a good choice

Re: Why use LAMP instead of J2EE or .NET?

Posted: Fri Feb 06, 2009 10:18 am
by gmarch
matthijs wrote:However, it would probably help if you'd explain what exactly you want to do and need. They are different platforms, each with pros and cons. .Net might be better suited for solving problem A, problem B might be better solved with PHP/Lamp
I am proposing an an alternative development framework for "the enterprise". So, this means that while we currently have J2EE and .NET, given the current economic climate, I would like to propose a lower cost framework for non-mission critical applications.

Applications range from simple (issue tracking, data capture) to the more complex (managing financial data, possibly client facing applications). Obviously, they are all browser based. So, think of the problem space as anything that J2EE or .NET would handle, but in this case, just not the mission critical applications (those are the ones where we would loose millions of dollars for short outages) (yes, we're a bank).

I truly believe that LAMP can handle anything we need to do, with a more agile development process, faster time to market, lower costs, etc. But, I am having a hard time being convincing about it.

Also, I'm looking for other institutions (preferably financial, but I'll take anything at this point) that use LAMP. I think google and facebook use LAMP, but I'm not 100% sure...
matthijs wrote:For the web specifically, often LAMP is a good choice
Unfortunately, this is true to me, but proving it is the point of this thread....

/greg

Re: Why use LAMP instead of J2EE or .NET?

Posted: Fri Feb 06, 2009 10:54 am
by alex.barylski
I am proposing an an alternative development framework for "the enterprise". So, this means that while we currently have J2EE and .NET, given the current economic climate, I would like to propose a lower cost framework for non-mission critical applications.
Unless you have specific 'issues' with existing frameworks and want them addressed, building your own is a waste of time (although it seems to be quite common). Zend is a good start.
I think google and facebook use LAMP, but I'm not 100% sure...
Google uses a modified version of MySQL from what I remember and most certainly some breed of Linux, whether they use Apache and PHP I dunno. I dought very much the latter. Maybe LAM? :P

Facebook has a lot of scripts which end in PHP so unless their trying to be cool...I'm certain they do though I have looked into their engineering job offers in the past and PHP and experience building C extensions were pre-requistes.

Re: Why use LAMP instead of J2EE or .NET?

Posted: Fri Feb 06, 2009 11:02 am
by gmarch
PCSpectra wrote:Unless you have specific 'issues' with existing frameworks and want them addressed, building your own is a waste of time (although it seems to be quite common). Zend is a good start.
Heh... No! I'm not looking to build my own - I'm looking to leverage an existing one. LAMP along with Zend is what I'm trying to sell...

What I AM looking for is HOW to sell it to management.

Why is it good?

What makes it a better alternative?

What are the thought provoking or key concepts that it has over other solutions?

I know this may be the wrong audience to ask these questions, but I was hoping for the folks in the trenches to point out the technical merits of LAMP over J2EE or .NET.

Thanks...

/greg

Re: Why use LAMP instead of J2EE or .NET?

Posted: Fri Feb 06, 2009 11:09 am
by pickle
To be honest, I'd be extremely surprised if any bank was running on a LAMP stack - simply for liability issues. F/OSS projects have absolutely no obligation to make sure the software is working 100%. If it doesn't, it's no hair off their back. That's fine for something like Facebook or Google. With something like a bank though, you want someone who needs their product to work, and most importantly, someone you can go after legally if they fail.

If a security flaw is found in PHP, and it's exploited - well, PHP doesn't really belong to anyone & the source code said there were no guarantees, so you're out of luck. If a security flaw is found in .NET, it's exploited, and your company loses millions of dollars, you can probably go after Microsoft.

I totally think LAMP will work as good & likely better than any .NET or J2EE stack. As a bank though, I'd be concerned with covering your butt.


On the other side, using terms like "no vender lock-in" is usually an appealing statement for the managers I've had to deal with.

Re: Why use LAMP instead of J2EE or .NET?

Posted: Fri Feb 06, 2009 11:15 am
by alex.barylski
What I AM looking for is HOW to sell it to management.
Ahh...oiee...Zend would probably be the clear winner here. From an enterprise perspective it's absolutely top dog.

1. It's supported by Zend the very company that develops PHP
2. Huge community, active documentation, etc

Technically I don't think it's *much* better than most others. CodeIgnitor has what I would consider annoying dependencies, particularly in MVC components. The designers probably read a few articles on MVC and started cracking, whereas Zend probably had more focus on adhering to patterns a little more strictly, IMHO and little to strictly.

Zend is cool but it's to abstract for my needs, which is what results when you try to be all things to all people. I realize that software performance is moot in most cases (just buy faster CPU's) however over abstraction can also complicate things from a developer perspective. This could be addressed by implementing your own facade's but again, more work.

I would use Zend in a commercial setting only because I think standards are very important, only I would follow a different standard for my own projects. :P
know this may be the wrong audience to ask these questions, but I was hoping for the folks in the trenches to point out the technical merits of LAMP over J2EE or .NET.
I am sure there are several on here who used Zend, grew tired of it's 'issues' and started developing their own. Probably the exception than the rule though.

Zend is apparently loosely coupled, which when compared to other PHP frameworks is a huge plus in my books. How you define loosely coupled will differ wildly from others.

It's easy to use individual components in Zend, but removing everything but that component is next to impossible due to the vast array of internal dependencies the framework has. I think that is probably what they meant by loosely coupled, whereas personally, it means remove all files but the one which the primary class is in.

Other frameworks like CodeIgnitor have a more "Use the whole framework or don't use it at all" type mentality.

CakePHP has auto-loading models (as does CI I think) seems a common practice. Personally I hate the idea of the controller dictating my view and/or models, so it's an example of when good intentioned conventions become bad. :P

Cheers,
Alex

Re: Why use LAMP instead of J2EE or .NET?

Posted: Fri Feb 06, 2009 2:55 pm
by josh
mintedjo wrote:He proposed that I learn to use .net and asp and ditch php altogether because it would be more productive and more reliable than to continue with PHP even though I have no experience with asp/.net stuff at all. Other tutors agreed with him. Their only argument FOR php was that it's free. They were mostly experienced web developers so I trust their opinion
Plain ignorance.
PCSpectra wrote: Zend is apparently loosely coupled, which when compared to other PHP frameworks is a huge plus in my books. How you define loosely coupled will differ wildly from others.

It's easy to use individual components in Zend, but removing everything but that component is next to impossible due to the vast array of internal dependencies the framework has. I think that is probably what they meant by loosely coupled, whereas personally, it means remove all files but the one which the primary class is in.
Dude loosely coupled doesn't mean no coupling. If you had 0 dependencies each class would have to re-invent its wheels. I'm all for loosely coupled software but I mean there gets a point where you depend on lower layers. I could say the same thing about the internet itself, since it has a "vast array" of dependencies like TCP / IP, packets, HTTP, various other protocols, which all in turn depends on other libraries etc.. etc..

You can't gauge a design on 1 or 2 factors, and some domains naturally have their dependencies. For instance in MVC controllers are going to depend on the views, I don't care how well you program it. Now if it were a good design that dependency would be an interface not a class, so other classes could be substituted. So far I've had no problems subclassing the ZF router, dispatcher, controller, etc...

Re: Why use LAMP instead of J2EE or .NET?

Posted: Fri Feb 06, 2009 5:39 pm
by alex.barylski
Dude loosely coupled doesn't mean no coupling. If you had 0 dependencies each class would have to re-invent its wheels.
Agreed. But 'loose' is a very subjective term...obviously dependencies are required for most solutions, but the type of dependencies and the number of dependecies per class are important factors as well.

Re: Why use LAMP instead of J2EE or .NET?

Posted: Fri Feb 06, 2009 8:12 pm
by Eran
Back to the OP original question:
I'm hoping to come up with come compelling arguments that demonstrate:

1) Concrete criteria for moving to LAMP
2) Provoking factors in such a move
3) Distinguishing characteristics of LAMP
All the popular web languages are completely suitable for developing high-class web applications - it is more dependent on the skill of the developers than the choice of technology. For that reason, development is best done with the technology that is the best match for the development team - meaning the technology the developers have the most familiarity and experience with. There are very little technical considerations in my opinion that would justify moving from one language to another.

As for the distinguishing features of LAMP:
1. Proven stack for developing scalable and maintainable web applications (not exactly distinguishing it from the rest, but still notable).
2. Free and open source.
3. Great community. Really. The best and most active of all web language communities in my opinion. If you need to do something in PHP, somebody probably has already written extensively on it or even developed that which you are after. Which is related to the next argument:
4. A very extensive selection of high-quality open-source libraries that solve many common and less common needs in web development. Often you can save plenty of development time by building over the efforts of others, much more in PHP than I have seen in other languages.
5. Very portable - Though PHP runs mostly as part of a LAMP stack, it can run on a myriad of platforms and is very widely supported by hosting providers.
6. Despite being open-source, has a commercial company actively promoting and enhancing the language (Zend). This company also offers commercial products for a more enterprise deployment of PHP (such as a PHP application server - Zend Platform).
7. C syntax. Being that C/C++ are very familiar to most programmers, it makes transition to PHP easier from a style/syntax perspective.

Re: Why use LAMP instead of J2EE or .NET?

Posted: Sat Feb 07, 2009 1:40 am
by JAB Creations
matthijs wrote:I have absolutely no experience with .Net, the only thing I read about it was that it spits out horrible code and it's extremely hard to change that. But I'm not able to help you with your choice.
Subjective...I bought an ASP.NET book which I later realized was a HUGE mistake. I should have browsed it more because the guy didn't concentrate on important things...it was more about generating MySpace horror code that would give any standards compliant web programmer ten heart attacks and summon cannibal zombies to finish off your dead corpse fo a hundred mile diameter for at least ten years.

Today a client called me (I was at her house yesterday) and the business site for her towing company wasn't working in Firefox. Loaded up the page like she said, cleared the error console, did the action, and saw two ActiveX object errors stick out like a sore thumb.

The thing with PHP is you don't have to worry if you switch back and forth from Windows and *nix. In fact there are exceptionally few circumstances where the code is different (generally file paths in very rare circumstances that I've personally encountered) but all in all I develop and design on WAMP on my computer while my live site is a LAMP environment.

...and Windows 7 uses 700MB of RAM the moment it finishes booting while XP uses not even 200MB. Vista? Haha that craptastic OS loaded 1.8 out of 2.0 GB after the last fresh install before I formatted it off my drive. If you plan on sticking with Windows be prepared to shell out money for insane amounts of memory for Windows to treat like a RAM disk. If you don't have direct control over the web server's hardware you're really going to feel a world of pain if you go ASP.NET and all the Windows servers go from XP to Vista. I haven't tried their server editions though I hardly see any difference to begin with. They might not treat RAM like a RAM disk though I still wouldn't trust them.

Any way I digress, you can generate decent code using ASP.NET though you will be developing in an environment that encourages the same thing as 10 megabyte Photoshop table cookie cutter layouts and the like. Here is an example ASP.NET page I wrote just to mess around with things...

Code: Select all

<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<title>JAB Creations</title>
</head>
<!--#include virtual="themes/header.asp"-->
<body>
 
<!--#include virtual="header.html"-->
<p>content here</p>
 
<a href="index.asp?audio=0">Disable Audio</a>
<br />
<a href="index.asp?audio=1">Enable Audio</a>
<br />
<br />
 
<%
response.write Request.ServerVariables("SERVER_NAME")
response.write Request.ServerVariables("SCRIPT_NAME")
response.write("<br />")
response.write Request.ServerVariables("SERVER_NAME")
response.write("<br />")
response.write Request.ServerVariables("SCRIPT_NAME")
response.write("<br />")
response.write Request.Servervariables("REMOTE_HOST")
response.write("<br />")
response.write Request.ServerVariables("HTTP_USER_AGENT")
response.write("<br />")
response.write Request.QueryString
response.write("<br />")
response.write Request.QueryString("name")
 
 
if Request.QueryString("audio") = "0" then
response.write "audio disabled"
elseif Request.QueryString("audio") = "1" then
response.write "audio enabled"
else
response.write "unknown"
end if
%>
 
<!--#include virtual="footer.html"-->
</body>
</html>

Re: Why use LAMP instead of J2EE or .NET?

Posted: Wed Feb 25, 2009 3:23 pm
by greyhoundcode
What's with all the .NET bashing anyway? The beauty of it, to my mind, is that you have your choice of C#, VB.NET, ASP.NET and various other languages that target .Net to choose from.

After all,If you can't write elegant code in C# then you must really have problems.

[Edit] JAB that isn't directed at your post in particular :wink:

Re: Why use LAMP instead of J2EE or .NET?

Posted: Wed Feb 25, 2009 4:10 pm
by VladSun
C# is a beautiful language - I do agree. In a recent thread ("Suggestions for PHP 6" I think) most of my suggestions are taken out from C# features.

Also, I think PHP is still not OOP enough, not strict enough (while it's too verbose compared to Perl e.g.).

But... I prefer PHP/Perl over .Net for web applications - freedom, huge community, huge number of resources, a lot of open source solutions, frameworks, IDEs, etc.

Re: Why use LAMP instead of J2EE or .NET?

Posted: Wed Feb 25, 2009 5:30 pm
by jayshields
I am also interested in this topic, but can't help either. I also have university tutors constantly telling me to start looking at .NET and leave Java and PHP alone.

I have used J2EE a little bit (JSP/Servlets). What I found is that it's just too cumbersome and possibly "overkill" for doing the simple things that most Web applications require. Not to mention the JDK/JRE being a PITA to set up on different platforms (in my experience, especially Linux - I spent an hour the other day messing with the classpath just to realise it was the java_home I needed to change to get a simple Java application to run).

I haven't really used Microsoft programming languages since I used VB6 at college, which has put me off Microsoft programming languages forever. I think I've once used ASP to change someones code, but it just seemed awkward coming from a PHP background.

When choosing between .NET and PHP the only things I can mention in PHP's favour are what's already been said. In .NET's favour the only real benefit is that you get technical support.