Jeśli jesteś właścicielem tej strony, możesz wyłączyć reklamę poniżej zmieniając pakiet na PRO lub VIP w panelu naszego hostingu już od 4zł!

Archive for the ‘WEB and PHP Development’ Category

Community News: Latest PECL Releases (12.12.2017)

Community News: Latest PECL Releases (12.12.2017)

Latest PECL Releases:

  • stackdriver_debugger 0.0.2
    Fix windows build configuration

  • opencensus 0.1.0RC2
    RC1 for alpha release.
    - Refactored internal data structures to match OpenCensus models
    - Supports creating detached spans.
    - Add support for annotations, message events, and links.

  • stackdriver_debugger 0.0.1
    First dev release
  • opencensus 0.1.0RC1
    RC1 for alpha release.
    - Refactored internal data structures to match OpenCensus models
    - Supports creating detached spans.
    - Add support for annotations, message events, and links.

  • redis 3.1.5RC2
    phpredis 3.1.5RC2

    This is interim release which contains only bug fixes.

    • Fix segfault when extending Redis class in PHP 5 [d23eff] (Pavlo Yatsukhnenko)
    • Fix RedisCluster constructor with PHP 7 strict scalar type [5c21d7] (Pavlo Yatsukhnenko)
    • Allow to use empty string as persistant_id [344de5] (Pavlo Yatsukhnenko)
    • Fix cluster_init_seeds. [db1347] (@adlagares)
    • Fix z_seeds may be a reference [42581a] (@janic716)
  • protobuf 3.5.0.1
    GA release.

Source: http://www.phpdeveloper.org/news/25800

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Matthieu Napoli: Organizing code into domain modules

Matthieu Napoli: Organizing code into domain modules

In a post to his site Matthieu Napoli shares some recommendations about how to organize the code in your application using a "domain modules" approach. This is an organization method that relates the code based on functionality it relates to rather than the type of object it is.

We recently discussed 2 topics seemingly unrelated with my colleagues at Wizaplace: how to organize code [and] how to organize teams.

Regarding “how to organize teams”, we were discussing Spotify’s Feature teams. In a “classic” organization, teams are usually formed by grouping people based on their job title. [...] But in a “feature team” organization, teams are organized… by features. [...] The pros of this kind of organization are numerous and I do not intend to go over them here. But what does this have to do with code organization?

He starts with the "classic" code structure – organized by each item’s type (ex: Entity, Service, etc). He then suggests reorganizing it move by what it does in the application, namely which module it belongs in best. He briefly touches on dependencies, "agile design" and the differences between a normal "product" and a "product" in e-commerce. He then applies these ideas and shares a domain organized directory structure, trying to reduce the overall complexity of the structure and the overall cohesion of the codebase.

Source: http://www.phpdeveloper.org/news/25799

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Matthieu Napoli: Organizing code into domain modules

Matthieu Napoli: Organizing code into domain modules

In a post to his site Matthieu Napoli shares some recommendations about how to organize the code in your application using a "domain modules" approach. This is an organization method that relates the code based on functionality it relates to rather than the type of object it is.

We recently discussed 2 topics seemingly unrelated with my colleagues at Wizaplace: how to organize code [and] how to organize teams.

Regarding “how to organize teams”, we were discussing Spotify’s Feature teams. In a “classic” organization, teams are usually formed by grouping people based on their job title. [...] But in a “feature team” organization, teams are organized… by features. [...] The pros of this kind of organization are numerous and I do not intend to go over them here. But what does this have to do with code organization?

He starts with the "classic" code structure – organized by each item’s type (ex: Entity, Service, etc). He then suggests reorganizing it move by what it does in the application, namely which module it belongs in best. He briefly touches on dependencies, "agile design" and the differences between a normal "product" and a "product" in e-commerce. He then applies these ideas and shares a domain organized directory structure, trying to reduce the overall complexity of the structure and the overall cohesion of the codebase.

Source: http://www.phpdeveloper.org/news/25799

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Laravel News: Creating Your Own PHP Helpers in a Laravel Project

Laravel News: Creating Your Own PHP Helpers in a Laravel Project

The Laravel News site has a quick post sharing a helpful topic for the Laravel users out there. In the tutorial they show how to create custom helpers for use across the entire application in any scope.

Laravel provides many excellent helper functions that are convenient for doing things like working with arrays, file paths, strings, and routes, among other things like the beloved dd() function.

You can also define your own set of helper functions for your Laravel applications and PHP packages, by using Composer to import them automatically.

If you are new to Laravel or PHP, let’s walk through how you might go about creating your own helper functions that automatically get loaded by Laravel.

The tutorial starts off by recommending the placement of the custom helper file and how to ensure it’s autoloaded when the application is bootstrapped. It then covers the creation of the helper functions including the use of if checks to ensure there’s not a function naming collision. Finally the post includes an example of a helper file, sharing the creation of two methods: show_route and plural_from_model. The post ends with a look at packages and how to include helper files inside of them for use in your application.

Source: http://www.phpdeveloper.org/news/25798

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Laravel News: Creating Your Own PHP Helpers in a Laravel Project

Laravel News: Creating Your Own PHP Helpers in a Laravel Project

The Laravel News site has a quick post sharing a helpful topic for the Laravel users out there. In the tutorial they show how to create custom helpers for use across the entire application in any scope.

Laravel provides many excellent helper functions that are convenient for doing things like working with arrays, file paths, strings, and routes, among other things like the beloved dd() function.

You can also define your own set of helper functions for your Laravel applications and PHP packages, by using Composer to import them automatically.

If you are new to Laravel or PHP, let’s walk through how you might go about creating your own helper functions that automatically get loaded by Laravel.

