Coding for beginners¶
What to learn?¶
The Developer Manual is divided into three major sections (scripts, plugins, or API client) depending on what you want to do with SeaTable. Your development requirements will naturally vary based on your intended project. Below is an outline of the skills you might need:
Scripts inside SeaTable can only be written with either JavaScript or Python. Therefore you will only require one of these programming languages.
The development of a custom plugin for your own SeaTable Server requires profound knowledge of JavaScript and React.
Even if the SeaTable plugin templates offers some reusable components, you will need some experience with React to build the interface of your plugin.
Due to the publicly available and well documented API documentation, you can theoretically interact with SeaTable using any programming language.
Learn the fundamentals¶
If you're relatively new to development, diving into general tutorials can lay a strong foundation for your SeaTable development journey.
While numerous free online tutorials cover various programming languages, investing in a comprehensive online course or a well-structured book can be invaluable. While free resources are available, a structured course or book often offers a more cohesive and thorough learning experience.
These paid resources, though requiring a small investment, often provide:
- Structured Learning: A step-by-step approach ensuring a coherent understanding.
- Comprehensive Content: In-depth coverage of essential concepts and practical applications.
- Consistency: Ensuring continuity and coherence in learning.
Remember, while free tutorials are abundant, investing in a structured resource can significantly expedite your learning process and provide a solid understanding of programming fundamentals essential for SeaTable development.
This are personal recommendations
The following sources does not contain any affiliate links and we do not earn any money from these recommendations. These are just good sources that we have used ourselves in the past.
- Free online course
-
A solid and free online course is available from codecademy.com. The course Learn JavaScript requires a registration but is free and teaches you in approx. 20 hours all necessary skills.
- Best online course
-
The best online course on javascript comes from Mosh Hamedani. Mosh manages to explain all the important basics for programming with JavaScript in his course The Ultimate JavaScript Series. Once you have completed this course, you should be able to write your first scripts with ease. A monthly subscription costs just $29.
- Book for Beginners
-
If you prefer a book, then we can recommend JavaScript from Beginner to Professional. It gives you all the basics for your first steps with JavaScript.
- Free online course
-
An easy to follow beginner guide comes from Google. At https://developers.google.com/edu/python you can find this well balanced course to learn how to do your first steps.
- Best online course
-
The best online course on Python comes from Mosh Hamedani. Mosh manages to explain all the important basics for programming with Python in his course Complete Python Mastery. Once you have completed this course, you should be able to write your first scripts with ease. A monthly subscription costs just $29.
- Book for Beginners
-
Our recommended book for beginners is called Learn Python in One Day and Learn It Well and as far as we can tell it keeps his promise. Most of our working students have read this book if they want to learn more about Python.
- Free online course
-
This free online course comes to you from Scrimba. Scrimba is a coding bootcamp with mainly paid courses and a high amount of interactive screencasts. The React course Learn React is fortunately free of charge.
- Best online course
-
The best online course on React comes from Mosh Hamedani. Mosh will guide and teach you React until and will build a complete Video Game Discovery App. The course is called React Course for Beginners.
Learning by doing¶
Some of us are more comfortable with learning by doing. The principle is simple: dissect a working example, understand it, and finally modify it so that it achieves what we want.
Here are three examples, one for each approach described in this manual:
Python script to get the structure of a base¶
You can take the following python code and copy&paste it to SeaTable. It will return the complete metastructure of your base. Easy or not? If you need some more information about this script, please refer to this step-by-step presentation.
from seatable_api import Base, context
base = Base(context.api_token, context.server_url)
base.auth()
metadata = base.get_metadata()
print("--- COMPLETE BASE STRUCTURE WITH ALL BASES AND COLUMNS ---")
for table in metadata['tables']:
print('.')
print("Table: "+table['name']+" (ID: "+table['_id']+")")
for column in table['columns']:
link_target = ""
if column['type'] == "link":
link_target = " --> "+column['data']['other_table_id']
if column['data']['other_table_id'] == table['_id']:
link_target = " --> "+column['data']['table_id']
print(" --> "+column['name']+" ("+column['type']+link_target+")")
--- COMPLETE BASE STRUCTURE WITH ALL BASES AND COLUMNS ---
.
Table: Opportunities (ID: 9g8f)
--> Name (text)
--> Status (single-select)
--> Prio (single-select)
--> Owner (collaborator)
--> Customer (link --> deGa)
--> Estimated value (number)
--> Proposal deadline (date)
--> Contacts (link --> lYb8)
--> Interactions (link --> 0000)
.
Table: Interactions (ID: 0000)
--> Interaction ID (auto-number)
--> Opportunity (link --> 9g8f)
--> Type (single-select)
--> Interaction (formula)
--> Opportunity status (formula)
--> Date and time (date)
--> Contact (link --> lYb8)
--> Notes (long-text)#
Feel free to check the other JavaScript and Python examples.
Existing plugins¶
SeaTable provides some plugins to visualize your data, for example the Gallery, Timeline, Kanban and so on, but it also offers everything you need to you build your own plugin. There are no limits to the imagination, it just requires some time and React skills.
For each existing plugin, you can find a corresponding Github repository that will allow you to fork/clone the code and try by yourself (you will probably need some basic git skills too). Please note that this is probably the one of the three approaches (scripts, plugins, or API client) that requires the most skills.
Using SeaTable APIs: the SeaTable ideas custom app example¶
There are multiple API classes available for various programming languages. This enables you to build any app or website you want.
Our feature request tool SeaTable Ideas is an example for such a website. It uses SeaTable as database and the frontend is build completely with PHP and the slim framework.
.
Do not hesitate to consult this pretty detailed article about the logic behind this app.
Of course, the SeaTable API Reference is another good place to start as it allows you to experiment with most queries, see the responses, and get the corresponding source code for all supported languages.