Try ERPNext Buy Support Partners Foundation

[RFC] New Developer Video Series 2021!

RFC = Request for comments

Here is the new video series we are planning with @Tropicalrambler and his team for learning Frappe Framework - based on the $5000 bounty that was announced on behalf of Frappe.

The goal of the series is to introduce new developers to Frappe development and best practices. We expect the developers to know Python / Flask to start off and at the end of the series, these developers would understand how to build new Frappe apps, including doctypes, scripts, reports, print formats and portal pages. This will be based on the new design.

Topics

  1. Introduction to Frappe Framework and the series (~3-4 mins)
    1. Welcome
    2. What will you expect to learn
    3. Who is this intended for (do the flask tutorial before you join)
    4. Why is Frappe
      1. A full stack framework - battries included
      2. Metadata modeling
      3. Out of the box admin interface
      4. Build complex tools like ERPNext
  2. Setting up Bench
    1. Pre requisites
    2. Installing bench from pip
    3. Starting bench locally
    4. Procfile - all the processes required to run frappe
    5. Create your first site
    6. Set /etc/hosts
    7. site_config.json
    8. Login
  3. Creating an app
    1. Introduction to apps
    2. Create your first app
    3. Explanation of what we are building - a library management system
    4. Folder structure for bench (apps and sites folders)
  4. Creating DocTypes
    1. What is a doctype
    2. Create a new one - add come fields
    3. Show in database
    4. Layouts - section and column breaks
    5. Naming - by series or by name
    6. Explain the commonly used fieldtypes
  5. Linking DocTypes
    1. Link Fields
    2. Show links in dashboard
  6. Creating Tables in DocTypes (parent child)
    1. Create a child table (Library Loan / Library Loan Item)
    2. Add to parent
    3. DocType naming - how parent and child are named, singular, title case
  7. Controllers - Python
    1. Adding validations, business logic
    2. Show the folder structure
    3. Frappe ORM - get_doc, get_value etc.
    4. Document Events - before_insert, validate, on_update, on_submit (introduce the idea of submission)
    5. Debugging (print - shows up on the bench console, frappe.msgprint)
  8. Controllers - JS
    1. Handling change events
    2. Common API
    3. Commit and push (git)
  9. Print Formats
    1. Print Format Builder
    2. Making HTML formats
    3. Standard HTML (commit and push to app)
  10. Reports
    1. Report Builder
    2. Query Reports
    3. Script Reports
    4. Commit and push
  11. Portal Pages
    1. www folder
    2. Building context
    3. Navigtion - Website Settings
    4. Building templates
  12. Extending / Migrating
    1. Hooks
    2. Migrating (patches)

Would love to have your comments, any other topics of interest that we missed out?

14 Likes

Very Nice.
Maybe a little about git and how git plays a roll in the eco-system when developing in Frappe.
Also when building new apps how does it affect upgrades to the core , how to integrate the newly created app into ERPNext.

Thank You For this @rmehta , much appreciated.

Salim

2 Likes

Similarly to @msalim79, I would love to learn more about your debugging workflow. How do you test your code ? Do you have a specific workflow you follow when developing. For instance, using Atom + push to git + pull on site + using bench console + etc.

Otherwise, I am just wondering how is it very different than what is already there in the documentation of https://frappeframework.com/docs. I understand that the format is different (video instead of documentation) but I hope it will bring something new as well in terms of content. I like the idea of a kb (like here) video style.

Thanks @rmehta and @Tropicalrambler for sponsoring and organizing this.

3 Likes

Hi,
Thanks a lot for this initiative @rmehta.
I would like to add below points:

  • Steps how to migrate customization (custom field, custom doctype, custom app, custom report) from dev to test then production
  • Steps How to build new custom report from scratch (like sales invoice, or POS invoice) where jinja2 is used.
  • Barcode label
  • Steps how to customize workflow approvals.
  • How to fix translation locally
  • How to contribute back to ERPNext
  • How to add custom script
  • email settings
  • Integration with external systems

Just show simple cases and not necessarily advanced complicated use cases, hello world is enough, most of the time we don’t know from where to start.

Very important, do not skip any step because trainer will get lost very soon.

Congrats @Tropicalrambler I am using his blogs already and I enjoy a lot.

4 Likes

My two cents on what else should also make it to the list:

  1. Writing custom API - this is useful when wanting to do integration {E.g. Mailchimp etc}
  2. Background Jobs - how to write and use Background Jobs {E.g. Sending automated reports, Pushing data to 3rd Party APIs}
  3. Query Permissions - there were times when I wanted to hide data few rows in a DocType knowing how to use Query Permissions saved the day
  4. Understanding Triggers: Knowing the exact sequence in which triggers will get fired would save time for lot of developers
  5. Where to put the logic? There are scenarios when putting logic in frontend {js files} makes sense at time it makes sense to put it in backend {python files}. Knowing when to use one vs another would help
  6. Attachments: Knowing how to use API to sync attachment between few linked documents can go long way
  7. Roles & Permissions: How to programatically create users & assign roles

Hope this list makes sense.

12 Likes