The tutorial starts off by recommending the placement of the custom helper file and how to ensure it’s autoloaded when the application is bootstrapped. It then covers the creation of the helper functions including the use of if checks to ensure there’s not a function naming collision. Finally the post includes an example of a helper file, sharing the creation of two methods: show_route and plural_from_model. The post ends with a look at packages and how to include helper files inside of them for use in your application.

Source: http://www.phpdeveloper.org/news/25798

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Gonzalo Ayuso: Authenticate OpenUI5 applications and Lumen backends with Amazon Cognito and JWT

Gonzalo Ayuso: Authenticate OpenUI5 applications and Lumen backends with Amazon Cognito and JWT

On his site today Gonzalo Ayuso has a tutorial posted showing how to create authentication in OpenUI5 applications with the help of Lumen, Amazon Cognito and JWTs.

Today I want to create an UI5/OpenUI5 boilerplate that plays with Lumen backends. Simple, isn’t it? We only need to create a Lumen API server and connect our OpenUI5 application with this API server. But today I also want to create a Login also. The typical user/password input form. I don’t want to build it from scratch (a user database, oauth provider or something like that). Since this days I’m involved with Amazon AWS projects I want to try Amazon Cognito.

He then walks through the Cognito service and what it has to offer including user management and authentication handling. He starts with the OpenUI5 side, creating the basic application and login handling via the Congnito Javascript SDK. He then modifies this with some basic user handling and creates the view for the login form. He also includes functionality for password resets and the code required to inject the JWT into every request post-authentication.

Source: http://www.phpdeveloper.org/news/25797

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Gonzalo Ayuso: Authenticate OpenUI5 applications and Lumen backends with Amazon Cognito and JWT

Gonzalo Ayuso: Authenticate OpenUI5 applications and Lumen backends with Amazon Cognito and JWT

On his site today Gonzalo Ayuso has a tutorial posted showing how to create authentication in OpenUI5 applications with the help of Lumen, Amazon Cognito and JWTs.

Today I want to create an UI5/OpenUI5 boilerplate that plays with Lumen backends. Simple, isn’t it? We only need to create a Lumen API server and connect our OpenUI5 application with this API server. But today I also want to create a Login also. The typical user/password input form. I don’t want to build it from scratch (a user database, oauth provider or something like that). Since this days I’m involved with Amazon AWS projects I want to try Amazon Cognito.

He then walks through the Cognito service and what it has to offer including user management and authentication handling. He starts with the OpenUI5 side, creating the basic application and login handling via the Congnito Javascript SDK. He then modifies this with some basic user handling and creates the view for the login form. He also includes functionality for password resets and the code required to inject the JWT into every request post-authentication.

Source: http://www.phpdeveloper.org/news/25797

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Gonzalo Ayuso: Authenticate OpenUI5 applications and Lumen backends with Amazon Cognito and JWT

Gonzalo Ayuso: Authenticate OpenUI5 applications and Lumen backends with Amazon Cognito and JWT

On his site today Gonzalo Ayuso has a tutorial posted showing how to create authentication in OpenUI5 applications with the help of Lumen, Amazon Cognito and JWTs.

Today I want to create an UI5/OpenUI5 boilerplate that plays with Lumen backends. Simple, isn’t it? We only need to create a Lumen API server and connect our OpenUI5 application with this API server. But today I also want to create a Login also. The typical user/password input form. I don’t want to build it from scratch (a user database, oauth provider or something like that). Since this days I’m involved with Amazon AWS projects I want to try Amazon Cognito.

He then walks through the Cognito service and what it has to offer including user management and authentication handling. He starts with the OpenUI5 side, creating the basic application and login handling via the Congnito Javascript SDK. He then modifies this with some basic user handling and creates the view for the login form. He also includes functionality for password resets and the code required to inject the JWT into every request post-authentication.

Source: http://www.phpdeveloper.org/news/25797

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Dhurim Kelmendi: SOLID Principles made easy

Dhurim Kelmendi: SOLID Principles made easy

In a post on the Dev.to site Dhurim Kelmendi shares an introduction to the SOLID principles of software development, a set of guidelines that can help to make your software more robust, flexible and testable in the long run.

This article aims to give a solid explanation of SOLID Principles and give some insight on their benefits and potential issues when applying them. Let’s go through each of them briefly.

He then goes through each of the principles and describes the basics behind them:

  • Single Responsibility Principle
  • Open-Closed Principle
  • Liskov Substitution Principle
  • Interface Segregation Principle
  • Dependency Inversion Principle

The post isn’t language specific so you won’t find any code examples but it is a great introduction to the principles for those that are just starting out.

Source: http://www.phpdeveloper.org/news/25796

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>

Joey Masip Romeu: Namespaces and organizing business logic services in Symfony

Joey Masip Romeu: Namespaces and organizing business logic services in Symfony

In a post on his Medium site Joey Masip Romeu shares some suggestions about how you can organize your business logic in a Symfony application with some simple namespacing and service definitions.

I want to talk about namespacing services in Symfony, specifically Symfony3.

These are exciting times, Symfony 4 is just round the corner?— -coming out on November 30th? – ?so this blog post might be irrelevant soon! Nevertheless, concepts are still the same so let´s get into it!

He offers three "rules" that he and his team at SlowCode have defined to help with their own organization:

  • using a folder for logic services
  • using a folder for the domain name
  • using . for folder separation and _ for word separation

Code and configuration examples are provided for each suggestion helping to illustrate the point. He ends the post mentioning public and private services and how they’re changing in upcoming Symfony releases.

Source: http://www.phpdeveloper.org/news/25795

<!–
var d = new Date();
r = escape(d.getTime()*Math.random());
document.writeln('’);
//–>