eleweek / WatchPeopleCode

http://WatchPeopleCode.com
MIT License
198 stars 16 forks source link

Why not use blueprint? #5

Closed arthurbarros closed 9 years ago

arthurbarros commented 9 years ago

Is there any (architecture) reason why not use flask-blueprint ? Your app seems pretty large.

Would love to discuss more about it. Thanks in advance

elimohl commented 9 years ago

What are the reasons to use it right now?

arthurbarros commented 9 years ago

In my opnion, because of this:

Em 15/02/2015, às 08:43, Elizaveta Logacheva notifications@github.com escreveu:

What are the reasons to use it right now?

— Reply to this email directly or view it on GitHub.

eleweek commented 9 years ago

Well, in principle, we agree, blueprints are a good thing. But right now there is no advantage for blueprints. Maybe in a couple of weeks we'll add them, so I am going to leave this open.

paked commented 9 years ago

Just gonna throw my opinion into this... I think blueprints should be implemented into the code as soon as the current refractor is over, I've spent a bit of time reading over the code and anything to increase structure and readability should be done soon. There are a lot of people who want to contribute but can't due to the (lack of) organization and documentation, however this might be an entirely separate issue entirely..

arthurbarros commented 9 years ago

@paked +1

eleweek commented 9 years ago

Code complexity and using blueprints are two different things. Flask-related code isn't complicated at all. C'mon a few views + a few models + one form -- how splitting these in three different files would help?

The code that deals with api is complicated, but this is because dealing with 3 kinds of API isn't straightforward. Some refactoring is definitely needed though.

As for documentation, pull requests with documentations will be gladly accepted.

arthurbarros commented 9 years ago

@eleweek totally agree in that point of Blueprints and complexity been different things. But the benefits about "splitting in more views, models and form" is about Single Responsibility Principle, if we are able to split the project into modules, and this modules has a clear responsibility, then everything would be more easy, maintenance and testing.

Thats is just my two cents

eleweek commented 9 years ago

@arthurbarros We split the app into smaller files today, so I'm closing this. For I agree with your point, but I still tend to keep things simple/in one file until project gets big enough.