Script47 Posted May 12, 2014 Share Posted May 12, 2014 (edited) 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 May 12, 2014 by Script47 Quote Link to comment Share on other sites More sharing options...
njfrlng Posted May 12, 2014 Share Posted May 12, 2014 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. Quote Link to comment Share on other sites More sharing options...
Script47 Posted May 12, 2014 Author Share Posted May 12, 2014 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? Quote Link to comment Share on other sites More sharing options...
njfrlng Posted May 12, 2014 Share Posted May 12, 2014 opps sorry, didnt notice the MVC part, considering I dont know what MVC is, Im going to go with no, lol Quote Link to comment Share on other sites More sharing options...
wrux Posted May 12, 2014 Share Posted May 12, 2014 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 Quote Link to comment Share on other sites More sharing options...
Script47 Posted May 12, 2014 Author Share Posted May 12, 2014 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? Quote Link to comment Share on other sites More sharing options...
wrux Posted May 12, 2014 Share Posted May 12, 2014 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 Quote Link to comment Share on other sites More sharing options...
BlackScorp Posted May 12, 2014 Share Posted May 12, 2014 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 Quote Link to comment Share on other sites More sharing options...
Script47 Posted May 12, 2014 Author Share Posted May 12, 2014 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! :) Quote Link to comment Share on other sites More sharing options...
ColdBlooded Posted May 12, 2014 Share Posted May 12, 2014 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! Quote Link to comment Share on other sites More sharing options...
Dave Posted May 12, 2014 Share Posted May 12, 2014 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! Quote Link to comment Share on other sites More sharing options...
Script47 Posted May 12, 2014 Author Share Posted May 12, 2014 (edited) 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 May 12, 2014 by Script47 Quote Link to comment Share on other sites More sharing options...
Dominion Posted May 12, 2014 Share Posted May 12, 2014 (edited) I would suggest reading this - http://makewebgames.io/showthread.php/43178-MVC-or-not-MVC Are you willing to take a step away from PHP to have a play with MVC or just using it within what you already know? Maybe you're willing to play around with an established framework? Edited May 12, 2014 by Dominion Quote Link to comment Share on other sites More sharing options...
ColdBlooded Posted May 13, 2014 Share Posted May 13, 2014 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 Quote Link to comment Share on other sites More sharing options...
HazardBoy Posted May 13, 2014 Share Posted May 13, 2014 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. Quote Link to comment Share on other sites More sharing options...
BlackScorp Posted May 13, 2014 Share Posted May 13, 2014 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 Quote Link to comment Share on other sites More sharing options...
Script47 Posted May 13, 2014 Author Share Posted May 13, 2014 (edited) 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 May 13, 2014 by Script47 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.