Hi all,
I would appreciate to see this topics

  • custom app as an extension of ERPNext, integration of custom app with ERPNext
  • exporting customizations to new app, hooks
  • managing changes to ERPNext (what touches core, what not, updating ERPNext with custom apps)
  • maintaining dev/test/prod environments, deploying changes and new apps to prod
  • custom naming, managing naming with custom scripts
  • fetching values accross different doctypes, automatic fetching of values from another doctype for example on create document
  • examples of automatic calculations in dialogs, for example calculate and show margin during quotation creation below item table, or conditional sum (for example show sum of items of specific item category)

Thank you for your effort!

5 Likes

A quick brain-dump of things I stumbled with, when I started learning ERPNext:

  1. When entering Bench commands in the terminal, ensure your current working directory is your instance of Bench.
  2. See item #1
  3. The directory frappe-bench is neither Frappe, nor is it Bench.
  4. Bench is mostly a standalone CLI app. However, about half its commands are actually defined inside the Frappe repo.
  5. Frappe and ERPNext repos are mostly Python-style. However, they are NodeJS too, with related package.json file that installs to node_modules
  6. When you first bench start, you’re just running ERPNext running in a Development mode.
  7. …which is not the same thing as enabling Development Mode = 1 in your JSON configuration file.
  8. Only much later, when you configure for Production, do certain technologies like Nginx, TLS, and gunicorn come into play.
  9. By default, Frappe/ERPNext assumes MariaDB is available on a local Unix socket. Edit your common_site_config.json if that’s not true.
  10. If you want to maintain your own Redis databases, remove the reference to them in Procfile.
  11. The actual git repo code resides in the apps directories. Everything else you see is scaffolding, created when you installed your Bench instance.
  12. See item #1

~Brian

5 Likes

Thanks everyone for the comments. Added debugging to the flow. I think the advanced topics can be part of an advanced tutorial. We can take this up once this one has been completed.

6 Likes

Thanks Rushabh! We are humbled and grateful for allowing us the opportunity to work these topics.

Back in 2016 when I selected ERPNext for our startup, I remember loving the openness of the community and how this would come in handy for learning. Meeting everybody at the conference in 2017 was profound in letting me know that I was not alone in what I perceived a Quixotic adventure.

I have read all posts from @msalim79, @f_deryckel, @nmami, @black_mamba, @martin42, @brian_pond before my reply and noted every request. We will discuss this with Rushabh and prioritize them into a logical structure as Frappe requires for the topics to be included into the queue for creation.

At the time there was sufficient information for us to launch into learning the framework, and I realized that to really leverage the power of ERPNext I would have to learn software development concepts. As my learning progressed, other people and companies started approaching our small team of 3 with the same pain points with their current ERP / POS / Inventory / Sales systems, and thus decided to structure a team to begin helping. Even though it has taken a lot of time 2017-2021, we have been working hard to develop the skills required: Software development in Python / Javascript / HTML / CSS / Vue JS, Git workflows, delegation of tasks and issues. Another skill we figured out was extremely useful was diagramming, and @Martin_Seibert was instrumental in helping empower us with diagrams.net / draw.io.

Our workflow for video creation is (loosely)

  1. Topic scripting
  2. Storyboarding
  3. Slides and graphic elements
  4. Screencasting of the process (large font, keycasting and mouse click visualization)
  5. Editing
  6. Narration (noise reduced, almost-studio-quality and best possible pronunciation and language)

Since I (try to) have a hardcore open source stance, we are working with the following choices of software:
ERPNext Text editor for Topic scripting - text, bullet points, etc.
Textmate - text editing
Storyboarder - storyboards
drawio - slides
Shotcut - video editing
Blender - video editing and some compositing
Audacity - narrations and audio editing
VLC - Playback and review

Again, many thanks for the opportunity and feedback.

12 Likes

good luck, when expected to play first episode?

6 to 8 weeks

:rofl:

5 Likes

Let us know if you’d like any feedback with editing.

Thanks, we appreciate feedback, and since the project will have all the source files properly indexed, any corrections can be made relatively easy with community feedback.

What about custom desk pages with some Vuejs

2 Likes

Hi,
One important point, if you can include at the end how to read js code and py code for a complex report and a complex doctype, know reading existing code is an endless knowledge source.
Thx
Nofal

  1. Deployment for production which would include gunicorn, werkzeug, letsencrypt ssl, security hardening using firewall and defending Frappe against threats like DDos.
  2. Debugging setup using VS Code remote ssh.
  3. Containerization using kubernetes or docker.
  4. Use of Redis.
  5. MariaDB topics - Replication, encryption.
6 Likes

I myself would love that too.

I still can’t debug.

FWIW … considering the diversity and amount of effort this takes (it is a lot!), if participants here could do their own versions of recordings of the problems and solutions they are aware of under free as in free beer terms, it might help support the cause and also potentially help give ideas and support to this sponsored route.

I would be happy to rework and iterate (and hopefully improve!) on any content generated that is simple enough to be comprehended by my limited skills.

3 Likes

Thanks, let’s keep this thread ongoing for input as videos roll out! :muscle:t3:

1 Like