Jam.py (web framework): Difference between revisions

Content deleted Content added
remove copyright content copied from https://www.linuxpromagazine.com/index.php/layout/set/print/Issues/2020/241/Jam.py/(tagID)/50, https://www.webprecis.com/best-frameworks-for-web-design/
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.
 
(17 intermediate revisions by 3 users not shown)
Line 2:
{{Infobox software
| name = Jam.py
| screenshot = File:FigureScreenshot from 2024-105-23 large09-42-54.png
| caption = Screenshot of Parameters, with the visual form editor being used to create an application
| author = Andrew Yushev
| released = {{Start date and age|2015|07|01}}
| latest release version = {{wikidata|property|reference|edit|P348}}
| latest release date = {{start date and age|{{wikidata|qualifier|P348|P577}}}}
| genre = [[Web framework]]
| license = [[BSD licenses#3-clause |BSD 3-clause]]
| websiterepo = {{URL|https://jampyapplicationbuildergithub.com/}}jam-py-v5/
| programming language = [[Python (programming language)|Python]], [[JavaScript (programming language)|JavaScript]]
| repo = https://github.com/jam-py/jam-py
| platform = [[Cross-platform software|Cross-platform]]
| programming language = [[Python (programming language)|Python]], [[JavaScript (programming language)|JavaScript]]
| website = {{URL|jampyapplicationbuilder.com}}
| platform = [[Cross-platform]]
| author = Andrew Yushev
}}
'''Jam.py''' is [[freeWeb and open source|free and open-sourceframework]] providing [[Low-code development platform|low-code]]/ and [[No-code_development_platformcode development platform|no-code]], full [[Web framework|"fullsolution stack"]] [[Webrapid Serverapplication Gateway Interface|WSGIdevelopment]] using [[rapidWeb applicationServer developmentGateway Interface]] framework(WSGI), for the [[programming language]]s [[JavaScript]] and [[Python (programming language)|Python]] programming language.<ref>{{Cite web |url=https://wiki.python.org/moin/WebFrameworks/ |title=WebFrameworks - Python Wiki|website=wiki.pythonPython 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 [[don't repeat 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 offersprovides a built-in web server, [[Graphicalgraphical user interface builder|]] (named Application Builder]]), and database access forincluding third-party databases.
Jam.py 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 [[DRY principle]], with emphasis on [[Create, read, update and delete|CRUD]].
It is designed to automatically create JavaScript [[web forms]] from the underlying database tables, although a form can be created manually if required.
 
Jam.py version 7.x supports routing within the [[Single-page application|single-page]]. Uniform resource locator ([[URL]]) mapping is unsupported.
It offers a built-in web server, [[Graphical user interface builder|Application Builder]] and database access for third-party databases.
 
== Features ==
* Singlev5.x is a single distribution which runs with both Python 2.6+ and 3.x
* v7.x runs with Python >3.6, and is using dependencies installed automatically
* Can run as a standalone web development server or be used with any web server which supports [[WSGI]]
* Built-in [[Graphical user interface builder|GUI builder]] callednamed Application Builder
* Support for [[JSON]] client data (for Representational State Transfer ([[REST]]) and [[JavaScript]] clients)
* Support for popular databases [[Oracle Database]], [[Microsoft SQL Server]], [[PostgreSQL]], [[SQLite]], [[MySQL]], [[Firebird (database server)]], SQLCipher<ref>{{cite web |title=SQLCipher |url=https://github.com/sqlcipher |website=GitHub |language=en}}</ref><ref group=Note>{{Cite web|url=https://jamjampy-pydocs.comreadthedocs.io/docsen/latest/admin/project/database.html|title=Database — Jam.py documentation|website=jam-py.com}}</ref>
* Extensible [[authentication]] mechanisms and [[role-based access control]]
* [[Internationalization]] support
Line 34 ⟶ 35:
* [[Template engine (web)|Template language]]
* [[OpenDocument|Reports Templates]] based on [[LibreOffice]]
* Files upload and camera capturing
* Optimistic locking
 
==Distinctive features==
 
=== Built-in Applicationapplication Builderbuilder ===
All [[Software development|development]], [[Software maintenance|maintenance]] and remote database administration can be performed via a 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>
 
Application Builder is strongly influenced by [[Delphi_Delphi (software)|Delphi]] visual designer.<ref>{{cite web | url=[https://www.webprecis.com/best-frameworks-for-web-design/ | title=10 Best Frameworks for Web Design | work=webprecis.com | date=11 March 2015 | accessdate=11 March 2015}}]</ref>
 
=== Application Builderbuilder Clientclient Modulemodule ===
This JavaScript [["Hello, World!" program]] code displays a simple web page when visited:
 
The following JavaScript code shows a simple web page that displays "[["Hello, World!" program|Hello World]]!" when visited:
 
<syntaxhighlight lang="javascript">
Line 53 ⟶ 56:
</syntaxhighlight>
 
The above code resides in Task/Client Module(s) within the Application Builder. The task function can be accessed globally.
 
 
=== Application Builder Server Module ===
 
=== 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
</syntaxhighlight>
 
The above code imports smtplib library, which might be used to send emails. The defined functions can be accessed globally.
 
=== 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 75 ⟶ 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==
Line 100 ⟶ 101:
* [[Comparison of server-side web frameworks|Comparison of web frameworks]]
* [[List of low-code development platforms]]
 
{{Clear}}
 
== External links ==
* {{Official website|jam-pyjampyapplicationbuilder.com}}
* {{GitHub|jam-py-v5}}
 
{{Python (programming language)}}
Line 114:
[[Category:Python (programming language) web frameworks]]
[[Category:Low Code Application Platform]]
<!-- Hidden categories below -->
[[Category:Articles with example JavaScript code]]