Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Programming

MEAN Vs. LAMP: Finding the Right Fit For Your Next Project 175

snydeq writes: LAMP diehards take note: The flexible simplicity of MongoDB, ExpressJS, AngularJS, and Node.js is no joke and could very well be a worthwhile stack for your next programming project, writes InfoWorld's Peter Wayner. "It was only a few years ago that MongoDB, Express.js, AngularJS, and Node.js were raising eyebrows on their own. Now they've grown up and ganged up, and together they're doing serious work, poaching no small number of developers from the vast LAMP camp. But how exactly does this newfangled MEAN thing stack up against LAMP? When is it better to choose the well-tested, mature LAMP over this upstart collection of JavaScript-centric technologies?"
This discussion has been archived. No new comments can be posted.

MEAN Vs. LAMP: Finding the Right Fit For Your Next Project

Comments Filter:
  • The Fuck? (Score:5, Insightful)

    by OverlordQ ( 264228 ) on Monday June 22, 2015 @04:26PM (#49965183) Journal

    >This isn't a problem if every single entry fits into exactly the same format, but how often is the world that generous?
    > What if two people share the same address but not the same account?

    You dont make it a unique field?

    > What if you want to have three lines to the address instead of two?

    You have an empty field?

    > Who hasn’t tried to fix a relational database by shoehorning too much data into a single column? Or else you end up adding yet another column, and the table grows unbounded.

    Yeah, I cant read this crap considering the very next section is 'Disk space is cheap'. If it's cheap, who cares about 1 extra field in the database.

    Remember guys MongoDB is webscale

    • Re: (Score:2, Insightful)

      by Anonymous Coward

      Might as well just call this place, Digg 3.0 - Getting Shittier All the Time.

    • Re:The Fuck? (Score:5, Insightful)

      by MightyMartian ( 840721 ) on Monday June 22, 2015 @04:33PM (#49965227) Journal

      It's almost as if the writer doesn't understand what a relational database is.

      • ...at all.

        But you know, it's totally cool to run your tiny startup's auth DB on its own multi-box sharded cluster... n' stuff. Bragging rights and all that.

      • Re:The Fuck? (Score:5, Insightful)

        by rockmuelle ( 575982 ) on Monday June 22, 2015 @04:47PM (#49965311)

        And the author hasn't looked at a relation database in the last few years, either. PostgreSQL, Oracle, MySQL, and I'm sure the other big ones all have JSON (or similar) column types now that let you attach semi-structured elements to your records. You get all the benefits of a RDBMs (ACID, referential integrity, 40 years of history) _and_ all the benefits of NoSQL.

        Seriously, there's no good reason not to start with PostgreSQL and only add MongoDB if you really have a good use case for it (you know, you suddenly need to be Web Scale). Personally (and professionally), I use both, with PostgreSQL as the main DB for everything and MongoDB for read-only collections of indexed data.

        My challenge to devs out there: spend the hour it takes to learn SQL and understand what you can actually do with it. And, stop pretending that an RDBMS won't scale to meet your needs (spoiler alert: it will).

        -Chris

        • Re:The Fuck? (Score:5, Informative)

          by jbolden ( 176878 ) on Monday June 22, 2015 @05:03PM (#49965399) Homepage

          I know SQL pretty well. I agree with you it handles most stuff. That doesn't mean it handles everything.

          SQL engines are often slower.
          SQL engines have problems with massive parallelism (i.e often at around 12 CPUs you stop gaining much at all by adding addition CPU).
          SQL engines have problems with complex in document (i.e. in blob) searches
          etc...

          • Re:The Fuck? (Score:5, Insightful)

            by drakaan ( 688386 ) on Monday June 22, 2015 @06:03PM (#49965797) Homepage Journal

            Not to be rude, but what the hell are you talking about?

            SQL engines are often slower than what? In what scenario? Operating on what hypothetical database schema with how many records spread across how many tables?

            SQL engines have problems with massive parallelism? Why? Which ones?

            How well do you *really* know SQL in general and the capabilities of different database engines in particular? I suspect you may know less than some people who know SQL *really* well (as opposed to *pretty* well).

            I apologize for the tenor of this post, but that portion off the article was ridiculous, and thus far all of the comments in support of it have demonstrated a similar lack of familiarity with actual databases, their operation, or performance tuning.

            • by yagu ( 721525 )
              +5 Insightful
            • Re: (Score:3, Funny)

              by Anonymous Coward

              Just an FYI, jbolden works for Microsoft. So his experience and comments would be related solely to SQLServer.

              • by ranton ( 36917 )

                Just an FYI, jbolden works for Microsoft. So his experience and comments would be related solely to SQLServer.

                jbolden appears to be a managing partner of his own consulting firm, and his linkedin resume not only doesn't mention Microsoft but it lists Oracle multiple times with no mention of MSSQL Server.

                But that only makes his post even more confusing, since there are very few scenarios extreme enough that Oracle cannot handle the database workload as well as any NoSQL solution. Although there are many scenarios where a novice Oracle DBA could not get the same performance as a novice NoSQL DBA. But god help those n

                • Re:The Fuck? (Score:4, Informative)

                  by jbolden ( 176878 ) on Tuesday June 23, 2015 @09:58AM (#49970089) Homepage

                  You are correct, I've never worked for Microsoft I don't even sell much Microsoft. Mostly when I'm dealing with SQLServer datasets they have been no problem for RDBMS. My company has helped do connector work for Azure on Hadoop / SQLServer mixtures.

                  I suspect the reason AC thought I worked for Microsoft was I thought the Windows 8 (and early new interface for Office) migration program (i.e shift the x86 ecosystem) that Balmer / Office group was pushing made a lot of sense and defended it.

                  there are very few scenarios extreme enough that Oracle cannot handle the database workload as well as any NoSQL solution

                  Oracle is excellent. Oracle has problems with massive parallelism though. The Oracle engine works well at 10 CPUs handling versatile workloads. It doesn't at 1000 CPUs focusing on one big table scan for one query.

                  But god help those novice developers using the NoSQL database set up by a novice DBA when they don't comprehend what they are giving up by saying "no thanks" to ACID compliance.

                  If you aren't using relational you better be using old fashioned block type strategies (i.e. full table writes like you do in COBOL) or not be doing transaction processing at all. That's one of the things you are giving up when you go non-relational. Data changes become much trickier.

                  But that's not a problem for most NoSQL where you just write the data out, process it for X time and changes are handled via appends if at all. A good relational analogy to the append structure is how RDBMS handle materialized views and data changes.

            • Re:The Fuck? (Score:5, Informative)

              by jbolden ( 176878 ) on Tuesday June 23, 2015 @05:46AM (#49968533) Homepage

              SQL engines are often slower than what?

              Than engines designed for massive parallelism in dealing with workloads which can be effectually processed in parallel.

              Operating on what hypothetical database schema with how many records spread across how many tables?

              Generally NoSQL engines use schema on read techniques not schema on write. The table structure comes during the read. To get some sort of fair comparison something like a typical star schema with a much too large fact table (think billions or trillions of rows) and a half dozen dimension tables.

              Or if you really want to make it worse. The same query where the table is getting 1m writes / second and you want an accurate stream.

              SQL engines have problems with massive parallelism? Why? Which ones?

              Because SQL by its nature operates on the table not the individual rows. Older database technologies that were row oriented like what you see on a mainframe on in SaS work better when the ratio of table size to computation speed is low. Today because disk storage size per dollar has gone up so fast, we disk we face many of the same problems systems in the 1980s faced with tape.

              And the next question is pretty much all of them. The big data SQL engines have the least problems though and via. their execution plans turning into map-reduces might present a viable long term solution.

              How well do you *really* know SQL in general and the capabilities of different database engines in particular?

              Assume I don't know anything. Oracle, which has the best engine and SQL people on the planet has a guide for hybridization to handle things their engine can't handle well. IBM which probably comes in second and invented the relational database produces their own Hadoop / R to handle queries that DB2 (which is BTW far better than Oracle at stream) can't handle. Teradata's engine which was originally written specifically for larger amounts of data for a decade has had specific features of another subsystem to do enhanced big data, they also have guides for hybridization for things even their enhanced engine can't handle And Microsoft which writes the 3rd most popular engine has spent many millions on hybridization strategies. Enterprise DB (postgres) fully supports the IBM strategy.

              I don't know anyone in the space who does agree with the /. "SQL can do everything" attitude.

              but that portion off the article was ridiculous, and thus far all of the comments in support of it have demonstrated a similar lack of familiarity with actual databases, their operation, or performance tuning.

              The article was ridiculous I said as much in another response. However the comment I was responding to went much too far in the other direction. As for performance tuning -- performance tuning is designed to avoid full table scans and expensive joins. To goal of many hybridization strategies is to take a raw data flow and convert it into a relational ETL using a big data engine which can take advantage of indexing and a better execution plan. It doesn't do much good when the initial goal is to do a full table scan.

              • by drakaan ( 688386 )

                Ok, thanks for the clarification.

                NoSQL scenarios being what they are, there are obviously cases when they make sense and have advantages in terms of performance, but it's not always a win, especially if you don't know what you're doing or why.

                I don't know anyone who believes that SQL can do everything either, especially when dealing with extremely large datasets, but analytics and search on huge datasets are not the scenario that your typical dev who doesn't know whether or why to use LAMP or MEAN in the fi

                • by jbolden ( 176878 )

                  but it's not always a win, especially if you don't know what you're doing or why.

                  I agree. I always start big data conversations with the "what query do you want to perform that doesn't work on RDBMS"? If they can't even name one then there is no reason to go big data. A dataset under a 100g, that isn't being read / destroyed quickly that can be structured consistently never needs big data. One of those 3 things has to not be true.

                  The problem on /. right now is that lots of the developers who are SQL

          • Comment removed based on user account deletion
            • by jbolden ( 176878 )

              Absolutely true. SQL technology is much more mature. But just like SQL made sense in a world where non-SQL COBOL based systems were more mature for many client-server workloads, big data makes sense for non client server workloads of the kind that are more similar from a hardware standpoint to the old non-SQL workloads.

          • by sribe ( 304414 )

            SQL engines are often slower.

            Well, for queries on structured data, no, not often at all. Practically never if properly configured.

            SQL engines have problems with massive parallelism (i.e often at around 12 CPUs you stop gaining much at all by adding addition CPU).

            Maybe MySQL does, I don't know. PostgreSQL does not. And the big expensive proprietary brands certainly scale well.

            SQL engines have problems with complex in document (i.e. in blob) searches

            Finally, a kernel of truth. Of course blobs are often an excuse to be lazy and not figure out the actual structure of the data, but in cases where blobs are truly appropriate, there are better solutions than SQL, for the blob parts at least.

            • by jbolden ( 176878 )

              Well, for queries on structured data, no, not often at all. Practically never if properly configured.

              Why do the people who make those engines disagree with you and advocate hybrid strategies?

              Maybe MySQL does, I don't know. PostgreSQL does not.

              Enterprise DB which writes Postgres disagrees with you. That's one reason they have a practice around supporting IBM's big data platform and themselves author the Postgres Plus Connector for Hadoop.

        • Re:The Fuck? (Score:4, Informative)

          by shutdown -p now ( 807394 ) on Monday June 22, 2015 @06:32PM (#49965943) Journal

          The last few years in this case is more like the last decade. Before JSON, there were (and are) XML-typed columns, and any decent RDBMS will let you use XQuery or similar to query on them directly within your SQL query (and will use special indices to optimize such queries). SQL/XML spec, that standardizes this, was published in 2003. Oracle shipped preliminary support of the then-draft spec in 2002; Microsoft shipped it in SQL Server 2005 in, well, 2005; and Postgres shipped it in 8.3 in 2008.

        • Re:The Fuck? (Score:4, Insightful)

          by Anonymous Coward on Monday June 22, 2015 @07:51PM (#49966363)

          What's really concerning is that I've had "new school" web devs completely laugh at me when I suggest they ask their resident DBA questions about database performance, etc. Apparently, a DBA is just someone who makes images and restores backups now. "Hey guys, let's make a business that's completely reliant upon reliable data, and then completely ignore getting someone who's entire knowledge specialization is data management and arrangement... Yeah, fuck those dba guys..."

        • And the author hasn't looked at a relation database in the last few years, either. PostgreSQL, Oracle, MySQL, and I'm sure the other big ones all have JSON (or similar) column types now that let you attach semi-structured elements to your records. You get all the benefits of a RDBMs (ACID, referential integrity, 40 years of history) _and_ all the benefits of NoSQL.

          Seriously, there's no good reason not to start with PostgreSQL and only add MongoDB if you really have a good use case for it (you know, you suddenly need to be Web Scale). Personally (and professionally), I use both, with PostgreSQL as the main DB for everything and MongoDB for read-only collections of indexed data.

          My challenge to devs out there: spend the hour it takes to learn SQL and understand what you can actually do with it. And, stop pretending that an RDBMS won't scale to meet your needs (spoiler alert: it will).

          -Chris

          What JSON column types exist in MySQL? I know that MariaDB supports COLUMN_JSON() on dynamic columns for SELECT statements (but no way to insert JSON), but MySQL seems to have no native JSON support. Even the third-party components such as mysqljson only import and export JSON, there is no internal JSON nor dynamic column storage and the values are stored in native MySQL datatypes in predefined columns.

          Even in MariaDB, WHEREing from a dynamic column means parsing the whole table's dynamic columns (i.e. no

        • I am aware of those features but most applications that rely on relational databases use some kind of object relational mapping, I never looked into it bu how is the support of those features in that context?

        • by sribe ( 304414 )

          Seriously, there's no good reason not to start with PostgreSQL and only add MongoDB...

          Although I've never needed MongoDB myself, I can see situations where it would be appropriate. I see ***NO*** situations where the ass-backward inside-out semantic model of Node.js is actually appropriate. There are ways to scale to serving high activity loads (actually, higher than Node has any chance of serving), with obfuscating control flow and making it so godawful difficult to be sure that you've handled all combinations of normal completion and errors thrown.

    • by wonkey_monkey ( 2592601 ) on Monday June 22, 2015 @04:40PM (#49965265) Homepage

      I enjoyed this gem:

      If you write code for Node and decide it’s better placed in AngularJS, you can move it over with ease, and it's almost certain to run the same way.

      Yes, if there's one thing professional programmers (and their PHBs) love, it's code that's almost certain to work.

      • Yes, if there's one thing professional programmers (and their PHBs) love, it's code that's almost certain to work.

        The reason that's OK for everyone is that it's also "Almost Certain" to work in the original place also...

        It's just that each placement has different values and flavors of "Almost". :-)

      • by narcc ( 412956 )

        Lack of Certainly.

        That's a big one. Not just in that context. It's why I'll forever maintain that new exciting things are for playing and old and stable things are for work. When you already know the problems, risk, and challenges, you're better able to plan. When you pick from the latest headlines, you're almost guaranteed to pick a flash-in-the-pan technology that'll be dead and gone in a year or two.

      • Even *I* know that Node.js is a backend "engine"/"framework" and AngularJS is a front end technology.

        So: you can not replace one of them with the other!

        • Field validation? You might arguably want some of the same code on both sides for more complex field validation, since client-side is more responsive.

          • That is not "replacing" ...

            • Original post:

              If you write code for Node and decide it’s better placed in AngularJS, you can move it over with ease

              You're right. That's not replacing. But code that works client-side could be moved server-side and vice-versa. And I gave an example of one case where that might happen. Or where the same code might be used in both places. I don't really know why you're in love with the fact that you used the word replacing, so I can't address it any more specifically.

              • Well, was it you, or wasn't it another parent who used it?

                Using the phrase "you can replace node.js with AngularJS" implies you can replace the whole back end site framework with a whole front end site framework.

                Obviously that makes no sense at all.

                Putting client side verification code as a verbatim copy into the backend implies that you use the exact same JavaScript objects (at least with the same "hashes") on both sides, which you likely don't do. On the backend you have "objects" on the front end you hav

      • by dave420 ( 699308 )
        You do realise that "almost certain to run the same way" and "almost certain to work" don't mean the same thing, right? At least I hope so! :)
        • If the same code doesn't "run the same way" (by which I take it to mean produces the same output from the same input) in two different places, then I'd class that as not working.

    • by darkain ( 749283 ) on Monday June 22, 2015 @04:41PM (#49965267) Homepage

      "MongoDB is webscale"

      For those that have not seen it yet: https://www.youtube.com/watch?... [youtube.com]

    • by rwa2 ( 4391 ) *
    • by mlts ( 1038732 )

      MEAN may have its place, but those duplicate fields implies not just additional disk space, but more data that has to be backed up, more data that can be hacked, more data that can get corrupted (what happens if two identical fields wind up with different values... what FirstName gets precedence), more data the backend RDBMS has to chug through.

      For smallish tasks, this isn't a big deal, since a small Linode VM or whatnot can do the tasks. However, this can impose a performance and space penalty that can be

    • by 0100010001010011 ( 652467 ) on Monday June 22, 2015 @07:10PM (#49966175)

      Hush, the 20 year olds think they invented something.

      “When I was a boy of 14, my father was so ignorant I could hardly stand to have the old man around. But when I got to be 21, I was astonished at how much the old man had learned in seven years.”

      Once you get a B.S., you think you know everything. Once you get an M.S., you realize you know nothing. Once you get a Ph.D., you realize no one knows anything!

    • /Oblg. but MongoDB has webscale [youtube.com]

  • Great comparison (Score:5, Insightful)

    by Anonymous Coward on Monday June 22, 2015 @04:26PM (#49965187)

    Which is a better tool for outdoor work, a lawn mower or a snowblower?

  • by markdavis ( 642305 ) on Monday June 22, 2015 @04:31PM (#49965211)

    Never heard of "MEAN" before now, but that doesn't align with the term "LAMP" which describes the entire server/platform. "LAMP" includes the operating system (Linux) and web server (Apache) in the name https://en.wikipedia.org/wiki/... [wikipedia.org]

    While MEAN does not https://en.wikipedia.org/wiki/... [wikipedia.org]

    So would it be "LAMEAN" perhaps? :)

    • by laffer1 ( 701823 ) <luke@@@foolishgames...com> on Monday June 22, 2015 @04:38PM (#49965255) Homepage Journal

      I think the who problem with LAMP or MEAN is that it's trying to define one web stack. The world has moved on. Some companies deploy nginx now instead of apache or in combination with it. Netflix sends 33% of all Internet traffic on FreeBSD rather than Linux. I've seen so many people replace the P in LAMP to be python. We can't even agree on the P.

      My current stack at work is FATAPJ - FreeBSD, Apache, Tomcat, AngularJS, PostgreSQL, Java

      • Agreed, we could make hundreds of different combinations of acronyms for different stuff! But I will say, your "FATAPJ" stack is a little hard to pronounce.... thus, you should change some components as soon as possible, preferably with another vowel near the end :)

      • by Penguinisto ( 415985 ) on Monday June 22, 2015 @04:48PM (#49965329) Journal

        As long as they don't replace it with Erlang, because then it would just be LAME.

      • Re: (Score:3, Funny)

        by Anonymous Coward

        Well, at least it isn't FreeBSD, Apache, Tomcat, AngularJS, Lua, Bash, Emacs, Ruby, and TypeScript.

    • So would it be "LAMEAN" perhaps? :)

      Pretty sure that this is a deliberate attempt to make the project have a more appealing name. LAMEAN is likely to be pronounced with a bad Spanish accent, "La MEAN," or pronounced as two words, "LAME AN." I can hear someone saying, "That project was LAME AN' just not worth it."

    • I think their idea may be that the OS is no longer relevant (you know, thanks to Docker or similar)?

      BTW, the "A" in LAMP is allegedly to be replaced by the "N" (as in, node.js), which IMHO is cute, but damned sure not as flexible a solution that Apache, nginx, or even (*ducks*) Tomcat provides.

      • by znrt ( 2424692 )

        I think their idea may be that the OS is no longer relevant (you know, thanks to Docker or similar)?

        yes, node is available on several platforms.
        (but docker is linux only for the time being :D)

        BTW, the "A" in LAMP is allegedly to be replaced by the "N"

        actually, this whole silver bullet 'stack' approach is nonsense. back in the days of lamp there were far fewer options, there was also little expertise with 'modern' webapps and high availability, it could make sense branding something like 'lamp' and have it distributed to developers and almost preinstalled on private servers. those days are gone, today there are many tools you can combine in different ways to suit

    • Stupid buzzword acronyms aren't just for MBAs anymore.

  • Angular (Score:5, Interesting)

    by pr0nbot ( 313417 ) on Monday June 22, 2015 @04:38PM (#49965247)

    I can't comment on the other technologies, but Angular has transformed how I build the interactive parts of web pages.

    When you first approach Angular it seems like an over-engineered, incomprehensible edifice, and the tutorial throws you straight into writing your whole website as a single-page application. But once your realise that you can use a small lump of it on a single page to bind some UI elements to javascript state objects, you find yourself using it all the time even for small things. For me at least, it's as much a revelation as jquery was.

    • by guruevi ( 827432 )

      There are way smaller libraries that can bind UI to state. I use them because Angular is an over-engineered incomprehensible edifice if that's all you want to do. If I'd want something the size of Angular, I'd also expect something that actually tracks/updates state in the backend.

  • So much stupid (Score:5, Informative)

    by geophile ( 16995 ) <jao@@@geophile...com> on Monday June 22, 2015 @04:42PM (#49965269) Homepage

    Among the great revelations of relational databases was the JOIN command. With JOIN, we could save disk space by removing repeated fields like city, state, and ZIP code. By storing this frequently accessed and repeated data in separate tables that can be included in future results through a JOIN, we keep our database tidy and our disks slim. But JOINs can be tricky for some and hard on RAM, and though it's still a good idea to isolate and access data in separate tables through JOINs, there's not as much need to save disk space now that disk drives are measured in multiple terabytes. The space is so cheap that some database designers end up denormalizing their data because the JOINs are too slow.

    This is just so wrong. If you store, let's say, city/state/zip redundantly, then you run the risk of having the copies, that should be kept synchronized, diverge. This is especially true in the absence of all-or-none transactions. And not to mention the fact that having to update the "same" datum in multiple places is going to affect performance.

  • When is it better to choose the well-tested, mature LAMP over this upstart collection of JavaScript-centric technologies?

    always

  • The CGI model used in LAMP meant your front-end could scale indefinitely, but the backend (Database) had to deal with a connection create/teardown on each request, so databases where that was fast are what won that round (MySQL).

    Now there's the App-Server model, which has some brittleness when people think they can save state locally, but they can't at scale (when you need more than one box). On the other hand, persistent and reused connections to backend resources mean faster TCP (already-warm). To scale t

  • I'm a big data advocate. I like the idea of engines designed for unstructured data. But the two examples in the article barely even register as difficulties of relational databases, "What if two people share the same address but not the same account? What if you want to have three lines to the address instead of two? Who hasn’t tried to fix a relational database by shoehorning too much data into a single column? Or else you end up adding yet another column, and the table grows unbounded.".

    As for his

    • by rev0lt ( 1950662 )
      PostgreSQL has a K/V extension available for a while now. And custom types and arrays aren't also actually new. If you add to that JSON & XML support, I see little to no advantage in using NoSQL for any kind of workload. (keeping in mind that graph databases that actually solve something useful aren't NoSQL)
      • by jbolden ( 176878 )

        Good comment. K/V can be potentially added to SQL.

  • Not only because stuff like this, https://aphyr.com/posts/322-ca... [aphyr.com] , but also because MongoDB performance actually isn't that great. I do care about my data, and PostgreSQL is actually faster in some scenarios (eg. if you actually know what you're doing), so thanks, I'll pass. And Apache HTTPD? Who's still using that on new projects?
    • by Prune ( 557140 )
      Mod parent up. A cursory look at that reference is proof beyond a doubt that Mongo is the sheerest garbage (to borrow the infamous quote from the history of QCD).
    • Not only because stuff like this, https://aphyr.com/posts/322-ca... [aphyr.com] , but also because MongoDB performance actually isn't that great. I do care about my data, and PostgreSQL is actually faster in some scenarios (eg. if you actually know what you're doing), so thanks, I'll pass. And Apache HTTPD? Who's still using that on new projects?

      Curious, if not Apache httpd, then what?

      • by dave420 ( 699308 )
        Most probably nginx. It blows Apache out of the water, at least for what I've been using it for.
      • by rev0lt ( 1950662 )
        Nginx, Lighttpd, Cherokee to name a few. There are probably more than a dozen options available more suitable than Apache in most cases.
  • Jepsen (Score:5, Interesting)

    by Wizy ( 38347 ) <greggatghc AT gmail DOT com> on Monday June 22, 2015 @05:04PM (#49965407) Journal

    Remember folks, MongoDB has failed the Jepsen Test multiple times.

    https://aphyr.com/posts/322-call-me-maybe-mongodb-stale-reads [aphyr.com]

    • by Prune ( 557140 )
      Please mod parent up. The examination he cites has the potential to save countless developers from getting burned by this toxic crap "database".
  • Just because you decide to use Node, doesn't mean there's any particular reason, why you should have to use Mongo and Angular. You might prefer Backbone and Postgres. Granted, then you wouldn't get such a nice acronym, but it's a perfectly reasonable technology stack. Oh, and you can throw in the L from LAMP if you want, as well.

  • When is it better to choose the well-tested, mature LAMP over this upstart collection of JavaScript-centric technologies?

    JavaScript in its current form will never have a place larger than simple website scripting in my production environment -- it's unmaintainable in anything beyond small doses and is something we work with because there's literally no other option, not because we want to. TypeScript makes things better, but being better than JavaScript really isn't that tough. It's still not as good as --

    • That's what happens when you take a front end language and move it throughout the stack. Now we have all these front end developers jumping through the stack doing all sorts of stupid crap thinking they are real developers.
  • Relations (Score:3, Insightful)

    by pigiron ( 104729 ) on Monday June 22, 2015 @06:00PM (#49965765) Homepage
    <blockquote>What if two people share the same address but not the same account?<blockquote>

    Then you need an account table, a customer table, and a relational table that contains instances of paired keys from each. Learn some elementary set theory for chrissakes! The article is full of other stupidities as bad as this. /. keeps getting dumber and dumber. "Gee, my My SQL table has too many columns."

    I'll bet it does, you nitwit.
  • by Dastardly ( 4204 ) on Monday June 22, 2015 @06:37PM (#49965965)

    And, if either tool works use the one you know best. And, try to write code well, so you don't get stuck when the right decision now becomes the wrong decision later because things change.

    From a data store side, there are reasons to use an RDBMS and one or more NoSQL solutions all together. They handle different situations better and if you have any decent level of complexity you find the boxes defined by LAMP or MEAN too confining. I generally stay away from MySQL due to the licensing issues, but MariaDB and Amazon Aurora fit the same space. I used PostgreSQL for one solution. Of course in the AWS case you might forgo MongoDB altogether for Dynamo because why deal with operating Mongo when Amazon will take care of that with Dynamo.

    Some of us have to deal with corporate standards and actually neither LAMP or MEAN is actually allowed, which makes this whole thing a pointless flame war.

  • If it isn't a joke then what is it? A tragedy?

    • To be fair I'm also no fan of what is traditionally considered "LAMP". I personally believe PHP is more dangerous than it needs to be, MySQL is a poor choice relative to alternatives and harbor little regard even for Apache.

      MongoDB is built for the cloud

      No. Application design limits scalability of non-trivial systems not the data store.

      MySQL's structure is confining (and overrated)

      The only thing that sucks worse than a good relational schema design is everything else.

      Disk space is cheap

      JOINS JOINS JOINS... The reason for JOINs is saving disk space... mind blown.

      Node.js simplifies the server layer
      MEAN makes code isomorphic

      General purpose languages are a dead

  • MongoDB is so 2003. (Score:5, Informative)

    by EmperorOfCanada ( 1332175 ) on Monday June 22, 2015 @07:52PM (#49966373)
    There is exactly a zero percentage chance that I will ever use MongoDB in another project. On the surface it was great. I evangelized my friends about it and the whole NoSQL thing. But as time went by I realized that it wasn't made for people to use. Almost nothing was intuitive. For each new feature that I wanted I had to look up a tutorial and generally found a list of gotchas. If you design your project around MongoDB then it will work. But if you try to wrap MongoDB around your project then you are completely screwed.

    Basically MongoDB halved the initial quarter of data storage design and programming. But as the project progressed the time spent screwing with Mongo went up exponentially until the project was shoved out the door and primary feature in version 2 was the complete removal of MongoDB.

    I could make a mile long list of places the project stumbled. But a few key ones would be that there are no good data management tools for accessing a MongoDB. The second was that huge schema screwups were way too easy. It was very hard for programmers to get a mile high overview of how data being stored was being structured. That is a data layout was easy but putting the results into your head was really hard.

    I am finding other NoSQL approaches are far superior. Things such as use of JSON, memcaches, MariaDB (or the excellent PostgreSQL) working together allows the project to dictate how things function instead of Mongo very quickly shaping the project architecture because of its marked strengths and weaknesses.

    Redis is the environment presently being explored for version 4 and so far it is looking very interesting. But I am not joking when I say that at this point I would use access on windows as my backend datastore before I would use MongoDB.
  • Why not finish the job, and just move the database to a distributed one that runs in the browsers?

  • Normalization (Score:4, Insightful)

    by Frankie70 ( 803801 ) on Monday June 22, 2015 @09:41PM (#49966877)

    The fool thinks the only reason for normalization is to save space.

  • All I know about it is that it installed with Debian on my laptop. And from time to time, when everything starts to bog down, its MongoDB that is hogging CPU cycles. So I sudo kill `pidof mongodb` and all is well. Nothing stops working or loses functions. So I can't figure out what the fuck MongoDB was doing clogging up my system.

  • Just read this article today [wiredhorizon.com].
    • by Lennie ( 16154 )

      Notice how the writer of the article in the last comment says:

      "Yeah, I actually have no problem with javascript on the client side. I think its really awesome for a beginner to be able to make static pages interactive relatively easily. However, javascript on the server is a totally different animal."

      The solution is obvious, maybe it much more readable and predictable:

      Promises, promises, promises

      https://www.youtube.com/watch?... [youtube.com]

    • This article is not about nodejs being bad, it is about low experienced programmers doing crappy things with it. It is basically saying: "To architecture good scalable web applications you need to be a smart guy with some experience". Well that is pretty much the same thing for all languages...

      The author then goes into a rant that I can only compare to VB6 rants of the old days: It made easier for beginners to get into the bandwagon, so much code written in it sucked, this caused VB6 to have a fame for bein

  • Why do I get the impression that these NoSQL guys know even *less* about proper programming than the PHP crowd?

    The problem with NoSQL is, they threw out SQL (well done) but they throw out relations and proper archtecture along with it (WTF?). I'm all for ditching SQL as an apps means to access persistance. It's stupid and wasn't meant for that. Even the SQL DB engineers tell us that. But if you don't understand relations and proper application models, you have no business building webapps or - heavens forbi

  • by Daniel Hoffmann ( 2902427 ) on Tuesday June 23, 2015 @08:08AM (#49969189)

    Meteor ( https://www.meteor.com/ [meteor.com] ) is a javascript framework that runs on top of Nodejs and it is GREAT. It is a full stack solution, it has a view engine (Blaze templating language, based on handlebars), a server (Nodejs) and a database (MongoDB) all bundled up and it just works out of the box, no configuration required. From the meteor website:

    "Really, you'd like to use a combination of packages that have been not just tested individually, but tested together, since so much of the complexity in a large software project comes not from its individual pieces but from how they're integrated. Rather than leaving your package system to select the "best" combination of package versions, which could change every day and could be a totally new combination that nobody else has ever tried, you'd like to use a set of packages that has been comprehensively tested by professional release engineers that really know the platform.

    That's what the Meteor Distribution provides. Similar to a Redhat or Ubuntu distribution, the Meteor Distribution is a set of package versions that have been tested and recommended for use together."

    And that is just one of the great features that Meteor provides. Another great feature of Meteor is that your Javascript code runs both on the server and on the client _at the same time_. Whatever action you make that triggers a state change (change in the database) will run both on the client and on the server, the client has something called MiniMongo that caches the result from the server database and the changes happen without a roundtrip to the server. If the server state is not consistent with the client state Meteor takes care of synchronizing everything. So the application looks like is running locally there is no lag at all.

    This drastically reduce the code necessary for example, you don't write form validation code twice, you write it once and show a popup message on the client and throw an exception on the server if something is wrong. Really everything in Meteor works great, there is a really good automatic deploy system (it even deploys to phonegap, also I believe you can deploy your mobile apps to app stores automatically), the API is really small, the meteor packages work great (check out the Velocity testing framework, it is awesome!) and so on

    There is one big caveat though, you can't migrate parts of your existing application to Meteor, the only real optional part of Meteor is the View layer, you can discard Blaze and run your own solution. I have had a great time using React with Meteor for example.

A consultant is a person who borrows your watch, tells you what time it is, pockets the watch, and sends you a bill for it.

Working...