Clean Architecture - How to pass request data towards inner, domain level Use...
Use Case Interactor:We can see it in this picture how does a request cross the layers until it reaches the Use Case Interactor. How does the controller pass the request towards the Use Case Interactor?...
View ArticleHow do you force developers to define dependencies/arguments if it's bad to...
I just started reading more about OOP and its design patterns and is confused with this conceptual question. I am too new that I am having second thought that the proper title should be, "when is it...
View ArticleWhat does comma signify in a function definition? [closed]
From PHP manual:array array_change_key_case ( array $array [, int $case = CASE_LOWER ] )What does comma signify in a function definition?
View ArticleWhen should I start learning a PHP Framework [closed]
I'm a beginner programmerI have been learning PHP for a while, though not consistently. But for the past few months (say 3 months) I have been a bit consistent in my learning, largely because of a...
View ArticleWhy PHP doesn't support function overloading?
I am wondering if one of the key features of a programming language is to have the ability to overload functions via arguments. I think it is essential in-context of the Object oriented programming.Is...
View ArticleBuilding a web app with encrypted MySQL database entries?
I have some experience in building PHP based websites with MySQL access, storing encrypted user details, but all other fields being plain text. My most recent project will require sensitive data to be...
View ArticleIs there a canonical definition of SPA or is SPA a broadly agreed-on...
Is there a canonical definition of SPA which would exclude the software architecture model described below?I'm working on an app with a new web-architecture model (new to me, at any rate) which has...
View ArticleHow to namespace global function overrides?
In PHP, trim() exists.By default the second parameter is " \n\r\t\v\x00"I wish to introduce my own version which doesn't deviate far from the core functionality:// Trim whitespace in addition to what...
View ArticleBest way to assure uniqueness in filename with php
I was wondering, without using any kind of user info (id, nickname, age, etc), what would be the best way to assure filename uniqueness using php in a large database with high traffic and most probably...
View ArticleHow to generate URLs for a custom URL shortener?
Due to some issues with other shorteners, I want to create my own URL shortener.I am looking to have a single table that will contain the following columns :-links_id - autoincrement idurl - the actual...
View ArticleBest Practices for Implementing a Heartbeat Feature in a Laravel App to Track...
I'm trying to implement a heartbeat feature for offline tracking that just sends an offline message to the server once the web browser app (Laravel-based) is offline. Ideally it will ping the app's URL...
View ArticleHow should User behaviour depending on role be design as OOP
Imagine I got user which might be either author, administrator, reviewerAn author have relation on book that he wrote.An administrator have relation on banned user (we track which administrator have...
View ArticleHandling recurring cURL POST request
I've basically came here for some advise based on my criteria, The application I'm trying to build is built completely from an API. It's like a "marketplace bidding" application, what I'm trying to...
View ArticleExceptions in DDD
I'm learning DDD and I'm thinking about throwing exceptions in certain situations. I understand that an object can not enter to a bad state so here the exceptions are fine, but in many examples...
View ArticleBest practice for integrating UI and dynamic user-specific content using a...
I am building a website that uses a recommendation system. Users submit a form which is sent to the backend for the recommendation logic calculation; the recommendation response is sent back to the...
View ArticleIntuitive dependency management with code includes?
I am building a PHP CMS system that parses template files and replaces tags with content. Sometimes this content is a HTML, CSS or JS snippet, but it can also be a code include.Most code includes use...
View ArticleHow do i create a logic for dynamic product list page like below using php...
The big image is catalog or ad blocks that comes from catalog table. And small images are the actual products block that comes from product table.There may be more products and more catalog. attached...
View ArticleIs widening parameter types in a PHP interface implementation a good practice?
I have an interface defined as follows:interface MyInterface{ public function setMyMethod(int $a); public function getMyMethod(): int;}And I have a class that widens the parameter type:class MyClass...
View ArticlePHP file_put_contents File Locking
The Senario:You have a file with a string (average sentence worth) on each line. For arguments sake lets say this file is 1Mb in size (thousands of lines).You have a script that reads the file, changes...
View ArticleShould migrations modify data?
Imagine you have a table that has 5 columns, and you need to split this into two tables, because in your iterative process, your application has increased in complexity.Should migrations change the...
View Article