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 Styczeń, 2017

Symfony Finland: Sharing state in a Symfony hybrid with Twig, React and other JavaScript apps

Symfony Finland: Sharing state in a Symfony hybrid with Twig, React and other JavaScript apps

The Symfony Finland site has posted a new tutorial showing you how you can share state in a Symfony application between Twig, React and other Javascript-based applications.

Front end development has certainly grown up in the last few years. UI logic is increasingly being moved to the client side, but the traditional server-rendered views aren’t going anywhere soon. And they shouldn’t.

The two methods will live alongside each other and you’ll have to work with two worlds. Let’s explore an idea how to make this pleasant to work with, by sharing state between Twig templates and JavaScript.

The post starts with some background on a case where this kind of sharing was a requirement and, while the initial version was scrapped, a prototype application was born. He details what this prototype showcases (which JS libraries) and links to the Javascript involved over on GitHub. They then get into the code examples showing the creation of an AppState object that handles the serializing of the state information and store the result in the database via a Doctrine connection. This value is then output to the pages that require it, making it available to the frontend application (Vue.js, React or plain Javascript).

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

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

Symfony Finland: Sharing state in a Symfony hybrid with Twig, React and other JavaScript apps

Symfony Finland: Sharing state in a Symfony hybrid with Twig, React and other JavaScript apps

The Symfony Finland site has posted a new tutorial showing you how you can share state in a Symfony application between Twig, React and other Javascript-based applications.

Front end development has certainly grown up in the last few years. UI logic is increasingly being moved to the client side, but the traditional server-rendered views aren’t going anywhere soon. And they shouldn’t.

The two methods will live alongside each other and you’ll have to work with two worlds. Let’s explore an idea how to make this pleasant to work with, by sharing state between Twig templates and JavaScript.

The post starts with some background on a case where this kind of sharing was a requirement and, while the initial version was scrapped, a prototype application was born. He details what this prototype showcases (which JS libraries) and links to the Javascript involved over on GitHub. They then get into the code examples showing the creation of an AppState object that handles the serializing of the state information and store the result in the database via a Doctrine connection. This value is then output to the pages that require it, making it available to the frontend application (Vue.js, React or plain Javascript).

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

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

SitePoint PHP Blog: Calendar as a Service in PHP? Easy, with Google Calendar API!

SitePoint PHP Blog: Calendar as a Service in PHP? Easy, with Google Calendar API!

On the SitePoint PHP blog there’s a new tutorial posted by Wern Ancheta showing you how to offer "calendar as a service" in your application with the help of the Google Calendar API. The Calendar API provides access to all of the features you’d expect from the Google Calendar system and the tutorial helps you make a fully functional overlay integrated with it and living in your application.

In this article, you’ll learn how to work with the Google Calendar API in PHP. You’ll do it by building a calendar app that allows users to add new calendars, add events, and sync calendars to Google Calendar.

The tutorial then walks you through every step of the process you’ll need to get your application hooked into the API and the code to use for the integration:

  • Setting up a Google Console Project
  • Building the App
  • Configuring the App
  • Creating a Service Container for the Google Client
  • (Adding) Routes
  • Admin Route Middleware
  • Database setup
  • Home Pages creation
  • Admin Pages creation
  • Creating a Calendar
  • Creating an Event
  • Syncing a Calendar
  • Listing Events
  • Logging Out

The application they create is Laravel based and makes use of a bit of Javascript in the views for the date selector and handlebars templating.

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

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

SitePoint PHP Blog: Calendar as a Service in PHP? Easy, with Google Calendar API!

SitePoint PHP Blog: Calendar as a Service in PHP? Easy, with Google Calendar API!

On the SitePoint PHP blog there’s a new tutorial posted by Wern Ancheta showing you how to offer "calendar as a service" in your application with the help of the Google Calendar API. The Calendar API provides access to all of the features you’d expect from the Google Calendar system and the tutorial helps you make a fully functional overlay integrated with it and living in your application.

In this article, you’ll learn how to work with the Google Calendar API in PHP. You’ll do it by building a calendar app that allows users to add new calendars, add events, and sync calendars to Google Calendar.

The tutorial then walks you through every step of the process you’ll need to get your application hooked into the API and the code to use for the integration:

  • Setting up a Google Console Project
  • Building the App
  • Configuring the App
  • Creating a Service Container for the Google Client
  • (Adding) Routes
  • Admin Route Middleware
  • Database setup
  • Home Pages creation
  • Admin Pages creation
  • Creating a Calendar
  • Creating an Event
  • Syncing a Calendar
  • Listing Events
  • Logging Out

The application they create is Laravel based and makes use of a bit of Javascript in the views for the date selector and handlebars templating.

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

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

SitePoint PHP Blog: Calendar as a Service in PHP? Easy, with Google Calendar API!

SitePoint PHP Blog: Calendar as a Service in PHP? Easy, with Google Calendar API!

On the SitePoint PHP blog there’s a new tutorial posted by Wern Ancheta showing you how to offer "calendar as a service" in your application with the help of the Google Calendar API. The Calendar API provides access to all of the features you’d expect from the Google Calendar system and the tutorial helps you make a fully functional overlay integrated with it and living in your application.

In this article, you’ll learn how to work with the Google Calendar API in PHP. You’ll do it by building a calendar app that allows users to add new calendars, add events, and sync calendars to Google Calendar.

The tutorial then walks you through every step of the process you’ll need to get your application hooked into the API and the code to use for the integration:

  • Setting up a Google Console Project
  • Building the App
  • Configuring the App
  • Creating a Service Container for the Google Client
  • (Adding) Routes
  • Admin Route Middleware
  • Database setup
  • Home Pages creation
  • Admin Pages creation
  • Creating a Calendar
  • Creating an Event
  • Syncing a Calendar
  • Listing Events
  • Logging Out

The application they create is Laravel based and makes use of a bit of Javascript in the views for the date selector and handlebars templating.

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

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

TutsPlus.com: Using Illuminate Database With Eloquent in Your PHP App Without Laravel

TutsPlus.com: Using Illuminate Database With Eloquent in Your PHP App Without Laravel

The TutsPlus.com site has posted a new tutorial showing you how you can use the Eloquent ORM from Laravel without having to use Laravel itself. There’s already functionality built into the popular database interface that makes it possible, it’s just a matter of turning it on.

Illuminate is Laravel’s database engine minus Laravel. It comes bundled with the Eloquent ORM in Laravel. If you would like to build your PHP apps with ORMs and prefer not to use Laravel, this tutorial is for you.

In this tutorial, we are going to build the back end for a Q&A App with PHP, Illuminate Database, and the Eloquent ORM.

They start the post with a list of requirements and a brief outline of what functionality the end result will include. With that defined the tutorial starts in on the directory structure of the application and the Composer configuration to pull in Eloquent and its requirements. Next up is the code to define the connection credentials and (raw) SQL to create the tables in the database. The database "capsule" is created and the code is shared to create simple controllers and matching models for users, questions, answers and upvotes. They show how to use relationships to get the linked objects between tables and how to perform update and delete operations.

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

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

Site News: Blast from the Past – One Year Ago in PHP (01.26.2017)

Site News: Blast from the Past – One Year Ago in PHP (01.26.2017)

Here’s what was popular in the PHP community one year ago today:

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

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

NetTuts.com: Building Your Startup: Automatic Time-Zone Detection

NetTuts.com: Building Your Startup: Automatic Time-Zone Detection

The TutsPlus.com site continues their "Building Your Startup" series of tutorials with the latest in the series covering automatic timezone detection based on the user’s local time.

For the alpha release of Meeting Planner, I provided people the opportunity to change their time zone in user settings. However, for anyone outside of the western United States, they may have been wondering why their calendar appointments were at the wrong times. You have to know to look for the settings page.

As I approach the beta, I realized I needed to fix this as soon as possible. So I began to reflect on how best to resolve this. In today’s episode, I’m going to walk you through my approach to automatic time-zone detection and how I integrated it into the user experience.

The tutorial starts off with a look at the current state of timezone detection, linking to two options that do mostly the same thing. Eventually, however, he decided on the jsTimezoneDetect library as it fit best with the needs of the application. He covers some of the thoughts that went into designing the user experience and the code required to integrate the Javascript library with his Yii2-based application. He ends the tutorial with a few additional considerations worth keeping in mind including timezone representation in ical exports and virtual meetings.

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

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

Voices of the ElePHPant: Interview with Shawn Mayzes

Voices of the ElePHPant: Interview with Shawn Mayzes

The Voices of the ElePHPant podcast, hosted by Cal Evans, has posted their latest in the series of interviews with members of the PHP community. In this latest show Cal interviews Shawn Mayzes.

Cal and Sean talk about how Sean got into programming, starting from some original tinkering around to his education through to his work as a professional developer. They also talk about Sean being hard of hearing and how it has had an effect on his career. There’s also a mention of the project Sean is a part of, the Larachat.co community. They finish up talking about Sean’s participation in the Canadian Deaf Ice Hockey Federation as a player.

You can listen to this latest interview either using the in-page audio or video player, by downloading the mp3 or watching it directly on YouTube. If you enjoy the show, be sure to subscribe to their feed and follow them on Twitter to get the latest updates as new shows are released.

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

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

Voices of the ElePHPant: Interview with Shawn Mayzes

Voices of the ElePHPant: Interview with Shawn Mayzes

The Voices of the ElePHPant podcast, hosted by Cal Evans, has posted their latest in the series of interviews with members of the PHP community. In this latest show Cal interviews Shawn Mayzes.

Cal and Sean talk about how Sean got into programming, starting from some original tinkering around to his education through to his work as a professional developer. They also talk about Sean being hard of hearing and how it has had an effect on his career. There’s also a mention of the project Sean is a part of, the Larachat.co community. They finish up talking about Sean’s participation in the Canadian Deaf Ice Hockey Federation as a player.

You can listen to this latest interview either using the in-page audio or video player, by downloading the mp3 or watching it directly on YouTube. If you enjoy the show, be sure to subscribe to their feed and follow them on Twitter to get the latest updates as new shows are released.

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

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