Create custom plugin

108 views
Skip to first unread message

mohamedhu...@gmail.com

unread,
Aug 19, 2019, 11:28:44 AM8/19/19
to AtoM Users
Hello.
I need help about availability create plugin and custom fields.

Dan Gillean

unread,
Aug 19, 2019, 11:59:09 AM8/19/19
to ICA-AtoM Users
Hi Mohamed, 

First, some thoughts on adding custom fields for consideration: 

We regularly get users asking us about adding custom, non-standardized fields to AtoM templates. However, in general we highly recommend not adding custom fields to AtoM.  From our experience we believe using custom fields is a risk to the long term maintenance of your descriptive data.  We have done many data migrations to AtoM from legacy systems that allow the addition of custom fields and we've found custom fields are generally:
  1. Inconsistently used. Because they are not standards-based fields and there is usually no strong guidelines about how to use the custom fields, the fields are used in different ways by different users. Often a custom field is introduced by one member of an institution, is only used by that member, and then its use is abandoned after that member leaves the institution.
  2. Filled with inconsistent data. Once again, because there are usually no clear guidelines about what data should go in the field, custom fields often contain inconsistent types of data.  This makes mapping the data to a new descriptive system very difficult.
  3. Difficult to export.  Adding a custom field for AtoM does not automatically add that field to the export templates (EAD XML, DC XML, MODS XML, CSV, etc) so unless custom development work is done to allow export of this custom data, it is effectively trapped in AtoM. Depending on the nature of your custom field, there may be no good mapping to an existing metadata standard that will allow you to export your data in a way that could be recognized and imported into another system at a future date.
  4. Difficult to maintain. Artefactual, and by extension the AtoM project, is committed to standards-based description and access - AtoM was originally developed with support from the International Council on Archives, and its goal was to make standards-based description and access more easily achievable by small and medium-sized institutions without the resources for a proprietary solution. We remain committed to this vision of the application, and will not be accepting custom modifications of templates in the public project. This means that it will be up to your institution to maintain your custom fields over time - meaning you will likely need to have developers available every time you want to upgrade the application to the newest public release, to resolve conflicts, fix bugs, and successfully re-merge your customizations into your local instance. Many institutions do not have the resources to support this level of ongoing maintenance, which can leave you stuck on a legacy version of the application.
We strongly believe that using open source software and descriptive standards are the best thing you can do for long term continuity of your institutional data.  Your descriptive metadata represents a significant investment of time and effort on the part of your institution. We urge all our AtoM users to protect that investment by making sure you have a plan to get your data out of AtoM if necessary.  We'd love you to use AtoM forever, but the reality is that your institution will probably outlast AtoM in its current form. :)

That said, the application is open source, and we do encourage users to study, modify, and develop against the code as needed so the application can do what you need it to do! Below, I'll share some initial resources. 

General AtoM development resources

We do maintain some basic development resources - you'll find some initial ones here:
You will find an overview of the elements that make up AtoM, and a tour of the AtoM code, in the following resources:
AtoM was originally developed using the Symfony 1.x framework, and the Propel 1.x ORM. You might want to familiarize yourself with Symfony before beginning:
AtoM also currently uses Elasticsearch 5.6 (in 2.5.0 and later versions - if you are developing new features we strongly recommend you work against our qa/2.6.x development branch) for its search index, Twitter Bootstrap 2.3.2 for theming, and several other libraries. MySQL (currently v5.7) is used for data storage. We keep all our code in a git repository, so being comfortable with git or other distributed version control systems will also help you. There are a lot of resources out there on all of these!

We maintain a Vagrant boxand a Docker environment that can be used for local development - see:

Vagrant:
We also have a slide deck that introduces developers to major feature development, here:
In terms of understanding AtoM's database and working with SQL, we keep copies of Entity Relationship Diagrams for AtoM's database on the wiki here:
And we have a slide deck that introduces users to performing SQL queries against an AtoM database here:
In terms of working with the Symfony 1.x framework, we recommend that developers adding features to AtoM follow Symfony's plugin development model whenever possible. Most of the existing modules in AtoM have been built as plugins - developing this way makes them easier to maintain in the long-term. Here are some of the best Symfony 1.x resources on Plugin development:
There is also a Symfony plugins page that lists "1458 symfony plugins developed by 609 contributors." These are generally not anything to do with AtoM, but they can be a great reference, to see how others using Symfony have developed their plugins for other projects. See:
For reference all of AtoM's current plugins can be studied here:
For custom theme plugins, I've previously shared a good outline of how the plugins are organized, here: 
You can also find some other good threads in the forum by searching. For example, see everything tagged with the label "Development":
In this older thread, our lead AtoM developer offer some suggestions and examples to a user who wants to create a new plugin by copying and adapting an existing one:
I strongly recommend that you start by looking for existing plugins, methods, functions, and actions in AtoM's code that can do what you want, and studying how they are implemented so you can reuse them whenever possible! Good luck!

Regards, 

Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory


On Mon, Aug 19, 2019 at 11:28 AM <mohamedhu...@gmail.com> wrote:
Hello.
I need help about availability create plugin and custom fields.

--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/ica-atom-users/2a19189b-e11a-426e-b440-91a26adcdcf4%40googlegroups.com.

mohamedhu...@gmail.com

unread,
Aug 27, 2019, 10:00:25 AM8/27/19
to AtoM Users
Hi Dan
Thanks for your reply
I have one question. Whene do modified isad plugin and custmized it and other plugins related, after any updates in present will conflict at my modifies?

Dan Gillean

unread,
Aug 27, 2019, 11:02:15 AM8/27/19
to ICA-AtoM Users
Hi Mohamed, 

I think I understand what you are asking, but if not I apologize - please clarify your question and I will ask one of our developers to respond. 

When you first create a new plugin, you must register it in Symfony for it to be understood and enabled. When doing so, you need to give the plugin a unique name - this will prevent it from conflicting with your existing AtoM plugins. 

You might find slides 19-25 helpful in the following slide deck: 
I would also recommend that you study how the RAD plugin is designed. It reuses many database fields and methods from ISAD(G) but also extends them and adds new properties. See: 
Also, this thread I shared previously may give you some ideas - enabling Debug mode for example can really help you troubleshoot issues during development!


Dan Gillean, MAS, MLIS
AtoM Program Manager
Artefactual Systems, Inc.
604-527-2056
@accesstomemory

--
You received this message because you are subscribed to the Google Groups "AtoM Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ica-atom-user...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages