A client wants to have a simple intranet application to manage his process. He runs a query and wishes to track number of loads delivered per day and associated activities.
Since I knew about Django's excellent Admin interface, I figured I could define the "Schema" in models.py and have Django Admin generate the forms.
I did exactly that and the result is not bad at all. I've been able to customize the look and feel to suit the client's taste.
Some questions:
Is Django Admin the right choice for such a use-case?
Will I run to problems in the future due to flexibility of the framework?
Is there a better framework out there specifically designed for this use-case (general Database management for small businesses)? I prefer ones written in Python since I can hack it up to customize.
Thanks!
In my personal experience, Django is a good choice for just being able to have a nice-looking UI on top of a database.
There is a chance you could run into flexibility issues trying to customize the admin interface... however, using Django's ModelForms and Templates - it is easy to create your own CRUD application - if you can't do what you need in the admin interface.
As far as Python frameworks go, I personally prefer Django over Turbogears or Pylons (which I believe also have admin interfaces) because it seems much simpler to get installed, setup and running.
Again, that is just my personal preference. ymmv.
I've been tempted to do something similar, and the answer is that in general, you don't want to hack the admin interface, because that's not it's purpose, and sooner or later you'll run into some flexibility issues.
Check my Q: How to implement a client admin in Django?
Having said so, I'd stick with django.
Related
TL;DR: Does strapi require me to model my database schema inside its admin panel?
Or is there a way I can use a database that I created its tables (but didn't populate it yet), populate it then and generate APIs for use in my front-end?
I understand this may be a general misunderstanding on my part as far as and I may have gotten on this framework for the wrong reasons - but I'd like to understand why so I can avoid making such decisions later on and have some better fundamentals for choosing my tooling.
My goal - I'm creating an eCommerce website for an extremely small artisan's shop that cannot afford anything but stuff like free AWS tiers at the moment. The end goal is a website for a few products with credit card payment, a database, and reasonably safe authentication, and I want it to be simple enough so that I can eventually scale it if it grows. I want to understand this project very intimately and really get to know my tooling.
What I tried vs my needs - my stack currently consists of react+next on the front-end, and strapi with postgresql for the back-end. I then took to the PostgreSQL docs (and my undergrad's database notes) and tried my hand at designing a database schema based on my app's use cases. However, I believed strapi would work with a traditional database modeled in a bare bones way. What I see now is that the only option from the docs is modeling it from scratch through its admin panel. I'd like to really understand out how I'm supposed to work with something I modeled elsewhere - how it all connects. I'd really appreciate any help. I hope this question is not too broad but I'm hoping it'll clear up some huge misconception I have!
I'm designing an app which needs to have some collaboration functionality. So 1 to many users can edit certain attributes of an event they plan together. e.g. the main-admin can change the title, picture etc. while all admin-users could change the date for example.
I would like to get some ideas how one would approach this in the modern world. Are there fancy frameworks etc.
Q: Is the best way storing it centraly on some server or would some peer to peer data storage work?
Q: My gut-feeling is that a web-application would probably be the easiest way, where people work on the object stored on the server instead of trying to sync a local copy with some central repository.
Is this correct?
Q: Are there mobile frameworks which could do the syncing, locking etc for me?
Thank you for some hints and suggestions. I know the questions are a bit broad, but I'm looking for directions not finished solutions. Thank you.
Kind regards
Fred
Some thoughts:
1a) There is no "best" way without a metric for better/best. But yes, having a server is almost certainly simpler, which is probably part of 'best' for most of us.
1b) Actually, there is always a server. Even p2p systems have clients and servers, it's just that every node is both a server and a client.
2) Yes, a web app would certain give you a lot of plumbing for free, & would probably be fastest/cheapest route to a working app. An alternative would be an olde worlde client/server database. A shinier approach might be mobile apps which use a webservice to communicate with a central server.
3) databases do that. But actually, if you use a web app it's probably not hard.
Analogies:
Apart from web apps, version control systems do exactly what you've
just described. they even do offline editting and subsequent merging.
Straightforward CRUD applications against a database also do what
you've just described.
But perhaps I'm under-estimating what you mean by collaboration?
firstly I apologise if this is a ridiculously simple question to answer but it has been bothering me for a while.
I am trying to understand what salesforce actually is, I mean in technical terms. I have read the websites documentation and the wikipedia page but I am trying to understand what's behind all this fluffy terminology.
My understanding is that salesforce is a cloud based database which stores a very high volume of information and all salesforce apps consists of scripts that query this database and model them in different ways depending on the intended application, is this correct?
Thanks !
Software as a Service (SaaS)
To get program you need to download it, install, configure and so on. If your system have a lot of users it's very hard to configure ans support single user installation.
Imagine that you improved application, new release for example. You need update every instance.
With SaaS model you have a shared web application, that do the same thing as old downloadable one. But it's much easier to support it, because ideally there is just one instance of it.
Salesforce is a company that provides its own system by SaaS model, but not only. It is also a platform for developing new applications.
I am going to be creating a work order system with three roles
The "client" - The client can request projects to be completed by the worker. The project must be selected from a list of templates and various sub options all referred to as a campaign (campaign types come and go throughout the year)
The worker - The worker must be able to view work orders and mark them as accepted/rejected, work in progress and completed.
The overlord - He/She needs to see stats concerning the activity of the other two types of users.
So.
This is a web app. But a very simple one in terms of logic. Could something like drupal handle this? Or would I have to write my own modules? The other out of the box aspects of drupal make it attractive (admin, user creation, news feeds, etc...)
I have looked at Views and Webforms. Views seems great for querying and displaying data from the work order database (great for a portion of all three roles), but I am not clear as to how I interface with my work order database when creating and modifying work orders.
Webforms doesn't see to be the answer, I am sure I just missing something right under my nose.
Any hints in which direction to look would be great!
Thanks.
If you use a simpler, less powerful CMS, you may save time with the learning curve but lose time struggling with a less flexible framework. Also: Check how active the developer community is when evaluating Open Source software. You'll need support.
Views and Webforms may be tools that you'll end up using but what you're really talking about is work flow. You could build your own work flow with a combination CCK and views, yes. There are also work flow modules.
Are you and IRC user? See: http://drupal.org/irc
I am pretty certain that you can do this with drupal. I would suggest looking into using an easier CMS than drupal for something simple like this. Using something like MediaWiki for this application might be quicker to develop and have less of a learning curve. If you don't mind putting in the time to learn drupal, I think you will ultimately have more freedom.
First of all, don't underestimate Drupal's learning curve. Especially if your PHP and/or programming skills are relatively new. Drupal does a lot of things in it's own way, and it's good to know that way.
Secondly, Drupal is (imho) made first of all for outward facing sites, it can have a lot of stuff just for the users and not for the public, but a lot of its functionality is made for the CMS part of the system. You might consider using a more framework-style system like Zend Framework, which components are a bit more "loose" but also offers less functionality out of the box.
Thirdly, depending on what a work order is and how it should be treated a custom module could be needed. If a workorder has a really simple datamodel, it could probably be done without programming, but if it is complex you'll have to fire up your favorite editor. Don't worry, making a module sounds scarier than it really is.
I don't know how good your knowledge of drupal is, but to me this has CCK and Views2 and user roles written all over it.
Basically, use CCK to create your content types (remember the user reference field might come in handy to assign a node/record to a particular user)
Then create views for each user group (they could be shared, as you can assign them to more than one role type)
Creating a view where you filter the cck user reference field by the user looking at the screen may also come in handy here.
OKAY, there might be a little bit more to it than that, but what you want is doable.
UPDATE: To protect your site from unwanted eyes, check out the site security module as it puts a security wrapper around all of your website.
Views - Create lists - allow access by user roles
CCK - Define your own content types (add your own fields)
I've created unmaintainable websites using PHP because it was so easy to do things quick and dirty. I don't want to do the same thing with Python/Django on Google's appengine.
Is there any good architecture references for creating websites using Django and appengine? (E.g. where to put business logic, where to put data access logic, how to cleanly separate the views, how to do unit testing, etc.)
Django by its nature will make it harder to put things in the wrong places. That is one of the cool things about the new generation of MVC frameworks, you have to work at it to create a ball of mud.
If you decide to not use Django, these hints from Werkzeug team might be interesting. This application structure takes what's best from Django but gives you complete freedom over actual layout (no need to have models.py even if you do not have any model in application...).
As already mentioned, by choosing Django, you have already taken a big step in avoiding spaghetti. Django provides you with an MVC framework (Model Template View to be Django specific). Thus, your job now is to study and properly follow the MVC design pattern which Django is guiding you with. Where you place your business logic will depend on your specific application and requirements. In some cases, some business logic is placed closer to the data in the models, and in other times its placed in the controller. Furthermore, GAE doesn't require Django and in some cases GAE's webapp framework should suffice.