Website Generator for SoftLab

Download Report

Transcript Website Generator for SoftLab

Website Generator for SoftLab
Final Presentation
By Yohann SABBAH & Mikael V.H Cohen
-Under the supervision of Viktor Kulikov7/6/2015
Goal of the project
7/6/2015
Goal of the project
Abstract
• Designing a website generator for Technion Labs
• Intuitive interface for
• Website creation
• Website administration
7/6/2015
Goal of the project
Some facts
A classy Technion lab website is always composed by the following types of
elements:
• HTML basic page
• Lists of people – As list of supervisors, list of professors…
• Lists of projects proposal
• Lists of finished projects
• Lists of links
• Certain pages contain several different elements
7/6/2015
Goal of the project
Technion Lab Website principle
1. First, create Sub-pages:
1.
2.
3.
Choosing the type of each Sub-page
Chose a name for each sub-page
Can create many sub-pages of the same type
2. Then, create Pages – A page is composed of one or many sub-pages
1.
2.
Choosing a name for each page
Filling a page with one or many sub-pages
3. Now, we create our Website- A website is composed of one or many pages
1.
Choosing pages and their order
4. Finally, we fill the sub-pages with elements
1.
An element can be in many sub-pages
7/6/2015
Used Technologies
7/6/2015
Used Technologies
PHP - 1
1. PHP recursive acronym for "PHP:Hypertext Preprocessor“
2. Widely-used Open Source scripting language
3. Especially suited for Web development
Used for producing dynamic web pages
5. Can be embedded into HTML.
4.
7/6/2015
Used Technologies
PHP - 2
1. PHP includes a large number of free and open source libraries
2. Real Object Oriented Programming Language
3. Commonly install on Apache Server allow to interact with
Database like Mysql
4. PHP is mainly focused on server-side scripting
7/6/2015
Used Technologies
PHP - Communication client-server
PHP generally runs on a web server, taking PHP code as its input
and creating Web pages as output
7/6/2015
Used Technologies
Smarty - 1
1. Smarty is a web template engine system written in PHP.
2. Allow separation between the Logic and the Presentation
3. Why templates ?
1. Ease of design change
2. Ease of interface localization
3. Possibility to work separately on design and code by different
people at one and the same time
7/6/2015
Used Technologies
Smarty - 2 - Why Smarty ?
1. Very fast compare to other template engines
2. Creates PHP scripts from templates instead of parsing
template
3. Smarty re-compiles templates only when make changes to
them.
4. Caching : caches the output of the template contents. Saves
from having to connect to the database every time your Web
page is accessed.
7/6/2015
Used Technologies
MySQL
1. MySQL is a multithreaded, multi-user SQL database
management system.
2. Popular for web applications.
3. Closely tied to PHP.
4. Allow all sort of queries.
5. PhpMyAdmin: friendly user interface to manage database
develop on PHP.
7/6/2015
Used Technologies
CCS
1. Cascading Style Sheets (CSS): style sheet language used to
describe the presentation of a html document.
2. Define colors, fonts, layout, and other aspects of document
3. Why CSS?
• more flexibility
• control the specification of presentational characteristics
• reduce complexity and repetition in the structural
7/6/2015
content.
Used Technologies
Javascript
1. JavaScript is a scripting language most often used for client-
side.
2. JS functions are embedded in HTML pages and interact with
the Document Object Model (DOM) of the page
3. Respond to user actions quickly, making an application feel
more responsive
4. Detect user actions which HTML alone cannot
7/6/2015
Used Technologies
Security
1. Administration is protected by username and password
2. Encryption using a MD5 provider that itself implements an
algorithm based on a cryptographic hash function.
3. Used of Session and cookies
7/6/2015
Database Design
7/6/2015
DataBase Design
Sub-page “People”
7/6/2015
DataBase Design
List of Pages
7/6/2015
7/6/2015
OOP Design
7/6/2015
OOP Design
SmartyClass
1. SmartyClass are responsible for:
• read template
• assign variables to the templates files
• show template files (.tpl)
7/6/2015
OOP Design
Smarty Templates - 1
1. Page divided into many templates
2. Our template design: main_page.tpl
Main_menu.tpl
Page_header.tpl
MIDDLE PAGE CONTENT
Page_footer.tpl
7/6/2015
OOP Design
Smarty Templates - 2
1. Entity Page that represents a standard page
2. Entity Sub-Page represents by his template file
3. Each page is divided in a list of sub-pages
7/6/2015
OOP Design
Other Classes
1. DBConnection: responsible for:
• Connection / Disconnection to the Database
• All the query to the DB
2. ConfigClass: responsible for:
• Build a standard page: get all templates and assign them to the
main page template
• Contain helpful functions that we use in many PHP files.
7/6/2015
The End…
Thanks…..
Thanks to Victor for his help
Follow the guide for the demo
7/6/2015