Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Could you explain the architecture #1

Open
andybak opened this issue Nov 21, 2016 · 2 comments
Open

Could you explain the architecture #1

andybak opened this issue Nov 21, 2016 · 2 comments

Comments

@andybak
Copy link

andybak commented Nov 21, 2016

This is a Django derivative project, using Flask as webserver,

I had a brief look around the code and it's obvious this is far from being a normal Django application. It would be really useful to understand your thinking on this front - and to get a sense of the architecture - especially how hard this would be to integrate into other Django projects (or how hard it would be to intergrate other Django apps into Orun)

@katrid
Copy link
Owner

katrid commented Nov 21, 2016

Sorry about that, the project status is still alpha/development.

About your question, the answer is:
The orun focus is not to keep compatibility with regular django apps/projects. Although you can easily manifest an Orun addon module adding the Addon class on the init.py package file.
It will be well covered in future documentations

Let me try to synthesize the project goal in a few topics:

  1. I need a business framework for Dashboard/ERP/CRM development (like openerp/odoo)
  2. It must be a decent, powerful and modern framework (like django and unlike openerp/odoo)

Django and OpenERP comparison
Django pros and cons:

  • Amazing ORM
  • Amazing Migration System
  • Awesome Check System
  • Full internationalization support
  • Poor Model and Module extensibility support (required for modular development)
  • Poor multiple database support (1 database per client with different installed modules for example)
  • Admin Framework is insufficient for end user business application development

OpenERP pros and cons:

  • Modular (Module Oriented with a pluggable system)
  • Model and Module extensibility
  • Good Model inheritance idea
  • Ready to use UI and API access (nice API definition idea)
  • Poor ORM
  • Internationalization support
  • Limited to postgrsql database
  • Many no sense standards, functions and classes (None and DB Null as False????)
  • Poor test framework
  • Poor web development support (views and static resources)
  • Ugly code style, non observance of Style Guide for Python Code (trivial)

Why Flask?
Basically, Django web server is monolithic while Flask framework is more dynamic and has the context request, that's the solution for the contextual environment requests and blocks:

with app.app_context(LANGUAGE_CODE='pt-br'):
    do_something_using_the_pt_br_lang()

Why do I need the model extensibility inheritance?
Try to think if you have 2 modules extending a model on the Base module, for example:


# module A
class Person(base.Contact):
    pet_name = models.CharField()


# module B
class Salesman(base.Contact):
    num_of_sales = models.IntegerField()

In the above code statement, we're extending the Base module Contact model, adding pet_name and num_of_sales columns.

Orun goal, main features:

  • Module Oriented (based on Flask Blueprints)
  • Model and Module extensibility and inheritance
  • Dynamic web application and views (Flask)
  • Powerful ORM (Django)
  • Internationalization (Django)
  • Cache (Django)
  • Check System (Django)
  • Auth/Permission System (inspired on openerp)
  • Actions Based Interface (inspired on openerp)
  • UI views inheritance (using xpath inspired on openerp)
  • Python DB-API support (Django database backend drivers)
  • Full multiple database support (Modules installation per database)
  • Easy to write UI and API communication
  • Jinja2 Templates
  • Test Framework (Django)
  • Extensible client-side application (using katrid framework)
  • Client-side component writing support (angularjs)
  • Advanced fixtures (menu, actions, views and data objects)

Feel free to make more questions, I would be happy to answer

@phamducthinhdev
Copy link

You can write docx project installation guide

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

No branches or pull requests

3 participants