TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

Magento 2.1 released

30 pointsby alternizealmost 9 years ago

7 comments

throwanemalmost 9 years ago
From the release notes [1]:<p>&gt; Upgrading the Magento system software no longer results in the loss of data.<p>Well, that&#x27;s good. You&#x27;re still working with Magento, though, so... (I&#x27;ve built plugins for it. Don&#x27;t. No money is worth that.)<p>[1] devdocs.magento.com&#x2F;guides&#x2F;v2.1&#x2F;release-notes&#x2F;ReleaseNotes2.1.0CE.html
评论 #11963004 未加载
评论 #11976015 未加载
评论 #11963262 未加载
评论 #11962973 未加载
DelaneyMalmost 9 years ago
I spent two years trying to innovate on Magento, because it was the platform before I got there and rebasing seemed like overkill, and it almost broke me as an engineer.<p>My experience (and I&#x27;m not even going to complain about the XML!):<p>The code base is horrifying; we would often trace bugs through the stack, realize they were in magento core files, then face really difficult decisions about furthering our fork.<p>The code is deeply integrated from UI to DB. If you change it, upgrades won&#x27;t apply cleanly. But you need to change it (or the data structures&#x2F;applications therein) to implement any non-core features.<p>Speaking of upgrades, they are mostly done by opaque and undocumented upgrade scripts, and tend to break plugins or addons...<p>Which are generally poorly written and untested, even highly rated ones in their web store, but their quality isn&#x27;t even the biggest problem. The absence of a sane extensibility model means they virtually can&#x27;t coexist consistently, and when they do they break on (or need rigorous requesting due to) upgrades...<p>The EAV table layout wouldn&#x27;t be totally horrible if it weren&#x27;t so badly implementated. They put everything, even system data, in EAV tables; not only did this make it hard to extend, but it put a huge load on the (outdated) ORM.<p>Performance was an exercise in caching like no system I&#x27;ve seen before, entirely due to this design choice. The downside of that is that server restarts under load could cause a full system panic as new web hosts put an unbearable load on the DB, which could throw off other web hosts when their ORMs blew up by timing out all their pooled DB threads, which started a cascade through the rest of the system.<p>It was possible to deploy a single cache shared by all your Magento servers, but even stock Magento would pepper that cache with dozens of <i>serialized</i> queries to serve a single page, making the network overhead barely worth it. Plus, this meant you couldn&#x27;t clear the cache under load or you&#x27;d be down for an hour, and clearing the cache was a daily necessity because their tagging system to rebuild the cache incrementally was horribly broken. (Only barely worked using Redis, which was both recommended by Magento <i>and</i> provided by a 3rd party unmaintained driver and officially unsupported.)<p>We ended up reimplementing all our e-commerce properties on a custom node platform by assembling high-quality atomic tools for the important bits. The technical debt of the transition was paid off in 3-6 months on our feature schedule and has paid dividends since, and we easily handle double the load on ~10% the infrastructure spend.
评论 #11963650 未加载
wysewunalmost 9 years ago
I&#x27;m migrating to Magento 2 from a custom built solution in Laravel. It is very complex, but there are some improvements from Magento 1, and it&#x27;s been good for the most part.<p>There are other alternatives we looked at, such as Spree (ruby) and other php based carts, but Magento 2 has so many extensions available from third party and the developers are actively listening to the community. The Chief Architect, Alan Kent is available to communicate with and has pushed changes that the community really wanted (i.e. moving to SASS from LESS).<p>It&#x27;s been a steep learning curve, but there is also a lot of flexibility in modifying the code to suite your needs (without needing to edit the core).
kyriakosalmost 9 years ago
Magento was one of the biggest pains of my career.<p>I am obviously exaggerating but Magento might have an xml file to configure another xml file.
评论 #11963630 未加载
评论 #11975969 未加载
kyriakosalmost 9 years ago
The only other large-scale PHP based system I&#x27;ve seen that has worse architecture&#x2F;coding standards than Magento is Moodle.
评论 #11975959 未加载
mnkmnkalmost 9 years ago
Why are all the popular ecommerce frameworks written in PHP? Magento, prestashop, woocommerce etc
评论 #11963992 未加载
评论 #11976030 未加载
评论 #11963592 未加载
评论 #11964018 未加载
评论 #11963866 未加载
benmarksalmost 9 years ago
tl;dr: I was compelled to write this because I saw a lot of complaints which seem to come from the end of the Magento 1 era. Many of these complaints are reduced when considering the context, and they are all handled quite nicely in the Magento 2 era.<p>(Full disclosure: I&#x27;m Magento&#x27;s chief evangelist, but I was an agency developer for a Magento shop from 2008-2014, so I&#x27;m not totally a shill. Also, I care that we are listening &amp; getting things right.)<p>I spend a lot of time interacting with PHP developers around the world. Some have been &#x2F; are Magento developers, some are not. By wearing Magento gear at conferences and usergroups I would hear quite a lot of opinions about Magento, both negative and positive. Here&#x27;s the negative.<p>* No documentation * Can&#x27;t test it * XML sucks * EAV is the Devil&#x27;s creation * The view layer is impossible to understand * Inconsistent implementation in core code * Not true open source * It&#x27;s too complicated * It&#x27;s too slow * etc.<p>Fact is, there&#x27;s always more to the story. Take documentation: yes, it&#x27;s tragic that there never was official developer documentation for M1, but it was an outcome of Magento&#x27;s explosive origins leading to the company being totally constrained. (We did eventually produce some fantastic user docs though.) Magento 2 solves this by having several tech writers on staff, as well as a doc site to which the community can contribute via pull request.<p>In the case of testability, well, Magento 1 was born in 2007. Ideally, yes, it would have been built with test coverage, but that wasn&#x27;t standard practice for PHP back then. (How many of you were writing tests for your PHP apps in 2007? Not too many aside from Sebastian Bergmann!) Eventually though some great tools came around, and there are many examples of fully covered installations as well as CI&#x2F;CD implementations. Magento 2 solves this by covering much of the core with unit, integration, and functional tests.<p>Regarding XML, Magento 1 (and 2) largely favor configuration over convention, and the decision was made to use the most structurally descriptive markup possible. Of course, the implementation of it in M1 was full of Magentoism - building a DOM by combining DB data, merging multiple XPATHs, and filling out a bizarre hierarchy for scope. It&#x27;s not intuitive without either experience or schema definitions. Magento 2 solves this by splitting up configuration into functionally-scoped files AND by providing XSD. The XSD help when editing files by hand in an IDE, and we are seeing the creation of tools to help developers avoid writing it altogether.<p>When questions about EAV come up, believe me, I understand. That&#x27;s a tough storage pattern to get used to, but the ORM helps quite a lot. The implementation in M1 is imperfect though, as you do end up with domain objects which leak their storage pattern. EAV is invaluable for solving the complicated requirements of facilitating arbitrary entity attributes and scoping&#x2F;translation of those values. We looked at removing it for M2, but could not find a better solution. And if you say &quot;noSQL,&quot; sorry, you&#x27;re wrong.<p>The view layer is the thing which trips most people up - even developers who grok Magento right away. Theme fallback and layout XML are the complicating factors here. Theme fallback&#x2F;inheritance is not so hard to get, and it is fantastic at keeping custom themes DRY - especially when multiple sites are running off of one instance. If only one thing could have been documented from the beginning, it should have been layout XML. Layout XML - along with the view model approach which we took with M1, allowed for simplified, DRY controller actions and ultimately allowed frontend developers to build interfaces without having to need backend developers. In M2 we have refined layout XML as well as abstracted the entire rendering framework, allowing developers to adjust or replace framework details as they see fit.<p>For inconsistent implementation in core code (which is especially evident in adminhtml), this was the outcome of a small team producing a lot of code independently. It&#x27;s unfortunate, and very confusing for developers new to the platform. I struggled with this when I was starting out. We&#x27;ve worked to eliminate this in M2, but there is work remaining to be done. Thankfully we have Issues and pull requests on GitHub, and at the very least we can evolve our test suite to help us (and others) to implement functionality in The One True Way®.<p>On the subject of GitHub, we are much more of an open source company than we were in the Magento 1 days. We did allow contributions, but the process for becoming a contributor was cumbersome, and development effort was only revealed through updates to an SVN endpoint with no discussion. That is very different from our approach with Magento 2. Starting with the beta in December of 2014, we allowed pull requests to the M2 codebase, eventually building in our contributor agreement into the CI process. Many of our core engineering team are regularly on GitHub interacting with a bevy of &quot;how do I&quot; requests along with legitimate issues and pull requests. We have improvements to make here which will help us to keep up with the volume of discussion, and you should see these soon.<p>When I hear that Magento is &quot;too complicated,&quot; I have to ask, then why doesn&#x27;t something similar take its place? Ultimately the problem of complexity rests with the domain of commerce, which is always custom and always complex. Consider just one area of a commerce application - say, price calculation - and look at the complexity: cost, retail price, adjustments at the catalog level, adjustments at the customer level, and then add in the multiple taxation schemes which exist in the world (tax on full price before discount vs after, tax on shipping, etc.). Complexity is everywhere, and if you want to make an app which works for most, there will be overhead. Ideally the app helps the user manage that complexity as best as possible.<p>When I hear that Magento is too slow, that is always a worthless discussion without details about traffic, order volume, amount of entity data, update frequency, etc. M2 is a much better application for performance than M1, largely because it was developed with a mind to commodity computing and reverse proxy (which were nascent in 2007). That allows us to build core architecture for performance as well as enterprise architecture for scalability. That said, performance for M2 is not a finished story; I imagine that we will continue to improve on it as time goes on.<p>Okay, if you made it this far, I owe you some coffee or beer or whatever when we happen to meet. I was compelled to write this because I saw a lot of complaints which seem to come from the end of the Magento 1 era. Many of these complaints are reduced when considering the context, and they are all handled quite nicely in the Magento 2 era. I&#x27;m always happy to see or hear feedback.<p>I can be reached at ben@magento.com.
评论 #11985214 未加载
评论 #11984510 未加载
评论 #11978681 未加载
评论 #11988634 未加载
评论 #11977005 未加载
评论 #11978680 未加载