Home Upgrade Search Memberlist Extras Hacker Tools Award Goals Help Wiki Contact

PHP 

Build your own MVC

What's up HF ?

I have been following this course today just to practice PHP:
https://www.Udemy (warez disallowed).com/learn-object-oriented-php-by-building-a-complete-website

I found it very useful.
At the end of the course you should be able to create your own MVC.

I'm pretty sure alot of you already know how-to and won't be going throught all the course so I will just share my source code.

I hope you'll like it and will be useful for more than one !

Some screenshots of the final result:
Spoiler (Click to View)

Here is the DL link for the archive: https://puu.sh/o6bNH/a68bc72844.rar
[Image: vibesignature.gif]
“Whatever Your Mind Can Conceive and Believe, It Can Achieve.” – Napoleon Hill
MVC is a design pattern, you'll need some sort of client sided language like JavaScript to make your controller. Luckily, there are awesome framworks, such as AngularJS out there that enable you to code in the MVC design pattern.

M = Model
V = View
C = Controller

https://en.wikipedia.org/wiki/Model%E2%8...controller

If you don't understand the wikipedia article, please hit me up via PM. I'll be glad to explain the approach in detail.
(Apr 4, 2016 02:56 PM).trigious Wrote:  MVC is a design pattern, you'll need some sort of client sided language like JavaScript to make your controller. Luckily, there are awesome framworks, such as AngularJS out there that enable you to code in the MVC design pattern.

M = Model
V = View
C = Controller

https://en.wikipedia.org/wiki/Model%E2%8...controller

If you don't understand the wikipedia article, please hit me up via PM. I'll be glad to explain the approach in detail.

Hello, hm, I never asked for any help, but thanks :)
I know what is a MVC, I followed this course because I wanted to know how-to build one.

I usually use Laravel 5 as framework when I'm working with multiple developers.
[Image: vibesignature.gif]
“Whatever Your Mind Can Conceive and Believe, It Can Achieve.” – Napoleon Hill
(Apr 4, 2016 03:03 PM)newQuery Wrote:  Hello, hm, I never asked for any help, but thanks :)
I know what is a MVC, I followed this course because I wanted to know how-to build one.

I usually use Laravel 5 as framework when I'm working with multiple developers.

So you do need help? :P

Well, if you know what it is and understand what it is, why can't you do it then?

It's as simple as some JS code that retrieves for example JSON from your API and templates it.
(Apr 4, 2016 03:04 PM).trigious Wrote:  So you do need help? :P

Well, if you know what it is and understand what it is, why can't you do it then?

It's as simple as some JS code that retrieves for example JSON from your API and templates it.

I never said that I couldn't do it 😯
I don't think you read my thread, because I litteraly give you the sources and screenshots.

❓❓
[Image: vibesignature.gif]
“Whatever Your Mind Can Conceive and Believe, It Can Achieve.” – Napoleon Hill
(Apr 4, 2016 03:06 PM)newQuery Wrote:  I never said that I couldn't do it 😯
I don't think you read my thread, because I litteraly give you the sources and screenshots.

❓❓

Well, shit.
I didn't read your source code because I'm on my Linux box rn and I was to lazy to install something to extract the rar.

My apologies, I saw that you were iterating over your shares, so my idea was that you want to implement the MVC design pattern as follows:

User goes on page,
User makes Ajax request to backend,
User templates ajax response if 20* code

So yeah. RIP me


Possibly Related Threads...
Thread / Author Replies Views Last Post
[PHP] by WingsOfAltairJul 21, 2020 10:34 AM 0 154 Jul 21, 2020 10:34 AM
Last Post: WingsOfAltair
[PHP] by HappinessIsKeyOct 17, 2015 12:44 PM 7 212 Oct 17, 2015 12:44 PM
Last Post: SIM-1947090
[Javascript]  by Mind GlowingDec 11, 2014 06:07 AM 0 74 Dec 11, 2014 06:07 AM
Last Post: Mind Glowing