K
K
Kokaas2015-04-12 18:28:31
PHP
Kokaas, 2015-04-12 18:28:31

What architecture(mvc, hmvc...) to choose for online store?

There was a question about architecture.
I know what it is:
mvc - ancient, for small projects.
hmvc is a more recent variant for more loaded projects.
Maybe something new has appeared and what is better to choose?
The load is expected to be about 100,000 visits per day, maximum.
Minimum 10,000 views.
The bundles will be:
nginx 1.7 (maybe the latest version)
php5.5, mysql5.5 (php 7? You can try on.)
redis (for cache, push, any notifications)
The client is written in js.
Data exchange is asynchronous (ajax or websockets, I don’t know which is better to choose ..)
but I don’t seem to be missing anything.
REST or SOAP, lean more towards SOAP. because payment systems have begun to move to SOAP and represent either SOAP or api.

Answer the question

In order to leave comments, you need to log in

4 answer(s)
S
Sergey, 2015-04-12
Protko @Fesor

What architecture(mvc, hmvc...) to choose for online store?

CQRS + Event Sourcing.
only REST (well, or RPC), SOAP is a pain and humiliation (unless, of course, you write both client and server in .NET)
What about the meaning? Then upgrade.
Well, it's like... a trifle. For now, focus on performance. It is better to do this later, armed with a profiler and load tests. And this optimization will include the introduction of additional layers of caching, etc.
I don't know how to spell June or July? Iraq or Iran?. websockets will help if you have a very intensive communication between the client and the server. Otherwise, long-poling is simpler. Although I think you don't need push notifications at all.
Only for the cache and can also be used as a data bus and a queue.
Or maybe something else? (languages ​​translated into js do not count).

F
FanatPHP, 2015-04-12
@FanatPHP

Eternal theme.

The fact is that I am not a photographer and I am not going to become one, but I am a programmer and a system administrator and I need to arrange an exhibition of my photos.
Tell me the algorithm of my actions:
1. I have to buy frames and carnations for hanging photos.
2. I also have to get some kind of camera that allows you to take beautiful photos. What is the name of such a camera or its analogues? Is it difficult to master?
3. I have to click the above camera until I click enough for the show.
Is everything correct?
update. I bought an Olympus device for 200 rubles. Topic closed...
A million questions, and not a single one on the topic. The dude sincerely believes that knowing a lot of scary words will help him somehow.

X
xmoonlight, 2015-04-12
@xmoonlight

Design Patterns Cheat Sheet
Patterns for Beginners: MVC vs MVP vs MVVM

Y
Yuri Yarosh, 2015-04-12
@voidnugget

In fact, it doesn’t matter what to write the store on, since these are banal CRUD and AAA services, in practice, usually it doesn’t even reach the normal database model.
Browser SPAs (single-page applications) promise problems with SEO, but not everyone can write an isomorphic application in react, and prerender.io with angular.js does not always behave well, although you can play around and render angular.js in jsdom' e... in general, it is very difficult to find a person who understands all this normally now.
The described architecture a la CQRS-ES requires budgets from $3000+, which is definitely not the best idea for an average store, or you need the enthusiasm of the developers, which will not take you far, and it is very difficult to motivate with enthusiasm alone. There are simply no ready-made solutions in this regard in nature, and it is not always possible to check whether five-wheeled bicycles are written there.
It’s easier to take any average PHP framework and not bother yourself with one place, cover it normally with tests (Codeception, for example), fasten full-text search and reports, figure out how to implement AAA correctly, make sure that you have a normalized database model. Recently, I see even less and less often even the 3rd normal form, the history is silent about the other 3.
If you have a normal budget, $8,000-10,000 for store development, you can think about all the things described above, but you need to properly organize the development process and quality control, understand the motivation of developers, and only then you can think about whether this money is not clear for what, because, in my lifetime, people launched millions of U.Dmurd hedgehogs into space inventing something unnecessary to anyone, and among such offices there are even IBM, Logitech, and TI.
In general, for starters, it’s worth understanding simpler things, and then trying to build androids, otherwise Skynet is waiting for us all. Kokaas.
ps php has been dead for me for 2 years already, and in the 7th it will be more from Java than from php.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question