D
D
deadmemoras2016-08-09 02:01:53
PHP
deadmemoras, 2016-08-09 02:01:53

What can I look at so as not to shit-code in MVC?

In general, I wrote my own MVC (To understand how everything works, and for practice), but it failed miserably (a lot of shit code). What can be seen about this? maybe there are some open source projects with normal (quality) code? Or what do you recommend?

Answer the question

In order to leave comments, you need to log in

3 answer(s)
T
trevoga_su, 2016-08-09
@trevoga_su

the question is meaningless.
look at someone else's - you will stupidly copy
if you want to experiment - you take the classics like Fowler, you read, with this base you write your own, but ..

In general, I wrote my own MVC
you don't have to do that. nobody needs it. including and you. mine if you're
interested

R
Rou1997, 2016-08-09
@Rou1997

Have you written your own MVC framework? It is useless to watch anything, because a new project must certainly be unique so as not to fail because of some "shit code" there, and unique - new - ideas are taken only from practice, so practical experience is needed with at least one MVC- framework such as Yii2.

X
xfg, 2016-08-09
@xfg

Look at any popular framework and try to make a framework without M and without V, leave only C and the dependency container. Such a framework should only parse the request and call the desired controller method and event system so that you can hang handlers before and after calling the controller method. Nothing else is needed, everything else can be implemented through the container by taking components from other frameworks, as well as writing your own. The result is a loosely coupled component framework. Call it loose or low framework, dedicated to one of the most important principles of GRASP loose/low coupling :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question