We are currently building our event management platform at a company i work for, The authentication service is being built with ASP.NET identity framework.
The main event management platform is built in Django using python, which i have built.
We are also planning on building a custom admin portal in ASP.NET MVC,
which will manage users and event data.
The problem is that the C# guys(Who are contractors albeit very experienced developers) want to build out the API using ASP.NET for the event app which is built in django, using the Database first model that .NET provides, thus the database migrations will be handled by Django, but the actual API will be built using ASP.NETS Web API, directly from the database.
This approach does not seem to make much sense in my opinion as it would make a lot more sense to build out the the API using Django rest framework and manage the database migrations for the event app. Instead of tightly coupling the database with Web API.
Either way both approaches are are effectively doing the same thing, but i don't think it's efficient to constantly manage two environments, migrations in one environment and api management in the other, this does not allow for flexibility.
What are the potential disadvantages of the WEB API approach.
Related
I am trying to access one Django Project Database value from another Django Project. So far I have tried making REST API on both the applications and it is working somewhat well on the local server. However, I am concerned that when I will be deploying both the projects on the server it will create some lag to access over the API. Moreover, if one server/application is down for maintenance, the other will be inaccessible.
Is it possible to directly access the other app database without using API as it will be much more faster and reliable?
Thanks.
I am currently interesting in web development using python language, but evertime I'm searching for reference, we only given two frameworks option between Django and flask. Can we just develop web app without using any of those framework
Yes, you can build a web-app using no framework. However it will require you writing a large amount of boiler plate code to send, receive, and parse HTTP data. It is generally highly recommended that you use a framework in order to save yourself a large amount of time and effort, and to ensure the product that you build is good quality.
You will also struggle to find resources on building a web-app without a framework, while there are a wealth of resources available for working with existing frameworks.
I am to develop an app, and I have to choose between Ruby on Rails or Python+Django. So far I want to do it with Ruby on Rails, because i feel more comfortable doing what I have to do on it.
But there is a problem. There would be a client app written on Python that has to communicate with mine. Cause that app should be able to communicate with mine.
First: I think if it is a matter of communicating with the MySQL database there wouldn't be an issue, cause the Python app is able to query to MySQL server with proper authentication right?
Second: and more important question: If I have a Ruby written API, to ease the queries, Could the Python app be able to invoke functions in that API and get the results? If it is possible, How could I achieve that?
Ruby on Rails 5 supports API only app, if you are using this app for APIs only, else just create a normal app and expose API endpoints that render json outputs. Use Active Record for mapping your MySql database and jbuilder for json views (both of which are available by default when you create new app). You will find lots of tutorials if you google Use Ruby on Rails as API app.
Good luck with it.. :)
Which of these would you pick for a B2B app (targeting small/med-small businesses) built on GAE with python:
Google Accounts
Custom Users with Django
Custom Users with Web2Py
I'm very tempted to go the Google Accounts route as it's very well integrated into GAE and takes care of everything from user creation to session authentication, and even takes care of forgotten passwords. However, I'm sure there are significant drawbacks to this, including usability, but if you are starting from scratch, which approach would you pick and why?
I started with Google account, added all OpenID and quickly found that the only accounts people use for my site are google and facebook accounts. So now I only have login with google and login with facebook. But I'm going to add my own accounts and I'm doing it with webapp2 instead of django and instead of web2py. I tried web2py but webapp2 and its auth model seem much better and not like with web2py a lot of unnecessary code that is not for app engine.
Try this and its auth model (there is example code from http://code.google.com/p/webapp-improved/issues/detail?id=20) and I hope it will work for you.
Google Accounts forces users to have Google Apps or Gmail accounts. Some customers might not like this.
Rolling your own is an (unnecessary) burden: you have to have sign up process (with captcha and/or 3rd party email confirmation), keep all user records, handle the security, etc..
I'd suggest you go with OpenID: http://code.google.com/appengine/docs/python/users/overview.html#Authentication_Options
Why both Create Django user from Google users. you will be able to adapt your system user with other system next
I've understood that question was only on authentication after I've written this so most of things here are offtopic, but I just wanted to demotivate on using full-stack solutions like django or web2py in appengine.
I can tell you something about django because I've used it for over a year and I do like it for certain types of websites. It was first framework which I've tried to use on appengine and I've dropped it after two weeks.
These are things in django which doesn't work or make no sense in appengine:
django models and orm: designed for sql; appengine sdk has its own models.
django admin site: is designed for sql databases, doesn't work on appengine
auto-forms from models: designed for django models
django management commands: none of commands which come with django is useful when working with appengine SDK.
django development server: appengine sdk has its own development server, django's one does not work.
django "plugable apps" architecture: at least in my practice it was useless on appengine.
static files collector: great tool to collect static files from various reusable applications into one folder, only if you have many reusable applications.
There exists django-nonrel project which says it can run django with admin site on appengine. It can, with half of things working and a lot of bugs. You spend more time trying to fix what does not work than building things.
What might be useful from django framework:
django forms: can be exchanged for a better library WTForms
django url routing: can use Werkzeug instead
django request/response objects and HTTP exceptions: can use Werkzeug instead
django pretty-printing exceptions: Werkzeug does it better, it adds a web debugger.
django i18n and localization: can be changed with babel
django templates: jinja2 is similar and a lot faster, which is important because appengine is an expensive platform. ctypes module is required to debug errors in jinja templates, however ctypes is forbidden on appengine, but on development server it does work, for debugging you don't need more.
Actually Jinja2, Werkzeug, WTForms and babel are so cool, that there exists projects for each of them which integrates them with django.
I know two frameworks which use these libraries:
kay-framework: made for appengine, a bit outdated, but a great example how you can use Jinja2, babel and Werkzeug on appengine.
flask from Armin Ronacher, the man behind Werkzeug and Jinja2.
I've not used web2py, however since it is also a full-stack framework like django is, I think it will be as bad as django is. Full-stack solutions simply do not fit in this different environment. Simple libraries fit in any environment.
I need to develop a web application with the following requirements:
Desktop like UI on the client side
Application deployment
Scalability (i.e. distributing the service on multiple servers)
What I thought of so far (as I love Python but haven't done much web development yet):
Django
Fabric (think I've read somewhere it's suited for this)
What I'm missing is:
How to create rich clients (probably need some javascript libraries for that)?
How to distribute the service?
For RIA you need to use some client technology in your templates.
See at Dojo or ExtJs.
ExtJs docs have example of Web Desktop app, but this library is not free for commercial project. I like more Dojo, and it is free.
Rich Internet Application: Javascript to do stuff asynchronously (AJAX). If you want a desktop-like interface on the web, it seems currently CoffeeScript is the way to go. It's a language that compiles into Javascript and adapted for rich interfaces.
Deployment: fabric (I think it's used to deploy Python apps).
Distribution: you deploy the code to one server.If you need to scale it up, you just need some additional servers (of course if you have specific usages like very high load on a database, you'll also need to add more database servers etc. But you get the idea).
using web browser as your client platform?