Re: BlackWolf - Housekeeping (standalone) - [PHP 5.6+/PDO/OOP/TPL/Angular]
Quote:
Originally Posted by
3M1L
I've decided to use MVC & I'll recode the current source to follow the MVC pattern.
Otherwise it's gonna get REALLY messy without MVC if I continue this way so.. :):
Just use a framework...
https://cakephp.org
https://laravel.com
Re: BlackWolf - Housekeeping (standalone) - [PHP 5.6+/PDO/OOP/TPL/Angular]
Quote:
Originally Posted by
NoBrain
For something small like this Housekeeping i wouldn't recommend this.
Use Laravel Lumen: https://lumen.laravel.com/
Uses the same API of Laravel but is really tiny.
It's like a ZeptoJS for jQuery, but in this case it's a PHP Framework xD
Observation.: I personally don't like CakePHP
Re: BlackWolf - Housekeeping (standalone) - [PHP 5.6+/PDO/OOP/TPL/Angular]
Quote:
Originally Posted by
saamus
For something small like this Housekeeping i wouldn't recommend this.
Use Laravel Lumen:
https://lumen.laravel.com/
Uses the same API of Laravel but is really tiny.
It's like a ZeptoJS for jQuery, but in this case it's a PHP Framework xD
Observation.: I personally don't like CakePHP
Sure, use Lumen if you want less flexibility. Lumen is designed for high performance applications or API's. Usage of a full framework for a Housekeeping is perfect, don't use a micro-framework unless you are 100% sure you want to deal with the potential issues in the long run.
Re: BlackWolf - Housekeeping (standalone) - [PHP 5.6+/PDO/OOP/TPL/Angular]
Quote:
Originally Posted by
saamus
For something small like this Housekeeping i wouldn't recommend this.
Use Laravel Lumen:
https://lumen.laravel.com/
Uses the same API of Laravel but is really tiny.
It's true it might be a small framework but you'll actually need all of the features of Laravel.
Lummen doesn't even have Blade (the templating engine) in it's package. Lummen is good for APIs. I get your Point of view because it's Angular and it uses API calls. I personally think it's better to go with the whole package.
- - - Updated - - -
Also Eloquent is disabled by default in Lummen. It's not hard to enable it but it's worth mentioning.
Re: BlackWolf - Housekeeping (standalone) - [PHP 5.6+/PDO/OOP/TPL/Angular]
Quote:
Originally Posted by
CodeDragon
It's true it might be a small framework but you'll actually need all of the features of Laravel.
Lummen doesn't even have Blade (the templating engine) in it's package. Lummen is good for APIs. I get your Point of view because it's Angular and it uses API calls. I personally think it's better to go with the whole package.
- - - Updated - - -
Also Eloquent is disabled by default in Lummen. It's not hard to enable it but it's worth mentioning.
Thanks for understand my point, that was exactly this. Since Angular will do all the front-end things i don't think that a robust framework it's necessary, since in certain point, the views will be only jSON.
Angular will threat, handle and parse the template. At least is how Habbo actually does.
But if need MVC in the Houskeeping (i don't know why will need this, if the views are simply jSON, i don't get why @NoBrain criticized me...) so it's better using Laravel.
For High Performance Applications, i personally like PhalconPHP..
But we don't will enter in discussion here of which Framework is better for the author, he can decide this of it's own way. Many frameworks have the basics, the same basics, in different ways.
Also i don't like using a super framework, i know that Laravel does modularization and has packages and a core package, you can even manage it with Composer, but anyways, it's a housekeeping... Not a complete CMS...
He need basically Angular Features, MVC, QueryBuilder and nothing more...
If he want to do the basics. Anyways, who will handle all those front-end things it's the Angular by itself.
I actually coded HabboWEB without the usage of any Framework, code wasn't 100% correct, but wasn't a mess at all.
Anyways, @3M1L good luck for your Housekeeping, i hope you conclude it, since this year we had many Housekeepings and no one finished.
Re: BlackWolf - Housekeeping (standalone) - [PHP 5.6+/PDO/OOP/TPL/MVC]
Happy Christmas everyone!
@samuus thanks, but I'm pretty sure I won't finish this Housekeeping this year though xD.
Updates:
Recoded the whole base I had according to the MVC architecture rules.
Updated the snippets in the intro post:
Dashboard controller: https://gist.github.com/ImEmil/af4bb...2fbf3fcd7dafa7
Dashboard model: https://gist.github.com/ImEmil/e360b...3b63749bd0aaf6
Re: BlackWolf - Housekeeping (standalone) - [PHP 5.6+/PDO/OOP/TPL/MVC]
The desing is nice, but the "users online" in /dash is like poop in da sandwitch. If someone gets 200 online, and this shitty monster comes up and start to loading the f*cking users..
Re: BlackWolf - Housekeeping (standalone) - [PHP 5.6+/PDO/OOP/TPL/MVC]
Quote:
Originally Posted by
swe
The desing is nice, but the "users online" in /dash is like poop in da sandwitch. If someone gets 200 online, and this shitty monster comes up and start to loading the f*cking users..
What exactly are you implying? "If someone gets 200 online, and this shitty monster comes up and start to loading the f*cking users.."
Re: BlackWolf - Housekeeping (standalone) - [PHP 5.6+/PDO/OOP/TPL/MVC]
Think he means that if you have 200 people online; that lists gets a bit too long. Maybe sort it on A-Z and add some pagination so not 200 users are displayed but just the first 10 or something?
Re: BlackWolf - Housekeeping (standalone) - [PHP 5.6+/PDO/OOP/TPL/MVC]
Yeah ofcourse, I thought about it in the beginning and that's why pagination is already implemented :)
I'll also add the A-Z sort option.
http://i.imgur.com/yXZk1Hm.png
Re: BlackWolf - Housekeeping (standalone) - [PHP 5.6+/PDO/OOP/TPL/MVC]
Quote:
Originally Posted by
The General
Think he means that if you have 200 people online; that lists gets a bit too long. Maybe sort it on A-Z and add some pagination so not 200 users are displayed but just the first 10 or something?
This. And good luck with the project 3M1L.
Re: BlackWolf - Housekeeping (standalone) - [PHP 5.6+/PDO/OOP/TPL/MVC]
Quote:
Originally Posted by
3M1L
To much comments in your controller.
Watch out on how you name your stuff ($this->view and $this->Dashboard).
Re: BlackWolf - Housekeeping (standalone) - [PHP 5.6+/PDO/OOP/TPL/MVC]
The reason why this->Dashboard has an uppercase letters is because it is a model (:
Re: BlackWolf - Housekeeping (standalone) - [PHP 5.6+/PDO/OOP/TPL/MVC]
Quote:
Originally Posted by
3M1L
The reason why this->Dashboard has an uppercase letters is because it is a model (:
What a stupid reason.
Re: BlackWolf - Housekeeping (standalone) - [PHP 5.6+/PDO/OOP/TPL/MVC]
Quote:
Originally Posted by
3M1L
The code looks fantastic now.
- - - Updated - - -
Quote:
Originally Posted by
Joopie
What a stupid reason.
In other words, you create a private variable to store the dashboard stuff, like private $dashboard, in Java will something like private Dashboard dashboard;
Understand now the point of @Joopie, @3M1L?