Skip to content

Conversation

@dg
Copy link
Member

@dg dg commented Mar 11, 2014

All DI extensions, Tracy panels and Latte macros moved to Nette\Briges.

In fact, I am not sure this directory structure is OK. Should it be Nette\Bridges\DI\NetteExtension.php Nette\Bridges\DI\Nette\Extension.php or Nette\Bridges\Nette\DI\Extension.php?

@dg
Copy link
Member Author

dg commented Mar 11, 2014

UIMacros will be splitted into BlockMacros (in Latte) and UIMacros (in Bridges).

@mishak87
Copy link
Contributor

I would keep current namespace of Nette DI extensions and only replaced references to various bridges. Since DI is not actual bridge but configuration of various settings (including databases) and I expect that Tracy will still be fundamental requirement for Nette at least couple of months.

About separation to modules/libraries generally
It should be done via extension interfaces (Nette\Database\DI\IDatabaseLoggerProvider) using nette/bridge-tracy package for implementation of such interfaces (for logging database queries, application errors, DI etc) and mapping them to Tracy (ideally by using interfaces Nette\Bridges\Tracy\DI\IPanelProvider). So when anyone who wants to add panel can use Tracy API directly or via Nettes bridge to avoid the hard work. I hope it makes some sense.

IMO I am not sure about name Bridges but nothing sounds to me way better (Adapters, Connectors). For mine style of separation Adapters would be more fitting name.

@f3l1x
Copy link
Member

f3l1x commented Mar 12, 2014

O vote for Nette\Bridges\DI\Extension.php

@hrach
Copy link
Contributor

hrach commented Mar 12, 2014

Well, the best way is to maintain only own namespaces a do not make options to use them when the other classes will be in the different repositories. So, the best should be

  • Nette\Bridges\DI\FrameworkExtension.php
  • Nette\Bridges\DI\DatabaseExtension.php, ...

@dg
Copy link
Member Author

dg commented Mar 12, 2014

@hrach sry, I do not understand

@hrach
Copy link
Contributor

hrach commented Mar 12, 2014

CS version:
Nejlepsi bude pouzit jako hlavni svuj jmenny prostor, a nedavat ostatnim moznost ho pouzivat, protoze stejne jejich bridge tridy budou v jinem repozitary.

  • Nette*** - doufam, ze snad jasne vede, ze nici doplnek by do toho neml cmarat.
  • Bridges\DI*** ale uz me tak nevzuruje, abych do nej necommitoval vlastni veci.

@milo
Copy link
Member

milo commented Mar 12, 2014

Is bad idea move all bridges out of Nette directory?

Nette/
bridges/
    Nette/
        DI/
    Tracy/
client-side/
tests/

@dg
Copy link
Member Author

dg commented Mar 12, 2014

Oh shit… vypadlo mi Nette\ v prvním příspěvku, mea culpa, pochopitelně všechno to bude v Nette\Bridges

@matej21
Copy link
Contributor

matej21 commented Mar 12, 2014

@milo I think it should follow psr-0

@milo
Copy link
Member

milo commented Mar 12, 2014

@dg OK
The Nette\Bridges\DI\NetteExtension.php structure is fine for me. And about Tracy panels... is the last directory needed? Following seems to me simplier:

Nette/
    Tracy/
        templates/
                DatabaseConnectionPanel.panel.phtml
                DatabaseConnectionPanel.bar.phtml
                ...
        DatabaseConnectionPanel.php
        DIContainerPanel.php
        SessionPanel.php
        UserPanel.php

dg added a commit that referenced this pull request Mar 12, 2014
@dg dg merged commit 10ecf1e into nette:master Mar 12, 2014
@dg dg deleted the pull-bridges branch August 11, 2015 08:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants