Jam.py (web framework): Difference between revisions

Content deleted Content added
Template:Infobox programming language, WP:REFerence WP:CITation parameters: reorder, respace, standardize. WP:LINKs: update-standardize, needless-WP:PIPEs > WP:NOPIPEs, underscores > spaces. WP:SLASH > and. WP:BADEMPHASIS MOS:QUOTEMARKS cut. MOS:FIRSTABBRevs define < parenthetic WP:ABBRs. Nonproper noun MOS:CAPS > WP:LOWERCASE sentence case. Cut carriage returns in: sentence, paragraph. WP:COPYEDITs WP:EoS, WP:TERSE.
WP:LINKs: WP:Disambiguate, update-standardizes, underscore > space, needless-WP:PIPE > WP:NOPIPE. Cut needless whitespace character carriage returns, between MOS:HEADings and text: to standardize, aid work via small screens.
 
(One intermediate revision by one other user not shown)
Line 15:
| website = {{URL|jampyapplicationbuilder.com}}
}}
'''Jam.py''' is [[Web framework]] providing [[Low-code development platform|low-code]] and [[No-code development platform|no-code]], full [[fullsolution stack]] [[rapid application development]] using [[Web Server Gateway Interface]] (WSGI), for the [[programming language]]s [[JavaScript]] and [[Python (programming language)|Python]].<ref>{{Cite web |url=https://wiki.python.org/moin/WebFrameworks/ |title=WebFrameworks |website=Python Wiki.org}}</ref> It is [[free and open-source software]] released under a [[BSD licenses#3-clause|BSD 3-clause]] license.
 
Jam.py version 5.x is a [[Single-page application|single-page]], [[Event-driven architecture|event driven]] [[low-code development platform]] for [[database]]-driven business [[web application]]s, based on the [[DRYdon't principlerepeat yourself]] (DRY) principle, with emphasis on [[create, read, update and delete]] (CRUD). It is designed to automatically create [[JavaScript]] [[HTML form|web forms]] from the underlying database tables, although a form can be created manually if required. The existing database tables can be imported into Jam.py to create the forms and reports. Database views are unsupported for import.
 
It provides a built-in web server, [[graphical user interface builder]] (named Application Builder), and database access including third-party databases.
Line 40:
==Distinctive features==
 
=== Built-in Applicationapplication Builderbuilder ===
All [[Software development|development]], [[Software maintenance|maintenance]] and remote database administration can be performed via Builder interface. The most distinctive feature is the Client and Server Module. The Server Module enables the Python code for business logic, executed as a [[server-side]] session. The Client Module executes the JavaScript code within a browser. It is possible to exchange data between the two.
<ref>[https://www.linux-magazine.com/Issues/2020/241/Jam.py Building a database front end with Jam.py]</ref>
Line 46:
Application Builder is strongly influenced by [[Delphi (software)|Delphi]] visual designer.<ref>[https://www.webprecis.com/best-frameworks-for-web-design Best Frameworks for Web Design]</ref>
 
=== Application Builderbuilder Clientclient Modulemodule ===
 
This JavaScript [["Hello, World!" program]] code displays a simple web page when visited:
 
Line 59 ⟶ 58:
The above code resides in Task/Client Module(s) within the Application Builder. The task function can be accessed globally.
 
=== Application Builderbuilder Serverserver Modulemodule ===
 
The Python libraries can be imported within the Task/Server Module(s):
 
<syntaxhighlight lang="python">
import smtplib
 
def send_email():
# code that sends email
Line 72 ⟶ 71:
 
=== Database migrations ===
 
Jam.py supports database [[Data migration|migration]] and data import from one supported database to another.
The below code in the Task/Server Module will import data from SQLite to application database:
Line 78 ⟶ 76:
<syntaxhighlight lang="python">
from jam.db.db_modules import SQLITE
 
def on_created(task):
task.copy_database(SQLITE, '"demo.sqlite'")
</syntaxhighlight>
 
Limits:
Limitations:
* The SQLite database can notcannot be imported into the application database which has [[Foreign_key|foreign keyskey]]s.<ref>[https://jampyapplicationbuilder.com/docs/how_to/how_to_migrate_to_another_database.html How to migrate to another database]</ref>
 
== PythonAnywhere ==
[[PythonAnywhere]] Python 3.x deployment is supported<ref group=Note>{{Cite web |url=https://github.com/pythonanywhere/help_pages/blob/master/articles/Jampy.md |title=pythonanywhere/help_pages |website=GitHub |date=11 October 2021}}</ref>
 
[[PythonAnywhere]] Python 3.x deployment is supported<ref group=Note>{{Cite web|url=https://github.com/pythonanywhere/help_pages/blob/master/articles/Jampy.md|title=pythonanywhere/help_pages|website=GitHub|date=11 October 2021}}</ref>
 
==Notes==