![]() See how inconvenient that is? Wouldn't it be better if this project had all the authentication related files separated from the rest of the application? The blueprints feature of Flask helps achieve a more practical organization that makes it easier to reuse code. ![]() For example, the user authentication portion should work well in other applications, but if you wanted to use that code as it is, you would have to go into several modules and copy/paste the pertinent sections into new files in the new project. One way to clearly see the problem is to consider how you would start a second project by reusing as much as you can from this one. While this is a structure that makes sense for small projects, once a project starts to grow, it tends to make some of these modules really large and messy. There is a module for view functions, another one for web forms, one for errors, one for emails, a directory for HTML templates, and so on. So far, the organization logic that I've been following is based on having modules dedicated to different application functions. Thinking about these three subsystems that I have identified and how they are structured, you can probably notice a pattern.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |