Modules encapsulate functionality, packaging resources together for simple deployment within LabKey Server. Modules are developed by incrementally adding file resources within a standardized directory structure. For deployment, the files are archived as a .module file (a standard .zip file renamed with a custom file extension).
|Hello World||A simple "Hello World" module.||Tutorial: Hello World Module|
|Assay||A module with an assay directory included, for defining a new assay type.||Modules: Assay Types|
|Extract-Transform-Load||A module with an etl directory included, for configuring data transfer and synchronization between databases.||ETL: Extract Transform Load|
|Java||A module with a Java src directory included. Develop Java-based applications to create server-side code.||Modules: Java|
Do I Need to Compile Modules?
Modules do not need to be compiled, unless they contain Java code. Most module functionality can be accomplished without the need for Java code, including "CRUD" applications (Create-Retrieve-Update-Delete applications) that provide views and reports on data on the server, and provide some way for users to interact with the data. These applications will typically use some combination of the following client APIs: LABKEY.Query.selectRows, insertRows, updateRows, and deleteRows
Also note that client-side APIs are generally guaranteed to be stable, while server-side APIs are not guaranteed to be stable and are liable to change as the LabKey Server code base evolves -- so modules based on the server API may require changes to keep them up to date.
More advanced client functionality, such as defining new assay types, working with the security API, and manipulating studies, can also be accomplished with a simple module without Java.
To create your own server actions
(i.e., code that runs on the server, not in the client), Java is generally required. Trigger scripts, which run on the server, are are an exception: trigger scripts are a powerful feature, sufficient in many cases to avoid the need for Java code. Note that Java modules require a build/compile step, but modules without Java code don't need to be compiled before deployment to the server.
Module Development Setup
Use the following topic to set up a development machine for building LabKey modules: Set Up a Development Machine
The topics below show you how to create a module, how to develop the various resources within the module, and how to package and deploy it to LabKey Server.