Admin interfaces

In Django and Rails

Types of interfaces

  • End user ones (Shiniest ones)
  • Admin user ones (For configuration)
  • Support / Monitor 
  • API (For developers)

Which of these interfaces can be generated ?

Enter admin interfaces

  • They are CRUD in nature
  • Generated, not coded
  • Usually divided into "report" and "form" interfaces

What I compare them by:

  • What comes out of the box
  • What comes from plugins
  • Configuration Functionality
  • Configuration Apperance
  • Can reports be exported
  • Permission support

What I don't compare them by:

  • Ease of set up
  • Performance

Django

  • Forms out of the box
  • Reports from plugins
  • User/Groups support out of the box
  • Export as
  • Configuration Functionality
  • Configuration Apperance

Django

 

{% block branding %}
<h1 id="site-name"><a href="{% url 'admin:index' %}">Polls Administration</a></h1>
{% endblock %}

You can freely change the templates: 

Django

Descriptors for the fields:

class QuestionAdmin(admin.ModelAdmin):
    fieldsets = [
        (None,               {'fields': ['question_text']}),
        ('Date information', {'fields': ['pub_date'], 'classes': ['collapse']}),
    ]
    inlines = [ChoiceInline]

admin.site.register(Question, QuestionAdmin)

RoR

  • Nothing out of the box
  • Reports and forms from plugins
  • Use/Groups support from plugins

Active Admin

  <%= f.inputs :name => "Author", :for => :author do |author_form| %>
      <%= author_form.input :first_name %>
      <%= author_form.input :last_name %>
    <% end %>

RoR templating plugin

ActiveAdmin.register Author do
  show do
    panel "Table of Contents" do
      table_for book.chapters do
        column :first_name
        column :last_name
      end
    end
    active_admin_comments
  end

Templating:

Active Admin

  <%= f.inputs :name => "Author", :for => :author do |author_form| %>
      <%= author_form.input :first_name %>
      <%= author_form.input :last_name %>
    <% end %>

RoR templating plugin

ActiveAdmin.register Author do
  show do
    panel "Table of Contents" do
      table_for book.chapters do
        column :first_name
        column :last_name
      end
    end
    active_admin_comments
  end

Templating:

Conclusions

  • In either you can get the same results
  • In general they are very easy to use
  • So, use them!

External links

  • https://www.djangopackages.com/packages/p/django-report-builder/

Questions?

Made with Slides.com