Questions tagged [architecture]

Questions about Magento architecture

1
vote
3answers
87 views

Websites vs Categories

I'm currently managing a fairly large and complex Magento2 site. Admittedly, I'm more of a front-end guy. As such, I had a question. We have 82 stores (one for each corporate customer). Each store ...
0
votes
1answer
43 views

Decoupled Frontend Architecture and Magento

Is there anyway we can utilize Decoupled Frontend Architecture in Magento. I would like to know if I can utilize this architecture to create Magento modules or convert my existing extensions? Is it ...
0
votes
1answer
10 views

How do I understand the connection of module components (e.g., code/design/frontend/template/block, etc.) in Magento 1.9?

I'm very new to Magento and am familiar with MVC and OOP and a lot of the design patterns that Magento uses. However, I find it difficult to understand the relationship between all the components of a ...
1
vote
4answers
415 views

Magento 2 follows MVVM architecture or MVC architechure?

I am understanding the logic behind working in separate folders in Magento 2 and came across bundle of articles talking about same thing in different ways. Some explain MVC logic behind it and some ...
5
votes
2answers
418 views

What is the recommended way to integrate to other services from Magento 2?

As part of building out an E-Commerence website for Company X, integrations into other systems within the company are required. These integrations include Ordering and Payment services. The APIs for ...
5
votes
1answer
335 views

Magento 2 : Which File & Line app/etc/di.xml Config Will Load by App

I need to know, area wise config will load by application entry point files like /Magento/Framework/App/Http launch method. But I'm not able to figure it out app/etc/di.xml config load.
15
votes
4answers
2k views

Magento 2 best practice for class locations and names

In Magento 1 we were used to place our classes in these directories Block Helper Model Resource and use a simple class name without any capital letters in the middle of the name. ...
1
vote
2answers
464 views

Use existing PHP, HTML, and JavaScript based website in the same structure, but use Magento 2.1 Functions and tools such as accounts and Carts

This is specific to Magento 2.1, but knowledge on other versions may help in pointing me in the right direction. I have tried a few things and have scoured the internet for similar solutions but most ...
1
vote
0answers
21 views

Right using models in controllers?

