Got some time testing on Laravel and PHP7's new feature. Usually, learning basic language is straightforward. Redesigning the sample and studying the difference gain good understanding.
Fortunately I got another time segment to test on Laravel. “Straightforward” probably is not a common characteristics in modern frameworks….. I try some popular topics to learn more prevalent understanding of modern design, and samples are usually not working. These must be the characteristics of a fast changing world. Sometimes it's annoying, but I kind of like it. Waking up expecting something new happening is intriguing. There are warnings that IT careers are fast-changing and unstable. But I assume a dying world unable to draw out any solution for current dismay is even horrible.
Unable to find Route file....
Route definition was moved out of app/http/
It was moved to Route/ and expanded to 4 basic functions: api, channels, consoles and web
Database folder get deeper..
Sample frame located at database/migrations/ with time flag as version denotation.
Class definition still located in app/ folder. I got lucky...
Utilizing artisan Laravel, a developer frequently requests the cloud for function framework. For example, when Quickstart downloaded, database/ folder didn't exist. After send request via artisan, database folder and sample DB schema created.
So is new defined class app/task.
It seems a developer using Laravel doesn't really have full control of the changing structure. This is why I previously mentioned Python/Flask was a better entry for modern web app. Flask's framework is much isolated from developer's creation. There are default folder names, but developers get tools to change it. When I deploy Flask to Azure and Azure doesn't support the function factory, together with the entry function's location may change the relation of directories. Sometimes things get very difficult under default definition. I guess this is why Docker gets popular.
Altered structure/codes for Laravel Quickstart
https://github.com/atfuture7/learning/tree/master/Laravel/03_quickstart
Due to my short time, PHP7 test paused before the anonymous class definition. Not because of technical reasons... I didn't really agree with the sample that defines an anonymous class under the blueprint of a template(interface).... Usually a template exists because different classes may implement it in different ways. When debugging, a developer needs to trace how a class is defined and used. A better developing habit is to put class definitions somewhere easy to identify. According to this example, an anonymous class hid behind an interface... would cause many troubles such as some classes defining the interface in wild or absolutely opposite ways.
After some fixes, the Quickstart from Laravel finally works, but still not right on visual. Laravel changed its own structure after this tutorial created. Here are some I think important:
Unable to find database....
My first try is mysql, but Laravel complained no DB created. So I tried sqlite3. Tripping off authentication possibilities, the problem of core function changes was found.
The fix: https://laracasts.com/discuss/channels/laravel/connect-to-an-sqlite-db-laravel-documentation-procedure-doesnt-work?page=1
Unable to find database....
My first try is mysql, but Laravel complained no DB created. So I tried sqlite3. Tripping off authentication possibilities, the problem of core function changes was found.
The fix: https://laracasts.com/discuss/channels/laravel/connect-to-an-sqlite-db-laravel-documentation-procedure-doesnt-work?page=1
/config/database.php -
'database' => database_path(env('DB_DATABASE','database.sqlite'))
And DB_DATABASE=dbname.sqlite
in .env
Route definition was moved out of app/http/
It was moved to Route/ and expanded to 4 basic functions: api, channels, consoles and web
Database folder get deeper..
Sample frame located at database/migrations/ with time flag as version denotation.
Class definition still located in app/ folder. I got lucky...
Utilizing artisan Laravel, a developer frequently requests the cloud for function framework. For example, when Quickstart downloaded, database/ folder didn't exist. After send request via artisan, database folder and sample DB schema created.
So is new defined class app/task.
It seems a developer using Laravel doesn't really have full control of the changing structure. This is why I previously mentioned Python/Flask was a better entry for modern web app. Flask's framework is much isolated from developer's creation. There are default folder names, but developers get tools to change it. When I deploy Flask to Azure and Azure doesn't support the function factory, together with the entry function's location may change the relation of directories. Sometimes things get very difficult under default definition. I guess this is why Docker gets popular.
Funny test on PHP7:
https://github.com/atfuture7/learning/tree/master/Laravel/03_quickstart
Casinos & Software | DRMCDC
ReplyDeleteSlots · 당진 출장샵 Video poker · Live dealer casino · Roulette · 창원 출장마사지 Sportsbook · Casino games. 동두천 출장마사지 The best casinos for US players. Video poker is one of the most 김포 출장안마 popular gambling games 광주광역 출장샵 in
It is truly a well-researched content and excellent wording. I got so engaged in this material that I couldn’t wait to read. Read more info about Qr Code Generate in Laravel Online. I am impressed with your work and skill. Thanks.
ReplyDelete