Jump to content
MakeWebGames

MVC PHP. Any jargon free tutorials?


Script47

Recommended Posts

I thought I would read up on MVC, now I was wondering if there was a specific way any of you guys learn't it or if you have any good tutorials. Also if possible jargon free tutorials. Any advice is most welcome!

Edited by Script47
Link to comment
Share on other sites

I signed up at Lynda.com and did a procedural php course, it was great! (Especially since I've never used php, and pretty much have no programming experience.)

This is the end result:

Front End:

http://nicfurlong.com/public/

Back End:

http://nicfurlong.com/public/login.php

Login: test

Password: test1

 

It's nothing fancy, but all subjects/pages are editable.

You can create/edit admins as well.

Currently making a front end user registration system on my own, almost have it complete! :D

I'm hoping to turn it into a useable website/database for my full time job. But for now, I'm just experimenting and learning.

Link to comment
Share on other sites

I signed up at Lynda.com and did a procedural php course, it was great! (Especially since I've never used php, and pretty much have no programming experience.)

This is the end result:

Front End:

http://nicfurlong.com/public/

Back End:

http://nicfurlong.com/public/login.php

Login: test

Password: test1

 

It's nothing fancy, but all subjects/pages are editable.

You can create/edit admins as well.

Currently making a front end user registration system on my own, almost have it complete! :D

Is this using MVC?

Link to comment
Share on other sites

CakePHP has some awesome documentation, check them out. Other frameworks such as codeignighter miss out on a lot of features but Cake is really good

I was looking over some tutorials which said sometimes it's better make your own framework. Is that correct?

Link to comment
Share on other sites

I was looking over some tutorials which said sometimes it's better make your own framework. Is that correct?

The amount of work required would seriously outweigh the benefits for something at most people's level. If you are creating a complex platform then it would probably be a better idea. CakePHP (and any other framework) has a very stable core and with constant updates it is a better idea to use a ready made framework.

That being said, it's a great exercise in object oriented programming creating your own framework

Link to comment
Share on other sites

Well MVC was invented in 1969 Trygve Reenskaug told on his Keynote that it was not invented to use for entire Architecture, just for small parts (e.g. Inputfield,Button,Slider etc) therefore he extendet MVC and called it Data Context Interaction Pattern.

Here is his Keynote to this Pattern

The key of this pattern is to create for each real user interaction a custom class, if a user interaction requires more than one process you have to combine them into a context.

Currently iam practicing the DCI Pattern in my Project

https://github.com/Opentribes/Core/tree/develop/src you can see there a folder Interactor it contains user interactions on the webpage and the logic behind it. some of the interactions were combined into Context which is bound to a role, you can see the Context inside the Context folder.

Each interactor/context has his own Request/Response class which contains properties

at the end i took the interactors and used them inside controllers

https://github.com/Opentribes/Core/blob/develop/silex/Controller/Account.php#L59-L71

Link to comment
Share on other sites

Well MVC was invented in 1969 Trygve Reenskaug told on his Keynote that it was not invented to use for entire Architecture, just for small parts (e.g. Inputfield,Button,Slider etc) therefore he extendet MVC and called it Data Context Interaction Pattern.

Here is his Keynote to this Pattern

The key of this pattern is to create for each real user interaction a custom class, if a user interaction requires more than one process you have to combine them into a context.

Currently iam practicing the DCI Pattern in my Project

https://github.com/Opentribes/Core/tree/develop/src you can see there a folder Interactor it contains user interactions on the webpage and the logic behind it. some of the interactions were combined into Context which is bound to a role, you can see the Context inside the Context folder.

Each interactor/context has his own Request/Response class which contains properties

at the end i took the interactors and used them inside controllers

https://github.com/Opentribes/Core/blob/develop/silex/Controller/Account.php#L59-L71

Just yesterday I was looking over your code for that project and was looking for the "controller" file and you pointed me in the direction. Thanks for the reply! :)

Link to comment
Share on other sites

I thought I would read up on MVC, now I was wondering if there was a specific way any of you guys learn't it or if you have any good tutorials. Also if possible jargon free tutorials. Any advice is most welcome!

Just throw yourself into it and learn as you go, do readings where required. Lots of tutorials and frameworks out there that use MVC, again, subjectable to your development needs. If it's a game, then use MCC v3 (you'll have to wait a bit more though)

I learnt MVC with Python (Django) framework.

Cheers!

Link to comment
Share on other sites

Just throw yourself into it and learn as you go, do readings where required. Lots of tutorials and frameworks out there that use MVC, again, subjectable to your development needs. If it's a game, then use MCC v3 (you'll have to wait a bit more though)

I learnt MVC with Python (Django) framework.

Cheers!

Milk will be using MVC!

Link to comment
Share on other sites

Just throw yourself into it and learn as you go, do readings where required. Lots of tutorials and frameworks out there that use MVC, again, subjectable to your development needs. If it's a game, then use MCC v3 (you'll have to wait a bit more though)

I learnt MVC with Python (Django) framework.

Cheers!

MCCodes V3 will be MVC? Nice! :D

I just want to generalize myself with that style of coding, seeing as quite a few people are gearing themselves towards it, and hopefully my future projects will be better of with this style of coding. Ya can't get left behind now can you! If people start using MVC more and more and you (I) don't have a clue how to write/change MVC code, I might as well stop coding. This will be a fun way to learn something else too. I guess people will be able use MCCodes V3 as a fun way to learn MVC too. Looking forward to seeing it. :)

 

Milk will be using MVC!

My point exactly!

 

If people start using MVC more and more and you (I) don't have a clue how to write/change MVC code, I might as well stop coding.
Edited by Script47
Link to comment
Share on other sites

Milk will be using MVC!

Imagine learning MVC with v2 thanks to Milk enabler :O - Interesting. People will learn a lot with such opportunities coming up. I will catch up with the all lead developers of these projects and release more information. This week I am moving places so everything is all over the place. I'll get myself sorted and we then we all can talk.

Back to topic: MVC will help code sharing a lot easier for passionate people who want to release modules

Link to comment
Share on other sites

The separation of UI form action code is one of the best things that MVC has to offer.

No more echo 'my_ulgly_html'.

Can use html highlight syntax. theming, UI components reuse, etc.

For beginners I recommend Code Ignite as it is easy, lightweight and fully documented.

I also made in past my own php MVC framework and websites like agendaturist.ro and atestatelainformatica.ro are using it.

Link to comment
Share on other sites

i created a simple MVC Implementation without a framework, you can find the code here

https://github.com/BlackScorp/MVC

just import install.sql in your phpmyadmin, edit config.php and try it

I found an error, I was going to try and play around and break things and learn like that but I didn't know how to fix. So I made a issue on GIT.

Issues GIT

Edited by Script47
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...