For example, I need to get special data from a table for prepare form-data to save (in controller). Currently I have a direct dependency for a model. use Vendor\CustomerSurvey\Model\Survey; /** * @...
4
votes
2answers
2k views

what is the app/bootstrap.php file for?

I just started working on a new magento site and when I moved it to my local I got the below error on my nginx server. 2016/09/14 13:38:41 [error] 7#7: *13 FastCGI sent in stderr: "PHP message: ...
4
votes
1answer
64 views

Why does Magento need blocks?

I'm reading the PHP Developer's Guide and I see this: Blocks are used in Magento to reduce the burden on the controller by moving most of the logic into blocks. What problem does this solve? ...
0
votes
1answer
22 views

extending custom(not core based) classes

In my project I have a "lib" directory with different custom libs/classes from php community. But unfortunately I need to extend several classes from "lib" directory. How can I do that in magento way? ...
7
votes
2answers
191 views

How to avoid Law of Demeter violation (“Newable objects should not hold a field reference to an injectable object”)

In the Rules for using dependency injection, the Magento 2 devdocs state: Newable objects should not hold a field reference to an injectable object nor should they request one in their constructor. ...
8
votes
2answers
2k views

what are the zend components using by magento2?

Magento2 now using zend framewok 1 ,zend framework 2 ,symfony etc. I want to know what are the components taken from zend framewok 1 and components taken from zend framewok 2. For example: Zend_Db (...
22
votes
3answers
3k views

Is there ever a reason to prefer $model->load() over service contracts?

I understand that the preferred way to work in between modules in Magento 2 is using the service contracts. So if I want to load a product, I use the product repository: $product = $...
1
vote
0answers
130 views

Are there any creative solutions for launching cron.sh for multiple Magento stores in a distributed architecture?

At the company I work for, our architecture is set up in such a way that we have hundreds of Magento stores, and a variable number of application servers (behind a load balancer), but only one ...
21
votes
2answers
5k views

What is Context Object purpose in any class's constructor DI ? How Context works?

In most of the class's Constructors, a Context object is passed . I couldn't understand how this Context Obj works . I also noticed that sometimes this is passed to parent class's constructor like ...
5
votes
2answers
2k views

Use preconfigured builders (e.g. for SearchCriteria) in Magento 2

Warning, this is a long winded question about module architecture. I'm not mad if it gets closed as opinion based, but I hope someone has a better idea than me. In Magento 2 we have builders like the ...
0
votes
2answers
708 views

Where does Magento keeps it's business logic?

I went through some articles which describes Magento architecture. As we all knows Magento uses MVC ( Model-View-Controller ) architecture. It separates the business logic, data access layer and ...
1
vote
0answers
279 views

Magento multi-site data migration. While merging new store needs to keep live existing stores/sites

I am working on Magento enterprise edition. In which, two sites are already set up and working. Both of them are setup and configured by us. Now as per requirement client wants to add one more site in ...
16
votes
4answers
13k views

Why `code` folder is missing under `app` folder in magento 2 stable version?

I have downloaded Magento 2 stable from https://www.magentocommerce.com/download with sample data and installed. It's working fine in both areas i.e. frontend & backend. But I could not find app/...
26
votes
1answer
10k views

Magento ER diagram of 1.9.x

I am looking for ER diagram of magento 1.9.x so that i can understand magento database flow and table-relationships. if anyone can provide me COMPLETE ER diagram that will really help me. Like i saw a ...
1
vote
1answer
55 views

How to cache (copy) the catalog database in a third-party app and keep it in sync?

We have a third party app that allows users to manage their catalog. The app uses the Magento API to fetch catalog data but it is very slow and it offers no pagination. I want to cache the catalog ...
1
vote
1answer
83 views

where are static blocks used, and what potential values in eav_attribute

I am about 3 months into Magento at this point. I have worked with static blocks core_blocks being used in a store for categories to either supplement or replace the category list. I know these are ...
5
votes
2answers
204 views

Where’s The V in Magento's MVC? And is there better name?

When you look at the Magento directory structure, the C for ‘controller’ and the M for Model are easily identified as files and classes. But where are the Views and what are they?
20
votes
3answers
3k views

Request flow of Magento 2

Their is a lot of fuss going about Magento 2, concept like Namespaces etc has been incorporated into it. I am just curious to know how REQUEST flow has been handled in Magento 2, can somebody give me ...
1
vote
2answers
132 views

Is it possible to configure one event Observer for all Magento events?

Is it possible (whether practical or not) to cut some configuration down by registering an observer to all Magento Events. The purpose for this would be to build an Observer that works as a "service ...
1
vote
1answer
45 views

Fill custom attribute product during checkout

Imagine this situation: in some situation the user, (in the cart view) are able to buy a special discount card, this card need the username, lastname and birthday. In my configuration I have a ...
5
votes
1answer
463 views

Is Magento based on 3 tier architecture?

I want to know few things: Is magento based on 3 tier architecture? Is it free from SQL-Injection, cross-site-scripting, CRLF injection attacks and SSI attacks?
3
votes
0answers
62 views

Need to know whole Magento Design Patterns [duplicate]

I want to know how many 'Design Patterns' are magento using, I am exploring my self and found below lists, if you know others than listed patterns. Please feel free to add. 1: MVC - Magento utilizes ...
6
votes
1answer
384 views

what is the need of extra layer(service contracts) in magento2?

With out service contracts: For example I can extend directly class AccountManagement model. I can override any function.At the same time if core developers add anything in class AccountManagement ...
1
vote
2answers
277 views

Building a highly customizable marketplace

I have to building a very customized marketplace and would like some advises. Basically weather or not Magento could be a good choice. I have to building a very customized marketplace and would like ...
2
votes
2answers
224 views

Fear about Magento 2.0 as a developer [closed]

I've been working for the last two years as a Magento developer.I have learned some what of magento's folder structure, rewrite of classes, front end customization etc. So if any requirement or ...
2
votes
3answers
2k views

What's the difference between order_id and Parent_id in sales Order?

The question might look a bit stupid but I don't understand the difference between parent_id and order_id.
3
votes
2answers
170 views

Why separately placing methods in interface instead of abstract class?

I want to delete Interface Mage_Shipping_Model_Carrier_Interface. interface Mage_Shipping_Model_Carrier_Interface { /** * Check if carrier has shipping tracking option available * ...
3
votes
1answer
2k views

Why are bundle product tier prices a percent value?

My question is not a coding but architectural one. So for simple products, downloadable, grouped and configurable products the tier pricing uses a monetary value for for each price e.g. 20.59 in what ...
0
votes
3answers
918 views

what is the exact use of interface in real time?

I know how to declare and rules to create interface. i'm trying to understand exact need of interface in real time.I'm reading many articles with examples.still i'm not satisfied. Can any one ...
1
vote
1answer
198 views

what is the need of implement arrayaccess interface for Varien_Object class?

I know using ArrayAccess interface we can use object as array(getting setting unseting).And i have idea that ArrayAcess interface contain 4 undefined methods.we should implement these methods if class ...
1
vote
1answer
142 views

Why so many classes declared as abstract even it contain all defined methods?

For example these classes are abstract Mage_Catalog_Model_Abstract,Mage_Core_Model_Abstract etc.But it contain only defined methods.and what is the necessity to given class as abstract. I know ...
3
votes
2answers
875 views

Finding possible methods for objects in Magento

Lots of confusion on this point, hopefully you will understand my areas of lacking understanding by the trend of my questioning: How does one find available methods for objects in Magento and the ...
1
vote
1answer
599 views

Best practices or tips for modules with multiple websites/stores/views

I haven't really seen this topic covered much, but I was wondering what are some things that need to be taken into account when implementing modules when the Magento setup is using multiple websitess. ...
2
votes
3answers
4k views

How to access custom table/attributes using the ORM?

I've been struggling with this for a while - I'm new to Magento and haven't programmed in PHP for a while, so please, bear with me. Doing some changes on a Shipping module to magento I've come to ...
4
votes
2answers
559 views

Extending newsletter functionality correctly

I have previously made a module which would allow a user to sign up for newsletters and decide on which type of newsletters they would receive e.g. promotion, new lines etc. This module was my first ...
0
votes
1answer
81 views

What Model Data Is Available On Edit

I have created a custom module with my own db table. My question is; what data is available to me in the block class while I'm editing an entry? For example, I use the products collection in my block ...
2
votes
1answer
1k views

Is Magento a better choice than, say, OpenCart? [closed]

I've been developing non-ecommerce sites for years and I've learned is that CMS code/architecture quality, and the size of the community/ecosystem around the CMS are two essentials. For example, there ...
2
votes
2answers
813 views

doing topsellers/bestsellers by category elegantly

So I've been tasked with making a bestsellers box, yet I've heard a horror story about the bestsellers box in a previous site taking down the site because of the extensive load. First, I should ...
18
votes
3answers
4k views

Magento running on Percona Server with XtraDB

Does anyone have any experience with Magento db running on Percona Server with XtraDB? Benchmarking, stres testing, numbers... anything
28
votes
4answers
10k views

How to optimise database architecture for high volume sites?

Question is less about specific Mysql configuration items, but more about handling multiple databases, splitting read and writes to multiple database servers, master+master? Master+Multiple Slaves? ...