News Feed
Sections




News Archive
feed this:

Looking for more information on how to do PHP the right way? Check out PHP: The Right Way

SitePoint PHP Blog:
Bower vs BowerPHP
November 04, 2014 @ 09:28:44

The SitePoint PHP blog has a new post today from editor Bruno Skvorc comparing two (almost) identical technologies - Bower and BowerPHP. The main different between the two? One is written in Javascript (Node.js) and the other is, surprise, in PHP. The Bower system is a dependency manager, originally for Node.js environments.

On October 28th, 2014, puppies all over the world spontaneously burst into flames - or so the community would have you believe. What happened was the reveal of BowerPHP (I shy from calling anything "alpha" a release), and here's why it wasn't anything nearly as apocalyptic as some would have you believe. BowerPHP is a PHP version of Bower, the NodeJS based front end package manager. We covered Bower before somewhat, but in essence, you use it to install front end libraries like jQuery, Angular or Foundation much in the same way you use Composer for PHP dependencies. You define a Bower file with dependencies, run bower install, and watch the magic happen.

He goes on to talk about what kinds of problems having the same tool in PHP solves and how to get it installed in your application (via Composer). He then includes an example of it in use installing a copy of the Foundation JS libraries and the resulting output HTML page. He finishes the post with a few reasons "why it's awesome" including there not being a need for yet another technology (Node) and that it's easy to install.

0 comments voice your opinion now!
bower package manager bowerphp library tutorial introduction

Link: http://www.sitepoint.com/bower-vs-bowerphp/

Laravel News:
Setting up Laravel Elixr with Bootstrap
October 31, 2014 @ 09:27:32

On the Laravel News site today there's a tutorial posted showing you how to set up an application that uses Elixir and Bootstrap for the layout of an application. Elixir is a wrapper for gulp, a build tool for node.js apps.

One exciting feature coming in Laravel 5 is the new Elixir package. At its core it is a wrapper around gulp to make dealing with assets easier. For my first look at this new tool I decided a good use case would be to setup Bootstrap and get everything working just like you would in a real world scenario. If you are not familiar, bootstrap includes three main components. CSS, JavaScript, and custom fonts. So we need to account for all those in our setup.

They walk you through the Elixir installation process (via node) of Gulp and setting up dependencies via Laravel's included "package.json" definition. He then shows how to install bower (another package manager) and use that to install the Bootstrap files (SASS version). Finally they show how to bootstrap these into your application's workflow - the SASS imported from bower, the fonts/javascript pulled in by gulp and finally the Elixir setup to merge them all together.

0 comments voice your opinion now!
laravel elixir bootstrap bower gulp install configure tutorial

Link: http://laravel-news.com/2014/10/setting-laravel-elixr-bootstrap/

Konrad Podgórski:
A better way to work with assets in Symfony 2
June 25, 2014 @ 13:02:11

Konrad Podgórski has a recent post to his site with his suggestion of a better way to deal with assets in Symfony 2-based applications with the help of some other tools, namely NodeJS, Bower and GruntJS.

I will explain how to work with assets in Symfony framework without having to use Assetic Bundle at all. [...] The process will be really fast and easy to understand even if you never used software listed here. However if you experience any problems do not hesitate to ask for help in comments. Post is quite long because it contain a lot of different configs but don't run away just yet. They are ready to copy & paste.

The setup will download the needed dependencies, merge and minify JS/CSS files, copy font files to the right place and deploy it all to an S3 bucket. He first walks you through the installation of the three tools complete with the commands and configurations to get them all integrated. With those installed and working, he then gets into three "scenarios", the steps in the process to build and deploy the completed version:

  • Download latest jQuery, Bootstrap, Font Awesome with Bower and copy the only necessary files to web/assets/*
  • Download dependencies with Bower, copy necessary files to web/assets/*. Then minify javascript and stylesheet files.
  • Download dependencies with Bower, merge them with your custom css and js files, then minify.

Finally, he includes the steps you'll need to follow to get the whole thing deployed out to S3 (or a CDN). In the next part of the series he'll continue the process and look at things like LESS/SASS, watching for changes in assets and how to use RequireJs.

0 comments voice your opinion now!
assets symfony2 grunt bower nodejs tutorial install configure deploy

Link: http://konradpodgorski.com/blog/2014/06/23/better-way-to-work-with-assets-in-symfony-2/

Inviqa techPortal:
Manage Project Dependencies with Bower and Composer
January 30, 2014 @ 12:20:40

On the Inviqa techPortal there's a new tutorial showing you how to manage your dependencies with the help of both Composer and Bower (a Javascript package manager).

As developers, most of us rely on third-party libraries as part of our web applications. PHP developers manage their dependencies with Composer, but how can you manage your client-side dependencies? Most projects start with one core JavaScript library (e.g. jQuery) and one or two plugins, but over time the application grows, and the list of JavaScript libraries grows as well. In this situation, Bower can help you, and in this article you will see how to integrate it into your own project.

You'll need Node installed to use Bower, but the installation process is simple - just one call to load it via npm. They help you get the configuration set up and how to specify its dependencies. Anyone familiar with how Composer works should feel right at home using a similar JSON structure. With that in place, you can move on to the next step, integrating it with Composer. In the Composer configuration, there's a setting for "scripts" that can be run before the install command is executed and some after the install is complete. This is where they call "bower install" to have it install the needed Javascript-based dependencies.

0 comments voice your opinion now!
project dependencies bower composer integrate introduction

Link: http://techportal.inviqa.com/2014/01/29/manage-project-dependencies-with-bower-and-composer/

BitExpert.de Blog:
Composer, Bower and HTTP Basic Auth
December 27, 2013 @ 11:16:23

Stephan Hochdörfer has shared a handy tip for the Composers users out there that may have to deal with username/password protected repositories as a part of your package install process. In his post he shows how to use a simple "expect" script to automatic the HTTP Basic Auth login.

A couple of months ago when we set-up our own internal Satis repository to host our custom Composer packages. We ran into an "unpleasant" issue with Composer that had this PR as an result. To sum things up: We are using HTTP Basic Auth to password-project our Satis repository. There was no way we could switch to an SSL client certificate to allow Composer to authenticate itself automatically without asking for a password. Asking for the password on a developer`s machine is no big thing, but it since we need an automated Composer run in our Jenkins environment, there was no way to set things up.

As Composer doesn't currently support this functionality, they had to find a way around it. They went with an expect script that is used to work with the prompts and send the username/password information when expected. He also points out that this could be useful for other situations and tools - like a Bower build.

0 comments voice your opinion now!
composer satis username password http basic authorization bower expect

Link: http://blog.bitexpert.de/blog/composer-bower-and-http-basic-auth/


Community Events





Don't see your event here?
Let us know!


list security community composer opinion voicesoftheelephpant series interview release library artisanfiles language introduction tool podcast laravel framework symfony version conference

All content copyright, 2014 PHPDeveloper.org :: info@phpdeveloper.org - Powered by the Solar PHP Framework