Evaneos / silex-rest-skeleton

Silex REST API skeleton fro your micro services and APIs
4 stars 2 forks source link

Remove ORM #1

Open qpautrat opened 8 years ago

qpautrat commented 8 years ago

We should not use ORM by default IMO. We should suggest it instead from composer.

ghost commented 8 years ago

As you can delete everything you don't want from it, I like the fact it's already bootstraped if you need it.

As a matter of fact, I'd like to also bootstrap rabbitmq with burrow for that instance.

But I'm prepared to discuss it.

My point is, it's easier to remove than to add (as long as there's a limited number of that kind of stuff)

oliviermadre commented 8 years ago

Maybe we'd like a more generic approach to bootstrap our skeleton.

There's a lot of configuration in constructors, boot methods, and stuff.

Is that possible to imagine something simpler, like :

public function __construct(BootStrategy $bootStrategy) { $this->bootStrategy = $bootStrategy;

$extensions = array();
$extensions[] = new DoctrineExtension();
$extensions[] = new MongoExtension();
$extensions[] = new WhateverExtension();

foreach ($extensions as $extension) {
    $extension->boot($this);
}

}

public function boot() { $this->bootStrategy->boot($this); }

And the same logic for extensions inside boot strategies

or something like that...

Le jeu. 14 janv. 2016 à 18:06, remievaneos notifications@github.com a écrit :

As you can delete everything you don't want from it, I like the fact it's already bootstraped if you need it.

As a matter of fact, I'd like to also bootstrap rabbitmq with burrow for that instance.

But I'm prepared to discuss it.

My point is, it's easier to remove than to add (as long as there's a limited number of that kind of stuff)

— Reply to this email directly or view it on GitHub https://github.com/Evaneos/silex-rest-skeleton/issues/1#issuecomment-171706141 .

Les agents partenaires d'Evaneos vous souhaitent bonne année en vidéo https://www.youtube.com/watch?v=srPivGYhLgk, des quatre coins du monde...

ghost commented 8 years ago

I think it makes us produce a lot of work for little gain...

But if you think it's better, why not... feel free to do it.

SelrahcD commented 8 years ago

I'm not in favor of creating a system of extensions, Silex's service providers are here for that. Maybe the starter kit can provide several service providers and everyone can choose to use them or not. Opt-in vs opt-out in some sort.