Giter Club home page Giter Club logo

vuejs-python's Introduction

Vuejs-Python

This project aims to create various examples showing how to work with vuejs and python based technologies. As vuejs may be integrated in different ways, with different advantages for each approach, having these examples are ideal for the brave-of-heart.

flask-vue

## quickstart

docker-compose -f docker-compose.yml -f docker-compose-dev.yml up

flask-vue is the first project made. It shows how to use flask and vuejs to build a non-SPA (single page application). This approach is more appropriate for those with little experience using js/node build tools like webpack and browserify. You'll mostly have to handle python and js code. Another important advantage is that most flask "resources" will still work out-of-the-box, like debug toolbar and csrf protection.

A disvantage for this approach is that it is much less flexible, integrates poorly with other javascript libraries, less performatic, has cache invalidation issues and is not appropriate for larger projects. Depending of how you implement the frontend, you may also see some flickering.

So, how does the flask-vue was built? Basically you have a flask application with support to schemas that loads your vue framework in the index.html page, mounts your Vue element, queries a endpoint and builds your view. Even though this approach produces flickering, it is quite simple to implement. Let's focus on a few highlights:

  • The javascript is generated by webassets, which converts the coffee files on access. Quite convenient.
  • Marshmallow is used for serialization, as it is capable of loading requests into python objects/sqlalchemy objects and serialize them back.
  • Ajax requests are treated by plain views, with exception to the rest api, which is handle by a custom Resource class, which provides a rest api interface.

Be warned that there are a few broken links here and there AND pagination is not implemented visually.

vuejs-python's People

Contributors

almavizca avatar italomaia avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.