Jump to content

Jam.py (web framework): Difference between revisions

From Wikipedia, the free encyclopedia
Content deleted Content added
mNo edit summary
m example
Line 28: Line 28:


== Example ==
== Example ==
The following code adds a form button and when clicked will show a message and
The following code adds a form button. When clicked, the message will show and
send the asynchronous request to the server, hiding the message after response.
asynchronous request sent to the server. After the server response, calculated_value field is updated and the message hidden.


Server Module ([[Python (programming language)|Python]]):
Server Module ([[Python (programming language)|Python]]):
Line 45: Line 45:
let mess = item.message('Calculation in progress!', {close_on_escape: false, margin: 20, text_center: true});
let mess = item.message('Calculation in progress!', {close_on_escape: false, margin: 20, text_center: true});
item.server('calculate', [100, 200], function(result) {
item.server('calculate', [100, 200], function(result) {
item.calculated_value.value = result;
item.hide_message(mess);
item.hide_message(mess);
});
});

Revision as of 06:40, 16 September 2022

Jam.py
Original author(s)Andrew Yushev
Initial releaseJuly 1, 2015; 9 years ago (2015-07-01)
Stable release
5.4.136[1] Edit this on Wikidata / 14 November 2023; 10 months ago (14 November 2023)
Repositoryhttps://github.com/jam-py/jam-py
Written inPython, JavaScript
PlatformCross-platform
TypeWeb framework
License3-clause BSD
Websitehttps://jampyapplicationbuilder.com/

Jam.py is a Low-code development platform for database-driven business web applications, based on DRY principle, with emphasis on CRUD.

Jam.py is free and open-source low-code "full stack" WSGI rapid application development framework for the JavaScript and Python programming language.[2] The server component runs on any computer with Python 2.6 or later.[3]

It offers a built-in web server, GUI Builder and database access for third-party databases.

Features

Example

The following code adds a form button. When clicked, the message will show and asynchronous request sent to the server. After the server response, calculated_value field is updated and the message hidden.

Server Module (Python):

import time
def calculate(item, params1, param2):
    time.sleep(5)
    return params1 + param2

Client Module (JavaScript):

function on_edit_form_created(item) {
    let calc_btn = item.add_edit_button('Calculate');
    calc_btn.click(function() {  
        let mess = item.message('Calculation in progress!', {close_on_escape: false, margin: 20, text_center: true});
        item.server('calculate', [100, 200], function(result) {
            item.calculated_value.value = result;
            item.hide_message(mess);
        });
    });
}


PythonAnywhere

PythonAnywhere Python 3.7 deployment is supported[Note 2]

Awards

  • 2015. 10 Best Frameworks for Web Design[5]
  • 2016. 35 Best HTML5 and CSS3 Responsive Frameworks[6]

Notes

  1. ^ "Database — Jam.py documentation". jam-py.com.
  2. ^ "pythonanywhere/help_pages". GitHub. 11 October 2021.

References

  1. ^ https://github.com/jam-py/jam-py/releases/tag/5.4.136. {{cite web}}: Missing or empty |title= (help)
  2. ^ "WebFrameworks - Python Wiki". wiki.python.org.
  3. ^ "Building a database front end with Jam.py". www.linux-magazine.com, p.50. Retrieved 30 November 2020.
  4. ^ "SQLCipher". GitHub.
  5. ^ "10 Best Frameworks for Web Design". webprecis.com. 11 March 2015. Retrieved 11 March 2015.
  6. ^ "35 Best HTML5 and CSS3 Responsive Frameworks". devrix.com. Retrieved 29 August 2016.

See also