Flask-Navigation
Flask-Nav owes a some good core ideas to Flask-Navigation, which is about a
year older and the first place the author looked before deciding to write
Flask-Nav. In defense of the reimplementation (opposed to just submitting
patches for Flask-Navigation) , here are some key differences:
- Flask-Navigation rolls all element types into a single
Item
class,
which serves as label, view and link element. This makes it a little hard
to extend.
- The HTML generation in Flask-Navigation is done inside the package itself,
while Flask-Nav uses a more complete, external solution.
- Navigational structure creation and rendering are separate in Flask-Nav
(see
Renderer
). This allows for more than one way of
rendering the same navbar, allowing other packages (such as Flask-Bootstrap,
see below) to supply renderers as well.
- Some technical choices were deemed a little strange and have been avoided
(BoundTypeProperty).
- While Flask-Navigation uses signals and hooks to regenerate navigation bars
on every request, Flask-Nav achieves dynamic behaviour by lazily
instantiating naviigation bars when they are needed and at the last
possible moment.