Download as pdf or txt
Download as pdf or txt
You are on page 1of 11

04/01/2020 Devups 4.

5 Quick
starter
Do your best

ATEMKENG AZANKANG
SPACEKOLA
Devups 4.5 Quick starter

Table des matières


I. Set environment........................................................................................................................... 3
A. server ....................................................................................................................................... 3
B. Integrate Development Environment (IDE) ....................................... Erreur ! Signet non défini.
C. composer .......................................................................................... Erreur ! Signet non défini.
II. Devups architechture ................................................................................................................... 4
A. configuration ............................................................................................................................ 6
B. Install dependences (composer) ............................................................................................... 6
C. Install devups ........................................................................................................................... 7

ATEMKENG AZANKANG 1
Devups 4.5 Quick starter

Introduction
Hi everybody so here is my first tutorial and it talks about Devups, a php framework I wrote and hope
you will like

ATEMKENG AZANKANG 2
Devups 4.5 Quick starter

Partie I: The base of Devups


Ok in this tutorial we will create a product stock manager. I choose this one because it gets all in one,
all the relations between entities (one to one, one to many, many to many).

I. Set environment
A. server
You need to have a base on php programming language

Minimum config :

- php 7.^
- PDO PHP Extension

You can find it by installing either xampp or wamp (if you’re on window os) however I suggest you
Xampp as it is the one I’m using in this tutorial. Download the last stable version here.

https://www.apachefriends.org/fr/index.html

https://sourceforge.net/projects/xampp/

Once it’s done, we will verify if php is install in cmd.

To verify that php is well install, open the cmd and type php –version. You may have this result
(depending of the version of your php)

Else follow this tutoriel to add php in windows path.

B. Installing devups project


Next step install composer.

ATEMKENG AZANKANG 3
Devups 4.5 Quick starter

Composer is the package manager for php https://getcomposer.org/ . It will help up download some
important dependencies that devups need to work. It will be automatically added in the system
environment variable.

In your xampp htdoc folder use the command to create a new project

composer create-project spacekola/devups

II. Devups architechture

Once the project has downloaded, let’s see devups project structure.

Figure 1 devups project structure

ATEMKENG AZANKANG 4
Devups 4.5 Quick starter

ressource

vendor

admin views

bin index.php

login.php

local
cache
views

dump

log
database
migration

transaction

devups

devupsjs

class extends
architecture
generator
controller
lib
core
constante.php
config entity
dvups_function.php
form
component module js
src ressource
requires.php views entity
vendor index.php
assets
web moduledependences.php
views
.htaccess services.php

header.php

index.php

services.php

lang.php

Figure 2: devups architecture

ATEMKENG AZANKANG 5
Devups 4.5 Quick starter

Open the project in your IDE and let’s do some configuration

A. configuration
Edit the config/constant.php file. Change

// replace by the name of your project


define('PROJECT_NAME', "devupstuto");

/**
* config database
*/
define ('dbname', 'devupstuto_bd');
define ('dbuser', 'root');
define ('dbpassword', '');
define ('dbhost', 'localhost');

/**
* config environment
*/
define('__server', 'http://127.0.0.1');
// base url
// in production, replace by "/"
define('__env', __server.'/devupstuto/');
define('__project_id', 'devupstuto');
define('__lang', 'en');

save and we are done for the config.

B. Install dependences (composer)

In the composer.json file we have this

{
"require": {
"doctrine/orm": "^2.1.3",
"philo/laravel-blade": "3.*",
"ifsnop/mysqldump-php": "^2.9"
},
"autoload": {
"classmap": [
"dclass/",
"src/"
],
"psr-0": {"": "src/"}

ATEMKENG AZANKANG 6
Devups 4.5 Quick starter

}
}

Next open the command prompt and execute


cd to_project_root

composer install (If you have downloaded the package via composer, this step has already
been done automatically so skip it!)

Figure 3: composer install

This will create a new folder called vendor at the root of your project (if it doesn’t exist). It’s in that
folder that all dependencies download via composer will be stored.

C. Install devups environment


Let’s use the first devups command.
php devups install

ATEMKENG AZANKANG 7
Devups 4.5 Quick starter

Figure 4: php devups install

This command will create database with the devups table. Create the master admin (you) and give him
all the right on all module and entities in the project.

Figure 5 devups project minimum database

Then before continue let’s see something I hope cool and helpful.

Open the browser and go to your project (localhost/devupstuto)

ATEMKENG AZANKANG 8
Devups 4.5 Quick starter

Figure 6 devups Project default home page

Click on “go to backoffice” on the right top.

Login: dv_admin Password: admin

Figure 7 back-end login page

ATEMKENG AZANKANG 9
Devups 4.5 Quick starter

Figure 8: complete account credential

After the first connection the system will ask for your own password and then resend you to the login
page for new connection.

Figure 9 dashboard

Note that devups is a framework oriented content manager. Then it comes with a default backoffice
who has an admin module ready to use, including role management on all current or further entities
and module you will create. We will go deeper later. I just wanted you to see what is already done with
just a few config :D .

ATEMKENG AZANKANG 10

You might also like