ActiveAdmin VS view_component

Compare ActiveAdmin vs view_component and see what are their differences.

ActiveAdmin

The administration framework for Ruby on Rails applications. (by activeadmin)

view_component

A framework for building reusable, testable & encapsulated view components in Ruby on Rails. (by ViewComponent)
Our great sponsors
  • PopRuby - Clothing and Accessories for Ruby Developers
  • WorkOS - The modern identity platform for B2B SaaS
  • InfluxDB - Power Real-Time Data Analytics at Scale
ActiveAdmin view_component
22 74
9,430 3,127
0.1% 1.1%
9.3 9.0
7 days ago 2 days ago
Ruby Ruby
MIT License MIT License
The number of mentions indicates the total number of mentions that we've tracked plus the number of user suggested alternatives.
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.

ActiveAdmin

Posts with mentions or reviews of ActiveAdmin. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-10-28.
  • Ask HN: Why aren't Django Admin style dashboards popular in other frameworks?
    6 projects | news.ycombinator.com | 28 Oct 2023
    Can you clarify what's the "tremendous value" you're getting out of the Django admin?

    At Heii On-Call https://heiioncall.com/ we are using Active Admin https://activeadmin.info/ for Ruby on Rails, which seems quite similar to the Django admin. In my experience, it's mostly useful as a fairly basic read-only view of what's in the database. In Rails, it's so easy to whip together a custom view that we tend to do that, and the Active Admin is nice to have but I wouldn't say "tremendous value".

  • Top 5 Ruby on Rails Gems
    5 projects | dev.to | 4 Jan 2023
    Github Link : https://github.com/activeadmin/activeadmin
  • View code coverage (active_admin and orther .arb file)
    2 projects | /r/rails | 14 Sep 2022
    for those who know [https://activeadmin.info/](https://activeadmin.info/) it uses a file format [https://github.com/activeadmin/arbre](https://github.com/activeadmin/arbre)
  • Show HN: Build Ruby on Rails apps 10x faster – Avo
    12 projects | news.ycombinator.com | 21 Jun 2022
    Very neat! My first thought was that this was a competitor to https://bullettrain.co/.

    Looking into it a bit more, it seems more aimed at building admin panels than whole apps. I guess it competes against tools like https://activeadmin.info/?

  • From partials to ViewComponents: writing reusable front-end code in Rails
    11 projects | dev.to | 3 Jun 2022
    We briefly considered migrating to a full-grown Rails admin interface, such as ActiveAdmin, RailsAdmin, Administrate or Avo. We especially liked Avo which is built on a very modern stack similar to ours (Tailwind + Hotwire + ViewComponents). In the end, we didn’t go this route as we found some of the options a bit too restrictive (even though Avo is very flexible) and we did not feel like trying to amend it to our needs. For example, Avo renders forms in a 1-field-per-row layout while we wanted something more similar to the Tailwind UI Stacked form layout. Nevertheless, we found a great deal of inspiration in the Avo code and its design principles.
  • Ask HN: Easiest way to build a CRUD app
    19 projects | news.ycombinator.com | 13 Feb 2022
    I second Rails. It's incredibly polished and has really good gems to speed up dev. ActiveAdmin is a great gem if you need to quickly make an admin dashboard. It was useful when I had a small consultancy.

    https://activeadmin.info/

  • Admin Framework for Rails
    10 projects | /r/rails | 10 Nov 2021
    See an example: https://activeadmin.info It provides a fast way to create back office functionality.
    10 projects | /r/rails | 10 Nov 2021
    Until recently, my default Admin was ActiveAdmin library. But I found it a bit challenging onboarding new engineers with Inherited Resources gem. Also, a lot is changed on the frontend side with webpack, and now esbuild. I would like to use TailwindCSS to simplify the development. IMHO, ActiveAdmin legacy makes it way more complicated for customization to a new project.
  • We built an open-source platform (3k stars on GitHub) for building & deploying react based internal tools.
    3 projects | /r/reactjs | 13 Sep 2021
    [1] https://activeadmin.info/
  • Stop Building a General Purpose API to Power Your Own Front End
    2 projects | news.ycombinator.com | 13 Sep 2021
    I can't speak much about Rails, as I've only played with it. But I've used a lot Django in the past.

    Regarding the Django admin (in rails you have ActiveAdmin[1]) think if it just as a glorified database explorer. It is an internal tool for developers, product managers and maybe for your support team. It is in no way thought to be used by end users. Every attempt I've seen to use it as such was a catastrophic failure.

    With Django, if you know plain HTML and CSS, with the tools I've mentioned in the comment you're responding to, you can build almost anything... For example, let's say you need a highly interactive client side table.... you can always just attach a Vue or a React component for it by using Unpoly compilers [2].

    I'd say this stack is less useful the more your app needs to work fully offline... but if you don't have that constraint... I cannot think of anything that can't be built faster and safer.

    [1] https://activeadmin.info/

    [2] https://unpoly.com/up.compiler

view_component

Posts with mentions or reviews of view_component. We have used some of these posts to build our list of alternatives and similar projects. The last one was on 2023-09-01.
  • Things I wish I knew before moving 50K lines of code to React Server Components
    7 projects | news.ycombinator.com | 1 Sep 2023
  • Have you been using ViewComponent. What advantages do you see in it?
    6 projects | /r/rails | 6 May 2023
  • Vanilla Rails view components with partials | Stanko K.R.
    2 projects | /r/ruby | 3 Apr 2023
    I used to do "pure ruby" approach to that -- but basically wound up realizing I was re-inventing github's view_component. Their design goals were similar enough to what I was trying to do, that it made more sense just to use that, rather than try to re-invent it myself.
  • Gnarly Learnings from March 2023
    6 projects | dev.to | 29 Mar 2023
    ViewComponent
  • Os benefícios de componentizar as views do Rails
    2 projects | dev.to | 27 Feb 2023
  • Does anyone kind of miss simpler webpages?
    6 projects | /r/webdev | 5 Feb 2023
    The linked one is my Rails implementation, written for ViewComponent. The official version uses Nunjucks.
  • I QUIT MY JOB
    3 projects | /r/Frontend | 16 Jan 2023
    In short, we migrated to ViewComponentViewComponent, opting for good ole Rails views, which allowed us to simplify the stack while retaining the benefits of the presenter pattern.
  • Rails 7 + Hotwire (Turbo + Stimulus) = Modern web applications
    4 projects | dev.to | 24 Nov 2022
    tl;dr; Let’s understand how we can migrate a scaffold generated by the command ‘bin/rails g scaffold Kit::Product name:string’, to an improved and performative screen. Inserting partial load and DOM manipulation writing a very little code in VanillaJS (“almost” without to write Javascript). Scaffold (Rails 7) Getting Started with Rails (https://guides.rubyonrails.org/getting_started.html#creating-a-new-rails-project-installing-rails) Generating the scaffold (https://guides.rubyonrails.org/command_line.html#bin-rails-generate): Using just one command you will generate all of these files: Model, Migration, Controllers, Routes, Tests, Helpers, and JSON. $ **bin/rails generate scaffold HighScore game:string score:integer** invoke active_record create db/migrate/20190416145729_create_high_scores.rb create app/models/high_score.rb invoke test_unit create test/models/high_score_test.rb create test/fixtures/high_scores.yml invoke resource_route route resources :high_scores invoke scaffold_controller create app/controllers/high_scores_controller.rb invoke erb create app/views/high_scores create app/views/high_scores/index.html.erb create app/views/high_scores/edit.html.erb create app/views/high_scores/show.html.erb create app/views/high_scores/new.html.erb create app/views/high_scores/_form.html.erb invoke test_unit create test/controllers/high_scores_controller_test.rb create test/system/high_scores_test.rb invoke helper create app/helpers/high_scores_helper.rb invoke test_unit invoke jbuilder create app/views/high_scores/index.json.jbuilder create app/views/high_scores/show.json.jbuilder create app/views/high_scores/_high_score.json.jbuilder Enter fullscreen mode Exit fullscreen mode After installing Rails, create your project, and generate your scaffold. Let's try to improve the default interface. I am using the Tailwind to insert styles on the interfaces and the ViewComponent for “creating reusable, testable & encapsulated view components, built to integrate seamlessly with Ruby on Rails”. You could see the resulting code at https://github.com/raphox/rails-7-fullstack. Turbo (heart of Hotwire) Hotwire is an alternative approach to building modern web applications without using much JavaScript by sending HTML instead of JSON over the wire. You can see the unique application’s screen in the following image. Yes, this project has just one screen. Let’s try to be simple to focus on the most important things. In this screen, we have two dynamic areas: List of products Form to create and edit the selected product I created a PR so you can see the exact part of the code that was changed or inserted to use the Hotwire on your project. You can see this PR on https://github.com/raphox/rails-7-fullstack/pull/1. The unique screen on the system has a few triggers to call actions or make requests. Plus button to access the ‘kit/products/new’ page Search input field Products links to access the product’s edit page Buttons to update, remove or create products based on the form’s fields data Using the Turbo, we can override the click event of the plus button to request the HTML of a new product form from the backend and put it in the ‘product_form’ area. You don’t need to write Javascript to override the events on your elements, just insert a new attribute ‘turbo_frame’ on your HTML tag. Like here: We can use the same approach of the plus button in the link of products and prevent reloading the entire screen HTML and assets. Now we need to use a little Javascript to insert the event ‘change’ to request a filtered list of products from the backend. In my code, I insert the ‘turbo_frame’ attribute into the form to change the submit action making the request using Turbo. In the next topic, we can see how to use the Stimulus and Javascript controllers to change the event ‘change’ of the input. Now we will need to submit the form and refresh the list of products. But we can do this better. We know that the updated list has changed on the created/updated product. So, we need to update the list with this product, instead refresh and query all the list of products from the database. To do this we need to use a lot of the Javascript code or a few actions from the Stimulus. You can see about the Javascript controller in the next topic. Stimulus (modest JavaScript framework) You won’t see any difference. But the code savings and ease of integration will help you a lot when inserting new features. The objective here is to insert an event on the search input form to make a request when the user changes the input’s value. When it occurs, the system will make a request to get all products filtered by the ‘name’ column. The result will be inserted into the list after it. To implement the Stimulus in our current project, we need to follow the following steps: 1. Insert the attribute ‘data-controller=”search-list”’ to the wrapper with the form and the list of the products (app/components/search_list_component.html.erb line 1). — This attribute is responsible to relate the following code to the DIV element. Get more info here https://stimulus.hotwired.dev/. — You can use the command ‘./bin/rails generate stimulus controllerName’ to generate the Javascript file with the class definition and import it in the ‘app/javascript/controllers/index.js’ automatically. 2. Insert the attribute ‘data-search_list_target=”inputSearch”’ to the form search field (app/components/search_list_form_component.html.erb line 2). 3. Insert the action (click->search-list#selectItem) to activate the currently selected product (app/components/search_list_item_component.rb lines 20). 4. Insert the attribute ‘search_list_target=”item”’ to each item of the product list (app/components/search_list_item_component.rb lines 21). I am using https://viewcomponent.org/ to define the view components instead to use a view or partial. Pay attention to this part https://viewcomponent.org/#performance. I really liked having this structure in my project: rails-7-fullstack/_list.html.erb at 11a479dafa5c84a1e769721d57792f39914a1204 ·… This approach is very similar to the React components or other Javascript Frameworks. I created a PR where you can see the exact part of the code I changed or inserted to use the Stimulus on my project. You can see this PR on https://github.com/raphox/rails-7-fullstack/pull/2.
  • Are utility classes horrible design or am I dumb?
    5 projects | /r/webdev | 18 Sep 2022
    Rails has view components. GitHub started the pattern years ago in their Rails app.
  • Can anyone recommend good, free component libraries for Tailwind?
    6 projects | /r/tailwindcss | 25 Aug 2022
    In Rails, I personally like to reuse a components and for that I use viewcomponents Gem (https://viewcomponent.org) My erb are still very verbose but I dont dupplicate the HTML.

What are some alternatives?

When comparing ActiveAdmin and view_component you can also consider the following projects:

RailsAdmin - RailsAdmin is a Rails engine that provides an easy-to-use interface for managing your data

Administrate - A Rails engine that helps you put together a super-flexible admin dashboard.

Trestle - A modern, responsive admin framework for Ruby on Rails

Avo - Build Ruby on Rails apps 10x faster

go-admin - A golang framework helps gopher to build a data visualization and admin panel in ten minutes

ActiveScaffold - Save time and headaches, and create a more easily maintainable set of pages, with ActiveScaffold. ActiveScaffold handles all your CRUD (create, read, update, delete) user interface needs, leaving you more time to focus on more challenging (and interesting!) problems.

Forest Admin - 💎 Ruby on Rails agent for Forest Admin to integrate directly to your existing Ruby on Rails backend application.

daisyui - 🌼 🌼 🌼 🌼 🌼  The most popular, free and open-source Tailwind CSS component library

Typus

Godmin - Admin framework for Rails 5+

esbuild-rails - Bundle and transpile JavaScript in Rails with esbuild

Stimulus - A modest JavaScript framework for the HTML you already have