Difference between revisions of "Web Apps"

From TRCCompSci - AQA Computer Science
Jump to: navigation, search
(Django)
(ASP.Net Web App)
 
(13 intermediate revisions by the same user not shown)
Line 1: Line 1:
 
=Web Apps=
 
=Web Apps=
 
Web apps are cross platform apps which are used via a browser. This allows you to create a single app to cover platforms such has Windows, Linux, iOS, Android, and so on. These essentially have a server program, which when you start it will allow you to access your app via '''<nowiki>http://localhost:8000</nowiki>''' or '''<nowiki>http://127.0.0.1:8000</nowiki>'''. The exact port number may vary, but the server will output the correct link to use.
 
Web apps are cross platform apps which are used via a browser. This allows you to create a single app to cover platforms such has Windows, Linux, iOS, Android, and so on. These essentially have a server program, which when you start it will allow you to access your app via '''<nowiki>http://localhost:8000</nowiki>''' or '''<nowiki>http://127.0.0.1:8000</nowiki>'''. The exact port number may vary, but the server will output the correct link to use.
 +
 +
==Flask==
 +
====Setup====
 +
[[Creating a Flask Web App]]
 +
 +
[[Parts of a Flask Web App]]
 +
 +
[[Connecting MySQL to Flask Web App]]
 +
 +
[[Connecting sqlite to Flask Web App]]
 +
====Login System====
 +
[[Login and Logout in a Flask App]]
 +
 +
[[Register and Edit profile in a Flask App]]
 +
====Database / Models====
 +
Models aren't used in Flask, so you will need to use the normal SQLITE queries. Remember the previous tutorials create a class to handle the database, so you will need to write the SQL only. The execute command can be used for Create, Update, Insert, and Delete queries. The select command can be used to run a select query.
 +
 +
====Skills====
 +
[[Flashing messages in Flask App]]
 +
 +
[[Passing an integer via URL in Flask App]]
 +
 +
[[Uploading files in Flask]]
 +
 +
==ASP.Net Web App==
 +
====Setup MySql====
 +
[[Connect MySQL to ASP.Net Web App]]
 +
 +
====Setup Session====
 +
[[Setup Session for ASP.Net Web App]]
 +
 +
====Custom Login System====
 +
[[Create login for ASP.Net Web App]]
 +
 +
[[Create logout for ASP.Net Web App]]
 +
 +
[[Create register for ASP.Net Web App]]
 +
 +
[[Hide logout button if user not logged in for ASP.Net Web App]]
  
 
==Django==
 
==Django==
 +
Students should avoid using this for their projects, use ASP.Net Core or Flask instead. Both can be set up to use MySQL and you can therefore easier to get the technical skills marks.
 +
 
====Setup====
 
====Setup====
 
[[Django in PythonAnywhere]]
 
[[Django in PythonAnywhere]]
Line 8: Line 49:
 
[[Creating the Home page in Django]]
 
[[Creating the Home page in Django]]
  
=====Setup in VS=====
 
 
[[Creating a Django Web App]]
 
[[Creating a Django Web App]]
  
Line 46: Line 86:
  
 
[[Reset password function]]
 
[[Reset password function]]
 
[[Fully OOP with generic views]]
 
 
==Flask==
 
====Setup====
 
[[Creating a Flask Web App]]
 
 
[[Parts of a Flask Web App]]
 
 
[[Connecting MySQL to Flask Web App]]
 
 
[[Connecting sqlite to Flask Web App]]
 
====Login System====
 
[[Login and Logout in a Flask App]]
 
 
[[Register and Edit profile in a Flask App]]
 
====Database / Models====
 
Models aren't used in Flask, so you will need to use the normal SQLITE queries. Remember the previous tutorials create a class to handle the database, so you will need to write the SQL only. The execute command can be used for Create, Update, Insert, and Delete queries. The select command can be used to run a select query.
 
 
====Skills====
 
[[Flashing messages in Flask App]]
 
 
[[Passing an integer via URL in Flask App]]
 
 
[[Uploading files in Flask]]
 
 
[[Fully OOP views in Flask]]
 

Latest revision as of 10:26, 19 November 2024

Web Apps

Web apps are cross platform apps which are used via a browser. This allows you to create a single app to cover platforms such has Windows, Linux, iOS, Android, and so on. These essentially have a server program, which when you start it will allow you to access your app via http://localhost:8000 or http://127.0.0.1:8000. The exact port number may vary, but the server will output the correct link to use.

Flask

Setup

Creating a Flask Web App

Parts of a Flask Web App

Connecting MySQL to Flask Web App

Connecting sqlite to Flask Web App

Login System

Login and Logout in a Flask App

Register and Edit profile in a Flask App

Database / Models

Models aren't used in Flask, so you will need to use the normal SQLITE queries. Remember the previous tutorials create a class to handle the database, so you will need to write the SQL only. The execute command can be used for Create, Update, Insert, and Delete queries. The select command can be used to run a select query.

Skills

Flashing messages in Flask App

Passing an integer via URL in Flask App

Uploading files in Flask

ASP.Net Web App

Setup MySql

Connect MySQL to ASP.Net Web App

Setup Session

Setup Session for ASP.Net Web App

Custom Login System

Create login for ASP.Net Web App

Create logout for ASP.Net Web App

Create register for ASP.Net Web App

Hide logout button if user not logged in for ASP.Net Web App

Django

Students should avoid using this for their projects, use ASP.Net Core or Flask instead. Both can be set up to use MySQL and you can therefore easier to get the technical skills marks.

Setup

Django in PythonAnywhere

Creating the Home page in Django

Creating a Django Web App

Django management program

Login System

Set up Login System in Django

Create a sign up page in Django

Create account edit page in Django

Enforce login required for page

Models in django

Creating a Model in Django

Display data from a model in django

Add data into a model in Django

Editing data into a model in Django

Delete data from a model in Django

Relating models in Django, ie Primary key to Foreign Key

Enforcing unique model entries

Other skills

Passing an integer through the url to make a product page

Returning a 404 error if the value is not in the model data

Images in models and uploading images

Change password function

Reset password function