nik_jain Posted August 24, 2015 Share Posted August 24, 2015 (edited) I am PHP developer developing for the past 3-4 years, but except for CI I had always kind of struggled with any type of framework..So I ended up not using most and just rolling my own frameworkish 'structure' . That ended up as a FANTASTIC learning experience, as I really got to understand what and how a real framework does/works.My complete source of the site wowpictures.link (which was made as a learning thing) is here: https://bitbucket.org/nikhil_jain/complete-wowpictures.link-source/src . Can someone take a quick look please . and offer suggestions / improvements / completely wrong things I did ?Secondly now I am hunting for a real framework, but I just find them too restriucitve / imposing. For instance yii seems too tied up with bootstrap, laravel like blade too much. Yii also seems to have a very specific class / method naming structure, that I find a chore to remember..etc etc.So what should I do? Learn any proper framework OR try to improve my own thingy ? I am strongly leaning towards th former option, but can't find a framework that doesn't forces random stuff no me ....Thanks Edited August 24, 2015 by nik_jain Quote Link to comment https://forums.phpfreaks.com/topic/297913-code-review-and-framework-woes/ Share on other sites More sharing options...
scootstah Posted August 24, 2015 Share Posted August 24, 2015 (edited) Symfony2 does not force anything on you. With any framework there are certain "rules" to follow, and preferred ways of doing things, but that is for the better. Except for some sort-of strict structure conventions (which you can totally ignore if you want, in your own application), Symfony2 gives a lot of freedom to do what you want to do. Your framework seems to lack any kind of structure or architecture. You just kind of arbitrarily dumped everything into a few files in /common/. As someone who is complaining about other frameworks being too restrictive, you should take a look at what you have made - your framework is very tightly coupled to not only a specific database driver, but also to a specific database schema. Your classes hold way too much responsibility, and your structure is not consistent (some methods have visibility keywords, some don't. Some have docblocks, some don't. Etc). What you have here is more like an application and less like a framework. A framework should be reusable in a wide variety of applications with freedom of choice. You're not offering that here. I was once in the same boat as you - I started with CodeIgniter and then found it hard to use the other frameworks, because I thought they were weird after using CI. Well, it turns out that CI is the weird one. Forget everything you think you know about frameworks and just start fresh with a new one. I usually recommend Symfony2, just because of its popularity and the fact an increasing number of other projects are starting to utilize the Symfony components. Edited August 24, 2015 by scootstah Quote Link to comment https://forums.phpfreaks.com/topic/297913-code-review-and-framework-woes/#findComment-1519547 Share on other sites More sharing options...
nik_jain Posted August 24, 2015 Author Share Posted August 24, 2015 Your framework seems to lack any kind of structure or architecture. Agreed. I was quite hesitant to call it a framework, hence the word structure (some code that I can reuse) . It was obviously never meant for use by anyone other than me.. As someone who is complaining about other frameworks being too restrictive, you should take a look at what you have made - your framework is very tightly coupled to not only a specific database driver, Well in my defense is the complete code of the site, not the actual 'structure' . Although I admit it doesn't even have a any kind of DB class Thanks a lot for your response. I have tried symphony in the past, will give it another shot. Though through another forum I discovered that its quite easy to get rid of blade in laravel, so I might give it a shot too! Thanks again Quote Link to comment https://forums.phpfreaks.com/topic/297913-code-review-and-framework-woes/#findComment-1519549 Share on other sites More sharing options...
scootstah Posted August 24, 2015 Share Posted August 24, 2015 Laravel is much more opinionated than something like Symfony2. It sacrifices some things in order to make it more simple to use. It's still a great choice, though, especially if you're still new to frameworks. Symfony2 is very powerful, but it also has a really steep learning curve. Quote Link to comment https://forums.phpfreaks.com/topic/297913-code-review-and-framework-woes/#findComment-1519550 Share on other sites More sharing options...
QuickOldCar Posted August 24, 2015 Share Posted August 24, 2015 If you want a good headstart your project...look at octobercms cms platform based on laravel. Quote Link to comment https://forums.phpfreaks.com/topic/297913-code-review-and-framework-woes/#findComment-1519555 Share on other sites More sharing options...
nik_jain Posted August 26, 2015 Author Share Posted August 26, 2015 Though through another forum I discovered that its quite easy to get rid of blade in laravel, so I might give it a shot too! Nope, I was kind of wrong about this one... lets hope I am able to get symfony.. Quote Link to comment https://forums.phpfreaks.com/topic/297913-code-review-and-framework-woes/#findComment-1519646 Share on other sites More sharing options...
scootstah Posted August 26, 2015 Share Posted August 26, 2015 What is so bad about Blade that you cannot use it? Quote Link to comment https://forums.phpfreaks.com/topic/297913-code-review-and-framework-woes/#findComment-1519675 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.