Alief’s Update — Week 14

Alief Aziz
Inspire Crawler
Published in
4 min readMay 29, 2016

a. Completing Task

The only remaining task from the previous week is to attach link to edit button in CRUD page. Because in this week there is no task at all,so in this week we focus to ‘patch some holes’ :D. But there are some accident last night when I tried to upload my work to badr server, I already pull my version to the latest one from branch development. But when I upload my changes to server, Ega said that the version that I just uploaded is the older one so the web is unavailable for a while.

b. Build Script, Software Integration
The Software Integration service that we use for our project is Travis CI, because it is easy to understand and has user-friendly tutorial. We use travis-CI.org not travis-CI.com, because in the end we want to make this application open source. For the beginning, I create travis-CI account and connect my github account with travis account. When connected, I change travis configuration so other branch without “.yml” can push as well.

Next I make “.travis.yml” file, this is the configuration file (build script) for travis CI (Travis CI will look upon this file to build the project). For experiment, I add simple php file in project root and simple build script. Here is the script

language: php
php:
- 5.5
- 5.4
script: phpunit test.php

in test.php

<?php
ecoh ‘hello’;
?>

and here is the result I got :

Yeay, when I push my work, it trigger travis-CI to build my dummy project and now for the real deal, I build the laravel project using build script template from here, then I got :

It looks like the problem is because I removed composer.json and other configuration file. So then I add composer.json and other things. Unfortunately after rebuilding, it still produced error.

So I did some exploring, and then I get that “before_install” section in “.travis.yml” act like terminal, it means that I could know about Travis CI system and I can use this information to do composer update correctly. So I add these in “before_install” section :

cd web
composer self-update

aaandd, got it. I got new error

They said that I have some missing php extension. I think it is the time to update my “.travis.yml” file to include those missing extension. So I add these :

// to be continued
// below if the previous problem solved

After finish with the system, I’ll move to test every method in laravel using built-in phpunit in laravel then I’ll have travis CI to report the error.
// to be continued

c. Contionous Integration
Continuous Integration is a software development practice where members of a team integrate their work frequently, usually each person integrates at least daily — leading to multiple integrations per day. Each integration is verified by an automated build (including test) to detect integration errors as quickly as possible. Many teams find that this approach leads to significantly reduced integration problems and allows a team to develop cohesive software more rapidly.

d. Role Management
in this part I’ll explain ega’s work. The first thing to do to set up a role management feature is use migration feature from laravel. Then build authentication system for laravel. For the frontend we also have to make login page, logout button. The last thing is to filter all admin page request to middle where, we use this to check wether the client has the right roles to access the specified resources.

e. Secure Deployment and Administration
In Secure deployment there are two main things to consider, the first one is web security where we have to make sure that each role only could access their resource as example ordinary users must restricted to view admin page.The real example for web security is already implemented by Kevin Ega when making login-logout feature . The second thing is deployment security, it talks about safety when we deploy the the application. One most common mistake in unsecure deployment is letting “.env” to be readable by public, this could cause harmful side effect.

f. Software Profiling

For profiling I use mozilla profilling tool which we can access by right click the web page and choose “Inspect Element”. From the picture above we can see that the load time of the website. To get this result I use Ctrl+F5 to make sure mozilla didn’t use any cache so I’ll get the pure load time. The result is surprising because it need 98.130 seconds to load it properly.

--

--